]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add QCA vendor interface to get connected channels utilization
authorAiny Kumari <quic_ainykuma@quicinc.com>
Wed, 15 Mar 2023 09:49:33 +0000 (15:19 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 3 Apr 2023 20:04:13 +0000 (23:04 +0300)
Add a new vendor command to trigger computation of connected channel
statistics such as channel utilization in STA mode.

Signed-off-by: Ainy Kumari <quic_ainykuma@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
src/common/qca-vendor.h

index 83cb21eefb4d85307e34d508bc9d809ce0b7a10b..3b1abccbdd136fd2a17086dc9d0a5dcb54db25f5 100644 (file)
@@ -899,6 +899,22 @@ enum qca_radiotap_vendor_ids {
  *     configure and fetch the state information of the MLO links affiliated
  *     with the STA interface. The attributes used with this command are
  *     defined in enum qca_wlan_vendor_attr_mlo_link_state.
+ *
+ * @QCA_NL80211_VENDOR_SUBCMD_CONNECTED_CHANNEL_STATS: Userspace can use this
+ *     vendor subcommand to trigger channel utilization measurement on entire
+ *     channel width of the connected channel(s). For MLO connection, connected
+ *     channel utilization measurement shall be done on all the MLO links.
+ *     The driver may use regular scan or wideband energy detection feature
+ *     based on the hardware capability for connected channel(s) utilization
+ *     measurement. The driver indicates the connected channel(s) utilization
+ *     measurement completion as an asynchronous event with this command ID to
+ *     userspace. Upon receiving this event, userspace can use
+ *     %NL80211_CMD_GET_INTERFACE to determine the channel width of the current
+ *     connected channel(s) and can derive the channel utilization percentage
+ *     (CU) of each 20 MHz sub-channel of the entire connected channel using
+ *     %NL80211_CMD_GET_SURVEY response.
+ *     CU = %NL80211_SURVEY_INFO_TIME_BUSY * 100 / %NL80211_SURVEY_INFO_TIME.
+ *     This command is only used for STA mode.
  */
 enum qca_nl80211_vendor_subcmds {
        QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0,
@@ -1110,6 +1126,7 @@ enum qca_nl80211_vendor_subcmds {
        QCA_NL80211_VENDOR_SUBCMD_GET_MONITOR_MODE = 225,
        QCA_NL80211_VENDOR_SUBCMD_ROAM_STATS = 226,
        QCA_NL80211_VENDOR_SUBCMD_MLO_LINK_STATE = 227,
+       QCA_NL80211_VENDOR_SUBCMD_CONNECTED_CHANNEL_STATS = 228,
 };
 
 /* Compatibility defines for previously used subcmd names.