qcacld-3.0: Remove enable_snr_monitoring from hdd_config struct
Currently, enable_snr_monitoring doesn't be initialized properly, in some acs scenario, hostapd will dump survey(NL80211_CMD_GET_SURVEY), driver return error due to uninitialized enable_snr_monitoring, this will result in acs won't be started and sap fail to start. Fix is to remove enable_snr_monitoring from hdd_config struct, calling ucfg_scan_is_snr_monitor_enabled() everywhere that enable_snr_monitoring is being used. Change-Id: I8784867683b21d9441e980a1215b2db712db381a CRs-Fixed: 2585661
This commit is contained in:
@@ -110,7 +110,6 @@ struct hdd_config {
|
|||||||
#ifdef ENABLE_MTRACE_LOG
|
#ifdef ENABLE_MTRACE_LOG
|
||||||
bool enable_mtrace;
|
bool enable_mtrace;
|
||||||
#endif
|
#endif
|
||||||
bool enable_snr_monitoring;
|
|
||||||
bool advertise_concurrent_operation;
|
bool advertise_concurrent_operation;
|
||||||
#ifdef DHCP_SERVER_OFFLOAD
|
#ifdef DHCP_SERVER_OFFLOAD
|
||||||
struct dhcp_server dhcp_server_ip;
|
struct dhcp_server dhcp_server_ip;
|
||||||
|
@@ -23697,7 +23697,7 @@ void wlan_hdd_init_chan_info(struct hdd_context *hdd_ctx)
|
|||||||
mac_handle_t mac_handle;
|
mac_handle_t mac_handle;
|
||||||
|
|
||||||
hdd_ctx->chan_info = NULL;
|
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");
|
hdd_debug("SNR monitoring is disabled");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -5021,7 +5021,7 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
|
|||||||
|
|
||||||
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
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;
|
return -ENONET;
|
||||||
|
|
||||||
if (sta_ctx->hdd_reassoc_scenario) {
|
if (sta_ctx->hdd_reassoc_scenario) {
|
||||||
|
@@ -7313,6 +7313,7 @@ static int __iw_get_char_setnone(struct net_device *dev,
|
|||||||
{
|
{
|
||||||
int8_t s7snr = 0;
|
int8_t s7snr = 0;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
bool enable_snr_monitoring;
|
||||||
struct hdd_context *hdd_ctx;
|
struct hdd_context *hdd_ctx;
|
||||||
struct hdd_station_ctx *sta_ctx;
|
struct hdd_station_ctx *sta_ctx;
|
||||||
|
|
||||||
@@ -7322,12 +7323,14 @@ static int __iw_get_char_setnone(struct net_device *dev,
|
|||||||
return status;
|
return status;
|
||||||
|
|
||||||
sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
|
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 !=
|
eConnectionState_Associated !=
|
||||||
sta_ctx->conn_info.conn_state) {
|
sta_ctx->conn_info.conn_state) {
|
||||||
hdd_err("getSNR failed: Enable SNR Monitoring-%d, ConnectionState-%d",
|
hdd_err("getSNR failed: Enable SNR Monitoring-%d, ConnectionState-%d",
|
||||||
hdd_ctx->config->enable_snr_monitoring,
|
enable_snr_monitoring,
|
||||||
sta_ctx->conn_info.conn_state);
|
sta_ctx->conn_info.conn_state);
|
||||||
return -ENONET;
|
return -ENONET;
|
||||||
}
|
}
|
||||||
wlan_hdd_get_snr(adapter, &s7snr);
|
wlan_hdd_get_snr(adapter, &s7snr);
|
||||||
|
Reference in New Issue
Block a user