Browse Source

qcacld-3.0: Add INI support for FIPS handshake offload feature

Add ini support for FIPS 4-way hanshake offload to firmware. FIPS
offload feature will add support to handle LFR 3.0 connection only
(auth/reassoc). If this ini is set then firmware will offload
4-way HS to supplicant. In the Roam sync indication firmware will
inform connected and not authenticated so that supplicant can take
care of 4-way HS.

Change-Id: I3da58910218ffc57094cac4c3cab4572631d9404
CRs-Fixed: 2459182
Yeshwanth Sriram Guntuka 6 years ago
parent
commit
b97cc66167

+ 2 - 0
mlme/core/src/wlan_mlme_main.c

@@ -432,6 +432,8 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_REMOVE_TIME_STAMP_SYNC_CMD);
 	gen->enable_change_channel_bandwidth =
 		cfg_get(psoc, CFG_CHANGE_CHANNEL_BANDWIDTH);
+	gen->disable_4way_hs_offload =
+		cfg_get(psoc, CFG_DISABLE_4WAY_HS_OFFLOAD);
 }
 
 static void mlme_init_edca_ani_cfg(struct wlan_mlme_edca_params *edca_params)

+ 23 - 0
mlme/dispatcher/inc/cfg_mlme_generic.h

@@ -625,6 +625,28 @@
 		CFG_CHANGE_CHANNEL_BANDWIDTH_DEFAULT, \
 		"enable change channel bw")
 
+/*
+ * <ini>
+ * disable_4way_hs_offload - Enable/Disable 4 way handshake offload to firmware
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * 0  4-way HS to be handled in firmware
+ * 1  4-way HS to be handled in supplicant
+ *
+ * Related: None
+ *
+ * Supported Feature: STA Roaming
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_DISABLE_4WAY_HS_OFFLOAD CFG_INI_BOOL("disable_4way_hs_offload", \
+						 0, \
+						 "Enable/disable 4 way handshake offload to firmware")
+
 #define CFG_GENERIC_ALL \
 	CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \
 	CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \
@@ -642,6 +664,7 @@
 	CFG(CFG_ENABLE_LPASS_SUPPORT) \
 	CFG(CFG_ENABLE_SELF_RECOVERY) \
 	CFG(CFG_ENABLE_DEAUTH_TO_DISASSOC_MAP) \
+	CFG(CFG_DISABLE_4WAY_HS_OFFLOAD) \
 	CFG(CFG_SAP_DOT11MC) \
 	CFG(CFG_ENABLE_FATAL_EVENT_TRIGGER) \
 	CFG(CFG_SUB_20_CHANNEL_WIDTH) \

+ 10 - 0
mlme/dispatcher/inc/wlan_mlme_api.h

@@ -2214,4 +2214,14 @@ wlan_mlme_get_wps_uuid(struct wlan_mlme_wps_params *wps_params, uint8_t *data);
 QDF_STATUS
 wlan_mlme_get_self_gen_frm_pwr(struct wlan_objmgr_psoc *psoc,
 			       uint32_t *value);
+
+/*
+ * wlan_mlme_get_4way_hs_offload() - get 4-way hs offload to fw cfg
+ * @psoc: pointer to psoc object
+ * @val:  Pointer to the value which will be filled for the caller
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS
+wlan_mlme_get_4way_hs_offload(struct wlan_objmgr_psoc *psoc, bool *value);
 #endif /* _WLAN_MLME_API_H_ */

+ 2 - 0
mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -1063,6 +1063,7 @@ struct wlan_mlme_chainmask {
  * @data_stall_recovery_fw_support: whether FW supports Data stall recovery.
  * @enable_change_channel_bandwidth: enable/disable change channel bw in mission
  * mode
+ * @disable_4way_hs_offload: enable/disable 4 way handshake offload to firmware
  */
 struct wlan_mlme_generic {
 	enum band_info band_capability;
@@ -1093,6 +1094,7 @@ struct wlan_mlme_generic {
 	bool enable_remove_time_stamp_sync_cmd;
 	bool data_stall_recovery_fw_support;
 	bool enable_change_channel_bandwidth;
+	bool disable_4way_hs_offload;
 };
 
 /*

+ 17 - 0
mlme/dispatcher/src/wlan_mlme_api.c

@@ -3415,3 +3415,20 @@ QDF_STATUS wlan_mlme_ibss_power_save_setup(struct wlan_objmgr_psoc *psoc,
 
 	return QDF_STATUS_SUCCESS;
 }
+
+QDF_STATUS
+wlan_mlme_get_4way_hs_offload(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+	struct wlan_mlme_psoc_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_obj(psoc);
+	if (!mlme_obj) {
+		*value = cfg_default(CFG_DISABLE_4WAY_HS_OFFLOAD);
+		mlme_legacy_err("Failed to get MLME Obj");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	*value = mlme_obj->cfg.gen.disable_4way_hs_offload;
+
+	return QDF_STATUS_SUCCESS;
+}