Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Liangwei Dong | 2a7f291 | 2018-02-07 17:08:17 +0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 19 | #ifndef _QC_SAP_IOCTL_H_ |
| 20 | #define _QC_SAP_IOCTL_H_ |
| 21 | |
| 22 | /* |
| 23 | * QCSAP ioctls. |
| 24 | */ |
| 25 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 26 | #define QCSAP_ADDR_LEN 6 |
| 27 | |
| 28 | typedef uint8_t qcmacaddr[QCSAP_ADDR_LEN]; |
| 29 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 30 | /* |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 31 | * Channel List Info |
| 32 | */ |
| 33 | |
Srinivas Girigowda | c231df6 | 2017-03-24 18:27:57 -0700 | [diff] [blame] | 34 | struct channel_list_info { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 35 | uint8_t num_channels; |
| 36 | uint8_t channels[WNI_CFG_VALID_CHANNEL_LIST_LEN]; |
Srinivas Girigowda | c231df6 | 2017-03-24 18:27:57 -0700 | [diff] [blame] | 37 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 38 | |
| 39 | #ifdef __linux__ |
| 40 | /* |
| 41 | * Wireless Extensions API, private ioctl interfaces. |
| 42 | * |
| 43 | * NB: Even-numbered ioctl numbers have set semantics and are privileged! |
| 44 | * (regardless of the incorrect comment in wireless.h!) |
| 45 | */ |
| 46 | |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 47 | #define QCSAP_IOCTL_SETPARAM (SIOCIWFIRSTPRIV + 0) |
| 48 | #define QCSAP_IOCTL_GETPARAM (SIOCIWFIRSTPRIV + 1) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 49 | /* (SIOCIWFIRSTPRIV+2) is unused */ |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 50 | #define QCSAP_IOCTL_SET_NONE_GET_THREE (SIOCIWFIRSTPRIV + 3) |
| 51 | #define WE_GET_TSF 1 |
| 52 | #define QCSAP_IOCTL_GET_STAWPAIE (SIOCIWFIRSTPRIV + 4) |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 53 | #define QCSAP_IOCTL_STOPBSS (SIOCIWFIRSTPRIV + 6) |
| 54 | #define QCSAP_IOCTL_VERSION (SIOCIWFIRSTPRIV + 7) |
Jeff Johnson | c98d41d | 2017-10-27 21:41:53 -0700 | [diff] [blame] | 55 | /* (SIOCIWFIRSTPRIV + 8) is unused */ |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 56 | #define QCSAP_IOCTL_GET_CHANNEL (SIOCIWFIRSTPRIV + 9) |
| 57 | #define QCSAP_IOCTL_ASSOC_STA_MACADDR (SIOCIWFIRSTPRIV + 10) |
| 58 | #define QCSAP_IOCTL_DISASSOC_STA (SIOCIWFIRSTPRIV + 11) |
Srinivas Girigowda | c34f11d | 2016-02-25 16:02:42 -0800 | [diff] [blame] | 59 | #define QCSAP_IOCTL_SET_PKTLOG (SIOCIWFIRSTPRIV + 12) |
| 60 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 61 | /* Private ioctls and their sub-ioctls */ |
| 62 | #define QCSAP_PRIV_GET_CHAR_SET_NONE (SIOCIWFIRSTPRIV + 13) |
| 63 | #define QCSAP_GET_STATS 1 |
Govind Singh | a471e5e | 2015-10-12 17:11:14 +0530 | [diff] [blame] | 64 | #define QCSAP_LIST_FW_PROFILE 2 |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 65 | #define QCSAP_IOCTL_CLR_STATS (SIOCIWFIRSTPRIV + 14) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 66 | |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 67 | #define QCSAP_IOCTL_PRIV_SET_THREE_INT_GET_NONE (SIOCIWFIRSTPRIV + 15) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 68 | #define WE_SET_WLAN_DBG 1 |
| 69 | #define WE_SET_DP_TRACE 2 |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 70 | #define QCSAP_IOCTL_PRIV_SET_VAR_INT_GET_NONE (SIOCIWFIRSTPRIV + 16) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 71 | #define WE_UNIT_TEST_CMD 7 |
Liangwei Dong | 2a7f291 | 2018-02-07 17:08:17 +0800 | [diff] [blame] | 72 | /* |
| 73 | * <ioctl> |
| 74 | * ch_avoid - unit test SAP channel avoidance |
| 75 | * |
| 76 | * @INPUT: chan avoid ranges |
| 77 | * |
| 78 | * @OUTPUT: none |
| 79 | * |
| 80 | * This IOCTL is used to fake a channel avoidance event. |
| 81 | * To test SAP/GO chan switch during chan avoid event process. |
| 82 | * |
| 83 | * @E.g: iwpriv wlan0 ch_avoid 2452 2462 |
| 84 | * |
| 85 | * Supported Feature: SAP chan avoidance. |
| 86 | * |
| 87 | * Usage: Internal |
| 88 | * |
| 89 | * </ioctl> |
| 90 | */ |
| 91 | #define WE_SET_CHAN_AVOID 21 |
| 92 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 93 | #define WE_P2P_NOA_CMD 2 |
| 94 | |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 95 | #define QCSAP_IOCTL_MODIFY_ACL (SIOCIWFIRSTPRIV + 18) |
| 96 | #define QCSAP_IOCTL_GET_CHANNEL_LIST (SIOCIWFIRSTPRIV + 19) |
| 97 | #define QCSAP_IOCTL_SET_TX_POWER (SIOCIWFIRSTPRIV + 20) |
| 98 | #define QCSAP_IOCTL_GET_STA_INFO (SIOCIWFIRSTPRIV + 21) |
| 99 | #define QCSAP_IOCTL_SET_MAX_TX_POWER (SIOCIWFIRSTPRIV + 22) |
| 100 | #define QCSAP_IOCTL_GET_INI_CFG (SIOCIWFIRSTPRIV + 25) |
| 101 | #define QCSAP_IOCTL_SET_INI_CFG (SIOCIWFIRSTPRIV + 26) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 102 | #define QCSAP_IOCTL_SET_TWO_INT_GET_NONE (SIOCIWFIRSTPRIV + 28) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 103 | #define QCSAP_IOCTL_SET_FW_CRASH_INJECT 1 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 104 | #define QCSAP_IOCTL_DUMP_DP_TRACE_LEVEL 2 |
Govind Singh | a471e5e | 2015-10-12 17:11:14 +0530 | [diff] [blame] | 105 | #define QCSAP_ENABLE_FW_PROFILE 3 |
| 106 | #define QCSAP_SET_FW_PROFILE_HIST_INTVL 4 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 107 | |
Dustin Brown | d95b96b | 2016-12-09 15:08:26 -0800 | [diff] [blame] | 108 | /* Private sub-ioctl for initiating WoW suspend without Apps suspend */ |
| 109 | #define QCSAP_SET_WLAN_SUSPEND 5 |
| 110 | #define QCSAP_SET_WLAN_RESUME 6 |
| 111 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 112 | #define MAX_VAR_ARGS 7 |
Will Huang | 496b36c | 2017-07-11 16:38:50 +0800 | [diff] [blame] | 113 | #define QCSAP_IOCTL_PRIV_GET_RSSI (SIOCIWFIRSTPRIV + 29) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 114 | #define QCSAP_IOCTL_PRIV_GET_SOFTAP_LINK_SPEED (SIOCIWFIRSTPRIV + 31) |
| 115 | |
| 116 | #define QCSAP_IOCTL_MAX_STR_LEN 1024 |
| 117 | |
| 118 | #define RC_2_RATE_IDX(_rc) ((_rc) & 0x7) |
| 119 | #define HT_RC_2_STREAMS(_rc) ((((_rc) & 0x78) >> 3) + 1) |
| 120 | |
| 121 | #define RC_2_RATE_IDX_11AC(_rc) ((_rc) & 0xf) |
| 122 | #define HT_RC_2_STREAMS_11AC(_rc) ((((_rc) & 0x30) >> 4) + 1) |
| 123 | |
Krishna Kumaar Natarajan | 9e5339d | 2016-12-05 14:12:13 -0800 | [diff] [blame] | 124 | #define RC_2_RATE_IDX_11AX(_rc) ((_rc) & 0x1f) |
| 125 | #define HT_RC_2_STREAMS_11AX(_rc) (((_rc) >> 5) & 0x7) |
| 126 | |
Kapil Gupta | 825f1ba | 2017-01-03 12:24:01 +0530 | [diff] [blame] | 127 | /* |
| 128 | * <ioctl> |
| 129 | * setRadar - simulate a radar event |
| 130 | * |
| 131 | * @INPUT: None |
| 132 | * |
| 133 | * @OUTPUT: None |
| 134 | * |
| 135 | * This IOCTL is used to simulate a radar event, state machines for |
| 136 | * SAP will behave as same way in which a radar event is reported by WMA |
| 137 | * |
| 138 | * @E.g: iwpriv wlan0 setRadar |
| 139 | * |
| 140 | * Supported Feature: DFS |
| 141 | * |
| 142 | * Usage: Internal |
| 143 | * |
| 144 | * </ioctl> |
| 145 | */ |
| 146 | |
| 147 | /* |
| 148 | * <ioctl> |
| 149 | * setRadarDbg - enable/disable radar specific logs |
| 150 | * |
| 151 | * @INPUT: 1/0 |
| 152 | * |
| 153 | * @OUTPUT: None |
| 154 | * |
| 155 | * This IOCTL is enable radar phyerror info in wma |
| 156 | * |
| 157 | * @E.g: iwpriv wlan0 setRadarDbg <enable> |
| 158 | * iwpriv wlan0 setRadarDbg 1 |
| 159 | * |
| 160 | * Supported Feature: DFS |
| 161 | * |
| 162 | * Usage: Internal |
| 163 | * |
| 164 | * </ioctl> |
| 165 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 166 | enum { |
| 167 | QCSAP_PARAM_MAX_ASSOC = 1, |
| 168 | QCSAP_PARAM_GET_WLAN_DBG, |
| 169 | QCSAP_PARAM_CLR_ACL = 4, |
| 170 | QCSAP_PARAM_ACL_MODE, |
| 171 | QCSAP_PARAM_HIDE_SSID, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 172 | QCSAP_PARAM_SET_MC_RATE, |
| 173 | QCSAP_PARAM_SET_TXRX_FW_STATS, |
| 174 | QCSAP_PARAM_SET_MCC_CHANNEL_LATENCY, |
| 175 | QCSAP_PARAM_SET_MCC_CHANNEL_QUOTA, |
| 176 | QCSAP_DBGLOG_LOG_LEVEL, |
| 177 | QCSAP_DBGLOG_VAP_ENABLE, |
| 178 | QCSAP_DBGLOG_VAP_DISABLE, |
| 179 | QCSAP_DBGLOG_MODULE_ENABLE, |
| 180 | QCSAP_DBGLOG_MODULE_DISABLE, |
| 181 | QCSAP_DBGLOG_MOD_LOG_LEVEL, |
| 182 | QCSAP_DBGLOG_TYPE, |
| 183 | QCSAP_DBGLOG_REPORT_ENABLE, |
| 184 | QCASAP_TXRX_FWSTATS_RESET, |
| 185 | QCSAP_PARAM_RTSCTS, |
| 186 | QCASAP_SET_11N_RATE, |
| 187 | QCASAP_SET_VHT_RATE, |
| 188 | QCASAP_SHORT_GI, |
| 189 | QCSAP_SET_AMPDU, |
| 190 | QCSAP_SET_AMSDU, |
| 191 | QCSAP_GTX_HT_MCS, |
| 192 | QCSAP_GTX_VHT_MCS, |
| 193 | QCSAP_GTX_USRCFG, |
| 194 | QCSAP_GTX_THRE, |
| 195 | QCSAP_GTX_MARGIN, |
| 196 | QCSAP_GTX_STEP, |
| 197 | QCSAP_GTX_MINTPC, |
| 198 | QCSAP_GTX_BWMASK, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 199 | QCASAP_SET_TM_LEVEL, |
| 200 | QCASAP_SET_DFS_IGNORE_CAC, |
| 201 | QCASAP_GET_DFS_NOL, |
| 202 | QCASAP_SET_DFS_NOL, |
| 203 | QCSAP_PARAM_SET_CHANNEL_CHANGE, |
| 204 | QCASAP_SET_DFS_TARGET_CHNL, |
| 205 | QCASAP_SET_RADAR_CMD, |
| 206 | QCSAP_GET_ACL, |
| 207 | QCASAP_TX_CHAINMASK_CMD, |
| 208 | QCASAP_RX_CHAINMASK_CMD, |
| 209 | QCASAP_NSS_CMD, |
| 210 | QCSAP_IPA_UC_STAT, |
| 211 | QCASAP_SET_PHYMODE, |
| 212 | QCASAP_GET_TEMP_CMD, |
| 213 | QCASAP_DUMP_STATS, |
| 214 | QCASAP_CLEAR_STATS, |
| 215 | QCASAP_SET_RADAR_DBG, |
Govind Singh | a471e5e | 2015-10-12 17:11:14 +0530 | [diff] [blame] | 216 | QCSAP_GET_FW_PROFILE_DATA, |
Manikandan Mohan | dcc21ba | 2016-03-15 14:31:56 -0700 | [diff] [blame] | 217 | QCSAP_START_FW_PROFILING, |
| 218 | QCSAP_CAP_TSF, |
| 219 | QCSAP_GET_TSF, |
Manjeet Singh | e80d6d8 | 2016-09-02 19:04:41 +0530 | [diff] [blame] | 220 | QCSAP_PARAM_CONC_SYSTEM_PREF, |
| 221 | QCASAP_PARAM_LDPC, |
| 222 | QCASAP_PARAM_TX_STBC, |
| 223 | QCASAP_PARAM_RX_STBC, |
Kai Liu | bdd5fcb | 2016-09-28 22:55:44 +0800 | [diff] [blame] | 224 | QCSAP_PARAM_CHAN_WIDTH, |
Venkata Sharath Chandra Manchala | 8398563 | 2017-02-28 14:16:22 -0800 | [diff] [blame] | 225 | QCSAP_PARAM_SET_TXRX_STATS, |
Krishna Kumaar Natarajan | 9e5339d | 2016-12-05 14:12:13 -0800 | [diff] [blame] | 226 | QCASAP_SET_11AX_RATE, |
Krishna Kumaar Natarajan | f1581df | 2017-02-21 13:42:08 -0800 | [diff] [blame] | 227 | QCASAP_SET_PEER_RATE, |
Krishna Kumaar Natarajan | 1a71ec7 | 2017-03-23 12:26:31 -0700 | [diff] [blame] | 228 | QCASAP_PARAM_DCM, |
Krishna Kumaar Natarajan | 150cd01 | 2017-03-23 12:29:10 -0700 | [diff] [blame] | 229 | QCASAP_PARAM_RANGE_EXT, |
lifeng | 959a04c | 2017-05-10 14:21:28 +0800 | [diff] [blame] | 230 | QCSAP_SET_DEFAULT_AMPDU, |
| 231 | QCSAP_ENABLE_RTS_BURSTING, |
Kiran Kumar Lokere | e6476b2 | 2017-10-16 23:40:32 -0700 | [diff] [blame] | 232 | QCASAP_SET_HE_BSS_COLOR, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 233 | }; |
| 234 | |
Agrawal Ashish | 6c9bca7 | 2016-09-04 13:37:59 +0530 | [diff] [blame] | 235 | int iw_get_channel_list(struct net_device *dev, |
| 236 | struct iw_request_info *info, |
| 237 | union iwreq_data *wrqu, char *extra); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 238 | |
| 239 | #endif /* __linux__ */ |
| 240 | |
| 241 | #endif /*_QC_SAP_IOCTL_H_*/ |