qcacld-3.0: Handle HW mode transition event early for offload case
In hw mode change offload case, update the mac id and frequency range in hw mode transition event handler instead of post msg to lim and sme to avoid the information updating delay. Change-Id: I3dc1d37880691148c4cffd8e1f5d46172f03cb0d CRs-Fixed: 3211683
This commit is contained in:

committad av
Madan Koyyalamudi

förälder
3ad3e3c34f
incheckning
b6713569bc
@@ -454,65 +454,6 @@ scan_ie_send_fail:
|
||||
qdf_mem_free(local_ie_buf);
|
||||
}
|
||||
|
||||
/**
|
||||
* lim_process_hw_mode_trans_ind() - Process set HW mode transition indication
|
||||
* @mac: Global MAC pointer
|
||||
* @body: Set HW mode response in cm_hw_mode_trans_ind format
|
||||
*
|
||||
* Process the set HW mode transition indication and post the message
|
||||
* to SME to invoke the HDD callback
|
||||
* command list
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void lim_process_hw_mode_trans_ind(struct mac_context *mac, void *body)
|
||||
{
|
||||
struct cm_hw_mode_trans_ind *ind, *param;
|
||||
uint32_t len, i;
|
||||
struct scheduler_msg msg = {0};
|
||||
|
||||
ind = (struct cm_hw_mode_trans_ind *)body;
|
||||
if (!ind) {
|
||||
pe_err("Set HW mode trans ind param is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
len = sizeof(*param);
|
||||
|
||||
param = qdf_mem_malloc(len);
|
||||
if (!param)
|
||||
return;
|
||||
|
||||
param->old_hw_mode_index = ind->old_hw_mode_index;
|
||||
param->new_hw_mode_index = ind->new_hw_mode_index;
|
||||
param->num_vdev_mac_entries = ind->num_vdev_mac_entries;
|
||||
|
||||
for (i = 0; i < ind->num_vdev_mac_entries; i++) {
|
||||
param->vdev_mac_map[i].vdev_id =
|
||||
ind->vdev_mac_map[i].vdev_id;
|
||||
param->vdev_mac_map[i].mac_id =
|
||||
ind->vdev_mac_map[i].mac_id;
|
||||
}
|
||||
|
||||
param->num_freq_map = ind->num_freq_map;
|
||||
for (i = 0; i < param->num_freq_map; i++) {
|
||||
param->mac_freq_map[i].mac_id =
|
||||
ind->mac_freq_map[i].mac_id;
|
||||
param->mac_freq_map[i].start_freq =
|
||||
ind->mac_freq_map[i].start_freq;
|
||||
param->mac_freq_map[i].end_freq =
|
||||
ind->mac_freq_map[i].end_freq;
|
||||
}
|
||||
/* TODO: Update this HW mode info in any UMAC params, if needed */
|
||||
|
||||
msg.type = eWNI_SME_HW_MODE_TRANS_IND;
|
||||
msg.bodyptr = param;
|
||||
msg.bodyval = 0;
|
||||
pe_err("Send eWNI_SME_HW_MODE_TRANS_IND to SME");
|
||||
lim_sys_process_mmh_msg_api(mac, &msg);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* def_msg_decision() - Should a message be deferred?
|
||||
* @mac_ctx: The global MAC context
|
||||
@@ -2026,11 +1967,6 @@ static void lim_process_messages(struct mac_context *mac_ctx,
|
||||
qdf_mem_free((void *)msg->bodyptr);
|
||||
msg->bodyptr = NULL;
|
||||
break;
|
||||
case SIR_HAL_PDEV_HW_MODE_TRANS_IND:
|
||||
lim_process_hw_mode_trans_ind(mac_ctx, msg->bodyptr);
|
||||
qdf_mem_free((void *)msg->bodyptr);
|
||||
msg->bodyptr = NULL;
|
||||
break;
|
||||
case SIR_HAL_PDEV_MAC_CFG_RESP:
|
||||
lim_process_dual_mac_cfg_resp(mac_ctx, msg->bodyptr);
|
||||
qdf_mem_free((void *)msg->bodyptr);
|
||||
|
@@ -4063,9 +4063,32 @@ static int wma_pdev_hw_mode_transition_evt_handler(void *handle,
|
||||
wma_process_pdev_hw_mode_trans_ind(wma, wmi_event, vdev_mac_entry,
|
||||
hw_mode_trans_ind);
|
||||
wma_process_mac_freq_mapping(hw_mode_trans_ind, param_buf);
|
||||
/* Pass the message to PE */
|
||||
wma_send_msg(wma, SIR_HAL_PDEV_HW_MODE_TRANS_IND,
|
||||
(void *) hw_mode_trans_ind, 0);
|
||||
|
||||
if (policy_mgr_is_hwmode_offload_enabled(wma->psoc)) {
|
||||
policy_mgr_hw_mode_transition_cb(
|
||||
hw_mode_trans_ind->old_hw_mode_index,
|
||||
hw_mode_trans_ind->new_hw_mode_index,
|
||||
hw_mode_trans_ind->num_vdev_mac_entries,
|
||||
hw_mode_trans_ind->vdev_mac_map,
|
||||
hw_mode_trans_ind->num_freq_map,
|
||||
hw_mode_trans_ind->mac_freq_map,
|
||||
wma->psoc);
|
||||
qdf_mem_free(hw_mode_trans_ind);
|
||||
} else {
|
||||
struct scheduler_msg sme_msg = {0};
|
||||
QDF_STATUS status;
|
||||
|
||||
wma_debug("post eWNI_SME_HW_MODE_TRANS_IND");
|
||||
sme_msg.type = eWNI_SME_HW_MODE_TRANS_IND;
|
||||
sme_msg.bodyptr = hw_mode_trans_ind;
|
||||
sme_msg.flush_callback = wma_discard_fw_event;
|
||||
|
||||
status = scheduler_post_message(QDF_MODULE_ID_WMA,
|
||||
QDF_MODULE_ID_SME,
|
||||
QDF_MODULE_ID_SME, &sme_msg);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
qdf_mem_free(hw_mode_trans_ind);
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
Referens i nytt ärende
Block a user