Browse Source

qcacld-3.0: Advertise CSN of BF Antenna as 7 in VHT Caps if fw supports

If firmware supports CSN[Compressed Steering Number of Beamformer Antennas
] 8x8 and if the concerned INI(i.e. gTxBFCsnValue) is set above 3 which is
default fw support currently, send Probe/Assoc Request with CSN in VHT caps
as set in INI. Else set CSN to 3.

CSN of Beamformer Antenna in VHT caps is one less than the max number of
space time streams that the STA can receive in VHT NDP(i.e. CSN in VHT caps
= max space time streams STA can receive - 1)

Change-Id: I6c77f7513ee090beba8849b27c90ac0346e1ac58
CRs-Fixed: 2052348
Nachiket Kukade 8 years ago
parent
commit
8b4bfd8c75

+ 1 - 1
core/hdd/inc/wlan_hdd_cfg.h

@@ -6349,7 +6349,7 @@ enum hdd_link_speed_rpt_type {
 #define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED         "gTxBFCsnValue"
 #define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_MIN     (WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMIN)
 #define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_MAX     (WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMAX - 1)
-#define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_DEFAULT (WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMAX - 1)
+#define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_DEFAULT (WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STADEF - 1)
 
 #define CFG_VHT_ENABLE_TXBF_IN_20MHZ               "gEnableTxBFin20MHz"
 #define CFG_VHT_ENABLE_TXBF_IN_20MHZ_MIN           (0)

+ 15 - 2
core/hdd/src/wlan_hdd_main.c

@@ -1525,12 +1525,25 @@ void hdd_update_tgt_cfg(void *context, void *param)
 	hdd_debug("Init current antenna mode: %d",
 		 hdd_ctx->current_antenna_mode);
 
-	hdd_debug("Target BPF %d Host BPF %d",
-		cfg->bpf_enabled, hdd_ctx->config->bpf_packet_filter_enable);
 	hdd_ctx->bpf_enabled = (cfg->bpf_enabled &&
 				hdd_ctx->config->bpf_packet_filter_enable);
 	hdd_update_ra_rate_limit(hdd_ctx, cfg);
 
+	if ((hdd_ctx->config->txBFCsnValue >
+		WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_FW_DEF) &&
+						!cfg->tx_bfee_8ss_enabled)
+		hdd_ctx->config->txBFCsnValue =
+			WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_FW_DEF;
+
+	if (sme_cfg_set_int(hdd_ctx->hHal,
+			WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
+			hdd_ctx->config->txBFCsnValue) == QDF_STATUS_E_FAILURE)
+		hdd_err("fw update WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED to CFG fails");
+
+
+	hdd_debug("Target BPF %d Host BPF %d 8ss fw support %d txBFCsnValue %d",
+		cfg->bpf_enabled, hdd_ctx->config->bpf_packet_filter_enable,
+		cfg->tx_bfee_8ss_enabled, hdd_ctx->config->txBFCsnValue);
 	/*
 	 * If BPF is enabled, maxWowFilters set to WMA_STA_WOW_DEFAULT_PTRN_MAX
 	 * because we need atleast WMA_STA_WOW_DEFAULT_PTRN_MAX free slots to

+ 11 - 2
core/mac/inc/wni_cfg.h

@@ -938,8 +938,17 @@ enum {
 #define WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STADEF    1
 
 #define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMIN    0
-#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMAX    4
-#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STADEF    0
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMAX    8
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STADEF    8
+/*
+ * WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_FW_DEF + 1 is
+ * assumed to be the default fw supported BF antennas, if fw
+ * says it supports 8 antennas in rx ready event and if
+ * gTxBFCsnValue INI value is configured above 3, set
+ * the same to WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED.
+ * Otherwise, fall back and set fw default value[3].
+ */
+#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_FW_DEF    3
 
 #define WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_STAMIN    0
 #define WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_STAMAX    3

+ 1 - 1
core/wma/inc/wma.h

@@ -1513,10 +1513,10 @@ typedef struct {
 	tp_wma_packetdump_cb wma_mgmt_tx_packetdump_cb;
 	tp_wma_packetdump_cb wma_mgmt_rx_packetdump_cb;
 	tSirLLStatsResults *link_stats_results;
-
 #ifdef WLAN_FEATURE_11AX
 	struct he_capability he_cap;
 #endif
+	bool tx_bfee_8ss_enabled;
 } t_wma_handle, *tp_wma_handle;
 
 /**

+ 2 - 0
core/wma/inc/wma_tgt_cfg.h

@@ -153,6 +153,7 @@ struct wma_dfs_radar_ind {
  * @bool is_ra_rate_limit_enabled: RA filter support
  * @he_cap: HE capability received from FW
  * @dfs_cac_offload: dfs and cac timer offloaded
+ * @tx_bfee_8ss_enabled: Tx Beamformee support for 8x8
  */
 struct wma_tgt_cfg {
 	uint32_t target_fw_version;
@@ -186,5 +187,6 @@ struct wma_tgt_cfg {
 	tDot11fIEvendor_he_cap he_cap;
 #endif
 	bool dfs_cac_offload;
+	bool tx_bfee_8ss_enabled;
 };
 #endif /* WMA_TGT_CFG_H */

+ 7 - 1
core/wma/src/wma_main.c

@@ -4305,7 +4305,7 @@ static void wma_update_hdd_cfg(tp_wma_handle wma_handle)
 	tgt_cfg.wmi_max_len = wmi_get_max_msg_len(wma_handle->wmi_handle)
 			      - WMI_TLV_HEADROOM;
 	wma_setup_egap_support(&tgt_cfg, wma_handle);
-
+	tgt_cfg.tx_bfee_8ss_enabled = wma_handle->tx_bfee_8ss_enabled;
 	wma_update_hdd_cfg_ndp(wma_handle, &tgt_cfg);
 	wma_handle->tgt_cfg_update_cb(hdd_ctx, &tgt_cfg);
 }
@@ -4778,6 +4778,12 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
 				__func__);
 	}
 
+	if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
+				   WMI_SERVICE_8SS_TX_BFEE))
+		wma_handle->tx_bfee_8ss_enabled = true;
+	else
+		wma_handle->tx_bfee_8ss_enabled = false;
+
 	return 0;
 }