Преглед изворни кода

qcacmn: Fix the nss geting from tlv being invalid in 11b mode

Only in 11b mode, exclusive of other legacy modes(11ag) will
the NSS obtained from the TLV header be invalid, which is 0
and cannot be resolved. This change will set nss to 1 in 11b.

Change-Id: I93e8bdb125764fb0247265da328929ecc837fb84
CRs-Fixed: 3275793
jinbaoliu пре 2 година
родитељ
комит
195e4c7d1b
2 измењених фајлова са 5 додато и 1 уклоњено
  1. 1 1
      dp/inc/cdp_txrx_cmn.h
  2. 4 0
      dp/wifi3.0/dp_rx.c

+ 1 - 1
dp/inc/cdp_txrx_cmn.h

@@ -139,7 +139,7 @@ enum {
 };
 
 /*
- * BW types of used for RX PPDU
+ * BW types used for RX PPDU
  */
 enum rx_tlv_bw {
 	RX_TLV_BW_20MHZ,

+ 4 - 0
dp/wifi3.0/dp_rx.c

@@ -2290,6 +2290,10 @@ dp_rx_rates_stats_update(struct dp_soc *soc, qdf_nbuf_t nbuf,
 
 	DP_PEER_EXTD_STATS_UPD(txrx_peer, rx.rx_rate, mcs);
 
+	/* In 11b mode, the nss we get from tlv is 0, invalid and should be 1 */
+	if (pkt_type == DOT11_B)
+		nss = 1;
+
 	/* here pkt_type corresponds to preamble */
 	ratekbps = dp_getrateindex(sgi,
 				   mcs,