qcacld-3.0: Post non deferable LIM msg from WMA with high priority

As beacon and probe rsp are not deferred in LIM the non-deferable
LIM msgs from WMA may get delayed due to processing of beacons and
probe responses.

To Avoid this post the non-deferable LIM msg from WMA with
high priority so that they can be processed before beacons and probes.

Change-Id: Ida7cb86be397a415893142a318b75b41c13578b5
CRs-Fixed: 2090173
This commit is contained in:
Abhishek Singh 2017-08-18 10:51:33 +05:30 • committed by snandini
commit 2d775fd638
8 changed files with 115 additions and 59 deletions

View file

@ -2155,7 +2155,7 @@ sir_convert_probe_req_frame2_struct(tpAniSirGlobal pMac,
}
/* & "transliterate" from a 'tDot11fProbeRequestto' a 'tSirProbeReq'... */
if (!pr.SSID.present) {
pe_warn("Mandatory IE SSID not present!");
pe_debug("Mandatory IE SSID not present!");
} else {
pProbeReq->ssidPresent = 1;
convert_ssid(pMac, &pProbeReq->ssId, &pr.SSID);
@ -2325,7 +2325,7 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac,
sir_copy_caps_info(pMac, pr->Capabilities, pProbeResp);
if (!pr->SSID.present) {
pe_warn("Mandatory IE SSID not present!");
pe_debug("Mandatory IE SSID not present!");
} else {
pProbeResp->ssidPresent = 1;
convert_ssid(pMac, &pProbeResp->ssId, &pr->SSID);
@ -3205,7 +3205,7 @@ sir_beacon_ie_ese_bcn_report(tpAniSirGlobal pMac,
}
/* & "transliterate" from a 'tDot11fBeaconIEs' to a 'eseBcnReportMandatoryIe'... */
if (!pBies->SSID.present) {
pe_warn("Mandatory IE SSID not present!");
pe_debug("Mandatory IE SSID not present!");
} else {
eseBcnReportMandatoryIe.ssidPresent = 1;
convert_ssid(pMac, &eseBcnReportMandatoryIe.ssId, &pBies->SSID);
@ -3485,7 +3485,7 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac,
}
/* & "transliterate" from a 'tDot11fBeaconIEs' to a 'tSirProbeRespBeacon'... */
if (!pBies->SSID.present) {
pe_warn("Mandatory IE SSID not present!");
pe_debug("Mandatory IE SSID not present!");
} else {
pBeaconStruct->ssidPresent = 1;
convert_ssid(pMac, &pBeaconStruct->ssId, &pBies->SSID);
@ -3822,7 +3822,7 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac,
pBeacon->Capabilities.immediateBA;
if (!pBeacon->SSID.present) {
pe_warn("Mandatory IE SSID not present!");
pe_debug("Mandatory IE SSID not present!");
} else {
pBeaconStruct->ssidPresent = 1;
convert_ssid(pMac, &pBeaconStruct->ssId, &pBeacon->SSID);

View file

@ -152,9 +152,43 @@ int
wmi_unified_pdev_set_param(wmi_unified_t wmi_handle, WMI_PDEV_PARAM param_id,
uint32_t param_value);
/**
* wma_send_msg_by_priority() - Send wma message to PE with priority.
* @wma_handle: wma handle
* @msg_type: message type
* @body_ptr: message body ptr
* @body_val: message body value
* @is_high_priority: if msg is high priority
*
* Return: none
*/
void wma_send_msg_by_priority(tp_wma_handle wma_handle, uint16_t msg_type,
void *body_ptr, uint32_t body_val, bool is_high_priority);
/**
* wma_send_msg() - Send wma message to PE.
* @wma_handle: wma handle
* @msg_type: message type
* @body_ptr: message body ptr
* @body_val: message body value
*
* Return: none
*/
void wma_send_msg(tp_wma_handle wma_handle, uint16_t msg_type,
void *body_ptr, uint32_t body_val);
/**
* wma_send_msg_high_priority() - Send wma message to PE with high priority.
* @wma_handle: wma handle
* @msg_type: message type
* @body_ptr: message body ptr
* @body_val: message body value
*
* Return: none
*/
void wma_send_msg_high_priority(tp_wma_handle wma_handle, uint16_t msg_type,
void *body_ptr, uint32_t body_val);
void wma_data_tx_ack_comp_hdlr(void *wma_context,
qdf_nbuf_t netbuf, int32_t status);

View file

@ -797,7 +797,7 @@ send_fail_resp:
WMA_LOGD("%s: Sending add bss rsp to umac(vdev %d status %d)",
__func__, resp_event->vdev_id, add_bss->status);
wma_send_msg(wma, WMA_ADD_BSS_RSP, (void *)add_bss, 0);
wma_send_msg_high_priority(wma, WMA_ADD_BSS_RSP, (void *)add_bss, 0);
}
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
@ -1098,7 +1098,8 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
}
}
wma_send_msg(wma, WMA_SWITCH_CHANNEL_RSP, (void *)params, 0);
wma_send_msg_high_priority(wma, WMA_SWITCH_CHANNEL_RSP,
(void *)params, 0);
} else if (req_msg->msg_type == WMA_ADD_BSS_REQ) {
tpAddBssParams bssParams = (tpAddBssParams) req_msg->user_data;
@ -1723,8 +1724,8 @@ wma_send_del_bss_response(tp_wma_handle wma, struct wma_target_req *req,
__func__, vdev_id);
} else {
params->status = QDF_STATUS_SUCCESS;
wma_send_msg(wma, WMA_DELETE_BSS_RSP, (void *)params,
0);
wma_send_msg_high_priority(wma, WMA_DELETE_BSS_RSP,
(void *)params, 0);
}
if (iface->del_staself_req != NULL) {
@ -2472,7 +2473,8 @@ int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info,
params->staType, params->smesessionId,
params->assocId, params->bssId, params->staIdx,
params->status);
wma_send_msg(wma, WMA_ADD_STA_RSP, (void *)params, 0);
wma_send_msg_high_priority(wma, WMA_ADD_STA_RSP,
(void *)params, 0);
} else if (req_msg->msg_type == WMA_ADD_BSS_REQ) {
tpAddBssParams params = (tpAddBssParams) req_msg->user_data;
@ -2489,7 +2491,8 @@ int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info,
params->operMode,
params->updateBss, params->nwType, params->bssId,
params->staContext.staIdx, params->status);
wma_send_msg(wma, WMA_ADD_BSS_RSP, (void *)params, 0);
wma_send_msg_high_priority(wma, WMA_ADD_BSS_RSP,
(void *)params, 0);
} else {
WMA_LOGE(FL("Unhandled request message type: %d"),
req_msg->msg_type);
@ -2602,7 +2605,7 @@ int wma_peer_delete_handler(void *handle, uint8_t *cmd_param_info,
del_sta = req_msg->user_data;
if (del_sta->respReqd) {
WMA_LOGD(FL("Sending peer del rsp to umac"));
wma_send_msg(wma, WMA_DELETE_STA_RSP,
wma_send_msg_high_priority(wma, WMA_DELETE_STA_RSP,
(void *)del_sta, QDF_STATUS_SUCCESS);
} else {
qdf_mem_free(del_sta);
@ -2688,7 +2691,8 @@ void wma_hold_req_timer(void *data)
if (wma_crash_on_fw_timeout(wma->fw_timeout_crash) == true)
QDF_BUG(0);
else
wma_send_msg(wma, WMA_ADD_STA_RSP, (void *)params, 0);
wma_send_msg_high_priority(wma, WMA_ADD_STA_RSP,
(void *)params, 0);
} else if (tgt_req->msg_type == WMA_ADD_BSS_REQ) {
tpAddBssParams params = (tpAddBssParams) tgt_req->user_data;
@ -2699,7 +2703,8 @@ void wma_hold_req_timer(void *data)
if (wma_crash_on_fw_timeout(wma->fw_timeout_crash) == true)
QDF_BUG(0);
else
wma_send_msg(wma, WMA_ADD_BSS_RSP, (void *)params, 0);
wma_send_msg_high_priority(wma, WMA_ADD_BSS_RSP,
(void *)params, 0);
} else if ((tgt_req->msg_type == WMA_DELETE_STA_REQ) &&
(tgt_req->type == WMA_DELETE_STA_RSP_START)) {
tpDeleteStaParams params =
@ -2717,7 +2722,7 @@ void wma_hold_req_timer(void *data)
* Send response in production builds.
*/
QDF_ASSERT(0);
wma_send_msg(wma, WMA_DELETE_STA_RSP,
wma_send_msg_high_priority(wma, WMA_DELETE_STA_RSP,
(void *)params, 0);
}
} else if ((tgt_req->msg_type == WMA_DELETE_STA_REQ) &&
@ -2757,7 +2762,8 @@ void wma_hold_req_timer(void *data)
if (wma_crash_on_fw_timeout(wma->fw_timeout_crash) == true)
QDF_BUG(0);
else
wma_send_msg(wma, WMA_DELETE_BSS_RSP, params, 0);
wma_send_msg_high_priority(wma, WMA_DELETE_BSS_RSP,
params, 0);
} else {
WMA_LOGE(FL("Unhandled timeout for msg_type:%d and type:%d"),
tgt_req->msg_type, tgt_req->type);
@ -2908,7 +2914,7 @@ void wma_vdev_resp_timer(void *data)
if (wma_crash_on_fw_timeout(wma->fw_timeout_crash) == true)
QDF_BUG(0);
else
wma_send_msg(wma, WMA_SWITCH_CHANNEL_RSP,
wma_send_msg_high_priority(wma, WMA_SWITCH_CHANNEL_RSP,
(void *)params, 0);
if (wma->interfaces[tgt_req->vdev_id].is_channel_switch) {
wma->interfaces[tgt_req->vdev_id].is_channel_switch =
@ -2991,8 +2997,8 @@ void wma_vdev_resp_timer(void *data)
}
params->status = QDF_STATUS_E_TIMEOUT;
WMA_LOGA("%s: WMA_DELETE_BSS_REQ timedout", __func__);
wma_send_msg(wma, WMA_DELETE_BSS_RSP,
(void *)params, 0);
wma_send_msg_high_priority(wma, WMA_DELETE_BSS_RSP,
(void *)params, 0);
if (iface->del_staself_req) {
WMA_LOGA("scheduling defered deletion(vdev id %x)",
tgt_req->vdev_id);
@ -3030,7 +3036,8 @@ void wma_vdev_resp_timer(void *data)
if (wma_crash_on_fw_timeout(wma->fw_timeout_crash) == true) {
QDF_BUG(0);
} else {
wma_send_msg(wma, WMA_ADD_BSS_RSP, (void *)params, 0);
wma_send_msg_high_priority(wma, WMA_ADD_BSS_RSP,
(void *)params, 0);
QDF_ASSERT(0);
}
goto free_tgt_req;
@ -3362,7 +3369,7 @@ peer_cleanup:
wma_remove_peer(wma, add_bss->bssId, vdev_id, peer, false);
send_fail_resp:
add_bss->status = QDF_STATUS_E_FAILURE;
wma_send_msg(wma, WMA_ADD_BSS_RSP, (void *)add_bss, 0);
wma_send_msg_high_priority(wma, WMA_ADD_BSS_RSP, (void *)add_bss, 0);
}
#ifdef QCA_IBSS_SUPPORT
@ -3517,7 +3524,7 @@ peer_cleanup:
wma_remove_peer(wma, add_bss->bssId, vdev_id, peer, false);
send_fail_resp:
add_bss->status = QDF_STATUS_E_FAILURE;
wma_send_msg(wma, WMA_ADD_BSS_RSP, (void *)add_bss, 0);
wma_send_msg_high_priority(wma, WMA_ADD_BSS_RSP, (void *)add_bss, 0);
}
#endif /* QCA_IBSS_SUPPORT */
@ -3802,7 +3809,7 @@ send_final_rsp:
__func__, add_bss->operMode,
add_bss->updateBss, add_bss->nwType, add_bss->bssId,
add_bss->staContext.staIdx, add_bss->status);
wma_send_msg(wma, WMA_ADD_BSS_RSP, (void *)add_bss, 0);
wma_send_msg_high_priority(wma, WMA_ADD_BSS_RSP, (void *)add_bss, 0);
return;
peer_cleanup:
@ -3811,7 +3818,8 @@ peer_cleanup:
send_fail_resp:
add_bss->status = QDF_STATUS_E_FAILURE;
if (!wma_is_roam_synch_in_progress(wma, vdev_id))
wma_send_msg(wma, WMA_ADD_BSS_RSP, (void *)add_bss, 0);
wma_send_msg_high_priority(wma, WMA_ADD_BSS_RSP,
(void *)add_bss, 0);
}
/**
@ -4080,7 +4088,7 @@ send_rsp:
add_sta->staType, add_sta->smesessionId,
add_sta->assocId, add_sta->bssId, add_sta->staIdx,
add_sta->status);
wma_send_msg(wma, WMA_ADD_STA_RSP, (void *)add_sta, 0);
wma_send_msg_high_priority(wma, WMA_ADD_STA_RSP, (void *)add_sta, 0);
}
#ifdef FEATURE_WLAN_TDLS
@ -4244,7 +4252,7 @@ send_rsp:
add_sta->staType, add_sta->smesessionId,
add_sta->assocId, add_sta->bssId, add_sta->staIdx,
add_sta->status);
wma_send_msg(wma, WMA_ADD_STA_RSP, (void *)add_sta, 0);
wma_send_msg_high_priority(wma, WMA_ADD_STA_RSP, (void *)add_sta, 0);
}
#endif
@ -4483,7 +4491,8 @@ out:
params->status);
/* Don't send a response during roam sync operation */
if (!wma_is_roam_synch_in_progress(wma, params->smesessionId))
wma_send_msg(wma, WMA_ADD_STA_RSP, (void *)params, 0);
wma_send_msg_high_priority(wma, WMA_ADD_STA_RSP,
(void *)params, 0);
}
/**
@ -4549,7 +4558,8 @@ send_del_rsp:
if (del_sta->respReqd) {
WMA_LOGD("%s: Sending del rsp to umac (status: %d)",
__func__, del_sta->status);
wma_send_msg(wma, WMA_DELETE_STA_RSP, (void *)del_sta, 0);
wma_send_msg_high_priority(wma, WMA_DELETE_STA_RSP,
(void *)del_sta, 0);
}
}
@ -4628,7 +4638,8 @@ send_del_rsp:
if (del_sta->respReqd) {
WMA_LOGD("%s: Sending del rsp to umac (status: %d)",
__func__, del_sta->status);
wma_send_msg(wma, WMA_DELETE_STA_RSP, (void *)del_sta, 0);
wma_send_msg_high_priority(wma, WMA_DELETE_STA_RSP,
(void *)del_sta, 0);
}
}
#endif
@ -4660,7 +4671,8 @@ static void wma_delete_sta_req_sta_mode(tp_wma_handle wma,
if (params->respReqd) {
WMA_LOGD("%s: vdev_id %d status %d", __func__,
params->smesessionId, status);
wma_send_msg(wma, WMA_DELETE_STA_RSP, (void *)params, 0);
wma_send_msg_high_priority(wma, WMA_DELETE_STA_RSP,
(void *)params, 0);
}
}
@ -4880,7 +4892,8 @@ void wma_delete_bss_ho_fail(tp_wma_handle wma, tpDeleteBssParams params)
iface->peer_count);
fail_del_bss_ho_fail:
params->status = status;
wma_send_msg(wma, WMA_DELETE_BSS_HO_FAIL_RSP, (void *)params, 0);
wma_send_msg_high_priority(wma, WMA_DELETE_BSS_HO_FAIL_RSP,
(void *)params, 0);
}
/**
@ -5025,7 +5038,7 @@ detach_peer:
out:
params->status = status;
wma_send_msg(wma, WMA_DELETE_BSS_RSP, (void *)params, 0);
wma_send_msg_high_priority(wma, WMA_DELETE_BSS_RSP, (void *)params, 0);
}
/**

View file

@ -2863,7 +2863,7 @@ void wma_aggr_qos_req(tp_wma_handle wma,
wmi_unified_aggr_qos_cmd(wma->wmi_handle,
(struct aggr_add_ts_param *)pAggrQosRspMsg);
/* send reponse to upper layers from here only. */
wma_send_msg(wma, WMA_AGGR_QOS_RSP, pAggrQosRspMsg, 0);
wma_send_msg_high_priority(wma, WMA_AGGR_QOS_RSP, pAggrQosRspMsg, 0);
}
#ifdef FEATURE_WLAN_ESE
@ -2930,7 +2930,7 @@ void wma_add_ts_req(tp_wma_handle wma, tAddTsParams *msg)
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
}
wma_send_msg(wma, WMA_ADD_TS_RSP, msg, 0);
wma_send_msg_high_priority(wma, WMA_ADD_TS_RSP, msg, 0);
}
#ifdef FEATURE_WLAN_ESE

View file

@ -2801,33 +2801,40 @@ end:
return qdf_status;
}
/**
* wma_send_msg() - Send wma message to PE.
* @wma_handle: wma handle
* @msg_type: message type
* @body_ptr: message body ptr
* @body_val: message body value
*
* Return: none
*/
void wma_send_msg(tp_wma_handle wma_handle, uint16_t msg_type,
void *body_ptr, uint32_t body_val)
void wma_send_msg_by_priority(tp_wma_handle wma_handle, uint16_t msg_type,
void *body_ptr, uint32_t body_val, bool is_high_priority)
{
struct scheduler_msg msg = { 0 };
uint32_t status = QDF_STATUS_SUCCESS;
tpAniSirGlobal pMac = cds_get_context(QDF_MODULE_ID_PE);
struct scheduler_msg msg = {0};
QDF_STATUS status;
msg.type = msg_type;
msg.bodyval = body_val;
msg.bodyptr = body_ptr;
status = lim_post_msg_api(pMac, &msg);
if (QDF_STATUS_SUCCESS != status) {
if (NULL != body_ptr)
status = scheduler_post_msg_by_priority(QDF_MODULE_ID_PE,
&msg, is_high_priority);
if (!QDF_IS_STATUS_SUCCESS(status)) {
WMA_LOGE("Failed to post msg %d to PE", msg_type);
if (body_ptr)
qdf_mem_free(body_ptr);
QDF_ASSERT(0);
}
}
void wma_send_msg(tp_wma_handle wma_handle, uint16_t msg_type,
void *body_ptr, uint32_t body_val)
{
wma_send_msg_by_priority(wma_handle, msg_type,
body_ptr, body_val, false);
}
void wma_send_msg_high_priority(tp_wma_handle wma_handle, uint16_t msg_type,
void *body_ptr, uint32_t body_val)
{
wma_send_msg_by_priority(wma_handle, msg_type,
body_ptr, body_val, true);
}
/**
* wma_set_base_macaddr_indicate() - set base mac address in fw
* @wma_handle: wma handle

View file

@ -1892,7 +1892,8 @@ void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info)
key_info->status = QDF_STATUS_SUCCESS;
out:
wma_send_msg(wma_handle, WMA_SET_BSSKEY_RSP, (void *)key_info, 0);
wma_send_msg_high_priority(wma_handle, WMA_SET_BSSKEY_RSP,
(void *)key_info, 0);
}
#ifdef QCA_IBSS_SUPPORT
@ -2214,8 +2215,8 @@ void wma_set_stakey(tp_wma_handle wma_handle, tpSetStaKeyParams key_info)
key_info->status = QDF_STATUS_SUCCESS;
out:
if (key_info->sendRsp)
wma_send_msg(wma_handle, WMA_SET_STAKEY_RSP, (void *)key_info,
0);
wma_send_msg_high_priority(wma_handle, WMA_SET_STAKEY_RSP,
(void *)key_info, 0);
}
/**

View file

@ -1038,7 +1038,7 @@ void wma_add_bss_ndi_mode(tp_wma_handle wma, tpAddBssParams add_bss)
send_fail_resp:
add_bss->status = QDF_STATUS_E_FAILURE;
wma_send_msg(wma, WMA_ADD_BSS_RSP, (void *)add_bss, 0);
wma_send_msg_high_priority(wma, WMA_ADD_BSS_RSP, (void *)add_bss, 0);
}
#ifndef WLAN_FEATURE_NAN_CONVERGENCE
@ -1163,7 +1163,7 @@ void wma_add_sta_ndi_mode(tp_wma_handle wma, tpAddStaParams add_sta)
send_rsp:
WMA_LOGD(FL("Sending add sta rsp to umac (mac:%pM, status:%d)"),
add_sta->staMac, add_sta->status);
wma_send_msg(wma, WMA_ADD_STA_RSP, (void *)add_sta, 0);
wma_send_msg_high_priority(wma, WMA_ADD_STA_RSP, (void *)add_sta, 0);
}
/**
@ -1206,6 +1206,6 @@ send_del_rsp:
if (del_sta->respReqd) {
WMA_LOGD(FL("Sending del rsp to umac (status: %d)"),
del_sta->status);
wma_send_msg(wma, WMA_DELETE_STA_RSP, del_sta, 0);
wma_send_msg_high_priority(wma, WMA_DELETE_STA_RSP, del_sta, 0);
}
}

View file

@ -3067,7 +3067,8 @@ send_resp:
params->status = status;
WMA_LOGI("%s: sending WMA_SWITCH_CHANNEL_RSP, status = 0x%x",
__func__, status);
wma_send_msg(wma, WMA_SWITCH_CHANNEL_RSP, (void *)params, 0);
wma_send_msg_high_priority(wma, WMA_SWITCH_CHANNEL_RSP,
(void *)params, 0);
}
#ifdef FEATURE_WLAN_ESE