QCA vendor command to configure the parameters for monitor mode

This new vendor command aims to indicate the driver to enable the
monitor mode for an interface on which this command is issued. Once
enabled, the frames (both TX and RX) on this interface are sent to an
active coexisting monitor interface.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
master
Sunil Dutt 3 years ago committed by Jouni Malinen
parent 8f7b2c898d
commit 1518638b70

@ -725,6 +725,29 @@ enum qca_radiotap_vendor_ids {
* @QCA_NL80211_VENDOR_SUBCMD_MDNS_OFFLOAD: Userspace can use this command to
* enable/disable mDNS offload to the firmware. The attributes used with
* this command are defined in enum qca_wlan_vendor_attr_mdns_offload.
*
* @QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE: This vendor subcommand is used
* to set packet monitor mode that aims to send the specified set of TX and
* RX frames on the current client interface to an active monitor
* interface. If this monitor mode is set, the driver will send the
* configured frames, from the interface on which the command is issued, to
* an active monitor interface. The attributes used with this command are
* defined in enum qca_wlan_vendor_attr_set_monitor_mode.
*
* Though the monitor mode is configured for the respective
* Data/Management/Control frames, it is up to the respective WLAN
* driver/firmware/hardware designs to consider the possibility of sending
* these frames over the monitor interface. For example, the Control frames
* are handled within the hardware and thus passing such frames over the
* monitor interface is left to the respective designs.
*
* Also, this monitor mode is governed to behave accordingly in
* suspend/resume states. If the firmware handles any of such frames in
* suspend state without waking up the host and if the monitor mode is
* configured to notify all such frames, the firmware is expected to resume
* the host and forward the respective frames to the monitor interface.
* Please note that such a request to get the frames over the monitor
* interface will have a definite power implication.
*/
enum qca_nl80211_vendor_subcmds {
QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0,
@ -916,6 +939,7 @@ enum qca_nl80211_vendor_subcmds {
QCA_NL80211_VENDOR_SUBCMD_GET_RADAR_HISTORY = 199,
QCA_NL80211_VENDOR_SUBCMD_MDNS_OFFLOAD = 200,
/* 201 - reserved for QCA */
QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE = 202,
};
enum qca_wlan_vendor_attr {
@ -11393,4 +11417,120 @@ enum qca_wlan_vendor_attr_mdns_offload {
QCA_WLAN_VENDOR_ATTR_MDNS_OFFLOAD_AFTER_LAST - 1,
};
/**
* qca_wlan_vendor_monitor_data_frame_type - Represent the various
* Data frame types to be sent over the monitor interface.
*/
enum qca_wlan_vendor_monitor_data_frame_type {
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_ALL = BIT(0),
/* valid only if QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_ALL is not set
*/
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_ARP = BIT(1),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_DHCPV4 = BIT(2),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_DHCPV6 = BIT(3),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_EAPOL = BIT(4),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_DNSV4 = BIT(5),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_DNSV6 = BIT(6),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_TCP_SYN = BIT(7),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_TCP_SYNACK = BIT(8),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_TCP_FIN = BIT(9),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_TCP_FINACK = BIT(10),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_TCP_ACK = BIT(11),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_TCP_RST = BIT(12),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_ICMPV4 = BIT(13),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_ICMPV6 = BIT(14),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_RTP = BIT(15),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_TYPE_SIP = BIT(16),
QCA_WLAN_VENDOR_MONITOR_DATA_FRAME_QOS_NULL = BIT(17),
};
/**
* qca_wlan_vendor_monitor_mgmt_frame_type - Represent the various
* Management frame types to be sent over the monitor interface.
* @QCA_WLAN_VENDOR_MONITOR_MGMT_FRAME_TYPE_ALL: All the Management Frames.
* @QCA_WLAN_VENDOR_MONITOR_MGMT_CONNECT_NO_BEACON: All the Management frames
* except the Beacon frame.
* @QCA_WLAN_VENDOR_MONITOR_MGMT_CONNECT_BEACON: Only the connected
* BSSID Beacon frames. Valid only in the connected state.
* @QCA_WLAN_VENDOR_MONITOR_MGMT_CONNECT_SCAN_BEACON: Represents
* the Beacon frames obtained during the scan (off channel and connected
* channel), when in connected state.
*/
enum qca_wlan_vendor_monitor_mgmt_frame_type {
QCA_WLAN_VENDOR_MONITOR_MGMT_FRAME_TYPE_ALL = BIT(0),
/* valid only if QCA_WLAN_VENDOR_MONITOR_MGMT_FRAME_TYPE_ALL is not set
*/
QCA_WLAN_VENDOR_MONITOR_MGMT_NO_BEACON = BIT(1),
QCA_WLAN_VENDOR_MONITOR_MGMT_CONNECT_BEACON = BIT(2),
QCA_WLAN_VENDOR_MONITOR_MGMT_CONNECT_SCAN_BEACON = BIT(3),
};
/**
* qca_wlan_vendor_monitor_ctrl_frame_type - Represent the various
* Control frame types to be sent over the monitor interface.
* @QCA_WLAN_VENDOR_MONITOR_CTRL_FRAME_TYPE_ALL: All the Control frames
* @QCA_WLAN_VENDOR_MONITOR_CTRL_TRIGGER_FRAME: Trigger frame
*/
enum qca_wlan_vendor_monitor_ctrl_frame_type {
QCA_WLAN_VENDOR_MONITOR_CTRL_FRAME_TYPE_ALL = BIT(0),
/* valid only if QCA_WLAN_VENDOR_MONITOR_CTRL_FRAME_TYPE_ALL is not set
*/
QCA_WLAN_VENDOR_MONITOR_CTRL_TRIGGER_FRAME = BIT(1),
};
/**
* enum qca_wlan_vendor_attr_set_monitor_mode - Used by the
* vendor command QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE to set the
* monitor mode.
*
* @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_DATA_TX_FRAME_TYPE: u32 attribute.
* Represents the TX Data frame types to be monitored (u32). These Data frames
* are represented by enum qca_wlan_vendor_monitor_data_frame_type.
*
* @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_DATA_RX_FRAME_TYPE: u32 attribute.
* Represents the RX Data frame types to be monitored (u32). These Data frames
* are represented by enum qca_wlan_vendor_monitor_data_frame_type.
*
* @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MGMT_TX_FRAME_TYPE: u32 attribute.
* Represents the TX Management frame types to be monitored (u32). These
* Management frames are represented by
* enum qca_wlan_vendor_monitor_mgmt_frame_type.
*
* @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MGMT_RX_FRAME_TYPE: u32 attribute.
* Represents the RX Management frame types to be monitored (u32). These
* Management frames are represented by
* enum qca_wlan_vendor_monitor_mgmt_frame_type.
*
* @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CTRL_TX_FRAME_TYPE: u32 attribute.
* Represents the TX Control frame types to be monitored (u32). These Control
* frames are represented by enum qca_wlan_vendor_monitor_ctrl_frame_type.
*
* @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CTRL_RX_FRAME_TYPE: u32 attribute.
* Represents the RX Control frame types to be monitored (u32). These Control
* frames are represented by enum qca_wlan_vendor_monitor_ctrl_frame_type.
*
* @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CONNECTED_BEACON_INTERVAL: u32
* attribute.
* Represents the interval in milliseconds only for the connected Beacon frames,
* expecting the connected BSS's Beacon frames to be sent on the monitor
* interface at this specific interval.
*/
enum qca_wlan_vendor_attr_set_monitor_mode
{
QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_INVALID = 0,
QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_DATA_TX_FRAME_TYPE = 1,
QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_DATA_RX_FRAME_TYPE = 2,
QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MGMT_TX_FRAME_TYPE = 3,
QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MGMT_RX_FRAME_TYPE = 4,
QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CTRL_TX_FRAME_TYPE = 5,
QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CTRL_RX_FRAME_TYPE = 6,
QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CONNECTED_BEACON_INTERVAL = 7,
/* keep last */
QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_AFTER_LAST,
QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MAX =
QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_AFTER_LAST - 1,
};
#endif /* QCA_VENDOR_H */

Loading…
Cancel
Save