diff options
| -rw-r--r-- | wmi/inc/wmi_unified_param.h | 2 | ||||
| -rw-r--r-- | wmi/src/wmi_unified_tlv.c | 17 |
2 files changed, 17 insertions, 2 deletions
diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 262814faafce..4a550ce4d15e 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -6967,11 +6967,13 @@ struct rcpi_req { * @operation: 0 reset to fw default, 1 set the bits, * 2 add the setting bits, 3 delete the setting bits * @action_category_map: bit mapping. + * @action_per_category: action id bitmask per category */ struct action_wakeup_set_param { uint32_t vdev_id; uint32_t operation; uint32_t action_category_map[WMI_SUPPORTED_ACTION_CATEGORY_ELE_LIST]; + uint32_t action_per_category[WMI_SUPPORTED_ACTION_CATEGORY]; }; /** diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 2e2e92b7c0d2..b387afed1e5d 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -7627,13 +7627,18 @@ QDF_STATUS send_action_frame_patterns_cmd_tlv(wmi_unified_t wmi_handle, wmi_buf_t buf; int i; int32_t err; + uint32_t len = 0, *cmd_args; + uint8_t *buf_ptr; - buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd)); + len = (MAX_SUPPORTED_ACTION_SUBCATEGORY * sizeof(A_UINT32)) + + WMI_TLV_HDR_SIZE + sizeof(*cmd); + buf = wmi_buf_alloc(wmi_handle, len); if (!buf) { WMI_LOGE("Failed to allocate buffer to send action filter cmd"); return QDF_STATUS_E_NOMEM; } cmd = (WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param *) wmi_buf_data(buf); + buf_ptr = (uint8_t *)cmd; WMITLV_SET_HDR(&cmd->tlv_header, WMITLV_TAG_STRUC_wmi_wow_set_action_wake_up_cmd_fixed_param, WMITLV_GET_STRUCT_TLVLEN( @@ -7646,8 +7651,16 @@ QDF_STATUS send_action_frame_patterns_cmd_tlv(wmi_unified_t wmi_handle, cmd->action_category_map[i] = action_params->action_category_map[i]; + buf_ptr += sizeof(WMI_WOW_SET_ACTION_WAKE_UP_CMD_fixed_param); + WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_UINT32, + (MAX_SUPPORTED_ACTION_SUBCATEGORY * sizeof(A_UINT32))); + buf_ptr += WMI_TLV_HDR_SIZE; + cmd_args = (uint32_t *) buf_ptr; + for (i = 0; i < MAX_SUPPORTED_ACTION_SUBCATEGORY; i++) + cmd_args[i] = action_params->action_per_category[i]; + err = wmi_unified_cmd_send(wmi_handle, buf, - sizeof(*cmd), WMI_WOW_SET_ACTION_WAKE_UP_CMDID); + len, WMI_WOW_SET_ACTION_WAKE_UP_CMDID); if (err) { WMI_LOGE("Failed to send ap_ps_egap cmd"); wmi_buf_free(buf); |
