qcacld-3.0: set the limit off-channel command parameters
Set the limit off-channel command parameters and conc_system_pref
according to active tos indication from application.
CRs-Fixed: 2066088
Change-Id: I896999adb59aa468daf33364c708d95ef3062018
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 5368f07..45bed11 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1543,6 +1543,36 @@
struct completion response_event;
};
+/**
+ * tos - Type of service requested by the application
+ * TOS_BK: Back ground traffic
+ * TOS_BE: Best effort traffic
+ * TOS_VI: Video traffic
+ * TOS_VO: Voice traffic
+ */
+enum tos {
+ TOS_BK = 0,
+ TOS_BE = 1,
+ TOS_VI = 2,
+ TOS_VO = 3,
+};
+
+#define HDD_AC_BK_BIT 1
+#define HDD_AC_BE_BIT 2
+#define HDD_AC_VI_BIT 4
+#define HDD_AC_VO_BIT 8
+
+#define HDD_MAX_OFF_CHAN_TIME_FOR_VO 20
+#define HDD_MAX_OFF_CHAN_TIME_FOR_VI 20
+#define HDD_MAX_OFF_CHAN_TIME_FOR_BE 40
+#define HDD_MAX_OFF_CHAN_TIME_FOR_BK 40
+
+#define HDD_MAX_AC 4
+#define HDD_MAX_OFF_CHAN_ENTRIES 2
+
+#define HDD_AC_BIT_INDX 0
+#define HDD_DWELL_TIME_INDX 1
+
/** Adapter structure definition */
struct hdd_context {
/** Global CDS context */
@@ -1844,6 +1874,7 @@
uint8_t bt_vo_active:1;
struct hdd_nud_stats_context nud_stats_context;
eCsrBand curr_band;
+ uint8_t active_ac;
};
/**
@@ -2827,4 +2858,17 @@
*/
void hdd_dp_trace_init(struct hdd_config *config);
+/**
+ * hdd_set_limit_off_chan_for_tos() - set limit off-chan command parameters
+ * @adapter: pointer adapter context
+ * @tos: type of service
+ * @status: status of the traffic (active/inactive)
+ *
+ * This function updates the limit off-channel command parameters to WMA
+ *
+ * Return: 0 on success or non zero value on failure
+ */
+int hdd_set_limit_off_chan_for_tos(struct hdd_adapter *adapter, enum tos tos,
+ bool is_tos_active);
+
#endif /* end #if !defined(WLAN_HDD_MAIN_H) */