mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
Merge "qcacld-3.0: Check for adapter validity in pre cac work" into wlan-cld3.driver.lnx.2.0-dev
This commit is contained in:
commit
39edc6e35c
1 changed files with 26 additions and 13 deletions
|
|
@ -890,6 +890,40 @@ static int wlan_hdd_set_pre_cac_complete_status(hdd_adapter_t *ap_adapter,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* __wlan_hdd_sap_pre_cac_failure() - Process the pre cac failure
|
||||
* @data: AP adapter
|
||||
*
|
||||
* Deletes the pre cac adapter
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void __wlan_hdd_sap_pre_cac_failure(void *data)
|
||||
{
|
||||
hdd_adapter_t *adapter;
|
||||
hdd_context_t *hdd_ctx;
|
||||
|
||||
ENTER();
|
||||
|
||||
adapter = (hdd_adapter_t *) data;
|
||||
if (!adapter ||
|
||||
adapter->magic != WLAN_HDD_ADAPTER_MAGIC) {
|
||||
hdd_err("SAP Pre CAC adapter invalid");
|
||||
return;
|
||||
}
|
||||
|
||||
hdd_ctx = (hdd_context_t *) (adapter->pHddCtx);
|
||||
if (wlan_hdd_validate_context(hdd_ctx)) {
|
||||
hdd_err("HDD context is null");
|
||||
return;
|
||||
}
|
||||
|
||||
wlan_hdd_release_intf_addr(hdd_ctx,
|
||||
adapter->macAddressCurrent.bytes);
|
||||
hdd_stop_adapter(hdd_ctx, adapter, true);
|
||||
hdd_close_adapter(hdd_ctx, adapter, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_hdd_sap_pre_cac_failure() - Process the pre cac failure
|
||||
* @data: AP adapter
|
||||
|
|
@ -900,32 +934,11 @@ static int wlan_hdd_set_pre_cac_complete_status(hdd_adapter_t *ap_adapter,
|
|||
*/
|
||||
void wlan_hdd_sap_pre_cac_failure(void *data)
|
||||
{
|
||||
hdd_adapter_t *pHostapdAdapter;
|
||||
hdd_context_t *hdd_ctx;
|
||||
|
||||
ENTER();
|
||||
|
||||
pHostapdAdapter = (hdd_adapter_t *) data;
|
||||
if (!pHostapdAdapter) {
|
||||
hdd_err("AP adapter is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
hdd_ctx = (hdd_context_t *) (pHostapdAdapter->pHddCtx);
|
||||
if (!hdd_ctx) {
|
||||
hdd_err("HDD context is null");
|
||||
return;
|
||||
}
|
||||
|
||||
cds_ssr_protect(__func__);
|
||||
wlan_hdd_release_intf_addr(hdd_ctx,
|
||||
pHostapdAdapter->macAddressCurrent.bytes);
|
||||
hdd_stop_adapter(hdd_ctx, pHostapdAdapter, true);
|
||||
hdd_close_adapter(hdd_ctx, pHostapdAdapter, false);
|
||||
__wlan_hdd_sap_pre_cac_failure(data);
|
||||
cds_ssr_unprotect(__func__);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* wlan_hdd_sap_pre_cac_success() - Process the pre cac result
|
||||
* @data: AP adapter
|
||||
|
|
|
|||
Loading…
Reference in a new issue