11#include "IEEE802_11_Phy.h"
26 UINT adjustedRetryCount;
37 UINT64 totalNumAttempt;
38 UINT64 totalNumSuccess;
40 UINT numSampleSkipped;
46 double nextStatsUpdate;
57 BOOL isDeferredSample;
58 UINT64 numSampleDeferred;
59 UINT64 totalPacketCount;
60 UINT64 samplePacketCount;
65 RateInfo* minstrelTable;
68 PIEEE802_11_PHY_VAR phy;
69}MinstrelPerRemoteStation,*Ptr_MinstrelPerRemoteStation;
71double updateStatsTime;
78 Ptr_MinstrelPerRemoteStation *minstrelInfo;
79}MinstrelWifiStation,*Ptr_MinstrelWifiStation;
81void InitMinstrel(NETSIM_ID nDevId,NETSIM_ID nifid);
82static void CheckInit(Ptr_MinstrelPerRemoteStation station,NETSIM_ID nDevId,NETSIM_ID nifid);
83static void InitSampleTable(Ptr_MinstrelPerRemoteStation station);
84static void InitMinstrelTable(Ptr_MinstrelPerRemoteStation station,
double *rate_arr);
85void DoReportDataOk(NETSIM_ID dev,NETSIM_ID ifid,NETSIM_ID recv);
86void DoReportDataFailed(NETSIM_ID dev,NETSIM_ID ifid,NETSIM_ID recv);
87static void UpdateRate(Ptr_MinstrelPerRemoteStation station);
88static void UpdatePacketCounter(Ptr_MinstrelPerRemoteStation station);
89static void UpdateRetry(Ptr_MinstrelPerRemoteStation station);
90static void UpdateStats(Ptr_MinstrelPerRemoteStation station);
91static UINT FindRate(Ptr_MinstrelPerRemoteStation station);
92static UINT GetNextSample(Ptr_MinstrelPerRemoteStation station);
93void DoReportFinalDataFailed(NETSIM_ID dev,NETSIM_ID ifid,NETSIM_ID recv);
94BOOL DoNeedDataRetransmission(NETSIM_ID dev,NETSIM_ID ifid,NETSIM_ID recv);
95static UINT CountRetry(Ptr_MinstrelPerRemoteStation station);
96void FreeMinstrel(NETSIM_ID nDevId,NETSIM_ID nifid);
97void FreeTables(Ptr_MinstrelPerRemoteStation station);