Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Jeff Johnson | 111ad91 | 2018-03-08 10:17:56 -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 __WEXT_IW_H__ |
| 20 | #define __WEXT_IW_H__ |
| 21 | |
| 22 | #include <linux/version.h> |
| 23 | #include <linux/module.h> |
| 24 | #include <linux/netdevice.h> |
| 25 | #include <linux/wireless.h> |
| 26 | #include <net/iw_handler.h> |
| 27 | #include <linux/timer.h> |
Anurag Chouhan | ce0dc99 | 2016-02-16 18:18:03 +0530 | [diff] [blame] | 28 | #include "qdf_event.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 29 | |
Jeff Johnson | 6d38ab8 | 2017-08-28 11:36:27 -0700 | [diff] [blame] | 30 | struct hdd_context; |
Jeff Johnson | e4c11db | 2018-05-05 23:22:32 -0700 | [diff] [blame] | 31 | struct sap_config; |
Krishna Kumaar Natarajan | 9e5339d | 2016-12-05 14:12:13 -0800 | [diff] [blame] | 32 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 33 | /* |
| 34 | * order of parameters in addTs private ioctl |
| 35 | */ |
| 36 | #define HDD_WLAN_WMM_PARAM_HANDLE 0 |
| 37 | #define HDD_WLAN_WMM_PARAM_TID 1 |
| 38 | #define HDD_WLAN_WMM_PARAM_DIRECTION 2 |
| 39 | #define HDD_WLAN_WMM_PARAM_APSD 3 |
| 40 | #define HDD_WLAN_WMM_PARAM_USER_PRIORITY 4 |
| 41 | #define HDD_WLAN_WMM_PARAM_NOMINAL_MSDU_SIZE 5 |
| 42 | #define HDD_WLAN_WMM_PARAM_MAXIMUM_MSDU_SIZE 6 |
| 43 | #define HDD_WLAN_WMM_PARAM_MINIMUM_DATA_RATE 7 |
| 44 | #define HDD_WLAN_WMM_PARAM_MEAN_DATA_RATE 8 |
| 45 | #define HDD_WLAN_WMM_PARAM_PEAK_DATA_RATE 9 |
| 46 | #define HDD_WLAN_WMM_PARAM_MAX_BURST_SIZE 10 |
| 47 | #define HDD_WLAN_WMM_PARAM_MINIMUM_PHY_RATE 11 |
| 48 | #define HDD_WLAN_WMM_PARAM_SURPLUS_BANDWIDTH_ALLOWANCE 12 |
| 49 | #define HDD_WLAN_WMM_PARAM_SERVICE_INTERVAL 13 |
| 50 | #define HDD_WLAN_WMM_PARAM_SUSPENSION_INTERVAL 14 |
| 51 | #define HDD_WLAN_WMM_PARAM_BURST_SIZE_DEFN 15 |
| 52 | #define HDD_WLAN_WMM_PARAM_ACK_POLICY 16 |
| 53 | #define HDD_WLAN_WMM_PARAM_INACTIVITY_INTERVAL 17 |
| 54 | #define HDD_WLAN_WMM_PARAM_MAX_SERVICE_INTERVAL 18 |
| 55 | #define HDD_WLAN_WMM_PARAM_COUNT 19 |
| 56 | |
| 57 | #define MHZ 6 |
| 58 | |
| 59 | #define WE_MAX_STR_LEN IW_PRIV_SIZE_MASK |
| 60 | #define WLAN_HDD_UI_BAND_AUTO 0 |
| 61 | #define WLAN_HDD_UI_BAND_5_GHZ 1 |
| 62 | #define WLAN_HDD_UI_BAND_2_4_GHZ 2 |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 63 | |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 64 | enum hdd_wlan_wmm_direction { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 65 | HDD_WLAN_WMM_DIRECTION_UPSTREAM = 0, |
| 66 | HDD_WLAN_WMM_DIRECTION_DOWNSTREAM = 1, |
| 67 | HDD_WLAN_WMM_DIRECTION_BIDIRECTIONAL = 2, |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 68 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 69 | |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 70 | enum hdd_wlan_wmm_power_save { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 71 | HDD_WLAN_WMM_POWER_SAVE_LEGACY = 0, |
| 72 | HDD_WLAN_WMM_POWER_SAVE_UAPSD = 1, |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 73 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 74 | |
| 75 | typedef enum { |
| 76 | /* TSPEC/re-assoc done, async */ |
| 77 | HDD_WLAN_WMM_STATUS_SETUP_SUCCESS = 0, |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 78 | /* no need to setup TSPEC since ACM=0 and no UAPSD desired, |
| 79 | * sync + async |
| 80 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 81 | HDD_WLAN_WMM_STATUS_SETUP_SUCCESS_NO_ACM_NO_UAPSD = 1, |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 82 | /* no need to setup TSPEC since ACM=0 and UAPSD already exists, |
| 83 | * sync + async |
| 84 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 85 | HDD_WLAN_WMM_STATUS_SETUP_SUCCESS_NO_ACM_UAPSD_EXISTING = 2, |
| 86 | /* TSPEC result pending, sync */ |
| 87 | HDD_WLAN_WMM_STATUS_SETUP_PENDING = 3, |
| 88 | /* TSPEC/re-assoc failed, sync + async */ |
| 89 | HDD_WLAN_WMM_STATUS_SETUP_FAILED = 4, |
| 90 | /* Request rejected due to invalid params, sync + async */ |
| 91 | HDD_WLAN_WMM_STATUS_SETUP_FAILED_BAD_PARAM = 5, |
| 92 | /* TSPEC request rejected since AP!=QAP, sync */ |
| 93 | HDD_WLAN_WMM_STATUS_SETUP_FAILED_NO_WMM = 6, |
| 94 | |
| 95 | /* TSPEC modification/re-assoc successful, async */ |
| 96 | HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS = 7, |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 97 | /* TSPEC modification a no-op since ACM=0 and |
| 98 | * no change in UAPSD, sync + async |
| 99 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 100 | HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS_NO_ACM_NO_UAPSD = 8, |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 101 | /* TSPEC modification a no-op since ACM=0 and |
| 102 | * requested U-APSD already exists, sync + async |
| 103 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 104 | HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS_NO_ACM_UAPSD_EXISTING = 9, |
| 105 | /* TSPEC result pending, sync */ |
| 106 | HDD_WLAN_WMM_STATUS_MODIFY_PENDING = 10, |
| 107 | /* TSPEC modification failed, prev TSPEC in effect, sync + async */ |
| 108 | HDD_WLAN_WMM_STATUS_MODIFY_FAILED = 11, |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 109 | /* TSPEC modification request rejected due to invalid params, |
| 110 | * sync + async |
| 111 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 112 | HDD_WLAN_WMM_STATUS_MODIFY_FAILED_BAD_PARAM = 12, |
| 113 | |
| 114 | /* TSPEC release successful, sync and also async */ |
| 115 | HDD_WLAN_WMM_STATUS_RELEASE_SUCCESS = 13, |
| 116 | /* TSPEC release pending, sync */ |
| 117 | HDD_WLAN_WMM_STATUS_RELEASE_PENDING = 14, |
| 118 | /* TSPEC release failed, sync + async */ |
| 119 | HDD_WLAN_WMM_STATUS_RELEASE_FAILED = 15, |
| 120 | /* TSPEC release rejected due to invalid params, sync */ |
| 121 | HDD_WLAN_WMM_STATUS_RELEASE_FAILED_BAD_PARAM = 16, |
| 122 | /* TSPEC modified due to the mux'ing of requests on ACs, async */ |
| 123 | |
| 124 | HDD_WLAN_WMM_STATUS_MODIFIED = 17, |
| 125 | /* TSPEC revoked by AP, async */ |
| 126 | HDD_WLAN_WMM_STATUS_LOST = 18, |
| 127 | /* some internal failure like memory allocation failure, etc, sync */ |
| 128 | HDD_WLAN_WMM_STATUS_INTERNAL_FAILURE = 19, |
| 129 | |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 130 | /* U-APSD failed during setup but OTA setup (whether TSPEC exchnage or |
| 131 | * re-assoc) was done so app should release this QoS, async |
| 132 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 133 | HDD_WLAN_WMM_STATUS_SETUP_UAPSD_SET_FAILED = 20, |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 134 | /* U-APSD failed during modify, but OTA setup (whether TSPEC exchnage or |
| 135 | * re-assoc) was done so app should release this QoS, async |
| 136 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 137 | HDD_WLAN_WMM_STATUS_MODIFY_UAPSD_SET_FAILED = 21 |
| 138 | } hdd_wlan_wmm_status_e; |
| 139 | |
| 140 | /** TS Info Ack Policy */ |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 141 | enum hdd_wlan_wmm_ts_info_ack_policy { |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 142 | HDD_WLAN_WMM_TS_INFO_ACK_POLICY_NORMAL_ACK = 0, |
| 143 | HDD_WLAN_WMM_TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK = 1, |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 144 | }; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 145 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 146 | /** Enable 11d */ |
| 147 | #define ENABLE_11D 1 |
| 148 | |
| 149 | /** Disable 11d */ |
| 150 | #define DISABLE_11D 0 |
| 151 | |
| 152 | /* |
Srinivas Girigowda | 4859267 | 2017-03-25 14:58:44 -0700 | [diff] [blame] | 153 | * refer wpa.h in wpa supplicant code for REASON_MICHAEL_MIC_FAILURE |
| 154 | * |
| 155 | * supplicant sets REASON_MICHAEL_MIC_FAILURE as the reason code when it |
| 156 | * sends the MLME deauth IOCTL for TKIP counter measures |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 157 | */ |
| 158 | #define HDD_REASON_MICHAEL_MIC_FAILURE 14 |
| 159 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 160 | #define HDD_RTSCTS_EN_MASK 0xF |
| 161 | #define HDD_RTSCTS_ENABLE 1 |
| 162 | #define HDD_CTS_ENABLE 2 |
| 163 | |
Kiran Kumar Lokere | a006a30 | 2018-03-07 20:58:13 -0800 | [diff] [blame] | 164 | #define HDD_AUTO_RATE_SGI 0x8 |
| 165 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 166 | /* Packet Types. */ |
| 167 | #define WLAN_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2 |
| 168 | #define WLAN_KEEP_ALIVE_NULL_PKT 1 |
| 169 | |
Anurag Chouhan | bf5e0e2 | 2016-09-12 12:54:09 +0530 | [diff] [blame] | 170 | /* |
| 171 | * Defines for fw_test command |
| 172 | */ |
| 173 | #define HDD_FWTEST_PARAMS 3 |
| 174 | #define HDD_FWTEST_SU_PARAM_ID 53 |
| 175 | #define HDD_FWTEST_MU_PARAM_ID 2 |
| 176 | #define HDD_FWTEST_SU_DEFAULT_VALUE 100 |
| 177 | #define HDD_FWTEST_MU_DEFAULT_VALUE 40 |
| 178 | #define HDD_FWTEST_MAX_VALUE 500 |
| 179 | |
Rachit Kankane | 0dc3e85 | 2018-05-07 17:33:42 +0530 | [diff] [blame^] | 180 | #ifdef WLAN_WEXT_SUPPORT_ENABLE |
Jeff Johnson | 7f2c591 | 2018-03-23 11:42:28 -0700 | [diff] [blame] | 181 | /** |
| 182 | * hdd_unregister_wext() - unregister wext context |
| 183 | * @dev: net device handle |
| 184 | * |
| 185 | * Unregisters wext interface context for a given net device |
| 186 | * |
| 187 | * Returns: None |
| 188 | */ |
| 189 | void hdd_unregister_wext(struct net_device *dev); |
| 190 | |
| 191 | /** |
| 192 | * hdd_register_wext() - register wext context |
| 193 | * @dev: net device handle |
| 194 | * |
| 195 | * Registers wext interface context for a given net device |
| 196 | * |
| 197 | * Returns: None |
| 198 | */ |
| 199 | void hdd_register_wext(struct net_device *dev); |
| 200 | |
Rajeev Kumar | f5a17ac | 2018-03-08 16:30:21 -0800 | [diff] [blame] | 201 | void hdd_wlan_get_stats(struct hdd_adapter *adapter, uint16_t *length, |
| 202 | char *buffer, uint16_t buf_len); |
| 203 | void hdd_wlan_list_fw_profile(uint16_t *length, |
| 204 | char *buffer, uint16_t buf_len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 205 | |
Rajeev Kumar | f5a17ac | 2018-03-08 16:30:21 -0800 | [diff] [blame] | 206 | int iw_set_var_ints_getnone(struct net_device *dev, |
| 207 | struct iw_request_info *info, |
| 208 | union iwreq_data *wrqu, char *extra); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 209 | |
Rajeev Kumar | f5a17ac | 2018-03-08 16:30:21 -0800 | [diff] [blame] | 210 | int iw_set_three_ints_getnone(struct net_device *dev, |
| 211 | struct iw_request_info *info, |
| 212 | union iwreq_data *wrqu, char *extra); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 213 | |
Rajeev Kumar | f5a17ac | 2018-03-08 16:30:21 -0800 | [diff] [blame] | 214 | int hdd_priv_get_data(struct iw_point *p_priv_data, |
| 215 | union iwreq_data *wrqu); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 216 | |
Rajeev Kumar | f5a17ac | 2018-03-08 16:30:21 -0800 | [diff] [blame] | 217 | void *mem_alloc_copy_from_user_helper(const void *wrqu_data, size_t len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 218 | |
Jeff Johnson | 3d278b0 | 2017-08-29 14:17:47 -0700 | [diff] [blame] | 219 | int hdd_get_ldpc(struct hdd_adapter *adapter, int *value); |
| 220 | int hdd_set_ldpc(struct hdd_adapter *adapter, int value); |
| 221 | int hdd_get_tx_stbc(struct hdd_adapter *adapter, int *value); |
| 222 | int hdd_set_tx_stbc(struct hdd_adapter *adapter, int value); |
| 223 | int hdd_get_rx_stbc(struct hdd_adapter *adapter, int *value); |
| 224 | int hdd_set_rx_stbc(struct hdd_adapter *adapter, int value); |
Manjeet Singh | e80d6d8 | 2016-09-02 19:04:41 +0530 | [diff] [blame] | 225 | |
Krishna Kumaar Natarajan | 9e5339d | 2016-12-05 14:12:13 -0800 | [diff] [blame] | 226 | /** |
| 227 | * hdd_assemble_rate_code() - assemble rate code to be sent to FW |
| 228 | * @preamble: rate preamble |
| 229 | * @nss: number of streams |
| 230 | * @rate: rate index |
| 231 | * |
| 232 | * Rate code assembling is different for targets which are 11ax capable. |
| 233 | * Check for the target support and assemble the rate code accordingly. |
| 234 | * |
| 235 | * Return: assembled rate code |
| 236 | */ |
| 237 | int hdd_assemble_rate_code(uint8_t preamble, uint8_t nss, uint8_t rate); |
| 238 | |
| 239 | /** |
| 240 | * hdd_set_11ax_rate() - set 11ax rate |
| 241 | * @adapter: adapter being modified |
| 242 | * @value: new 11ax rate code |
| 243 | * @sap_config: pointer to SAP config to check HW mode |
| 244 | * this will be NULL for call from STA persona |
| 245 | * |
| 246 | * Return: 0 on success, negative errno on failure |
| 247 | */ |
Jeff Johnson | 3d278b0 | 2017-08-29 14:17:47 -0700 | [diff] [blame] | 248 | int hdd_set_11ax_rate(struct hdd_adapter *adapter, int value, |
Jeff Johnson | e4c11db | 2018-05-05 23:22:32 -0700 | [diff] [blame] | 249 | struct sap_config *sap_config); |
Krishna Kumaar Natarajan | 9e5339d | 2016-12-05 14:12:13 -0800 | [diff] [blame] | 250 | |
Jeff Johnson | cec6e92 | 2018-06-12 16:17:27 -0700 | [diff] [blame] | 251 | int wlan_hdd_update_phymode(struct net_device *net, mac_handle_t mac_handle, |
Jeff Johnson | 6d38ab8 | 2017-08-28 11:36:27 -0700 | [diff] [blame] | 252 | int new_phymode, struct hdd_context *phddctx); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 253 | |
Jeff Johnson | 441e1f7 | 2017-02-07 08:50:49 -0800 | [diff] [blame] | 254 | struct iw_request_info; |
Jeff Johnson | 4e63267 | 2017-10-03 11:40:51 -0700 | [diff] [blame] | 255 | |
Jeff Johnson | 441e1f7 | 2017-02-07 08:50:49 -0800 | [diff] [blame] | 256 | /** |
Jeff Johnson | 441e1f7 | 2017-02-07 08:50:49 -0800 | [diff] [blame] | 257 | * hdd_check_private_wext_control() - Check to see if private |
| 258 | * wireless extensions ioctls are allowed |
| 259 | * @hdd_ctx: Global HDD context |
| 260 | * @info: Wireless extensions ioctl information passed by the kernel |
| 261 | * |
| 262 | * This function will examine the "private_wext_control" configuration |
| 263 | * item to determine whether or not private wireless extensions ioctls |
| 264 | * are allowed. |
| 265 | * |
| 266 | * Return: 0 if the ioctl is allowed to be processed, -ENOTSUPP if the |
| 267 | * ioctls have been disabled. Note that in addition to returning |
| 268 | * status, this function will log a message if the ioctls are disabled |
| 269 | * or deprecated. |
| 270 | */ |
Jeff Johnson | 82797b6 | 2017-08-11 15:31:27 -0700 | [diff] [blame] | 271 | int hdd_check_private_wext_control(struct hdd_context *hdd_ctx, |
Jeff Johnson | 441e1f7 | 2017-02-07 08:50:49 -0800 | [diff] [blame] | 272 | struct iw_request_info *info); |
| 273 | |
Will Huang | 496b36c | 2017-07-11 16:38:50 +0800 | [diff] [blame] | 274 | /** |
Jeff Johnson | df5d779 | 2018-04-14 15:58:24 -0700 | [diff] [blame] | 275 | * hdd_crash_inject() - Inject a crash |
| 276 | * @adapter: Adapter upon which the command was received |
| 277 | * @v1: first value to inject |
| 278 | * @v2: second value to inject |
| 279 | * |
| 280 | * This function is the handler for the crash inject debug feature. |
| 281 | * This feature only exists for internal testing and must not be |
| 282 | * enabled on a production device. |
| 283 | * |
| 284 | * Return: result of the command |
| 285 | */ |
| 286 | #ifdef CONFIG_WLAN_DEBUG_CRASH_INJECT |
| 287 | int hdd_crash_inject(struct hdd_adapter *adapter, uint32_t v1, uint32_t v2); |
| 288 | #else |
| 289 | static inline |
| 290 | int hdd_crash_inject(struct hdd_adapter *adapter, uint32_t v1, uint32_t v2) |
| 291 | { |
| 292 | return -ENOTSUPP; |
| 293 | } |
| 294 | #endif |
| 295 | |
Nirav Shah | d21a2e3 | 2018-04-20 16:34:43 +0530 | [diff] [blame] | 296 | #ifdef CONFIG_DP_TRACE |
| 297 | void hdd_set_dump_dp_trace(uint16_t cmd_type, uint16_t count); |
| 298 | #else |
| 299 | static inline |
| 300 | void hdd_set_dump_dp_trace(uint16_t cmd_type, uint16_t count) {} |
| 301 | #endif |
Rachit Kankane | 0dc3e85 | 2018-05-07 17:33:42 +0530 | [diff] [blame^] | 302 | #else /* WLAN_WEXT_SUPPORT_ENABLE */ |
| 303 | |
| 304 | static inline void hdd_unregister_wext(struct net_device *dev) |
| 305 | { |
| 306 | } |
| 307 | |
| 308 | static inline void hdd_register_wext(struct net_device *dev) |
| 309 | { |
| 310 | } |
| 311 | #endif /* WLAN_WEXT_SUPPORT_ENABLE */ |
Nirav Shah | d21a2e3 | 2018-04-20 16:34:43 +0530 | [diff] [blame] | 312 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 313 | #endif /* __WEXT_IW_H__ */ |