Jelajahi Sumber

qcacld-3.0: add ini gActionOUIAuthAssoc6Mbps2GHz

Some AP doesn't honor CCK rate for auth/assoc.
this ini is added to detect specified AP and
send auth/assoc/reassoc(non-offload) with 6 Mbps
rate on 2.4 GHz, then AP will ack to STA.

Change-Id: I8a164471198842368add40ca726420569dd82430
CRs-Fixed: 3412381
Jingxiang Ge 2 tahun lalu
induk
melakukan
3e2b569a81

+ 4 - 0
components/action_oui/core/src/wlan_action_oui_main.c

@@ -183,6 +183,10 @@ static void action_oui_load_config(struct action_oui_psoc_priv *psoc_priv)
 		      cfg_get(psoc,
 			      CFG_ACTION_OUI_DISABLE_DYNAMIC_QOS_NULL_TX_RATE),
 		      ACTION_OUI_MAX_STR_LEN);
+	qdf_str_lcopy(psoc_priv->action_oui_str
+			[ACTION_OUI_AUTH_ASSOC_6MBPS_2GHZ],
+		      cfg_get(psoc, CFG_ACTION_OUI_AUTH_ASSOC_6MBPS_2GHZ),
+		      ACTION_OUI_MAX_STR_LEN);
 }
 
 static void action_oui_parse_config(struct wlan_objmgr_psoc *psoc)

+ 33 - 0
components/action_oui/dispatcher/inc/wlan_action_oui_cfg.h

@@ -711,6 +711,38 @@
 	"00e04c 03 020160 E0 01 001018 06 02FF009c0000 BC 01", \
 	"Used to turn off FW's dynamic qos null tx rate for specified APs")
 
+/*
+ * <ini>
+ * gActionOUIAuthAssoc6Mbps2GHz - Used to send auth/assoc req with 6 Mbps rate
+ * on 2.4 GHz for specified AP
+ *
+ * Some AP sometimes doesn't honor auth/assoc with CCK rate.
+ * This ini will provide 6 Mbps rate for auth/assoc in 2.4 GHz.
+ *
+ * Example OUIs: (All values in Hex)
+ * OUI 1: 000c43
+ *       OUI data Len: 04
+ *       OUI Data : 03000000
+ *       OUI data Mask: F0 - 11110000
+ *       Info Mask : 01 - only OUI present in Info mask
+ *
+ * Refer to gEnableActionOUI for more detail about the format.
+ *
+ * Related: gEnableActionOUI
+ *
+ * Supported Feature: Action OUIs
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_ACTION_OUI_AUTH_ASSOC_6MBPS_2GHZ CFG_INI_STRING( \
+	"gActionOUIAuthAssoc6Mbps2GHz", \
+	0, \
+	ACTION_OUI_MAX_STR_LEN, \
+	"", \
+	"send auth/assoc req with 6 Mbps rate on 2.4 GHz for specified APs")
+
 #define CFG_ACTION_OUI \
 	CFG(CFG_ACTION_OUI_CCKM_1X1) \
 	CFG(CFG_ACTION_OUI_CONNECT_1X1) \
@@ -727,5 +759,6 @@
 	CFG(CFG_ACTION_OUI_TAKE_ALL_BAND_INFO) \
 	CFG(CFG_ACTION_OUI_11BE_ALLOW_LIST) \
 	CFG(CFG_ACTION_OUI_DISABLE_DYNAMIC_QOS_NULL_TX_RATE) \
+	CFG(CFG_ACTION_OUI_AUTH_ASSOC_6MBPS_2GHZ) \
 	CFG(CFG_ENABLE_ACTION_OUI)
 #endif

+ 3 - 0
components/action_oui/dispatcher/inc/wlan_action_oui_public_struct.h

@@ -106,6 +106,8 @@
  * @ACTION_OUI_HOST_RECONN: reconnect to the same BSSID when wait for
  * association response timeout from AP
  * @ACTION_OUI_TAKE_ALL_BAND_INFO: let AP country ie take all band info
+ * @ACTION_OUI_AUTH_ASSOC_6MBPS_2GHZ: send auth/assoc req with 6 Mbps rate
+ * on 2.4 GHz
  * @ACTION_OUI_MAXIMUM_ID: maximum number of action oui types
  */
 enum action_oui_id {
@@ -127,6 +129,7 @@ enum action_oui_id {
 	ACTION_OUI_HOST_ONLY,
 	ACTION_OUI_HOST_RECONN = ACTION_OUI_HOST_ONLY,
 	ACTION_OUI_TAKE_ALL_BAND_INFO,
+	ACTION_OUI_AUTH_ASSOC_6MBPS_2GHZ,
 	ACTION_OUI_MAXIMUM_ID
 };
 

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

@@ -664,6 +664,8 @@ struct wlan_mlo_ie_info {
  * @mlo_ie_total_len:
  * @mlo_ie:
  * @user_edca_set:
+ * @is_oui_auth_assoc_6mbps_2ghz_enable: send auth/assoc req with 6 Mbps rate
+ * on 2.4 GHz
  */
 struct pe_session {
 	uint8_t available;
@@ -992,6 +994,7 @@ struct pe_session {
 #endif
 #endif /* WLAN_FEATURE_11BE */
 	uint8_t user_edca_set;
+	bool is_oui_auth_assoc_6mbps_2ghz_enable;
 };
 
 /*-------------------------------------------------------------------------

+ 7 - 0
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -1852,6 +1852,13 @@ static void lim_check_oui_and_update_session(struct mac_context *mac_ctx,
 			  mac_ctx->roam.configParam.is_force_1x1);
 	}
 
+	if (WLAN_REG_IS_24GHZ_CH_FREQ(bss_desc->chan_freq) &&
+		wlan_action_oui_search(mac_ctx->psoc,
+				       &vendor_ap_search_attr,
+				       ACTION_OUI_AUTH_ASSOC_6MBPS_2GHZ)) {
+		session->is_oui_auth_assoc_6mbps_2ghz_enable = true;
+	}
+
 	if (WLAN_REG_IS_24GHZ_CH_FREQ(bss_desc->chan_freq) &&
 	    !mac_ctx->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band &&
 	    session->dot11mode == MLME_DOT11_MODE_11AC) {

+ 6 - 1
core/mac/src/pe/lim/lim_send_frames_host_roam.c

@@ -631,6 +631,7 @@ void lim_send_reassoc_req_mgmt_frame(struct mac_context *mac,
 	uint8_t *bcn_ie = NULL;
 	uint32_t bcn_ie_len = 0;
 	uint8_t *p_ext_cap = NULL;
+	enum rateid min_rid = RATEID_DEFAULT;
 
 	if (!pe_session)
 		return;
@@ -928,12 +929,16 @@ void lim_send_reassoc_req_mgmt_frame(struct mac_context *mac,
 	lim_diag_mgmt_tx_event_report(mac, pMacHdr,
 				      pe_session, QDF_STATUS_SUCCESS,
 				      QDF_STATUS_SUCCESS);
+
+	if (pe_session->is_oui_auth_assoc_6mbps_2ghz_enable)
+		min_rid = RATEID_6MBPS;
+
 	qdf_status =
 		wma_tx_frame(mac, pPacket,
 			   (uint16_t) (sizeof(tSirMacMgmtHdr) + nPayload),
 			   TXRX_FRM_802_11_MGMT, ANI_TXDIR_TODS, 7,
 			   lim_tx_complete, pFrame, txFlag, smeSessionId, 0,
-			   RATEID_DEFAULT, 0);
+			   min_rid, 0);
 	MTRACE(qdf_trace
 		       (QDF_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
 		       pe_session->peSessionId, qdf_status));

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

@@ -9582,6 +9582,9 @@ enum rateid lim_get_min_session_txrate(struct pe_session *session,
 
 	lim_get_min_rate(&min_rate, rateset);
 
+	if (session->is_oui_auth_assoc_6mbps_2ghz_enable)
+		min_rate = SIR_MAC_RATE_6;
+
 	switch (min_rate) {
 	case SIR_MAC_RATE_1:
 		rid = RATEID_1MBPS;