qcacmn: Add vendor event to update TCP parameters
Currently, TCP params are configured through cnss-daemon. Add vendor event to configure TCP params through Wi-Fi HAL. Change-Id: Ifb81b810f0fb830515fb4558d016778083323b5a CRs-Fixed: 2348945
This commit is contained in:
@@ -469,6 +469,7 @@ enum qca_nl80211_vendor_subcmds {
|
|||||||
QCA_NL80211_VENDOR_SUBCMD_SET_QDEPTH_THRESH = 166,
|
QCA_NL80211_VENDOR_SUBCMD_SET_QDEPTH_THRESH = 166,
|
||||||
/* Wi-Fi test configuration subcommand */
|
/* Wi-Fi test configuration subcommand */
|
||||||
QCA_NL80211_VENDOR_SUBCMD_WIFI_TEST_CONFIGURATION = 169,
|
QCA_NL80211_VENDOR_SUBCMD_WIFI_TEST_CONFIGURATION = 169,
|
||||||
|
QCA_NL80211_VENDOR_SUBCMD_THROUGHPUT_CHANGE_EVENT = 174,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum qca_wlan_vendor_tos {
|
enum qca_wlan_vendor_tos {
|
||||||
@@ -891,6 +892,7 @@ enum qca_nl80211_vendor_subcmds_index {
|
|||||||
QCA_NL80211_VENDOR_SUBCMD_HANG_REASON_INDEX,
|
QCA_NL80211_VENDOR_SUBCMD_HANG_REASON_INDEX,
|
||||||
QCA_NL80211_VENDOR_SUBCMD_HTT_STATS_INDEX,
|
QCA_NL80211_VENDOR_SUBCMD_HTT_STATS_INDEX,
|
||||||
QCA_NL80211_VENDOR_SUBCMD_WLAN_MAC_INFO_INDEX,
|
QCA_NL80211_VENDOR_SUBCMD_WLAN_MAC_INFO_INDEX,
|
||||||
|
QCA_NL80211_VENDOR_SUBCMD_THROUGHPUT_CHANGE_EVENT_INDEX,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6343,4 +6345,73 @@ enum qca_wlan_vendor_twt_setup_req_type {
|
|||||||
QCA_WLAN_VENDOR_TWT_SETUP_DEMAND = 3,
|
QCA_WLAN_VENDOR_TWT_SETUP_DEMAND = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum qca_wlan_throughput_level - Current throughput level
|
||||||
|
*
|
||||||
|
* Indicates the current level of throughput calculated by driver. The driver
|
||||||
|
* may choose different thresholds to decide whether the throughput level is
|
||||||
|
* low or medium or high based on variety of parameters like physical link
|
||||||
|
* capacity of current connection, number of pakcets being dispatched per
|
||||||
|
* second etc. The throughput level events might not be consistent with the
|
||||||
|
* actual current throughput value being observed.
|
||||||
|
*
|
||||||
|
* @QCA_WLAN_THROUGHPUT_LEVEL_LOW: Low level of throughput
|
||||||
|
* @QCA_WLAN_THROUGHPUT_LEVEL_MEDIUM: Medium level of throughput
|
||||||
|
* @QCA_WLAN_THROUGHPUT_LEVEL_HIGH: High level of throughput
|
||||||
|
*/
|
||||||
|
enum qca_wlan_throughput_level {
|
||||||
|
QCA_WLAN_THROUGHPUT_LEVEL_LOW = 0,
|
||||||
|
QCA_WLAN_THROUGHPUT_LEVEL_MEDIUM = 1,
|
||||||
|
QCA_WLAN_THROUGHPUT_LEVEL_HIGH = 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum qca_wlan_vendor_attr_throughput_change - Vendor subcmd attributes to
|
||||||
|
* report throughput changes from driver to user space. enum values are used
|
||||||
|
* for NL attributes sent with
|
||||||
|
* %QCA_NL80211_VENDOR_SUBCMD_THROUGHPUT_CHANGE_EVENT sub command.
|
||||||
|
*/
|
||||||
|
enum qca_wlan_vendor_attr_throughput_change {
|
||||||
|
QCA_WLAN_VENDOR_ATTR_THROUGHPUT_CHANGE_INVALID = 0,
|
||||||
|
/*
|
||||||
|
* Indicates the direction of throughput in which the change is being
|
||||||
|
* reported. u8 attribute. Value is 0 for TX and 1 for RX.
|
||||||
|
*/
|
||||||
|
QCA_WLAN_VENDOR_ATTR_THROUGHPUT_CHANGE_DIRECTION = 1,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Indicates the newly observed throughput level.
|
||||||
|
* qca_wlan_throughput_level describes the possible range of values.
|
||||||
|
* u8 attribute.
|
||||||
|
*/
|
||||||
|
QCA_WLAN_VENDOR_ATTR_THROUGHPUT_CHANGE_THROUGHPUT_LEVEL = 2,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Indicates the driver's guidance on the new value to be set to
|
||||||
|
* kernel's tcp parameter tcp_limit_output_bytes. u32 attribute. Driver
|
||||||
|
* may optionally include this attribute.
|
||||||
|
*/
|
||||||
|
QCA_WLAN_VENDOR_ATTR_THROUGHPUT_CHANGE_TCP_LIMIT_OUTPUT_BYTES = 3,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Indicates the driver's guidance on the new value to be set to
|
||||||
|
* kernel's tcp parameter tcp_adv_win_scale. s8 attribute. Possible
|
||||||
|
* values are from -31 to 31. Driver may optionally include this
|
||||||
|
* attribute.
|
||||||
|
*/
|
||||||
|
QCA_WLAN_VENDOR_ATTR_THROUGHPUT_CHANGE_TCP_ADV_WIN_SCALE = 4,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Indicates the driver's guidance on the new value to be set to
|
||||||
|
* kernel's tcp parameter tcp_delack_seg. u32 attribute. Driver may
|
||||||
|
* optionally include this attribute.
|
||||||
|
*/
|
||||||
|
QCA_WLAN_VENDOR_ATTR_THROUGHPUT_CHANGE_TCP_DELACK_SEG = 5,
|
||||||
|
|
||||||
|
/* keep last */
|
||||||
|
QCA_WLAN_VENDOR_ATTR_THROUGHPUT_CHANGE_AFTER_LAST,
|
||||||
|
QCA_WLAN_VENDOR_ATTR_THROUGHPUT_CHANGE_MAX =
|
||||||
|
QCA_WLAN_VENDOR_ATTR_THROUGHPUT_CHANGE_AFTER_LAST - 1,
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -244,8 +244,22 @@ struct wlan_core_minfreq {
|
|||||||
|
|
||||||
/* Indication to enable TCP delayed ack in TPUT indication */
|
/* Indication to enable TCP delayed ack in TPUT indication */
|
||||||
#define TCP_DEL_ACK_IND (1 << 0)
|
#define TCP_DEL_ACK_IND (1 << 0)
|
||||||
|
#define TCP_DEL_ACK_IND_MASK 0x1
|
||||||
/* Indication to enable TCP advance window scaling in TPUT indication */
|
/* Indication to enable TCP advance window scaling in TPUT indication */
|
||||||
#define TCP_ADV_WIN_SCL (1 << 1)
|
#define TCP_ADV_WIN_SCL (1 << 1)
|
||||||
|
#define TCP_ADV_WIN_SCL_MASK 0x2
|
||||||
|
|
||||||
|
/* TCP limit output bytes for low and high TPUT */
|
||||||
|
#define TCP_LIMIT_OUTPUT_BYTES_LOW 506072
|
||||||
|
#define TCP_LIMIT_OUTPUT_BYTES_HI 4048579
|
||||||
|
|
||||||
|
/* TCP window scale for low and high TPUT */
|
||||||
|
#define WIN_SCALE_LOW 2
|
||||||
|
#define WIN_SCALE_HI 1
|
||||||
|
|
||||||
|
/* TCP DEL ACK value for low and high TPUT */
|
||||||
|
#define TCP_DEL_ACK_LOW 0
|
||||||
|
#define TCP_DEL_ACK_HI 20
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct wlan_rx_tp_data - msg to TCP delayed ack and advance window scaling
|
* struct wlan_rx_tp_data - msg to TCP delayed ack and advance window scaling
|
||||||
@@ -258,4 +272,15 @@ struct wlan_rx_tp_data {
|
|||||||
uint16_t rx_tp_flags;
|
uint16_t rx_tp_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct wlan_tx_tp_data - msg to TCP for Tx Dir
|
||||||
|
* @level: Throughput level.
|
||||||
|
* @tcp_limit_output: Tcp limit output flag.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
struct wlan_tx_tp_data {
|
||||||
|
enum wlan_tp_level level;
|
||||||
|
bool tcp_limit_output;
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* WLAN_NLINK_COMMON_H__ */
|
#endif /* WLAN_NLINK_COMMON_H__ */
|
||||||
|
Reference in New Issue
Block a user