1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 4*5113495bSYour Name * 5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for 6*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the 7*5113495bSYour Name * above copyright notice and this permission notice appear in all 8*5113495bSYour Name * copies. 9*5113495bSYour Name * 10*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE. 18*5113495bSYour Name */ 19*5113495bSYour Name 20*5113495bSYour Name #ifndef _OS_IF_PKT_CAPTURE_H_ 21*5113495bSYour Name #define _OS_IF_PKT_CAPTURE_H_ 22*5113495bSYour Name 23*5113495bSYour Name #include "qdf_types.h" 24*5113495bSYour Name #include "qca_vendor.h" 25*5113495bSYour Name #include "wlan_hdd_main.h" 26*5113495bSYour Name 27*5113495bSYour Name #ifdef WLAN_FEATURE_PKT_CAPTURE 28*5113495bSYour Name 29*5113495bSYour Name #define os_if_pkt_enter() QDF_TRACE_ENTER(QDF_MODULE_ID_HDD, "enter") 30*5113495bSYour Name #define os_if_pkt_exit() QDF_TRACE_EXIT(QDF_MODULE_ID_HDD, "exit") 31*5113495bSYour Name 32*5113495bSYour Name #define FEATURE_MONITOR_MODE_VENDOR_COMMANDS \ 33*5113495bSYour Name { \ 34*5113495bSYour Name .info.vendor_id = QCA_NL80211_VENDOR_ID, \ 35*5113495bSYour Name .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE, \ 36*5113495bSYour Name .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \ 37*5113495bSYour Name WIPHY_VENDOR_CMD_NEED_NETDEV | \ 38*5113495bSYour Name WIPHY_VENDOR_CMD_NEED_RUNNING, \ 39*5113495bSYour Name .doit = wlan_hdd_cfg80211_set_monitor_mode, \ 40*5113495bSYour Name vendor_command_policy(set_monitor_mode_policy, \ 41*5113495bSYour Name QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MAX) \ 42*5113495bSYour Name }, 43*5113495bSYour Name 44*5113495bSYour Name /* Short name for QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE command */ 45*5113495bSYour Name 46*5113495bSYour Name #define SET_MONITOR_MODE_CONFIG_MAX \ 47*5113495bSYour Name QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MAX 48*5113495bSYour Name #define SET_MONITOR_MODE_INVALID \ 49*5113495bSYour Name QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_INVALID 50*5113495bSYour Name #define SET_MONITOR_MODE_DATA_TX_FRAME_TYPE \ 51*5113495bSYour Name QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_DATA_TX_FRAME_TYPE 52*5113495bSYour Name #define SET_MONITOR_MODE_DATA_RX_FRAME_TYPE \ 53*5113495bSYour Name QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_DATA_RX_FRAME_TYPE 54*5113495bSYour Name #define SET_MONITOR_MODE_MGMT_TX_FRAME_TYPE \ 55*5113495bSYour Name QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MGMT_TX_FRAME_TYPE 56*5113495bSYour Name #define SET_MONITOR_MODE_MGMT_RX_FRAME_TYPE \ 57*5113495bSYour Name QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_MGMT_RX_FRAME_TYPE 58*5113495bSYour Name #define SET_MONITOR_MODE_CTRL_TX_FRAME_TYPE \ 59*5113495bSYour Name QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CTRL_TX_FRAME_TYPE 60*5113495bSYour Name #define SET_MONITOR_MODE_CTRL_RX_FRAME_TYPE \ 61*5113495bSYour Name QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CTRL_RX_FRAME_TYPE 62*5113495bSYour Name #define SET_MONITOR_MODE_CONNECTED_BEACON_INTERVAL \ 63*5113495bSYour Name QCA_WLAN_VENDOR_ATTR_SET_MONITOR_MODE_CONNECTED_BEACON_INTERVAL 64*5113495bSYour Name 65*5113495bSYour Name extern const struct nla_policy 66*5113495bSYour Name set_monitor_mode_policy[SET_MONITOR_MODE_CONFIG_MAX + 1]; 67*5113495bSYour Name 68*5113495bSYour Name /** 69*5113495bSYour Name * os_if_monitor_mode_configure() - Process monitor mode configuration 70*5113495bSYour Name * operation in the received vendor command 71*5113495bSYour Name * @adapter: adapter pointer 72*5113495bSYour Name * @data: %QCA_NL80211_VENDOR_SUBCMD_SET_MONITOR_MODE payload 73*5113495bSYour Name * @data_len: length of @data 74*5113495bSYour Name * 75*5113495bSYour Name * Return: %QDF_STATUS_SUCCESS on success, error status otherwise 76*5113495bSYour Name */ 77*5113495bSYour Name QDF_STATUS os_if_monitor_mode_configure(struct hdd_adapter *adapter, 78*5113495bSYour Name const void *data, int data_len); 79*5113495bSYour Name #endif 80*5113495bSYour Name #endif 81