Explorar el Código

qcacld-3.0: Send vht ie based on gEnableVhtFor24GHzBand ini for 2.4g band

Currently, driver sends DOT11F_EID_VHTCAPS for 2.4g band without validating
gEnableVhtFor24GHzBand ini which may cause different phy modes in host and
fw because host modifies phy mode based on gEnableVhtFor24GHzBand ini but
doesn't consider gEnableVhtFor24GHzBand while sending vht ie to fw.

Fix: Populate and send vht ie based on gEnableVhtFor24GHzBand for 2.4g band
to avoid phy mode mismatch between host and fw.

Change-Id: I54622304635ee803bcfd5ba49dfb3e25b28a39de
CRs-Fixed: 2725164
sheenam monga hace 4 años
padre
commit
ada4be8c61
Se han modificado 2 ficheros con 19 adiciones y 4 borrados
  1. 11 4
      core/mac/src/pe/lim/lim_ft.c
  2. 8 0
      core/mac/src/pe/lim/lim_utils.c

+ 11 - 4
core/mac/src/pe/lim/lim_ft.c

@@ -424,15 +424,22 @@ static uint8_t lim_calculate_dot11_mode(struct mac_context *mac_ctx,
 	case MLME_DOT11_MODE_ALL:
 		if (bcn->he_cap.present)
 			return MLME_DOT11_MODE_11AX;
-		else if (bcn->VHTCaps.present ||
-			 bcn->vendor_vht_ie.present)
+		else if ((bcn->VHTCaps.present ||
+			  bcn->vendor_vht_ie.present) &&
+			 (!(band == REG_BAND_2G &&
+			  !mac_ctx->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band)
+			 ))
+
 			return MLME_DOT11_MODE_11AC;
 		else if (bcn->HTCaps.present)
 			return MLME_DOT11_MODE_11N;
 	case MLME_DOT11_MODE_11AC:
 	case MLME_DOT11_MODE_11AC_ONLY:
-		if (bcn->VHTCaps.present ||
-		    bcn->vendor_vht_ie.present)
+		if ((bcn->VHTCaps.present ||
+		     bcn->vendor_vht_ie.present) &&
+		   (!(band == REG_BAND_2G &&
+		    !mac_ctx->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band)
+		   ))
 			return MLME_DOT11_MODE_11AC;
 		else if (bcn->HTCaps.present)
 			return MLME_DOT11_MODE_11N;

+ 8 - 0
core/mac/src/pe/lim/lim_utils.c

@@ -51,6 +51,7 @@
 #include "wlan_reg_services_api.h"
 #include "wlan_policy_mgr_api.h"
 #include "wlan_mlme_public_struct.h"
+#include "wlan_mlme_ucfg_api.h"
 #ifdef WLAN_FEATURE_11AX_BSS_COLOR
 #include "wma_he.h"
 #endif
@@ -5633,6 +5634,7 @@ static QDF_STATUS lim_send_vht_caps_ie(struct mac_context *mac_ctx,
 				       uint8_t vdev_id)
 {
 	uint8_t vht_caps[DOT11F_IE_VHTCAPS_MAX_LEN + 2] = {0};
+	bool vht_for_2g_enabled = false;
 	tSirMacVHTCapabilityInfo *p_vht_cap =
 			(tSirMacVHTCapabilityInfo *)(&vht_caps[2]);
 	QDF_STATUS status_5g, status_2g;
@@ -5662,6 +5664,12 @@ static QDF_STATUS lim_send_vht_caps_ie(struct mac_context *mac_ctx,
 	status_5g = lim_send_ie(mac_ctx, vdev_id, DOT11F_EID_VHTCAPS,
 				CDS_BAND_5GHZ, &vht_caps[2],
 				DOT11F_IE_VHTCAPS_MIN_LEN);
+	/* Send VHT CAP for 2.4G band based on CFG_ENABLE_VHT_FOR_24GHZ ini */
+	ucfg_mlme_get_vht_for_24ghz(mac_ctx->psoc, &vht_for_2g_enabled);
+
+	if (!vht_for_2g_enabled)
+		return status_5g;
+
 
 	/* Get LDPC and over write for 2G */
 	p_vht_cap->ldpcCodingCap = lim_get_rx_ldpc(mac_ctx, CHAN_ENUM_2437);