瀏覽代碼

qcacmn: WMI support added for sifs_trigger interval config

FR: TDMA Support for Wave2 Radios (host support)
Added a wmi cmd for configuring the interval between successive sifs
trigger frames given by the user app. Added a separate wmi cmd instead
of wmi param with reference to further scope.

Change-Id: Ifa778a761e3495ef7abab5f63a49661b307034ae
CRs-Fixed: 2330484
narayan 6 年之前
父節點
當前提交
a566dce41a
共有 5 個文件被更改,包括 62 次插入0 次删除
  1. 3 0
      wmi/inc/wmi_unified_api.h
  2. 9 0
      wmi/inc/wmi_unified_param.h
  3. 3 0
      wmi/inc/wmi_unified_priv.h
  4. 19 0
      wmi/src/wmi_unified_api.c
  5. 28 0
      wmi/src/wmi_unified_non_tlv.c

+ 3 - 0
wmi/inc/wmi_unified_api.h

@@ -470,6 +470,9 @@ QDF_STATUS wmi_unified_hidden_ssid_vdev_restart_send(void *wmi_hdl,
 QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
 				struct vdev_set_params *param);
 
+QDF_STATUS wmi_unified_sifs_trigger_send(void *wmi_hdl,
+					 struct sifs_trigger_param *param);
+
 QDF_STATUS wmi_unified_peer_delete_send(void *wmi_hdl,
 				    uint8_t
 				    peer_addr[IEEE80211_ADDR_LEN],

+ 9 - 0
wmi/inc/wmi_unified_param.h

@@ -881,6 +881,15 @@ struct vdev_set_params {
 	uint32_t param_value;
 };
 
+/**
+ * struct sifs_trigger_param - sifs_trigger cmd parameter
+ * @if_id: vdev id
+ * @param_value: parameter value
+ */
+struct sifs_trigger_param {
+	uint32_t if_id;
+	uint32_t param_value;
+};
 
 /**
  * struct peer_delete_params - peer delete cmd parameter

+ 3 - 0
wmi/inc/wmi_unified_priv.h

@@ -367,6 +367,9 @@ QDF_STATUS
 QDF_STATUS (*send_vdev_set_param_cmd)(wmi_unified_t wmi_handle,
 				struct vdev_set_params *param);
 
+QDF_STATUS (*send_vdev_sifs_trigger_cmd)(wmi_unified_t wmi_handle,
+					 struct sifs_trigger_param *param);
+
 QDF_STATUS (*send_stats_request_cmd)(wmi_unified_t wmi_handle,
 				uint8_t macaddr[IEEE80211_ADDR_LEN],
 				struct stats_request_params *param);

+ 19 - 0
wmi/src/wmi_unified_api.c

@@ -678,6 +678,25 @@ QDF_STATUS wmi_unified_vdev_set_param_send(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
+/**
+ *  wmi_unified_sifs_trigger_send() - WMI vdev sifs trigger parameter function
+ *  @param wmi_handle      : handle to WMI.
+ *  @param param    : pointer to hold sifs trigger parameter
+ *
+ *  Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_unified_sifs_trigger_send(void *wmi_hdl,
+					 struct sifs_trigger_param *param)
+{
+	wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
+
+	if (wmi_handle->ops->send_vdev_sifs_trigger_cmd)
+		return wmi_handle->ops->send_vdev_sifs_trigger_cmd(wmi_handle,
+				param);
+
+	return QDF_STATUS_E_FAILURE;
+}
+
 /**
  *  wmi_unified_stats_request_send() - WMI request stats function
  *  @param wmi_handle      : handle to WMI.

+ 28 - 0
wmi/src/wmi_unified_non_tlv.c

@@ -1412,6 +1412,33 @@ static QDF_STATUS send_vdev_set_param_cmd_non_tlv(wmi_unified_t wmi_handle,
 	return QDF_STATUS_E_FAILURE;
 }
 
+/**
+ *  send_vdev_sifs_trigger_cmd_non_tlv() - WMI vdev sifs trigger param function
+ *
+ *  @param wmi_handle     : handle to WMI.
+ *  @param param        : pointer to hold sifs trigger parameter
+ *  @return QDF_STATUS_SUCCESS  on success and -ve on failure.
+ */
+QDF_STATUS send_vdev_sifs_trigger_cmd_non_tlv(wmi_unified_t wmi_handle,
+					      struct sifs_trigger_param *param)
+{
+	wmi_vdev_sifs_trigger_time_cmd *cmd;
+	wmi_buf_t buf;
+	int len = sizeof(wmi_vdev_sifs_trigger_time_cmd);
+
+	buf = wmi_buf_alloc(wmi_handle, len);
+	if (!buf) {
+		WMI_LOGE("%s:wmi_buf_alloc failed\n", __func__);
+		return QDF_STATUS_E_NOMEM;
+	}
+	cmd = (wmi_vdev_sifs_trigger_time_cmd *)wmi_buf_data(buf);
+	cmd->vdev_id = param->if_id;
+	cmd->sifs_trigger_time = param->param_value;
+
+	return wmi_unified_cmd_send(wmi_handle, buf, len,
+				    WMI_VDEV_SIFS_TRIGGER_TIME_CMDID);
+}
+
 /**
  *  get_stats_id_non_tlv() - Get stats identifier function
  *
@@ -8724,6 +8751,7 @@ struct wmi_ops non_tlv_ops =  {
 	.send_crash_inject_cmd = send_crash_inject_cmd_non_tlv,
 	.send_dbglog_cmd = send_dbglog_cmd_non_tlv,
 	.send_vdev_set_param_cmd = send_vdev_set_param_cmd_non_tlv,
+	.send_vdev_sifs_trigger_cmd = send_vdev_sifs_trigger_cmd_non_tlv,
 	.send_stats_request_cmd = send_stats_request_cmd_non_tlv,
 	.send_packet_log_enable_cmd = send_packet_log_enable_cmd_non_tlv,
 	.send_packet_log_disable_cmd = send_packet_log_disable_cmd_non_tlv,