qcacmn: add vendor command to configure the parameters for monitor mode
Add new vendor command to configure monitor mode packet filter parameters which includes data/mgmt/ctrl frame types. Change-Id: Ie5e5d35b725e3d1b617edc1c889dc269b22a3673 CRs-Fixed: 3025489
This commit is contained in:

committed by
Madan Koyyalamudi

parent
2d0856d0b2
commit
e045cd0fed
@@ -506,6 +506,29 @@
|
|||||||
* moved to the existing diag infra with cnss diag events. This command
|
* moved to the existing diag infra with cnss diag events. This command
|
||||||
* will be deprecated soon and it is not recommended to do any further
|
* will be deprecated soon and it is not recommended to do any further
|
||||||
* enhancements to this command.
|
* enhancements to this command.
|
||||||
|
*
|
||||||
|
* @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/mgmt/ctrl
|
||||||
|
* 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 with in 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, then 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 implications.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum qca_nl80211_vendor_subcmds {
|
enum qca_nl80211_vendor_subcmds {
|
||||||
@@ -743,6 +766,7 @@ enum qca_nl80211_vendor_subcmds {
|
|||||||
QCA_NL80211_VENDOR_SUBCMD_GET_RADAR_HISTORY = 199,
|
QCA_NL80211_VENDOR_SUBCMD_GET_RADAR_HISTORY = 199,
|
||||||
QCA_NL80211_VENDOR_SUBCMD_MDNS_OFFLOAD = 200,
|
QCA_NL80211_VENDOR_SUBCMD_MDNS_OFFLOAD = 200,
|
||||||
QCA_NL80211_VENDOR_SUBCMD_DIAG_DATA = 201,
|
QCA_NL80211_VENDOR_SUBCMD_DIAG_DATA = 201,
|
||||||
|
QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE = 202,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum qca_wlan_vendor_tos {
|
enum qca_wlan_vendor_tos {
|
||||||
@@ -12240,4 +12264,116 @@ enum qca_wlan_vendor_attr_diag {
|
|||||||
QCA_WLAN_VENDOR_ATTR_DIAG_AFTER_LAST - 1,
|
QCA_WLAN_VENDOR_ATTR_DIAG_AFTER_LAST - 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qca_wlan_vendor_monitor_data_frame_type - Represent the various
|
||||||
|
* data 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
|
||||||
|
* mgmt types to be sent over the monitor interface.
|
||||||
|
* @QCA_WLAN_VENDOR_MONITOR_MGMT_FRAME_TYPE_ALL: All the MGMT Frames.
|
||||||
|
* @QCA_WLAN_VENDOR_MONITOR_MGMT_CONNECT_NO_BEACON: All the MGMT Frames
|
||||||
|
* except the Beacons. Valid only in the Connect state.
|
||||||
|
* @QCA_WLAN_VENDOR_MONITOR_MGMT_CONNECT_BEACON: Only the connected
|
||||||
|
* BSSID Beacons. Valid only in the Connect state.
|
||||||
|
* @QCA_WLAN_VENDOR_MONITOR_MGMT_CONNECT_SCAN_BEACON: Represents
|
||||||
|
* the Beacons 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_CONNECT_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
|
||||||
|
* ctrl types to be sent over the monitor interface.
|
||||||
|
* @QCA_WLAN_VENDOR_MONITOR_CTRL_FRAME_TYPE_ALL: All the ctrl 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 packet type to be monitored (u32). These data packets
|
||||||
|
* 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 tx data packet type to be monitored (u32). These data packets
|
||||||
|
* 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 data packet type to be monitored (u32). These mgmt packets
|
||||||
|
* 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 tx data packet type to be monitored (u32). These mgmt packets
|
||||||
|
* 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 data packet type to be monitored (u32). These ctrl packets
|
||||||
|
* 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 tx data packet type to be monitored (u32). These ctrl packets
|
||||||
|
* are represented by enum qca_wlan_vendor_monitor_ctrl_frame_type.
|
||||||
|
*
|
||||||
|
* @QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CONNECTED_BEACON_INTERVAL:
|
||||||
|
* u32 attribute, An interval only for the connected beacon interval, which
|
||||||
|
* expects that the connected BSSID's beacons shall be sent on the monitor
|
||||||
|
* interface only on 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
|
#endif
|
||||||
|
Reference in New Issue
Block a user