diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 24c03bed92..9d82515d4d 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1923,6 +1923,7 @@ struct hdd_context { bool force_rsne_override; qdf_wake_lock_t monitor_mode_wakelock; bool lte_coex_ant_share; + bool obss_scan_offload; int sscan_pid; uint32_t track_arp_ip; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 8014b06c72..99a20149f4 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2092,6 +2092,7 @@ void hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg) hdd_nan_datapath_target_config(hdd_ctx, cfg); hdd_ctx->dfs_cac_offload = cfg->dfs_cac_offload; hdd_ctx->lte_coex_ant_share = cfg->services.lte_coex_ant_share; + hdd_ctx->obss_scan_offload = cfg->services.obss_scan_offload; status = sme_cfg_set_int(mac_handle, WNI_CFG_OBSS_DETECTION_OFFLOAD, cfg->obss_detection_offloaded); if (QDF_IS_STATUS_ERROR(status)) @@ -7260,6 +7261,12 @@ static int hdd_wiphy_init(struct hdd_context *hdd_ctx) wiphy->wowlan.pattern_min_len = WOW_MIN_PATTERN_SIZE; wiphy->wowlan.pattern_max_len = WOW_MAX_PATTERN_SIZE; #endif + if (hdd_ctx->obss_scan_offload) { + hdd_debug("wmi_service_obss_scan supported"); + } else if (hdd_ctx->config->nChannelBondingMode24GHz) { + hdd_debug("enable wpa_supp obss_scan"); + wiphy->features |= NL80211_FEATURE_NEED_OBSS_SCAN; + } /* registration of wiphy dev with cfg80211 */ ret_val = wlan_hdd_cfg80211_register(wiphy); diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index a6ffa12876..606a087c29 100644 --- a/core/mac/inc/ani_global.h +++ b/core/mac/inc/ani_global.h @@ -928,6 +928,7 @@ typedef struct sAniSirGlobal { tDot11fIEhe_cap he_cap_2g; tDot11fIEhe_cap he_cap_5g; #endif + bool obss_scan_offload; } tAniSirGlobal; diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index fd227cb755..7a3e1e7022 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -13627,6 +13627,8 @@ void sme_update_tgt_services(tHalHandle hal, struct wma_tgt_services *cfg) { tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); + mac_ctx->obss_scan_offload = cfg->obss_scan_offload; + sme_debug("obss_scan_offload: %d", mac_ctx->obss_scan_offload); mac_ctx->lteCoexAntShare = cfg->lte_coex_ant_share; mac_ctx->beacon_offload = cfg->beacon_offload; mac_ctx->pmf_offload = cfg->pmf_offload; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index b9aaf721f4..70845e2c13 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -12564,7 +12564,8 @@ csr_roam_chk_lnk_set_ctx_rsp(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) * OBSS SCAN Indication will be sent to Firmware * to start OBSS Scan */ - if (CSR_IS_CHANNEL_24GHZ( + if (mac_ctx->obss_scan_offload && + CSR_IS_CHANNEL_24GHZ( session->connectedProfile.operationChannel) && (session->connectState == eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED) diff --git a/core/wma/inc/wma_tgt_cfg.h b/core/wma/inc/wma_tgt_cfg.h index c2c28aa802..e18f3a3424 100644 --- a/core/wma/inc/wma_tgt_cfg.h +++ b/core/wma/inc/wma_tgt_cfg.h @@ -69,6 +69,7 @@ struct wma_tgt_services { bool is_11k_offload_supported; bool twt_requestor; bool twt_responder; + bool obss_scan_offload; }; /** diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 315d8843c0..7cf86ed1d6 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -4849,6 +4849,8 @@ static inline void wma_update_target_services(struct wmi_unified *wmi_handle, cfg->twt_requestor = true; if (wmi_service_enabled(wmi_handle, wmi_service_twt_responder)) cfg->twt_responder = true; + if (wmi_service_enabled(wmi_handle, wmi_service_obss_scan)) + cfg->obss_scan_offload = true; } /**