|
@@ -1718,11 +1718,16 @@ static void wlan_hdd_cfg80211_start_pending_acs(struct work_struct *work);
|
|
|
int wlan_hdd_cfg80211_start_acs(struct hdd_adapter *adapter)
|
|
|
{
|
|
|
|
|
|
- struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
+ struct hdd_context *hdd_ctx;
|
|
|
tsap_Config_t *sap_config;
|
|
|
tpWLAN_SAPEventCB acs_event_callback;
|
|
|
int status;
|
|
|
|
|
|
+ if (!adapter) {
|
|
|
+ hdd_err("adapater is NULL");
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+ hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
sap_config = &adapter->sessionCtx.ap.sapConfig;
|
|
|
if (hdd_ctx->acs_policy.acs_channel)
|
|
|
sap_config->channel = hdd_ctx->acs_policy.acs_channel;
|
|
@@ -2639,6 +2644,9 @@ static void wlan_hdd_cfg80211_start_pending_acs(struct work_struct *work)
|
|
|
{
|
|
|
struct hdd_adapter *adapter = container_of(work, struct hdd_adapter,
|
|
|
acs_pending_work.work);
|
|
|
+ if (!adapter)
|
|
|
+ return;
|
|
|
+ clear_bit(ACS_PENDING, &adapter->event_flags);
|
|
|
wlan_hdd_cfg80211_start_acs(adapter);
|
|
|
}
|
|
|
|
|
@@ -2770,7 +2778,6 @@ void wlan_hdd_cfg80211_acs_ch_select_evt(struct hdd_adapter *adapter)
|
|
|
/* Lets give 500ms for OBSS + START_BSS to complete */
|
|
|
schedule_delayed_work(&con_sap_adapter->acs_pending_work,
|
|
|
msecs_to_jiffies(500));
|
|
|
- clear_bit(ACS_PENDING, &con_sap_adapter->event_flags);
|
|
|
}
|
|
|
}
|
|
|
|