Browse Source

qcacld-3.0: Fix channel width issue for EHT

If EHT operation information field is present, it means EHT connection
has different channel bandwidth with legacy mode. We should update
pAddBssParams->ch_width with pe_session->ch_width which considers
channel width in EHT operation IE.

Otherwise, channel width is not set correctly for EHT connection.

Change-Id: Idcac0382fb45df389b99711abcf0140caa80728f
CRs-Fixed: 3239711
Bing Sun 2 years ago
parent
commit
8d43935c04
1 changed files with 18 additions and 1 deletions
  1. 18 1
      core/mac/src/pe/lim/lim_assoc_utils.c

+ 18 - 1
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -2200,12 +2200,27 @@ static bool lim_is_add_sta_params_eht_capable(tpAddStaParams add_sta_params)
 	return add_sta_params->eht_capable;
 }
 
+static bool lim_is_eht_connection_op_info_present(struct pe_session *pe_session,
+						  tpSirAssocRsp assoc_rsp)
+{
+	if (IS_DOT11_MODE_EHT(pe_session->dot11mode) &&
+	    assoc_rsp->eht_op.present &&
+	    assoc_rsp->eht_op.eht_op_information_present)
+		return true;
+
+	return false;
+}
 #else
 static bool lim_is_add_sta_params_eht_capable(tpAddStaParams add_sta_params)
 {
 	return false;
 }
 
+static bool lim_is_eht_connection_op_info_present(struct pe_session *pe_session,
+						  tpSirAssocRsp assoc_rsp)
+{
+	return false;
+}
 #endif
 
 #ifdef WLAN_SUPPORT_TWT
@@ -3612,7 +3627,9 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
 		    ((pAssocRsp->HTCaps.present &&
 		      pAssocRsp->HTCaps.supportedChannelWidthSet) ||
 		     (pBeaconStruct->HTCaps.present &&
-		      pBeaconStruct->HTCaps.supportedChannelWidthSet))) {
+		      pBeaconStruct->HTCaps.supportedChannelWidthSet) ||
+		     lim_is_eht_connection_op_info_present(pe_session,
+							   pAssocRsp))) {
 			pAddBssParams->ch_width =
 					pe_session->ch_width;
 			pAddBssParams->staContext.ch_width =