qcacld-3.0: Create same call signature for WIN and MCL

In wmi_process_fw_event_default_ctx, Use same call
signature for MCL as WIN for wma_process_fw_event_handler

Change-Id: Ie361dd762c97667f4ee5bc3bb67fd0d39fbcae94
CRS-Fixed: 2372982
This commit is contained in:
Harprit Chhabada
2018-12-26 12:24:53 -08:00
committed by nshrivas
parent 1fde96e762
commit 3f4c05872e
2 changed files with 23 additions and 20 deletions

View File

@@ -1667,7 +1667,17 @@ typedef struct {
void *evt_buf; void *evt_buf;
} wma_process_fw_event_params; } wma_process_fw_event_params;
int wma_process_fw_event_handler(void *ctx, void *ev, uint8_t rx_ctx); /**
* wma_process_fw_event_handler() - common event handler to serialize
* event processing through mc_thread
* @scn_handle: scn handle
* @ev: event buffer
* @rx_ctx: rx execution context
*
* Return: 0 on success, errno on failure
*/
int wma_process_fw_event_handler(ol_scn_t scn_handle, void *ev,
uint8_t rx_ctx);
A_UINT32 e_csr_auth_type_to_rsn_authmode(eCsrAuthType authtype, A_UINT32 e_csr_auth_type_to_rsn_authmode(eCsrAuthType authtype,
eCsrEncryptionType encr); eCsrEncryptionType encr);

View File

@@ -1772,34 +1772,27 @@ static int wma_process_fw_event_mc_thread_ctx(void *ctx, void *ev)
} }
/** int wma_process_fw_event_handler(ol_scn_t scn_handle, void *evt_buf,
* wma_process_fw_event_handler() - common event handler to serialize uint8_t rx_ctx)
* event processing through mc_thread
* @ctx: wmi context
* @ev: event buffer
* @rx_ctx: rx execution context
*
* Return: 0 on success, errno on failure
*/
int wma_process_fw_event_handler(void *ctx, void *htc_packet, uint8_t rx_ctx)
{ {
int err = 0; int err = 0;
ol_scn_t scn_handle; struct wmi_unified *wmi_handle;
struct wlan_objmgr_psoc *psoc; struct wlan_objmgr_psoc *psoc;
struct target_psoc_info *tgt_hdl; struct target_psoc_info *tgt_hdl;
wmi_buf_t evt_buf;
bool is_wmi_ready = false; bool is_wmi_ready = false;
evt_buf = (wmi_buf_t) ((HTC_PACKET *)htc_packet)->pPktContext;
scn_handle = ((wmi_unified_t)ctx)->scn_handle;
psoc = target_if_get_psoc_from_scn_hdl(scn_handle); psoc = target_if_get_psoc_from_scn_hdl(scn_handle);
if (!psoc) { if (!psoc) {
WMA_LOGE("psoc is null"); WMA_LOGE("psoc is null");
return err; return err;
} }
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
if (!wmi_handle) {
WMA_LOGE("wmi_handle is null");
return err;
}
tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc); tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
if (!tgt_hdl) { if (!tgt_hdl) {
WMA_LOGE("target_psoc_info is null"); WMA_LOGE("target_psoc_info is null");
@@ -1810,14 +1803,14 @@ int wma_process_fw_event_handler(void *ctx, void *htc_packet, uint8_t rx_ctx)
if (!is_wmi_ready) { if (!is_wmi_ready) {
WMA_LOGD("fw event recvd before ready event processed"); WMA_LOGD("fw event recvd before ready event processed");
WMA_LOGD("therefore use worker thread"); WMA_LOGD("therefore use worker thread");
wmi_process_fw_event_worker_thread_ctx(ctx, htc_packet); wmi_process_fw_event_worker_thread_ctx(wmi_handle, evt_buf);
return err; return err;
} }
if (rx_ctx == WMA_RX_SERIALIZER_CTX) { if (rx_ctx == WMA_RX_SERIALIZER_CTX) {
err = wma_process_fw_event_mc_thread_ctx(ctx, evt_buf); err = wma_process_fw_event_mc_thread_ctx(wmi_handle, evt_buf);
} else if (rx_ctx == WMA_RX_TASKLET_CTX) { } else if (rx_ctx == WMA_RX_TASKLET_CTX) {
wma_process_fw_event_tasklet_ctx(ctx, evt_buf); wma_process_fw_event_tasklet_ctx(wmi_handle, evt_buf);
} else { } else {
WMA_LOGE("%s: invalid wmi event execution context", __func__); WMA_LOGE("%s: invalid wmi event execution context", __func__);
qdf_nbuf_free(evt_buf); qdf_nbuf_free(evt_buf);