diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 4df2573c6ea2..a15991849316 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/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; }; /** diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 06280deb9e9c..40c6f34c8050 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/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; } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 7508ec4e8912..d3b087b05cab 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/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 diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index d40b30e4cfc0..165771f9def2 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/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: diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index 1b4b93cd42ad..a19e39c3f873 100644 --- a/core/mac/inc/ani_global.h +++ b/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; diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index ce88d8caaa9f..c44e5920746f 100644 --- a/core/sme/src/common/sme_api.c +++ b/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); } diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 9301e15065c9..dd42b7ecea82 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/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 diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index 8375ed1a1fa3..3467621a4963 100644 --- a/core/wma/inc/wma.h +++ b/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; diff --git a/core/wma/inc/wma_tgt_cfg.h b/core/wma/inc/wma_tgt_cfg.h index 2b07ae21dc5a..400a8e1cef8a 100644 --- a/core/wma/inc/wma_tgt_cfg.h +++ b/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; }; /** diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index cb7e6ff17236..28755cb0e7b8 100644 --- a/core/wma/src/wma_main.c +++ b/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; } /**