|
@@ -5926,7 +5926,6 @@ static QDF_STATUS wma_update_wep_default_key(tp_wma_handle wma,
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* wma_update_tx_fail_cnt_th() - Set threshold for TX pkt fail
|
|
|
* @wma_handle: WMA handle
|
|
@@ -6091,6 +6090,77 @@ void wma_update_sta_inactivity_timeout(tp_wma_handle wma,
|
|
|
max_unresponsive_time);
|
|
|
}
|
|
|
|
|
|
+#ifdef WLAN_FEATURE_WOW_PULSE
|
|
|
+
|
|
|
+
|
|
|
+#define WMI_WOW_HOSTWAKEUP_GPIO_CMD_FIXED_PARAM \
|
|
|
+WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param
|
|
|
+
|
|
|
+
|
|
|
+#define WMITLV_TAG_HOSTWAKEUP_GPIO_CMD_FIXED_PARAM \
|
|
|
+WMITLV_TAG_STRUC_wmi_wow_hostwakeup_gpio_pin_pattern_config_cmd_fixed_param
|
|
|
+
|
|
|
+/**
|
|
|
+* wma_send_wow_pulse_cmd() - send wmi cmd of wow pulse cmd
|
|
|
+* infomation to fw.
|
|
|
+* @wma_handle: wma handler
|
|
|
+* @udp_response: wow_pulse_mode pointer
|
|
|
+*
|
|
|
+* Return: Return QDF_STATUS
|
|
|
+*/
|
|
|
+static QDF_STATUS wma_send_wow_pulse_cmd(tp_wma_handle wma_handle,
|
|
|
+ struct wow_pulse_mode *wow_pulse_cmd)
|
|
|
+{
|
|
|
+ QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
+ wmi_buf_t buf;
|
|
|
+ WMI_WOW_HOSTWAKEUP_GPIO_CMD_FIXED_PARAM *cmd;
|
|
|
+ u_int16_t len;
|
|
|
+
|
|
|
+ len = sizeof(*cmd);
|
|
|
+ buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
|
|
|
+ if (!buf) {
|
|
|
+ WMA_LOGE("wmi_buf_alloc failed");
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
+ }
|
|
|
+
|
|
|
+ cmd = (WMI_WOW_HOSTWAKEUP_GPIO_CMD_FIXED_PARAM *)wmi_buf_data(buf);
|
|
|
+ qdf_mem_zero(cmd, len);
|
|
|
+
|
|
|
+ WMITLV_SET_HDR(&cmd->tlv_header,
|
|
|
+ WMITLV_TAG_HOSTWAKEUP_GPIO_CMD_FIXED_PARAM,
|
|
|
+ WMITLV_GET_STRUCT_TLVLEN(
|
|
|
+ WMI_WOW_HOSTWAKEUP_GPIO_CMD_FIXED_PARAM));
|
|
|
+
|
|
|
+ cmd->enable = wow_pulse_cmd->wow_pulse_enable;
|
|
|
+ cmd->pin = wow_pulse_cmd->wow_pulse_pin;
|
|
|
+ cmd->interval_low = wow_pulse_cmd->wow_pulse_interval_low;
|
|
|
+ cmd->interval_high = wow_pulse_cmd->wow_pulse_interval_high;
|
|
|
+ cmd->repeat_cnt = WMI_WOW_PULSE_REPEAT_CNT;
|
|
|
+
|
|
|
+ if (wmi_unified_cmd_send(wma_handle->wmi_handle, buf, len,
|
|
|
+ WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMDID)) {
|
|
|
+ WMA_LOGE("Failed to send send wow pulse");
|
|
|
+ wmi_buf_free(buf);
|
|
|
+ status = QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ WMA_LOGD("%s: Exit", __func__);
|
|
|
+ return status;
|
|
|
+}
|
|
|
+
|
|
|
+#undef WMI_WOW_HOSTWAKEUP_GPIO_CMD_FIXED_PARAM
|
|
|
+#undef WMITLV_TAG_HOSTWAKEUP_GPIO_CMD_FIXED_PARAM
|
|
|
+#undef WMI_WOW_PULSE_REPEAT_CNT
|
|
|
+
|
|
|
+#else
|
|
|
+static inline QDF_STATUS wma_send_wow_pulse_cmd(tp_wma_handle wma_handle,
|
|
|
+ struct wow_pulse_mode *wow_pulse_cmd)
|
|
|
+{
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* wma_process_power_debug_stats_req() - Process the Chip Power stats collect
|
|
|
* request and pass the Power stats request to Fw
|
|
@@ -6985,6 +7055,11 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg)
|
|
|
case SIR_HAL_POWER_DEBUG_STATS_REQ:
|
|
|
wma_process_power_debug_stats_req(wma_handle);
|
|
|
break;
|
|
|
+ case WMA_SET_WOW_PULSE_CMD:
|
|
|
+ wma_send_wow_pulse_cmd(wma_handle,
|
|
|
+ (struct wow_pulse_mode *)msg->bodyptr);
|
|
|
+ qdf_mem_free(msg->bodyptr);
|
|
|
+ break;
|
|
|
default:
|
|
|
WMA_LOGD("unknown msg type %x", msg->type);
|
|
|
/* Do Nothing? MSG Body should be freed at here */
|