mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacld-3.0: Handle SAP turn-off gracefully during SSR
There is a possibility of user to turn-off SAP while SSR is in progress, leading framework to show SAP as turn-off though SAP is still beaconning, after succsessful SSR. Changes are done to make sure driver and framework are in sync. Change-Id: Ic3cd1eebb23482e9cebf04683533face178698b4 CRs-Fixed: 2137646
This commit is contained in:
parent
41ed422ead
commit
74a97d4ada
1 changed files with 23 additions and 0 deletions
|
|
@ -605,6 +605,23 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
|
|||
}
|
||||
}
|
||||
|
||||
if (session_type == QDF_SAP_MODE) {
|
||||
adapter = hdd_get_adapter(hdd_ctx, QDF_SAP_MODE);
|
||||
if (adapter && test_bit(NET_DEVICE_REGISTERED,
|
||||
&adapter->event_flags)) {
|
||||
hdd_debug("iface already registered");
|
||||
if (adapter->session.ap.beacon) {
|
||||
qdf_mem_free(adapter->session.ap.beacon);
|
||||
adapter->session.ap.beacon = NULL;
|
||||
}
|
||||
if (adapter->dev && adapter->dev->ieee80211_ptr)
|
||||
return adapter->dev->ieee80211_ptr;
|
||||
|
||||
hdd_err("ieee80211_ptr points to NULL");
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
}
|
||||
|
||||
adapter = NULL;
|
||||
if (hdd_ctx->config->isP2pDeviceAddrAdministrated &&
|
||||
((NL80211_IFTYPE_P2P_GO == type) ||
|
||||
|
|
@ -773,6 +790,12 @@ int __wlan_hdd_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear SOFTAP_INIT_DONE flag to mark SAP unload, so that we do
|
||||
* not restart SAP after SSR as SAP is already stopped from user space.
|
||||
*/
|
||||
clear_bit(SOFTAP_INIT_DONE, &pVirtAdapter->event_flags);
|
||||
|
||||
MTRACE(qdf_trace(QDF_MODULE_ID_HDD,
|
||||
TRACE_CODE_HDD_DEL_VIRTUAL_INTF,
|
||||
pVirtAdapter->session_id, pVirtAdapter->device_mode));
|
||||
|
|
|
|||
Loading…
Reference in a new issue