diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index cb9c7cfcaa..1ae6718f8b 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -110,7 +110,6 @@ struct hdd_config { #ifdef ENABLE_MTRACE_LOG bool enable_mtrace; #endif - bool enable_snr_monitoring; bool advertise_concurrent_operation; #ifdef DHCP_SERVER_OFFLOAD struct dhcp_server dhcp_server_ip; diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index ee960f7fc2..626ed54ffa 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -23697,7 +23697,7 @@ void wlan_hdd_init_chan_info(struct hdd_context *hdd_ctx) mac_handle_t mac_handle; hdd_ctx->chan_info = NULL; - if (!hdd_ctx->config->enable_snr_monitoring) { + if (!ucfg_scan_is_snr_monitor_enabled(hdd_ctx->psoc)) { hdd_debug("SNR monitoring is disabled"); return; } diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 05f103bbd2..8ca1aa6cb1 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -5021,7 +5021,7 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy, sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); - if (!hdd_ctx->config->enable_snr_monitoring) + if (!ucfg_scan_is_snr_monitor_enabled(hdd_ctx->psoc)) return -ENONET; if (sta_ctx->hdd_reassoc_scenario) { diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 5d5f98baf0..44018b93ec 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -7313,6 +7313,7 @@ static int __iw_get_char_setnone(struct net_device *dev, { int8_t s7snr = 0; int status = 0; + bool enable_snr_monitoring; struct hdd_context *hdd_ctx; struct hdd_station_ctx *sta_ctx; @@ -7322,12 +7323,14 @@ static int __iw_get_char_setnone(struct net_device *dev, return status; sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); - if (!hdd_ctx->config->enable_snr_monitoring || + enable_snr_monitoring = + ucfg_scan_is_snr_monitor_enabled(hdd_ctx->psoc); + if (!enable_snr_monitoring || eConnectionState_Associated != sta_ctx->conn_info.conn_state) { hdd_err("getSNR failed: Enable SNR Monitoring-%d, ConnectionState-%d", - hdd_ctx->config->enable_snr_monitoring, - sta_ctx->conn_info.conn_state); + enable_snr_monitoring, + sta_ctx->conn_info.conn_state); return -ENONET; } wlan_hdd_get_snr(adapter, &s7snr);