Przeglądaj źródła

qcacmn: Add tlv formation of wmi data commands in common wmi layer

Move tlv formation of wmi data-path commands from umac to
common wmi layer.

Change-Id: I6994103441997935a82464b0e195597305a09557
CRs-Fixed: 983619
Govind Singh 9 lat temu
rodzic
commit
9bad000a2d
4 zmienionych plików z 100 dodań i 0 usunięć
  1. 17 0
      wmi_unified_api.h
  2. 49 0
      wmi_unified_param.h
  3. 17 0
      wmi_unified_priv.h
  4. 17 0
      wmi_unified_tlv.h

+ 17 - 0
wmi_unified_api.h

@@ -367,6 +367,23 @@ int32_t wmi_unified_ocb_get_tsf_timer(void *wmi_hdl,
 int wmi_unified_ocb_start_timing_advert(void *wmi_hdl,
 	struct ocb_timing_advert_param *timing_advert);
 
+int32_t wmi_unified_lro_config_cmd(void *wmi_hdl,
+	 struct wmi_lro_config_cmd_t *wmi_lro_cmd);
+
+int32_t wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl,
+				struct thermal_cmd_params *thermal_info);
+
+int32_t wmi_unified_set_mcc_channel_time_quota_cmd
+	(void *wmi_hdl,
+	uint32_t adapter_1_chan_freq,
+	uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq);
+
+int32_t wmi_unified_set_mcc_channel_time_latency_cmd
+	(void *wmi_hdl,
+	uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
+
+int32_t wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd(
+		   void *wmi_hdl, uint32_t mcc_adaptive_scheduler);
 int32_t wmi_unified_ocb_set_utc_time_cmd(void *wmi_hdl,
 			  struct ocb_utc_param *utc);
 int32_t wmi_unified_dcc_get_stats_cmd(void *wmi_hdl,

+ 49 - 0
wmi_unified_param.h

@@ -44,6 +44,19 @@
 #define WMI_SIZE_UTC_TIME (10)
 /* The size of the utc time error in bytes. */
 #define WMI_SIZE_UTC_TIME_ERROR (5)
+#define WMI_MCC_MIN_CHANNEL_QUOTA             20
+#define WMI_MCC_MAX_CHANNEL_QUOTA             80
+#define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY  30
+#define WMI_BEACON_TX_BUFFER_SIZE             (512)
+#define WMI_WIFI_SCANNING_MAC_OUI_LENGTH      3
+#define WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS   64
+#define WMI_RSSI_THOLD_DEFAULT   -300
+#define WMI_NLO_FREQ_THRESH          1000
+#define WMI_SEC_TO_MSEC(sec)         (sec * 1000)
+#define WMI_MSEC_TO_USEC(msec)	     (msec * 1000)
+#define WMI_ETH_LEN      64
+#define WMI_QOS_NUM_TSPEC_MAX 2
+#define WMI_QOS_NUM_AC_MAX 4
 /**
  * struct vdev_create_params - vdev create cmd parameter
  * @if_id: interface id
@@ -706,5 +719,41 @@ struct ocb_config_param {
 	uint32_t dcc_ndl_active_state_list_len;
 	void *dcc_ndl_active_state_list;
 };
+
+/**
+ * struct t_thermal_cmd_params - thermal command parameters
+ * @min_temp: minimum temprature
+ * @max_temp: maximum temprature
+ * @thermal_enable: thermal enable
+ */
+struct thermal_cmd_params {
+	uint16_t min_temp;
+	uint16_t max_temp;
+	uint8_t thermal_enable;
+};
+
+#define WMI_LRO_IPV4_SEED_ARR_SZ 5
+#define WMI_LRO_IPV6_SEED_ARR_SZ 11
+
+/**
+ * struct wmi_lro_config_cmd_t - set LRO init parameters
+ * @lro_enable: indicates whether lro is enabled
+ * @tcp_flag: If the TCP flags from the packet do not match
+ * the values in this field after masking with TCP flags mask
+ * below, packet is not LRO eligible
+ * @tcp_flag_mask: field for comparing the TCP values provided
+ * above with the TCP flags field in the received packet
+ * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
+ * 5-tuple toeplitz hash for ipv4 packets
+ * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
+ * 5-tuple toeplitz hash for ipv6 packets
+ */
+struct wmi_lro_config_cmd_t {
+	uint32_t lro_enable;
+	uint32_t tcp_flag:9,
+		tcp_flag_mask:9;
+	uint32_t toeplitz_hash_ipv4[WMI_LRO_IPV4_SEED_ARR_SZ];
+	uint32_t toeplitz_hash_ipv6[WMI_LRO_IPV6_SEED_ARR_SZ];
+};
 #endif /* _WMI_UNIFIED_PARAM_H_ */
 

+ 17 - 0
wmi_unified_priv.h

@@ -214,6 +214,23 @@ int32_t (*send_dcc_update_ndl_cmd)(wmi_unified_t wmi_handle,
 
 int32_t (*send_ocb_set_config_cmd)(wmi_unified_t wmi_handle,
 		  struct ocb_config_param *config, uint32_t *ch_mhz);
+int32_t (*send_lro_config_cmd)(wmi_unified_t wmi_handle,
+	 struct wmi_lro_config_cmd_t *wmi_lro_cmd);
+
+int32_t (*send_set_thermal_mgmt_cmd)(wmi_unified_t wmi_handle,
+				struct thermal_cmd_params *thermal_info);
+
+int32_t (*send_set_mcc_channel_time_quota_cmd)
+	(wmi_unified_t wmi_handle,
+	uint32_t adapter_1_chan_freq,
+	uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq);
+
+int32_t (*send_set_mcc_channel_time_latency_cmd)
+	(wmi_unified_t wmi_handle,
+	uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
+
+int32_t (*send_set_enable_disable_mcc_adaptive_scheduler_cmd)(
+		   wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler);
 };
 
 struct wmi_unified {

+ 17 - 0
wmi_unified_tlv.h

@@ -177,3 +177,20 @@ int send_dcc_update_ndl_cmd_tlv(wmi_unified_t wmi_handle,
 
 int32_t send_ocb_set_config_cmd_tlv(wmi_unified_t wmi_handle,
 		struct ocb_config_param *config, uint32_t *ch_mhz);
+int32_t send_lro_config_cmd_tlv(wmi_unified_t wmi_handle,
+	 struct wmi_lro_config_cmd_t *wmi_lro_cmd);
+
+int32_t send_set_thermal_mgmt_cmd_tlv(wmi_unified_t wmi_handle,
+				struct thermal_cmd_params *thermal_info);
+
+int32_t send_set_mcc_channel_time_quota_cmd_tlv
+	(wmi_unified_t wmi_handle,
+	uint32_t adapter_1_chan_freq,
+	uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq);
+
+int32_t send_set_mcc_channel_time_latency_cmd_tlv
+	(wmi_unified_t wmi_handle,
+	uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency);
+
+int32_t send_set_enable_disable_mcc_adaptive_scheduler_cmd_tlv(
+		   wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler);