NetSim Source Code Help
Loading...
Searching...
No Matches
Minstrel_ht.c File Reference
#include "Minstrel_ht.h"
Include dependency graph for Minstrel_ht.c:

Go to the source code of this file.

Macros

#define HT_GROUP_RATES   8
 
#define VHT_GROUP_RATES   10
 
#define HT_BANDWIDTHS   2
 
#define VHT_BANDWIDTHS   4
 
#define HT_NSS   4
 
#define VHT_NSS   8
 
#define HT_GROUPS   16
 
#define VHT_GROUPS   64
 
#define GetRateId(index, isVht)   (isVht ? (index%VHT_GROUP_RATES):(index%HT_GROUP_RATES))
 
#define GetGroupId(index, isVht)   (isVht ? (index/VHT_GROUP_RATES):(index/HT_GROUP_RATES))
 
#define GetIndex(grpId, rateId, isVht)   (isVht ? (grpId*VHT_GROUP_RATES + rateId):(grpId*HT_GROUP_RATES + rateId))
 
#define IsEqual(b1, g1, s1, b2, g2, s2)   ((b1 == b2 && g1 == g2 && s1 ==s2) ? true:false)
 
#define SEED_r   &NETWORK->ppstruDeviceList[0]->ulSeed[0],&NETWORK->ppstruDeviceList[0]->ulSeed[1]
 
#define rand01()   (fn_NetSim_Utilities_GenerateRandomNo(SEED_r)/NETSIM_RAND_MAX)
 
#define tSlot(phy)   (phy->plmeCharacteristics.aSlotTime)
 
#define ackTime(phy)   (phy->plmeCharacteristics.aSIFSTime + get_preamble_time(phy) + (getAckSize(phy) * 8)/phy->dControlFrameDataRate)
 
#define firstTransmissionTime(phy, byte, rate)   (phy->plmeCharacteristics.aSIFSTime + get_preamble_time(phy)+ byte*8/rate)
 
#define transmissionTime(phy, byte, rate)   (byte*8/rate)
 

Functions

static Ptr_MinstrelHtPerRemoteStation getMinstrelInfo (NETSIM_ID dev, NETSIM_ID ifid, NETSIM_ID recv)
 
void Ht_InitMinstrel (NETSIM_ID nDevId, NETSIM_ID nifid)
 
static void CheckInit (Ptr_MinstrelHtPerRemoteStation station, NETSIM_ID devid, NETSIM_ID ifid)
 
static void InitSampleTable (Ptr_MinstrelHtPerRemoteStation station)
 
static void InitGroupTable (Ptr_MinstrelHtPerRemoteStation station)
 
void DoReportAmpduStatus (NETSIM_ID devid, NETSIM_ID ifid, NETSIM_ID recvid, UINT success, UINT failed)
 
static void UpdatePacketCounter (Ptr_MinstrelHtPerRemoteStation station, UINT success, UINT failed)
 
static void UpdateRetry (Ptr_MinstrelHtPerRemoteStation station)
 
static void UpdateStats (Ptr_MinstrelHtPerRemoteStation station)
 
static void UpdateRate (Ptr_MinstrelHtPerRemoteStation station)
 
static UINT FindRate (Ptr_MinstrelHtPerRemoteStation station)
 
static void SetStationThRate (Ptr_MinstrelHtPerRemoteStation station)
 
static void SetStationProbRate (Ptr_MinstrelHtPerRemoteStation station)
 
static UINT GetNextSample (Ptr_MinstrelHtPerRemoteStation station)
 
static void SetNextSample (Ptr_MinstrelHtPerRemoteStation station)
 
static double CalculateEwmsd (double oldEwmsd, double currentProb, double ewmaProb, double ewmaWeight)
 
static double CalculateThroughput (Ptr_MinstrelHtPerRemoteStation station, UINT grpId, UINT rateId)
 
static void CalculateRetransmits (Ptr_MinstrelHtPerRemoteStation station, UINT index)
 
BOOL Ht_DoNeedDataRetransmission (NETSIM_ID devid, NETSIM_ID ifid, NETSIM_ID recvid)
 
static UINT CountRetries (Ptr_MinstrelHtPerRemoteStation station)
 
static UINT GetLowestIndex (Ptr_MinstrelHtPerRemoteStation station)
 
static UINT GetHighestIndex (Ptr_MinstrelHtPerRemoteStation station)
 
struct stru_802_11_Phy_Parameters_HT getTxRate (NETSIM_ID devid, NETSIM_ID ifid, NETSIM_ID recvid)
 
void HT_Minstrel_Free (NETSIM_ID nDevId, NETSIM_ID nifid)
 

Macro Definition Documentation

◆ ackTime

#define ackTime (   phy)    (phy->plmeCharacteristics.aSIFSTime + get_preamble_time(phy) + (getAckSize(phy) * 8)/phy->dControlFrameDataRate)

Definition at line 29 of file Minstrel_ht.c.

◆ firstTransmissionTime

#define firstTransmissionTime (   phy,
  byte,
  rate 
)    (phy->plmeCharacteristics.aSIFSTime + get_preamble_time(phy)+ byte*8/rate)

Definition at line 30 of file Minstrel_ht.c.

◆ GetGroupId

#define GetGroupId (   index,
  isVht 
)    (isVht ? (index/VHT_GROUP_RATES):(index/HT_GROUP_RATES))

Definition at line 22 of file Minstrel_ht.c.

◆ GetIndex

#define GetIndex (   grpId,
  rateId,
  isVht 
)    (isVht ? (grpId*VHT_GROUP_RATES + rateId):(grpId*HT_GROUP_RATES + rateId))

Definition at line 23 of file Minstrel_ht.c.

◆ GetRateId

#define GetRateId (   index,
  isVht 
)    (isVht ? (index%VHT_GROUP_RATES):(index%HT_GROUP_RATES))

Definition at line 21 of file Minstrel_ht.c.

◆ HT_BANDWIDTHS

#define HT_BANDWIDTHS   2

Definition at line 14 of file Minstrel_ht.c.

◆ HT_GROUP_RATES

#define HT_GROUP_RATES   8

Definition at line 12 of file Minstrel_ht.c.

◆ HT_GROUPS

#define HT_GROUPS   16

Definition at line 18 of file Minstrel_ht.c.

◆ HT_NSS

#define HT_NSS   4

Definition at line 16 of file Minstrel_ht.c.

◆ IsEqual

#define IsEqual (   b1,
  g1,
  s1,
  b2,
  g2,
  s2 
)    ((b1 == b2 && g1 == g2 && s1 ==s2) ? true:false)

Definition at line 24 of file Minstrel_ht.c.

◆ rand01

Definition at line 27 of file Minstrel_ht.c.

◆ SEED_r

#define SEED_r   &NETWORK->ppstruDeviceList[0]->ulSeed[0],&NETWORK->ppstruDeviceList[0]->ulSeed[1]

Definition at line 26 of file Minstrel_ht.c.

◆ transmissionTime

#define transmissionTime (   phy,
  byte,
  rate 
)    (byte*8/rate)

Definition at line 31 of file Minstrel_ht.c.

◆ tSlot

#define tSlot (   phy)    (phy->plmeCharacteristics.aSlotTime)

Definition at line 28 of file Minstrel_ht.c.

◆ VHT_BANDWIDTHS

#define VHT_BANDWIDTHS   4

Definition at line 15 of file Minstrel_ht.c.

◆ VHT_GROUP_RATES

#define VHT_GROUP_RATES   10

Definition at line 13 of file Minstrel_ht.c.

◆ VHT_GROUPS

#define VHT_GROUPS   64

Definition at line 19 of file Minstrel_ht.c.

◆ VHT_NSS

#define VHT_NSS   8

Definition at line 17 of file Minstrel_ht.c.

Function Documentation

◆ CalculateEwmsd()

static double CalculateEwmsd ( double  oldEwmsd,
double  currentProb,
double  ewmaProb,
double  ewmaWeight 
)
static

Definition at line 639 of file Minstrel_ht.c.

Here is the caller graph for this function:

◆ CalculateRetransmits()

static void CalculateRetransmits ( Ptr_MinstrelHtPerRemoteStation  station,
UINT  index 
)
static

Definition at line 664 of file Minstrel_ht.c.

Here is the caller graph for this function:

◆ CalculateThroughput()

static double CalculateThroughput ( Ptr_MinstrelHtPerRemoteStation  station,
UINT  grpId,
UINT  rateId 
)
static

Definition at line 652 of file Minstrel_ht.c.

Here is the caller graph for this function:

◆ CheckInit()

static void CheckInit ( Ptr_MinstrelHtPerRemoteStation  station,
NETSIM_ID  devid,
NETSIM_ID  ifid 
)
static

Definition at line 63 of file Minstrel_ht.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CountRetries()

static UINT CountRetries ( Ptr_MinstrelHtPerRemoteStation  station)
static

Definition at line 707 of file Minstrel_ht.c.

Here is the caller graph for this function:

◆ DoReportAmpduStatus()

void DoReportAmpduStatus ( NETSIM_ID  devid,
NETSIM_ID  ifid,
NETSIM_ID  recvid,
UINT  success,
UINT  failed 
)

Definition at line 210 of file Minstrel_ht.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindRate()

static UINT FindRate ( Ptr_MinstrelHtPerRemoteStation  station)
static

Definition at line 414 of file Minstrel_ht.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetHighestIndex()

static UINT GetHighestIndex ( Ptr_MinstrelHtPerRemoteStation  station)
static

Definition at line 744 of file Minstrel_ht.c.

Here is the caller graph for this function:

◆ GetLowestIndex()

static UINT GetLowestIndex ( Ptr_MinstrelHtPerRemoteStation  station)
static

Definition at line 724 of file Minstrel_ht.c.

Here is the caller graph for this function:

◆ getMinstrelInfo()

static Ptr_MinstrelHtPerRemoteStation getMinstrelInfo ( NETSIM_ID  dev,
NETSIM_ID  ifid,
NETSIM_ID  recv 
)
static

Definition at line 33 of file Minstrel_ht.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNextSample()

static UINT GetNextSample ( Ptr_MinstrelHtPerRemoteStation  station)
static

Definition at line 614 of file Minstrel_ht.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTxRate()

struct stru_802_11_Phy_Parameters_HT getTxRate ( NETSIM_ID  devid,
NETSIM_ID  ifid,
NETSIM_ID  recvid 
)

Definition at line 762 of file Minstrel_ht.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Ht_DoNeedDataRetransmission()

BOOL Ht_DoNeedDataRetransmission ( NETSIM_ID  devid,
NETSIM_ID  ifid,
NETSIM_ID  recvid 
)

Definition at line 702 of file Minstrel_ht.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Ht_InitMinstrel()

void Ht_InitMinstrel ( NETSIM_ID  nDevId,
NETSIM_ID  nifid 
)

Definition at line 40 of file Minstrel_ht.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HT_Minstrel_Free()

void HT_Minstrel_Free ( NETSIM_ID  nDevId,
NETSIM_ID  nifid 
)

Definition at line 780 of file Minstrel_ht.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitGroupTable()

static void InitGroupTable ( Ptr_MinstrelHtPerRemoteStation  station)
static

Definition at line 133 of file Minstrel_ht.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitSampleTable()

static void InitSampleTable ( Ptr_MinstrelHtPerRemoteStation  station)
static

Definition at line 107 of file Minstrel_ht.c.

Here is the caller graph for this function:

◆ SetNextSample()

static void SetNextSample ( Ptr_MinstrelHtPerRemoteStation  station)
static

Definition at line 625 of file Minstrel_ht.c.

Here is the caller graph for this function:

◆ SetStationProbRate()

static void SetStationProbRate ( Ptr_MinstrelHtPerRemoteStation  station)
static

Definition at line 558 of file Minstrel_ht.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetStationThRate()

static void SetStationThRate ( Ptr_MinstrelHtPerRemoteStation  station)
static

Definition at line 476 of file Minstrel_ht.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdatePacketCounter()

static void UpdatePacketCounter ( Ptr_MinstrelHtPerRemoteStation  station,
UINT  success,
UINT  failed 
)
static

Definition at line 244 of file Minstrel_ht.c.

Here is the caller graph for this function:

◆ UpdateRate()

static void UpdateRate ( Ptr_MinstrelHtPerRemoteStation  station)
static

Retry Chain table is implemented here. Note this Retry Chain is different from Legacy Minstrel.

Try | LOOKAROUND RATE | NORMAL RATE

1 | Random rate | Best throughput 2 | Next best throughput | Next best throughput 3 | Best probability | Best probability

Note: For clarity, multiple blocks of if's and else's are used Following implementation in Linux, in MinstrelHT Lowest baserate is not used. Explanation can be found here: http://marc.info/?l=linux-wireless&m=144602778611966&w=2

Definition at line 346 of file Minstrel_ht.c.

Here is the caller graph for this function:

◆ UpdateRetry()

static void UpdateRetry ( Ptr_MinstrelHtPerRemoteStation  station)
static

Definition at line 264 of file Minstrel_ht.c.

Here is the caller graph for this function:

◆ UpdateStats()

static void UpdateStats ( Ptr_MinstrelHtPerRemoteStation  station)
static

Definition at line 270 of file Minstrel_ht.c.

Here is the call graph for this function:
Here is the caller graph for this function: