From 8b36248cd2fdc2150074109db794ca4c0cb6a34a Mon Sep 17 00:00:00 2001 From: Shivani Baranwal Date: Fri, 2 Dec 2022 14:19:17 +0530 Subject: [PATCH] Add QCA vendor command to get the monitor mode status Add a new vendor command QCA_NL80211_VENDOR_SUBCMD_GET_MONITOR_MODE to get the local packet capture status in the monitor mode. Add required attributes to respond with status of the monitor mode. The monitor mode can be started/configured by using the QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE subcommand. Signed-off-by: Shivani Baranwal --- src/common/qca-vendor.h | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index 5f4c55c72..412823da3 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -880,6 +880,14 @@ enum qca_radiotap_vendor_ids { * * The attributes used with this subcommand are defined in * enum qca_wlan_vendor_attr_dozed_ap. + * + * @QCA_NL80211_VENDOR_SUBCMD_GET_MONITOR_MODE: This vendor subcommand is used + * to get the status of local packet capture of monitor mode. The monitor + * mode can be started using QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE + * subcommand. + * + * The attributes used with this command are defined in enum + * qca_wlan_vendor_attr_get_monitor_mode. */ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0, @@ -1088,6 +1096,7 @@ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_AFC_EVENT = 222, QCA_NL80211_VENDOR_SUBCMD_AFC_RESPONSE = 223, QCA_NL80211_VENDOR_SUBCMD_DOZED_AP = 224, + QCA_NL80211_VENDOR_SUBCMD_GET_MONITOR_MODE = 225, }; /* Compatibility defines for previously used subcmd names. @@ -14375,4 +14384,39 @@ enum qca_wlan_vendor_attr_dozed_ap { QCA_WLAN_VENDOR_ATTR_DOZED_AP_AFTER_LAST - 1, }; +/** + * enum qca_wlan_vendor_monitor_mode_status - Represents the status codes + * used with QCA_NL80211_VENDOR_SUBCMD_GET_MONITOR_MODE. + * @QCA_WLAN_VENDOR_MONITOR_MODE_NO_CAPTURE_RUNNING: Used to indicate no + * capture running status. + * @QCA_WLAN_VENDOR_MONITOR_MODE_CAPTURE_RUNNING: Used to indicate + * capture running status. + **/ + +enum qca_wlan_vendor_monitor_mode_status { + QCA_WLAN_VENDOR_MONITOR_MODE_NO_CAPTURE_RUNNING = 0, + QCA_WLAN_VENDOR_MONITOR_MODE_CAPTURE_RUNNING = 1, +}; + +/** + * enum qca_wlan_vendor_attr_get_monitor_mode - Used by the + * vendor command QCA_NL80211_VENDOR_SUBCMD_GET_MONITOR_MODE to report + * information regarding the local packet capture over the monitor mode. + * + * @QCA_WLAN_VENDOR_ATTR_GET_MONITOR_MODE_STATUS: u32 attribute. This attribute + * represents the status of the start capture commands. The values used with + * this attribute are defined in enum qca_wlan_vendor_monitor_mode_status. This + * is returned by the driver in the response to the command. + */ + +enum qca_wlan_vendor_attr_get_monitor_mode { + QCA_WLAN_VENDOR_ATTR_GET_MONITOR_MODE_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_GET_MONITOR_MODE_STATUS = 1, + + /* Keep last */ + QCA_WLAN_VENDOR_ATTR_GET_MONITOR_MODE_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_GET_MONITOR_MODE_MAX = + QCA_WLAN_VENDOR_ATTR_GET_MONITOR_MODE_AFTER_LAST - 1, +}; + #endif /* QCA_VENDOR_H */