|
@@ -2510,6 +2510,12 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
|
+ if (qdf_atomic_inc_return(&hdd_ctx->is_acs_allowed) > 1) {
|
|
|
+ hdd_err("ACS rejected as previous req already in progress");
|
|
|
+ status = -EINVAL;
|
|
|
+ goto out;
|
|
|
+ }
|
|
|
+
|
|
|
sap_config = &adapter->session.ap.sap_config;
|
|
|
if (sap_config->acs_cfg.ch_list)
|
|
|
qdf_mem_free(sap_config->acs_cfg.ch_list);
|
|
@@ -2520,12 +2526,14 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|
|
wlan_hdd_cfg80211_do_acs_policy);
|
|
|
if (status) {
|
|
|
hdd_err("Invalid ATTR");
|
|
|
+ qdf_atomic_set(&hdd_ctx->is_acs_allowed, 0);
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
|
if (!tb[QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE]) {
|
|
|
hdd_err("Attr hw_mode failed");
|
|
|
status = -EINVAL;
|
|
|
+ qdf_atomic_set(&hdd_ctx->is_acs_allowed, 0);
|
|
|
goto out;
|
|
|
}
|
|
|
hw_mode = nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE]);
|
|
@@ -2607,6 +2615,7 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|
|
if (!sap_config->acs_cfg.ch_list) {
|
|
|
hdd_err("ACS config alloc fail");
|
|
|
status = -ENOMEM;
|
|
|
+ qdf_atomic_set(&hdd_ctx->is_acs_allowed, 0);
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
@@ -2625,6 +2634,7 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
|
|
|
if (!sap_config->acs_cfg.ch_list) {
|
|
|
hdd_err("ACS config alloc fail");
|
|
|
status = -ENOMEM;
|
|
|
+ qdf_atomic_set(&hdd_ctx->is_acs_allowed, 0);
|
|
|
goto out;
|
|
|
}
|
|
|
|