qcacmn: Include sgi parameter for ratekps calculation
Currently gi value was not considered for ratekbps calculation if sgi is enabled, include gi parameter for ratekbps calculation Change-Id: Idd8b36375493c26f22f2f4f0c7ae922df37e65a1
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "dp_ratetable.h"
|
#include "dp_ratetable.h"
|
||||||
#include "qdf_module.h"
|
#include "qdf_module.h"
|
||||||
|
#include "cdp_txrx_mon_struct.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
MODE_11A = 0, /* 11a Mode */
|
MODE_11A = 0, /* 11a Mode */
|
||||||
@@ -3211,7 +3212,8 @@ enum DP_CMN_MODULATION_TYPE dp_getmodulation(
|
|||||||
* return - rate in kbps
|
* return - rate in kbps
|
||||||
*/
|
*/
|
||||||
uint32_t
|
uint32_t
|
||||||
dp_getrateindex(uint16_t mcs, uint8_t nss, uint8_t preamble, uint8_t bw)
|
dp_getrateindex(uint32_t gi, uint16_t mcs, uint8_t nss, uint8_t preamble,
|
||||||
|
uint8_t bw)
|
||||||
{
|
{
|
||||||
uint32_t ratekbps = 0, res = RT_INVALID_INDEX; /* represents failure */
|
uint32_t ratekbps = 0, res = RT_INVALID_INDEX; /* represents failure */
|
||||||
uint16_t rc;
|
uint16_t rc;
|
||||||
@@ -3251,7 +3253,21 @@ dp_getrateindex(uint16_t mcs, uint8_t nss, uint8_t preamble, uint8_t bw)
|
|||||||
if (res >= DP_RATE_TABLE_SIZE)
|
if (res >= DP_RATE_TABLE_SIZE)
|
||||||
return ratekbps;
|
return ratekbps;
|
||||||
|
|
||||||
ratekbps = dp_11abgnratetable.info[res].userratekbps;
|
if (!gi) {
|
||||||
|
ratekbps = dp_11abgnratetable.info[res].userratekbps;
|
||||||
|
} else {
|
||||||
|
switch (gi) {
|
||||||
|
case CDP_SGI_0_4_US:
|
||||||
|
ratekbps = dp_11abgnratetable.info[res].ratekbpssgi;
|
||||||
|
break;
|
||||||
|
case CDP_SGI_1_6_US:
|
||||||
|
ratekbps = dp_11abgnratetable.info[res].ratekbpsdgi;
|
||||||
|
break;
|
||||||
|
case CDP_SGI_3_2_US:
|
||||||
|
ratekbps = dp_11abgnratetable.info[res].ratekbpsqgi;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ratekbps;
|
return ratekbps;
|
||||||
}
|
}
|
||||||
|
@@ -165,7 +165,8 @@ enum DP_CMN_MODULATION_TYPE dp_getmodulation(
|
|||||||
uint8_t width);
|
uint8_t width);
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
dp_getrateindex(uint16_t mcs, uint8_t nss, uint8_t preamble, uint8_t bw);
|
dp_getrateindex(uint32_t gi, uint16_t mcs, uint8_t nss, uint8_t preamble,
|
||||||
|
uint8_t bw);
|
||||||
|
|
||||||
int dp_rate_idx_to_kbps(uint8_t rate_idx, uint8_t gintval);
|
int dp_rate_idx_to_kbps(uint8_t rate_idx, uint8_t gintval);
|
||||||
|
|
||||||
|
@@ -104,7 +104,8 @@ dp_tx_rate_stats_update(struct dp_peer *peer,
|
|||||||
|
|
||||||
dp_peer_stats_notify(peer);
|
dp_peer_stats_notify(peer);
|
||||||
|
|
||||||
ratekbps = dp_getrateindex(ppdu->mcs,
|
ratekbps = dp_getrateindex(ppdu->gi,
|
||||||
|
ppdu->mcs,
|
||||||
ppdu->nss,
|
ppdu->nss,
|
||||||
ppdu->preamble,
|
ppdu->preamble,
|
||||||
ppdu->bw);
|
ppdu->bw);
|
||||||
|
@@ -144,7 +144,8 @@ static inline void dp_rx_rate_stats_update(struct dp_peer *peer,
|
|||||||
else
|
else
|
||||||
nss = ppdu->u.nss - 1;
|
nss = ppdu->u.nss - 1;
|
||||||
|
|
||||||
ratekbps = dp_getrateindex(ppdu->u.mcs,
|
ratekbps = dp_getrateindex(ppdu->u.gi,
|
||||||
|
ppdu->u.mcs,
|
||||||
nss,
|
nss,
|
||||||
ppdu->u.preamble,
|
ppdu->u.preamble,
|
||||||
ppdu->u.bw);
|
ppdu->u.bw);
|
||||||
|
Reference in New Issue
Block a user