Sfoglia il codice sorgente

qcacld-3.0: Add service_available_event handler for FILS roam capability

Currently, wmi_service_bitmap field in WMI_SERVICE_READY_EVENT is
exhausted. WMI_SERVICE_AVAILABLE_EVENT is available for upcoming
capability intimations.

Add service_available_event handler in host driver to extract
FILS roaming capability of fw. Based on this capability only,
send RSO, update connect params, HLP IE commands, GTK offload
are sent to fw.

Change-Id: I320ba86d29109d8cba23830ef9cb5e159792f19a
CRs-Fixed: 2094229
Vignesh Viswanathan 7 anni fa
parent
commit
731186f0ff

+ 1 - 0
core/hdd/inc/wlan_hdd_main.h

@@ -1760,6 +1760,7 @@ struct hdd_context {
 	bool fw_mem_dump_enabled;
 	bool imps_enabled;
 	int user_configured_pkt_filter_rules;
+	bool is_fils_roaming_supported;
 };
 
 /**

+ 5 - 2
core/hdd/src/wlan_hdd_cfg80211.c

@@ -19891,8 +19891,11 @@ static int __wlan_hdd_cfg80211_update_connect_params(
 			req->fils_erp_rrk_len, req->fils_erp_realm_len,
 			roam_profile->fils_con_info->key_nai_length);
 
-	if (!adapter->fast_roaming_allowed) {
-		hdd_debug("LFR3 not enabled on this interface");
+	if (!adapter->fast_roaming_allowed ||
+	    !hdd_ctx->is_fils_roaming_supported) {
+		hdd_debug("LFR3: %d, FILS support %d",
+			  adapter->fast_roaming_allowed,
+			  hdd_ctx->is_fils_roaming_supported);
 		return 0;
 	}
 

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

@@ -1708,6 +1708,8 @@ void hdd_update_tgt_cfg(void *context, void *param)
 	temp_band_cap = hdd_ctx->config->nBandCapability;
 
 	hdd_ctx->config->nBandCapability = cfg->band_cap;
+	hdd_ctx->is_fils_roaming_supported =
+			cfg->services.is_fils_roaming_supported;
 
 	/*
 	 * now overwrite the target band capability with INI

+ 4 - 1
core/hdd/src/wlan_hdd_power.c

@@ -749,10 +749,13 @@ static void __hdd_ipv4_notifier_work_queue(struct work_struct *work)
 	if (hdd_ctx->config->sta_keepalive_method == HDD_STA_KEEPALIVE_GRAT_ARP)
 		hdd_set_grat_arp_keepalive(adapter);
 
+	hdd_debug("FILS Roaming support: %d",
+		  hdd_ctx->is_fils_roaming_supported);
 	wext_state = WLAN_HDD_GET_WEXT_STATE_PTR(adapter);
 	roam_profile = &wext_state->roamProfile;
+
 	ifa = hdd_lookup_ifaddr(adapter);
-	if (ifa)
+	if (ifa && hdd_ctx->is_fils_roaming_supported)
 		sme_send_hlp_ie_info(hdd_ctx->hHal, adapter->sessionId,
 				     roam_profile, ifa->ifa_local);
 exit:

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

@@ -921,6 +921,7 @@ typedef struct sAniSirGlobal {
 	uint8_t lteCoexAntShare;
 	uint8_t beacon_offload;
 	bool pmf_offload;
+	bool is_fils_roaming_supported;
 	uint32_t fEnableDebugLog;
 	uint16_t mgmtSeqNum;
 	bool enable5gEBT;

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

@@ -14101,6 +14101,10 @@ void sme_update_tgt_services(tHalHandle hal, struct wma_tgt_services *cfg)
 	mac_ctx->pmf_offload = cfg->pmf_offload;
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 		FL("mac_ctx->pmf_offload: %d"), mac_ctx->pmf_offload);
+	mac_ctx->is_fils_roaming_supported =
+				cfg->is_fils_roaming_supported;
+	sme_debug("mac_ctx->pmf_offload: %d fils_roam support %d",
+		  mac_ctx->pmf_offload, mac_ctx->is_fils_roaming_supported);
 
 }
 

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

@@ -18660,6 +18660,15 @@ csr_roam_offload_scan(tpAniSirGlobal mac_ctx, uint8_t session_id,
 		sme_err("Roam Scan Offload is already started");
 		return QDF_STATUS_E_FAILURE;
 	}
+
+	/* Roaming is not supported currently for FILS akm */
+	if (session->pCurRoamProfile && CSR_IS_AUTH_TYPE_FILS(
+	    session->pCurRoamProfile->AuthType.authType[0]) &&
+				!mac_ctx->is_fils_roaming_supported) {
+		sme_info("FILS Roaming not suppprted by fw");
+		return QDF_STATUS_SUCCESS;
+	}
+
 	/*
 	 * The Dynamic Config Items Update may happen even if the state is in
 	 * INIT. It is important to ensure that the command is passed down to

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

@@ -1421,6 +1421,8 @@ typedef struct {
 	uint32_t phy_capability;
 	uint32_t max_frag_entry;
 	uint32_t wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
+	uint32_t wmi_service_ext_offset;
+	uint32_t wmi_service_ext_bitmap[WMI_SERVICE_SEGMENT_BM_SIZE32];
 	wmi_resource_config wlan_resource_config;
 	uint32_t frameTransRequired;
 	tBssSystemRole wmaGlobalSystemRole;

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

@@ -70,6 +70,7 @@ struct wma_tgt_services {
 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
 	bool en_11ax;
 	bool get_peer_info_enabled;
+	bool is_fils_roaming_supported;
 };
 
 /**

+ 45 - 0
core/wma/src/wma_main.c

@@ -2366,6 +2366,43 @@ void wma_vdev_deinit(struct wma_txrx_node *vdev)
 	qdf_wake_lock_destroy(&vdev->vdev_set_key_wakelock);
 }
 
+/**
+ * wma_rx_service_available_event() - service available event handler
+ * @handle: pointer to wma handle
+ * @cmd_param_info: Pointer to service available event TLVs
+ * @length: length of the event buffer received
+ *
+ * Return: zero on success, error code on failure
+ */
+static int wma_rx_service_available_event(void *handle, uint8_t *cmd_param_info,
+					uint32_t length)
+{
+	tp_wma_handle wma_handle = (tp_wma_handle) handle;
+	WMI_SERVICE_AVAILABLE_EVENTID_param_tlvs *param_buf;
+	wmi_service_available_event_fixed_param *ev;
+
+	param_buf = (WMI_SERVICE_AVAILABLE_EVENTID_param_tlvs *) cmd_param_info;
+	if (!(handle && param_buf)) {
+		WMA_LOGE("%s: Invalid arguments", __func__);
+		return -EINVAL;
+	}
+
+	ev = param_buf->fixed_param;
+	if (!ev) {
+		WMA_LOGE("%s: Invalid buffer", __func__);
+		return -EINVAL;
+	}
+
+	WMA_LOGD("WMA <-- WMI_SERVICE_AVAILABLE_EVENTID");
+
+	wma_handle->wmi_service_ext_offset = ev->wmi_service_segment_offset;
+	qdf_mem_copy(wma_handle->wmi_service_ext_bitmap,
+				&ev->wmi_service_segment_bitmap[0],
+				WMI_SERVICE_EXT_BM_SIZE32);
+
+	return 0;
+}
+
 /**
  * wma_open() - Allocate wma context and initialize it.
  * @psoc: Psoc pointer
@@ -2487,6 +2524,10 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
 	wlan_psoc_set_tgt_if_handle(psoc, tgt_psoc_info);
 	wlan_psoc_obj_unlock(psoc);
 
+	wmi_unified_register_event_handler(wmi_handle,
+					   WMI_SERVICE_AVAILABLE_EVENTID,
+					   wma_rx_service_available_event,
+					   WMA_RX_SERIALIZER_CTX);
 	wmi_unified_register_event_handler(wmi_handle,
 					   WMI_SERVICE_READY_EVENTID,
 					   init_deinit_service_ready_event_handler,
@@ -4222,6 +4263,10 @@ static inline void wma_update_target_services(tp_wma_handle wh,
 	cfg->get_peer_info_enabled =
 		WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap,
 				       WMI_SERVICE_PEER_STATS_INFO);
+	if (WMI_SERVICE_EXT_IS_ENABLED(wh->wmi_service_bitmap,
+			wh->wmi_service_ext_bitmap,
+			WMI_SERVICE_FILS_SUPPORT))
+		cfg->is_fils_roaming_supported = true;
 }
 
 /**