Ver Fonte

qcacld-3.0: Fix handler for operating mode action frame

Do not drop operating mode action frame if channel bonding is disabled.
Process NSS change if requested by frame.

Change-Id: Id342c5399a70be8ea1b3d6c9878983a75ca456ad
CRs-Fixed: 2157167
Naveen Rawat há 7 anos atrás
pai
commit
2f13193c4a
1 ficheiros alterados com 14 adições e 11 exclusões
  1. 14 11
      core/mac/src/pe/lim/lim_process_action_frame.c

+ 14 - 11
core/mac/src/pe/lim/lim_process_action_frame.c

@@ -467,17 +467,6 @@ static void __lim_process_operating_mode_action_frame(tpAniSirGlobal mac_ctx,
 	frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);
 
 	pe_debug("Received Operating Mode action frame");
-	if (CHAN_ENUM_14 >= session->currentOperChannel)
-		cb_mode = mac_ctx->roam.configParam.channelBondingMode24GHz;
-	else
-		cb_mode = mac_ctx->roam.configParam.channelBondingMode5GHz;
-	/* Do not update the channel bonding mode if channel bonding
-	 * mode is disabled in INI.
-	 */
-	if (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE == cb_mode) {
-		pe_warn("channel bonding disabled");
-		return;
-	}
 	operating_mode_frm = qdf_mem_malloc(sizeof(*operating_mode_frm));
 	if (NULL == operating_mode_frm) {
 		pe_err("AllocateMemory failed");
@@ -503,6 +492,19 @@ static void __lim_process_operating_mode_action_frame(tpAniSirGlobal mac_ctx,
 		goto end;
 	}
 
+	if (CHAN_ENUM_14 >= session->currentOperChannel)
+		cb_mode = mac_ctx->roam.configParam.channelBondingMode24GHz;
+	else
+		cb_mode = mac_ctx->roam.configParam.channelBondingMode5GHz;
+	/*
+	 * Do not update the channel bonding mode if channel bonding
+	 * mode is disabled in INI.
+	 */
+	if (WNI_CFG_CHANNEL_BONDING_MODE_DISABLE == cb_mode) {
+		pe_warn("channel bonding disabled");
+		goto update_nss;
+	}
+
 	if (sta_ptr->htSupportedChannelWidthSet) {
 		if (WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ <
 				sta_ptr->vhtSupportedChannelWidthSet)
@@ -564,6 +566,7 @@ static void __lim_process_operating_mode_action_frame(tpAniSirGlobal mac_ctx,
 					     sta_ptr->staIndex, mac_hdr->sa);
 	}
 
+update_nss:
 	if (sta_ptr->vhtSupportedRxNss !=
 			(operating_mode_frm->OperatingMode.rxNSS + 1)) {
 		sta_ptr->vhtSupportedRxNss =