Ver Fonte

qcacld-3.0: Send Nss 1x1 for HT-STAs if hw is DBS capable

If the device is DBS capable, then it may switch between 2x2 and
1x1 depending on the active session. If the reference device is
non-VHT STA and is HT-STA, then the reference device may not be
able to decode operating mode notification frame. Thus, there can
be IOT issues.

The fix is to associate with non-VHT STA that are HT STA with 1x1
Nss capability.

Change-Id: Ic6c889f18a2e20bbde9e0d8228de65cffa5162b8
CRs-Fixed: 2023200
Nitesh Shah há 8 anos atrás
pai
commit
db5ea0d6db

+ 22 - 0
core/hdd/src/wlan_hdd_main.c

@@ -844,6 +844,26 @@ static void hdd_update_vdev_nss(hdd_context_t *hdd_ctx)
 			cfg_ini->vdev_type_nss_5g, eCSR_BAND_5G);
 }
 
+/**
+ * hdd_update_hw_dbs_capable() - sets the dbs capability of the device
+ * @hdd_ctx: HDD context
+ *
+ * Sets the DBS capability as per INI and firmware capability
+ *
+ * Return: None
+ */
+static void hdd_update_hw_dbs_capable(hdd_context_t *hdd_ctx)
+{
+	struct hdd_config *cfg_ini = hdd_ctx->config;
+	uint8_t hw_dbs_capable = 0;
+
+	if ((!cfg_ini->dual_mac_feature_disable)
+	    && wma_is_hw_dbs_capable())
+		hw_dbs_capable = 1;
+
+	sme_update_hw_dbs_capable(hdd_ctx->hHal, hw_dbs_capable);
+}
+
 static void hdd_update_tgt_ht_cap(hdd_context_t *hdd_ctx,
 				  struct wma_tgt_ht_cap *cfg)
 {
@@ -1468,6 +1488,8 @@ void hdd_update_tgt_cfg(void *context, void *param)
 
 	hdd_update_vdev_nss(hdd_ctx);
 
+	hdd_update_hw_dbs_capable(hdd_ctx);
+
 	hdd_ctx->config->fine_time_meas_cap &= cfg->fine_time_measurement_cap;
 	hdd_ctx->fine_time_meas_cap_target = cfg->fine_time_measurement_cap;
 	hdd_info("fine_time_meas_cap: 0x%x",

+ 3 - 0
core/mac/inc/ani_global.h

@@ -961,6 +961,9 @@ typedef struct sAniSirGlobal {
 	/* 802.11p enable */
 	bool enable_dot11p;
 
+	/* DBS capability based on INI and FW capability */
+	uint8_t hw_dbs_capable;
+	/* Based on INI parameter */
 	uint32_t dual_mac_feature_disable;
 	sir_mgmt_frame_ind_callback mgmt_frame_ind_cb;
 	sir_p2p_ack_ind_callback p2p_ack_ind_cb;

+ 4 - 0
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -1275,6 +1275,10 @@ lim_send_assoc_rsp_mgmt_frame(tpAniSirGlobal mac_ctx,
 			populate_dot11f_vht_operation(mac_ctx, pe_session,
 					&frm.VHTOperation);
 			is_vht = true;
+		} else {
+			/* Advertise 1x1 if either is HT-STA */
+			if (frm.HTCaps.present && mac_ctx->hw_dbs_capable)
+				frm.HTCaps.supportedMCSSet[1] = 0;
 		}
 		if (pe_session->vhtCapability &&
 		    pe_session->vendor_vht_sap &&

+ 1 - 0
core/sme/inc/sme_api.h

@@ -1252,6 +1252,7 @@ void sme_set_pdev_ht_vht_ies(tHalHandle hHal, bool enable2x2);
 
 void sme_update_vdev_type_nss(tHalHandle hal, uint8_t max_supp_nss,
 		uint32_t vdev_type_nss, eCsrBand band);
+void sme_update_hw_dbs_capable(tHalHandle hal, uint8_t hw_dbs_capable);
 void sme_register_p2p_lo_event(tHalHandle hHal, void *context,
 					p2p_lo_callback callback);
 

+ 15 - 0
core/sme/src/common/sme_api.c

@@ -15896,6 +15896,21 @@ void sme_update_vdev_type_nss(tHalHandle hal, uint8_t max_supp_nss,
 		vdev_nss->tdls, vdev_nss->ocb);
 }
 
+/**
+ * sme_update_hw_dbs_capable() - sets the HW DBS capability
+ * @hal: Pointer to HAL
+ * @hw_dbs_capable: HW DBS capability
+ *
+ * Sets HW DBS capability based on INI and fw capability.
+ *
+ * Return: None
+ */
+void sme_update_hw_dbs_capable(tHalHandle hal, uint8_t hw_dbs_capable)
+{
+	tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
+	mac_ctx->hw_dbs_capable = hw_dbs_capable;
+}
+
 /**
  * sme_register_p2p_lo_event() - Register for the p2p lo event
  * @hHal: reference to the HAL