qcacmn: Protect sap restart work for driver unload

Protect sap restart work handler from SSR to avoid accessing
data structures which are freed already.

Change-Id: I75d2032b022aa68817ec102cbe65f635a627eb82
CRs-Fixed: 2325966
Este commit está contenido en:
Tushnim Bhattacharyya
2018-10-01 14:50:15 -07:00
cometido por nshrivas
padre 1ea0e2a6ae
commit e269fc71f2

Ver fichero

@@ -31,6 +31,7 @@
#include "qdf_types.h"
#include "qdf_trace.h"
#include "wlan_objmgr_global_obj.h"
#include "qdf_platform.h"
enum policy_mgr_conc_next_action (*policy_mgr_get_current_pref_hw_mode_ptr)
(struct wlan_objmgr_psoc *psoc);
@@ -1286,15 +1287,7 @@ bool policy_mgr_is_sap_restart_required_after_sta_disconnect(
return true;
}
/**
* policy_mgr_check_sta_ap_concurrent_ch_intf() - Restart SAP in STA-AP case
* @data: Pointer check concurrent channel work data
*
* Restarts the SAP interface in STA-AP concurrency scenario
*
* Restart: None
*/
void policy_mgr_check_sta_ap_concurrent_ch_intf(void *data)
static void __policy_mgr_check_sta_ap_concurrent_ch_intf(void *data)
{
struct wlan_objmgr_psoc *psoc;
struct policy_mgr_psoc_priv_obj *pm_ctx = NULL;
@@ -1305,6 +1298,11 @@ void policy_mgr_check_sta_ap_concurrent_ch_intf(void *data)
uint8_t operating_channel[MAX_NUMBER_OF_CONC_CONNECTIONS];
uint8_t vdev_id[MAX_NUMBER_OF_CONC_CONNECTIONS];
if (qdf_is_module_state_transitioning()) {
policy_mgr_err("Module transition in progress");
goto end;
}
work_info = (struct sta_ap_intf_check_work_ctx *) data;
if (!work_info) {
policy_mgr_err("Invalid work_info");
@@ -1379,6 +1377,13 @@ end:
}
}
void policy_mgr_check_sta_ap_concurrent_ch_intf(void *data)
{
qdf_ssr_protect(__func__);
__policy_mgr_check_sta_ap_concurrent_ch_intf(data);
qdf_ssr_unprotect(__func__);
}
static bool policy_mgr_valid_sta_channel_check(struct wlan_objmgr_psoc *psoc,
uint8_t sta_channel)
{