Kaynağa Gözat

qcacmn: Implement interface to set WLM level

WLAN Latency module (WLM) is added by fw to gain latency
because of schedule out of service like power saving,
scanning, roaming etc. per the level set by framework.

Change-Id: I6b8775e5f492b6f287d60d39610a544114185a23
CRs-Fixed: 2152290
Paul Zhang 7 yıl önce
ebeveyn
işleme
6a857a9745
3 değiştirilmiş dosya ile 51 ekleme ve 0 silme
  1. 10 0
      wmi_unified_api.h
  2. 39 0
      wmi_unified_param.h
  3. 2 0
      wmi_unified_priv.h

+ 10 - 0
wmi_unified_api.h

@@ -743,6 +743,16 @@ QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id,
 
 QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id);
 
+/**
+ * wmi_unified_set_latency_config_cmd()
+ * @wmi_handle: wmi handle
+ * @param: WLM parameters
+ *
+ * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
+ */
+QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl,
+					struct wlm_latency_level_param *param);
+
 QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id);
 
 #ifdef WLAN_FEATURE_CIF_CFR

+ 39 - 0
wmi_unified_param.h

@@ -2910,6 +2910,45 @@ struct aggr_add_ts_param {
 	uint8_t sessionId;
 };
 
+
+/**
+ * struct wlm_latency_level_param - WLM parameters
+ * @wlm_latency_level: wlm latency level to set
+ *  0 - normal, 1 - moderate, 2 - low, 3 - ultralow
+ * @wlm_latency_flags: wlm latency flags to set
+ *  |31  12|  11  |  10  |9    8|7    6|5    4|3    2|  1  |  0  |
+ *  +------+------+------+------+------+------+------+-----+-----+
+ *  | RSVD | SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP |
+ *  +------+-------------+-------------+-------------------------+
+ *  |  WAL |      PS     |     Roam    |         Scan            |
+ *
+ *  bit 0: Avoid scan request from HLOS if setting
+ *  bit 1: Skip DFS channel SCAN if setting
+ *  bit 2-3: Define policy of dwell time/duration for each foreign channel
+ *     (b2 b3)
+ *     (0  0 ): Default scan dwell time
+ *     (0  1 ): Reserve
+ *     (1  0 ): Shrink off channel dwell time
+ *     (1  1 ): Reserve
+ *  bit 4-5: Reserve for scan
+ *  bit 6-7: Define roaming policy
+ *     (b6 b7)
+ *     (0  0 ): Default roaming behavior, allow roaming in all scenarios
+ *     (0  1 ): Disallow all roaming
+ *     (1  0 ): Allow roaming when final bmissed
+ *     (1  1 ): Reserve
+ *  bit 8-9: Reserve for roaming
+ *  bit 10: Disable css power collapse if setting
+ *  bit 11: Disable sys sleep if setting
+ *  bit 12-31: Reserve for future useage
+ * @vdev_id: vdev id
+ */
+struct wlm_latency_level_param {
+	uint16_t wlm_latency_level;
+	uint32_t wlm_latency_flags;
+	uint16_t vdev_id;
+};
+
 #define    WMI_MAX_FILTER_TEST_DATA_LEN       8
 #define    WMI_MAX_NUM_MULTICAST_ADDRESS    240
 #define    WMI_MAX_NUM_FILTERS               20

+ 2 - 0
wmi_unified_priv.h

@@ -459,6 +459,8 @@ QDF_STATUS (*send_start_extscan_cmd)(wmi_unified_t wmi_handle,
 QDF_STATUS (*send_plm_stop_cmd)(wmi_unified_t wmi_handle,
 		 const struct plm_req_params *plm);
 
+QDF_STATUS (*send_wlm_latency_level_cmd)(wmi_unified_t wmi_handle,
+				struct wlm_latency_level_param *param);
 
 QDF_STATUS (*send_plm_start_cmd)(wmi_unified_t wmi_handle,
 		  const struct plm_req_params *plm,