Просмотр исходного кода

qcacld-3.0: Do not send SMPS force mode on dynamic antenna mode switch

When dynamic antenna selection requests to change the number of
TX/RX chains, the FW chain mask manager will take care of sending
the corresponding SMPS action frames to the AP to put the station
in 1x1 or 2x2 mode. The host driver should only handle setting
the right SMPS mode in the HT capabilities of association
or re-association requests.

CRs-Fixed: 931250
Change-Id: I9bedcc5024a98040f571f730ff084f6fe3e3ad00
Archana Ramachandran 9 лет назад
Родитель
Сommit
fec2481466

+ 2 - 0
core/hdd/src/wlan_hdd_cfg.c

@@ -6543,6 +6543,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
 	smeConfig->csrConfig.enableAmpduPs = pConfig->enableAmpduPs;
 	smeConfig->csrConfig.enableHtSmps = pConfig->enableHtSmps;
 	smeConfig->csrConfig.htSmps = pConfig->htSmps;
+	/* This param cannot be configured from INI */
+	smeConfig->csrConfig.send_smps_action = true;
 	smeConfig->csrConfig.AdHocChannel5G = pConfig->AdHocChannel5G;
 	smeConfig->csrConfig.AdHocChannel24 = pConfig->AdHocChannel24G;
 	smeConfig->csrConfig.ProprietaryRatesEnabled = 0;

+ 1 - 0
core/mac/inc/sir_api.h

@@ -970,6 +970,7 @@ typedef struct sSirSmeJoinReq {
 	uint8_t enableAmpduPs;
 	uint8_t enableHtSmps;
 	uint8_t htSmps;
+	bool send_smps_action;
 
 	uint8_t isAmsduSupportInAMPDU;
 	tAniBool isWMEenabled;

+ 1 - 0
core/mac/src/pe/include/lim_session.h

@@ -325,6 +325,7 @@ typedef struct sPESession       /* Added to Support BT-AMP */
 	uint8_t enableAmpduPs;
 	uint8_t enableHtSmps;
 	uint8_t htSmpsvalue;
+	bool send_smps_action;
 	uint8_t spectrumMgtEnabled;
 	/* *********************11H related**************************** */
 	tLimSpecMgmtInfo gLimSpecMgmt;

+ 2 - 0
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -3013,6 +3013,8 @@ lim_add_sta_self(tpAniSirGlobal pMac, uint16_t staIdx, uint8_t updateSta,
 	pAddStaParams->enableHtSmps = (psessionEntry->enableHtSmps &&
 				(!psessionEntry->supported_nss_1x1));
 	pAddStaParams->htSmpsconfig = psessionEntry->htSmpsvalue;
+	pAddStaParams->send_smps_action =
+		psessionEntry->send_smps_action;
 
 	/* For Self STA get the LDPC capability from session i.e config.ini */
 	pAddStaParams->htLdpcCapable =

+ 1 - 0
core/mac/src/pe/lim/lim_process_mlm_req_messages.c

@@ -549,6 +549,7 @@ static void mlm_add_sta(tpAniSirGlobal mac_ctx, tpAddStaParams sta_param,
 	sta_param->enableAmpduPs = session_entry->enableAmpduPs;
 	sta_param->enableHtSmps = session_entry->enableHtSmps;
 	sta_param->htSmpsconfig = session_entry->htSmpsvalue;
+	sta_param->send_smps_action = session_entry->send_smps_action;
 
 	lim_populate_own_rate_set(mac_ctx, &sta_param->supportedRates, NULL,
 				  false, session_entry, NULL);

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

@@ -1744,10 +1744,13 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
 		session->enableAmpduPs = sme_join_req->enableAmpduPs;
 		session->enableHtSmps = sme_join_req->enableHtSmps;
 		session->htSmpsvalue = sme_join_req->htSmps;
+		session->send_smps_action =
+			sme_join_req->send_smps_action;
 		lim_log(mac_ctx, LOG1,
-			FL("enableHtSmps: %d htSmps: %d"),
+			FL("enable Smps: %d mode: %d send action: %d"),
 			session->enableHtSmps,
-			session->htSmpsvalue);
+			session->htSmpsvalue,
+			session->send_smps_action);
 
 		/*Store Persona */
 		session->pePersona = sme_join_req->staPersona;
@@ -2171,9 +2174,13 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx,
 
 	session_entry->enableHtSmps = reassoc_req->enableHtSmps;
 	session_entry->htSmpsvalue = reassoc_req->htSmps;
-	lim_log(mac_ctx, LOG1, FL("enableHtSmps: %d htSmps: %d"),
+	session_entry->send_smps_action =
+		reassoc_req->send_smps_action;
+	lim_log(mac_ctx, LOG1,
+		FL("enableHtSmps: %d htSmps: %d send action: %d"),
 		session_entry->enableHtSmps,
-		session_entry->htSmpsvalue);
+		session_entry->htSmpsvalue,
+		session_entry->send_smps_action);
 	/*
 	 * Reassociate request is expected
 	 * in link established state only.

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

@@ -1158,6 +1158,7 @@ typedef struct tagCsrConfigParam {
 	uint8_t enableAmpduPs;
 	uint8_t enableHtSmps;
 	uint8_t htSmps;
+	bool send_smps_action;
 	bool ignore_peer_erp_info;
 	/*
 	 * To enable/disable scanning only 2.4Ghz channels on first scan

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

@@ -603,6 +603,7 @@ typedef struct tagCsrConfig {
 	uint8_t enableAmpduPs;
 	uint8_t enableHtSmps;
 	uint8_t htSmps;
+	bool send_smps_action;
 	uint8_t txLdpcEnable;
 	/*
 	 * Enable/Disable heartbeat offload

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

@@ -1099,7 +1099,8 @@ QDF_STATUS sme_ht40_stop_obss_scan(tHalHandle hHal, uint32_t vdev_id);
 
 QDF_STATUS sme_update_mimo_power_save(tHalHandle hHal,
 				      uint8_t is_ht_smps_enabled,
-				      uint8_t ht_smps_mode);
+				      uint8_t ht_smps_mode,
+				      bool send_smps_action);
 
 bool sme_is_sta_smps_allowed(tHalHandle hHal, uint8_t session_id);
 #endif /* #if !defined( __SME_API_H ) */

+ 10 - 3
core/sme/src/common/sme_api.c

@@ -15392,21 +15392,28 @@ QDF_STATUS sme_ht40_stop_obss_scan(tHalHandle hal, uint32_t vdev_id)
  * @hal: The handle returned by macOpen
  * @is_ht_smps_enabled: enable/disable ht smps
  * @ht_smps_mode: smps mode disabled/static/dynamic
+ * @send_smps_action: flag to send smps force mode command
+ * to FW
  *
  * Return: QDF_STATUS if SME update mimo power save
  * configuration sucsess else failue status
  */
 QDF_STATUS sme_update_mimo_power_save(tHalHandle hal,
 				      uint8_t is_ht_smps_enabled,
-				      uint8_t ht_smps_mode)
+				      uint8_t ht_smps_mode,
+				      bool send_smps_action)
 {
 	tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
+
 	sms_log(mac_ctx, LOG1,
-		"update SMPS config enable smps: %d mode: %d",
-		is_ht_smps_enabled, ht_smps_mode);
+		"SMPS enable: %d mode: %d send action: %d",
+		is_ht_smps_enabled, ht_smps_mode,
+		send_smps_action);
 	mac_ctx->roam.configParam.enableHtSmps =
 		is_ht_smps_enabled;
 	mac_ctx->roam.configParam.htSmps = ht_smps_mode;
+	mac_ctx->roam.configParam.send_smps_action =
+		send_smps_action;
 
 	return QDF_STATUS_SUCCESS;
 }

+ 4 - 0
core/sme/src/csr/csr_api_roam.c

@@ -2031,6 +2031,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
 		pMac->roam.configParam.enableAmpduPs = pParam->enableAmpduPs;
 		pMac->roam.configParam.enableHtSmps = pParam->enableHtSmps;
 		pMac->roam.configParam.htSmps = pParam->htSmps;
+		pMac->roam.configParam.send_smps_action =
+			pParam->send_smps_action;
 		pMac->roam.configParam.txLdpcEnable = pParam->enableTxLdpc;
 		pMac->roam.configParam.ignore_peer_erp_info =
 			pParam->ignore_peer_erp_info;
@@ -13860,6 +13862,8 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
 			(uint8_t) pMac->roam.configParam.enableHtSmps;
 
 		csr_join_req->htSmps = (uint8_t) pMac->roam.configParam.htSmps;
+		csr_join_req->send_smps_action =
+			pMac->roam.configParam.send_smps_action;
 
 		csr_join_req->isAmsduSupportInAMPDU =
 			(uint8_t) pMac->roam.configParam.isAmsduSupportInAMPDU;

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

@@ -309,6 +309,7 @@ typedef struct {
 	uint8_t enableAmpduPs;
 	uint8_t enableHtSmps;
 	uint8_t htSmpsconfig;
+	bool send_smps_action;
 	uint8_t htLdpcCapable;
 	uint8_t vhtLdpcCapable;
 	uint8_t smesessionId;

+ 4 - 4
core/wma/src/wma_dev_if.c

@@ -3801,16 +3801,16 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
 
 	/* Send SMPS force command to FW to send the required
 	 * action frame only when SM power save is enbaled in
-	 * the INI. In case dynamic antenna selection, the
-	 * action frames are sent by the chain mask manager.
+	 * from INI. In case dynamic antenna selection, the
+	 * action frames are sent by the chain mask manager
 	 * In addition to the action frames, The SM power save is
 	 * published in the assoc request HT SMPS IE for both cases.
 	 */
-	if (params->enableHtSmps) {
+	if ((params->enableHtSmps) && (params->send_smps_action)) {
 		smps_param = wma_smps_mode_to_force_mode_param(
 			params->htSmpsconfig);
 		if (smps_param >= 0) {
-			WMA_LOGD("%s: Set MIMO power save smps mode %d",
+			WMA_LOGD("%s: Send SMPS force mode: %d",
 				__func__, params->htSmpsconfig);
 			wma_set_mimops(wma, params->smesessionId,
 				smps_param);