ソースを参照

qcacld-3.0: fix wrong peer bw issue

Chan width 1 in vht operation means >=80M, while chan width 1 in eht op or
he op means 40M, need be handled in different way.

Change-Id: Ib65dca6245c33f07df351b6ac7eed86f91b372c7
CRs-Fixed: 3506080
Jianmin Zhu 1 年間 前
コミット
7553c36974

+ 2 - 1
components/mlme/dispatcher/src/wlan_mlme_api.c

@@ -6795,8 +6795,9 @@ enum phy_ch_width wlan_mlme_convert_vht_op_bw_to_phy_ch_width(
 		phy_bw = CH_WIDTH_80MHZ;
 	else if (channel_width == WLAN_VHTOP_CHWIDTH_160)
 		phy_bw = CH_WIDTH_160MHZ;
+	/* 80 + 80 not supported */
 	else if (channel_width == WLAN_VHTOP_CHWIDTH_80_80)
-		phy_bw = CH_WIDTH_80P80MHZ;
+		phy_bw = CH_WIDTH_80MHZ;
 
 	return phy_bw;
 }

+ 9 - 2
core/mac/src/pe/lim/lim_process_beacon_frame.c

@@ -43,6 +43,7 @@
 #include "lim_mlo.h"
 #include "wlan_mlo_mgr_sta.h"
 #include "wlan_cm_api.h"
+#include "wlan_mlme_api.h"
 #ifdef WLAN_FEATURE_11BE_MLO
 #include <cds_ieee80211_common.h>
 #endif
@@ -264,6 +265,7 @@ void lim_process_beacon_eht_op(struct pe_session *session,
 	tDot11fIEeht_op *eht_op;
 	tDot11fIEhe_op *he_op;
 	uint8_t  ch_width;
+	uint8_t center_freq_diff;
 
 	if (!bcn_ptr || !session || !session->mac_ctx || !session->vdev) {
 		pe_err("invalid input parameters");
@@ -308,7 +310,7 @@ void lim_process_beacon_eht_op(struct pe_session *session,
 		ccfs1 = eht_op->ccfs1;
 	} else if (he_op->vht_oper_present) {
 		ch_width = he_op->vht_oper.info.chan_width;
-		ori_bw = wlan_mlme_convert_eht_op_bw_to_phy_ch_width(ch_width);
+		ori_bw = wlan_mlme_convert_vht_op_bw_to_phy_ch_width(ch_width);
 		ccfs0 = he_op->vht_oper.info.center_freq_seg0;
 		ccfs1 = he_op->vht_oper.info.center_freq_seg1;
 	} else if (he_op->oper_info_6g_present) {
@@ -318,7 +320,7 @@ void lim_process_beacon_eht_op(struct pe_session *session,
 		ccfs1 = he_op->oper_info_6g.info.center_freq_seg1;
 	} else if (bcn_ptr->VHTOperation.present) {
 		ch_width = bcn_ptr->VHTOperation.chanWidth;
-		ori_bw = wlan_mlme_convert_eht_op_bw_to_phy_ch_width(ch_width);
+		ori_bw = wlan_mlme_convert_vht_op_bw_to_phy_ch_width(ch_width);
 		ccfs0 = bcn_ptr->VHTOperation.chan_center_freq_seg0;
 		ccfs1 = bcn_ptr->VHTOperation.chan_center_freq_seg1;
 
@@ -327,6 +329,11 @@ void lim_process_beacon_eht_op(struct pe_session *session,
 		return;
 	}
 
+	if (!eht_op->eht_op_information_present) {
+		center_freq_diff = abs(ccfs0 - ccfs1);
+		if (center_freq_diff == 8)
+			ori_bw = CH_WIDTH_160MHZ;
+	}
 	status = lim_get_update_eht_bw_puncture_allow(session, ori_bw,
 						      &new_bw,
 						      &update_allow);