qcacmn: Runtime PM packets tagging after wow suspend
qcacld-2.0 to qcacmn propagation. Don't Tag Non-WoW packets as Runtime PM packets after wow suspend. Some WMI Commands can be send in Runtime PM context and MC thread context. Packets coming via MC Thread Context can be tagged as Runtime PM packets when runtime pm in progress. Packets should be tagged in the same caller context to avoid any race condition. Being stability issue, addressing this issue by not tagging any non-wow commands as runtime pm after wow suspend. This will ensure all the non-wow packets coming after wow_suspend flag is set as non runtime pm packets and will trigger a runtime resume. Git-commit: 4a396d80c5cc2ded75098c61426521b9b2762c17 Git-commit: 2ee4bf4791cc5db30ec03eceaf591367deffe39a CRs-Fixed: 1106496 Change-Id: I4e55733ad8403581aca0b49ce9442fc5591335c0
此提交包含在:
@@ -12897,6 +12897,117 @@ static bool is_management_record_tlv(uint32_t cmd_id)
|
||||
}
|
||||
#endif
|
||||
|
||||
static uint16_t wmi_tag_vdev_set_cmd(wmi_unified_t wmi_hdl, wmi_buf_t buf)
|
||||
{
|
||||
wmi_vdev_set_param_cmd_fixed_param *set_cmd;
|
||||
|
||||
set_cmd = (wmi_vdev_set_param_cmd_fixed_param *)wmi_buf_data(buf);
|
||||
|
||||
switch (set_cmd->param_id) {
|
||||
case WMI_VDEV_PARAM_LISTEN_INTERVAL:
|
||||
case WMI_VDEV_PARAM_DTIM_POLICY:
|
||||
return HTC_TX_PACKET_TAG_AUTO_PM;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint16_t wmi_tag_sta_powersave_cmd(wmi_unified_t wmi_hdl, wmi_buf_t buf)
|
||||
{
|
||||
wmi_sta_powersave_param_cmd_fixed_param *ps_cmd;
|
||||
|
||||
ps_cmd = (wmi_sta_powersave_param_cmd_fixed_param *)wmi_buf_data(buf);
|
||||
|
||||
switch (ps_cmd->param) {
|
||||
case WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD:
|
||||
case WMI_STA_PS_PARAM_INACTIVITY_TIME:
|
||||
case WMI_STA_PS_ENABLE_QPOWER:
|
||||
return HTC_TX_PACKET_TAG_AUTO_PM;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint16_t wmi_tag_common_cmd(wmi_unified_t wmi_hdl, wmi_buf_t buf,
|
||||
uint32_t cmd_id)
|
||||
{
|
||||
if (qdf_atomic_read(&wmi_hdl->is_wow_bus_suspended))
|
||||
return 0;
|
||||
|
||||
switch (cmd_id) {
|
||||
case WMI_VDEV_SET_PARAM_CMDID:
|
||||
return wmi_tag_vdev_set_cmd(wmi_hdl, buf);
|
||||
case WMI_STA_POWERSAVE_PARAM_CMDID:
|
||||
return wmi_tag_sta_powersave_cmd(wmi_hdl, buf);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint16_t wmi_tag_fw_hang_cmd(wmi_unified_t wmi_handle)
|
||||
{
|
||||
uint16_t tag = 0;
|
||||
|
||||
if (qdf_atomic_read(&wmi_handle->is_target_suspended)) {
|
||||
pr_err("%s: Target is already suspended, Ignore FW Hang Command\n",
|
||||
__func__);
|
||||
return tag;
|
||||
}
|
||||
|
||||
if (wmi_handle->tag_crash_inject)
|
||||
tag = HTC_TX_PACKET_TAG_AUTO_PM;
|
||||
|
||||
wmi_handle->tag_crash_inject = false;
|
||||
return tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* wmi_set_htc_tx_tag_tlv() - set HTC TX tag for WMI commands
|
||||
* @wmi_handle: WMI handle
|
||||
* @buf: WMI buffer
|
||||
* @cmd_id: WMI command Id
|
||||
*
|
||||
* Return htc_tx_tag
|
||||
*/
|
||||
static uint16_t wmi_set_htc_tx_tag_tlv(wmi_unified_t wmi_handle,
|
||||
wmi_buf_t buf,
|
||||
uint32_t cmd_id)
|
||||
{
|
||||
uint16_t htc_tx_tag = 0;
|
||||
|
||||
switch (cmd_id) {
|
||||
case WMI_WOW_ENABLE_CMDID:
|
||||
case WMI_PDEV_SUSPEND_CMDID:
|
||||
case WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID:
|
||||
case WMI_WOW_ADD_WAKE_PATTERN_CMDID:
|
||||
case WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID:
|
||||
case WMI_PDEV_RESUME_CMDID:
|
||||
case WMI_WOW_DEL_WAKE_PATTERN_CMDID:
|
||||
case WMI_WOW_SET_ACTION_WAKE_UP_CMDID:
|
||||
#ifdef FEATURE_WLAN_D0WOW
|
||||
case WMI_D0_WOW_ENABLE_DISABLE_CMDID:
|
||||
#endif
|
||||
htc_tx_tag = HTC_TX_PACKET_TAG_AUTO_PM;
|
||||
break;
|
||||
case WMI_FORCE_FW_HANG_CMDID:
|
||||
htc_tx_tag = wmi_tag_fw_hang_cmd(wmi_handle);
|
||||
break;
|
||||
case WMI_VDEV_SET_PARAM_CMDID:
|
||||
case WMI_STA_POWERSAVE_PARAM_CMDID:
|
||||
htc_tx_tag = wmi_tag_common_cmd(wmi_handle, buf, cmd_id);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return htc_tx_tag;
|
||||
}
|
||||
|
||||
struct wmi_ops tlv_ops = {
|
||||
.send_vdev_create_cmd = send_vdev_create_cmd_tlv,
|
||||
.send_vdev_delete_cmd = send_vdev_delete_cmd_tlv,
|
||||
@@ -13163,6 +13274,7 @@ struct wmi_ops tlv_ops = {
|
||||
extract_mac_phy_cap_service_ready_ext_tlv,
|
||||
.extract_reg_cap_service_ready_ext =
|
||||
extract_reg_cap_service_ready_ext_tlv,
|
||||
.wmi_set_htc_tx_tag = wmi_set_htc_tx_tag_tlv,
|
||||
};
|
||||
|
||||
#ifndef CONFIG_MCL
|
||||
|
新增問題並參考
封鎖使用者