qcacmn: Handle WMI_REG_CHAN_LIST_CC_EVENTID in worker thread

Somtimes F/W event WMI_REG_CHAN_LIST_CC_EVENTID comes for country
code changed before WMI_READY_EVENTID processed completely in
worker thread, to update current channel list,
hdd_regulatory_dyn_cbk is invoked in scheduler thread and wiphy
is extracted from pdev which isn't attached to pdev yet, assert
will happen.

WMI_READY_EVENTID and WMI_REG_CHAN_LIST_CC_EVENTID
should be serialized, both of them should be handled in same
context, such as worker thread.

Set WMI_REG_CHAN_LIST_CC_EVENTID execution context same as
WMI_READY_EVENTID: WMI_RX_WORK_CTX.

Host F/W handshake during init:

	Host <- FW WMI_SERVICE_READY_EVENTID
	Host <- FW WMI_SERVICE_READY_EXT_EVENTID
	Host -> FW WMI_INIT_CMDID
	Host <- FW WMI_REG_CHAN_LIST_CC_EVENTID
	Host -> FW WMI_SET_CURRENT_COUNTRY_CMDID
	Host <- FW WMI_READY_EVENTID
	Host <- FW WMI_REG_CHAN_LIST_CC_EVENTID

Change-Id: I922e5f2a9722e9b441cc844dd38b1039dd4d8900
CRs-Fixed: 2689274
This commit is contained in:
Jianmin Zhu
2020-05-19 19:55:31 +08:00
committed by nshrivas
parent 2d3493959f
commit bd4a9fe637
2 changed files with 1 additions and 26 deletions

View File

@@ -2122,31 +2122,6 @@ wmi_process_fw_event_sched_thread_ctx(struct wmi_unified *wmi,
struct wmi_process_fw_event_params *params_buf;
struct scheduler_msg msg = { 0 };
uint32_t event_id;
struct target_psoc_info *tgt_hdl;
bool is_wmi_ready = false;
struct wlan_objmgr_psoc *psoc;
psoc = target_if_get_psoc_from_scn_hdl(wmi->scn_handle);
if (!psoc) {
target_if_err("psoc is null");
qdf_nbuf_free(ev);
return QDF_STATUS_E_INVAL;
}
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
if (!tgt_hdl) {
wmi_err("target_psoc_info is null");
qdf_nbuf_free(ev);
return QDF_STATUS_E_INVAL;
}
is_wmi_ready = target_psoc_get_wmi_ready(tgt_hdl);
if (!is_wmi_ready) {
wmi_debug("fw event recvd before ready event processed");
wmi_debug("therefore use worker thread");
wmi_process_fw_event_worker_thread_ctx(wmi, ev);
return QDF_STATUS_E_INVAL;
}
params_buf = qdf_mem_malloc(sizeof(struct wmi_process_fw_event_params));
if (!params_buf) {