]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add QCA vendor command to get the monitor mode status
authorShivani Baranwal <quic_shivbara@quicinc.com>
Fri, 2 Dec 2022 08:49:17 +0000 (14:19 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 19 Dec 2022 19:00:44 +0000 (21:00 +0200)
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 <quic_shivbara@quicinc.com>
src/common/qca-vendor.h

index 5f4c55c7208245863cea368113f2800efbf755db..412823da3c81665a128813b1b4807a5a571a6fc6 100644 (file)
@@ -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 */