Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Jeff Johnson | 4610688 | 2017-01-12 10:39:26 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
| 4 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 5 | * |
| 6 | * |
| 7 | * Permission to use, copy, modify, and/or distribute this software for |
| 8 | * any purpose with or without fee is hereby granted, provided that the |
| 9 | * above copyright notice and this permission notice appear in all |
| 10 | * copies. |
| 11 | * |
| 12 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 13 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 14 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 15 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 16 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 17 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 18 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 19 | * PERFORMANCE OF THIS SOFTWARE. |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | * This file was originally distributed by Qualcomm Atheros, Inc. |
| 24 | * under proprietary terms before Copyright ownership was assigned |
| 25 | * to the Linux Foundation. |
| 26 | */ |
| 27 | |
| 28 | #ifndef __WEXT_IW_H__ |
| 29 | #define __WEXT_IW_H__ |
| 30 | |
| 31 | #include <linux/version.h> |
| 32 | #include <linux/module.h> |
| 33 | #include <linux/netdevice.h> |
| 34 | #include <linux/wireless.h> |
| 35 | #include <net/iw_handler.h> |
| 36 | #include <linux/timer.h> |
Anurag Chouhan | ce0dc99 | 2016-02-16 18:18:03 +0530 | [diff] [blame] | 37 | #include "qdf_event.h" |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 38 | |
Krishna Kumaar Natarajan | 9e5339d | 2016-12-05 14:12:13 -0800 | [diff] [blame] | 39 | struct sap_Config; |
| 40 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 41 | /* |
| 42 | * order of parameters in addTs private ioctl |
| 43 | */ |
| 44 | #define HDD_WLAN_WMM_PARAM_HANDLE 0 |
| 45 | #define HDD_WLAN_WMM_PARAM_TID 1 |
| 46 | #define HDD_WLAN_WMM_PARAM_DIRECTION 2 |
| 47 | #define HDD_WLAN_WMM_PARAM_APSD 3 |
| 48 | #define HDD_WLAN_WMM_PARAM_USER_PRIORITY 4 |
| 49 | #define HDD_WLAN_WMM_PARAM_NOMINAL_MSDU_SIZE 5 |
| 50 | #define HDD_WLAN_WMM_PARAM_MAXIMUM_MSDU_SIZE 6 |
| 51 | #define HDD_WLAN_WMM_PARAM_MINIMUM_DATA_RATE 7 |
| 52 | #define HDD_WLAN_WMM_PARAM_MEAN_DATA_RATE 8 |
| 53 | #define HDD_WLAN_WMM_PARAM_PEAK_DATA_RATE 9 |
| 54 | #define HDD_WLAN_WMM_PARAM_MAX_BURST_SIZE 10 |
| 55 | #define HDD_WLAN_WMM_PARAM_MINIMUM_PHY_RATE 11 |
| 56 | #define HDD_WLAN_WMM_PARAM_SURPLUS_BANDWIDTH_ALLOWANCE 12 |
| 57 | #define HDD_WLAN_WMM_PARAM_SERVICE_INTERVAL 13 |
| 58 | #define HDD_WLAN_WMM_PARAM_SUSPENSION_INTERVAL 14 |
| 59 | #define HDD_WLAN_WMM_PARAM_BURST_SIZE_DEFN 15 |
| 60 | #define HDD_WLAN_WMM_PARAM_ACK_POLICY 16 |
| 61 | #define HDD_WLAN_WMM_PARAM_INACTIVITY_INTERVAL 17 |
| 62 | #define HDD_WLAN_WMM_PARAM_MAX_SERVICE_INTERVAL 18 |
| 63 | #define HDD_WLAN_WMM_PARAM_COUNT 19 |
| 64 | |
| 65 | #define MHZ 6 |
| 66 | |
| 67 | #define WE_MAX_STR_LEN IW_PRIV_SIZE_MASK |
| 68 | #define WLAN_HDD_UI_BAND_AUTO 0 |
| 69 | #define WLAN_HDD_UI_BAND_5_GHZ 1 |
| 70 | #define WLAN_HDD_UI_BAND_2_4_GHZ 2 |
| 71 | /* SETBAND x */ |
| 72 | /* 012345678 */ |
| 73 | #define WLAN_HDD_UI_SET_BAND_VALUE_OFFSET 8 |
| 74 | |
| 75 | typedef enum { |
| 76 | HDD_WLAN_WMM_DIRECTION_UPSTREAM = 0, |
| 77 | HDD_WLAN_WMM_DIRECTION_DOWNSTREAM = 1, |
| 78 | HDD_WLAN_WMM_DIRECTION_BIDIRECTIONAL = 2, |
| 79 | } hdd_wlan_wmm_direction_e; |
| 80 | |
| 81 | typedef enum { |
| 82 | HDD_WLAN_WMM_POWER_SAVE_LEGACY = 0, |
| 83 | HDD_WLAN_WMM_POWER_SAVE_UAPSD = 1, |
| 84 | } hdd_wlan_wmm_power_save_e; |
| 85 | |
| 86 | typedef enum { |
| 87 | /* TSPEC/re-assoc done, async */ |
| 88 | HDD_WLAN_WMM_STATUS_SETUP_SUCCESS = 0, |
| 89 | /* no need to setup TSPEC since ACM=0 and no UAPSD desired, sync + async */ |
| 90 | HDD_WLAN_WMM_STATUS_SETUP_SUCCESS_NO_ACM_NO_UAPSD = 1, |
| 91 | /* no need to setup TSPEC since ACM=0 and UAPSD already exists, sync + async */ |
| 92 | HDD_WLAN_WMM_STATUS_SETUP_SUCCESS_NO_ACM_UAPSD_EXISTING = 2, |
| 93 | /* TSPEC result pending, sync */ |
| 94 | HDD_WLAN_WMM_STATUS_SETUP_PENDING = 3, |
| 95 | /* TSPEC/re-assoc failed, sync + async */ |
| 96 | HDD_WLAN_WMM_STATUS_SETUP_FAILED = 4, |
| 97 | /* Request rejected due to invalid params, sync + async */ |
| 98 | HDD_WLAN_WMM_STATUS_SETUP_FAILED_BAD_PARAM = 5, |
| 99 | /* TSPEC request rejected since AP!=QAP, sync */ |
| 100 | HDD_WLAN_WMM_STATUS_SETUP_FAILED_NO_WMM = 6, |
| 101 | |
| 102 | /* TSPEC modification/re-assoc successful, async */ |
| 103 | HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS = 7, |
| 104 | /* TSPEC modification a no-op since ACM=0 and no change in UAPSD, sync + async */ |
| 105 | HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS_NO_ACM_NO_UAPSD = 8, |
| 106 | /* TSPEC modification a no-op since ACM=0 and requested U-APSD already exists, sync + async */ |
| 107 | HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS_NO_ACM_UAPSD_EXISTING = 9, |
| 108 | /* TSPEC result pending, sync */ |
| 109 | HDD_WLAN_WMM_STATUS_MODIFY_PENDING = 10, |
| 110 | /* TSPEC modification failed, prev TSPEC in effect, sync + async */ |
| 111 | HDD_WLAN_WMM_STATUS_MODIFY_FAILED = 11, |
| 112 | /* TSPEC modification request rejected due to invalid params, sync + async */ |
| 113 | HDD_WLAN_WMM_STATUS_MODIFY_FAILED_BAD_PARAM = 12, |
| 114 | |
| 115 | /* TSPEC release successful, sync and also async */ |
| 116 | HDD_WLAN_WMM_STATUS_RELEASE_SUCCESS = 13, |
| 117 | /* TSPEC release pending, sync */ |
| 118 | HDD_WLAN_WMM_STATUS_RELEASE_PENDING = 14, |
| 119 | /* TSPEC release failed, sync + async */ |
| 120 | HDD_WLAN_WMM_STATUS_RELEASE_FAILED = 15, |
| 121 | /* TSPEC release rejected due to invalid params, sync */ |
| 122 | HDD_WLAN_WMM_STATUS_RELEASE_FAILED_BAD_PARAM = 16, |
| 123 | /* TSPEC modified due to the mux'ing of requests on ACs, async */ |
| 124 | |
| 125 | HDD_WLAN_WMM_STATUS_MODIFIED = 17, |
| 126 | /* TSPEC revoked by AP, async */ |
| 127 | HDD_WLAN_WMM_STATUS_LOST = 18, |
| 128 | /* some internal failure like memory allocation failure, etc, sync */ |
| 129 | HDD_WLAN_WMM_STATUS_INTERNAL_FAILURE = 19, |
| 130 | |
| 131 | /* U-APSD failed during setup but OTA setup (whether TSPEC exchnage or */ |
| 132 | /* re-assoc) was done so app should release this QoS, async */ |
| 133 | HDD_WLAN_WMM_STATUS_SETUP_UAPSD_SET_FAILED = 20, |
| 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 | HDD_WLAN_WMM_STATUS_MODIFY_UAPSD_SET_FAILED = 21 |
| 137 | } hdd_wlan_wmm_status_e; |
| 138 | |
| 139 | /** TS Info Ack Policy */ |
| 140 | typedef enum { |
| 141 | HDD_WLAN_WMM_TS_INFO_ACK_POLICY_NORMAL_ACK = 0, |
| 142 | HDD_WLAN_WMM_TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK = 1, |
| 143 | } hdd_wlan_wmm_ts_info_ack_policy_e; |
| 144 | |
| 145 | /** Maximum Length of WPA/RSN IE */ |
| 146 | #define MAX_WPA_RSN_IE_LEN 40 |
| 147 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 148 | /** Enable 11d */ |
| 149 | #define ENABLE_11D 1 |
| 150 | |
| 151 | /** Disable 11d */ |
| 152 | #define DISABLE_11D 0 |
| 153 | |
| 154 | /* |
Jeff Johnson | 4610688 | 2017-01-12 10:39:26 -0800 | [diff] [blame] | 155 | * refer wpa.h in wpa supplicant code for REASON_MICHAEL_MIC_FAILURE. |
| 156 | * supplicant sets REASON_MICHAEL_MIC_FAILURE as the reason code when |
| 157 | * it sends the MLME deauth IOCTL for TKIP counter measures |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 158 | */ |
| 159 | #define HDD_REASON_MICHAEL_MIC_FAILURE 14 |
| 160 | |
| 161 | /* |
| 162 | * These are for TLV fields in WPS IE |
| 163 | */ |
| 164 | #define HDD_WPS_UUID_LEN 16 |
| 165 | #define HDD_WPS_ELEM_VERSION 0x104a |
| 166 | #define HDD_WPS_ELEM_REQUEST_TYPE 0x103a |
| 167 | #define HDD_WPS_ELEM_CONFIG_METHODS 0x1008 |
| 168 | #define HDD_WPS_ELEM_UUID_E 0x1047 |
| 169 | #define HDD_WPS_ELEM_PRIMARY_DEVICE_TYPE 0x1054 |
| 170 | #define HDD_WPS_ELEM_RF_BANDS 0x103c |
| 171 | #define HDD_WPS_ELEM_ASSOCIATION_STATE 0x1002 |
| 172 | #define HDD_WPS_ELEM_CONFIGURATION_ERROR 0x1009 |
| 173 | #define HDD_WPS_ELEM_DEVICE_PASSWORD_ID 0x1012 |
| 174 | |
| 175 | #define HDD_WPA_ELEM_VENDOR_EXTENSION 0x1049 |
| 176 | |
| 177 | #define HDD_WPS_MANUFACTURER_LEN 64 |
| 178 | #define HDD_WPS_MODEL_NAME_LEN 32 |
| 179 | #define HDD_WPS_MODEL_NUM_LEN 32 |
| 180 | #define HDD_WPS_SERIAL_NUM_LEN 32 |
| 181 | #define HDD_WPS_DEVICE_OUI_LEN 4 |
| 182 | #define HDD_WPS_DEVICE_NAME_LEN 32 |
| 183 | |
| 184 | #define HDD_WPS_ELEM_WPS_STATE 0x1044 |
| 185 | #define HDD_WPS_ELEM_APSETUPLOCK 0x1057 |
| 186 | #define HDD_WPS_ELEM_SELECTEDREGISTRA 0x1041 |
| 187 | #define HDD_WPS_ELEM_RSP_TYPE 0x103B |
| 188 | #define HDD_WPS_ELEM_MANUFACTURER 0x1021 |
| 189 | #define HDD_WPS_ELEM_MODEL_NAME 0x1023 |
| 190 | #define HDD_WPS_ELEM_MODEL_NUM 0x1024 |
| 191 | #define HDD_WPS_ELEM_SERIAL_NUM 0x1042 |
| 192 | #define HDD_WPS_ELEM_DEVICE_NAME 0x1011 |
| 193 | #define HDD_WPS_ELEM_REGISTRA_CONF_METHODS 0x1053 |
| 194 | |
| 195 | #define HDD_RTSCTS_EN_MASK 0xF |
| 196 | #define HDD_RTSCTS_ENABLE 1 |
| 197 | #define HDD_CTS_ENABLE 2 |
| 198 | |
| 199 | #define WPS_OUI_TYPE "\x00\x50\xf2\x04" |
| 200 | #define WPS_OUI_TYPE_SIZE 4 |
| 201 | |
| 202 | #define SS_OUI_TYPE "\x00\x16\x32" |
| 203 | #define SS_OUI_TYPE_SIZE 3 |
| 204 | |
| 205 | #define P2P_OUI_TYPE "\x50\x6f\x9a\x09" |
| 206 | #define P2P_OUI_TYPE_SIZE 4 |
| 207 | |
| 208 | #define HS20_OUI_TYPE "\x50\x6f\x9a\x10" |
| 209 | #define HS20_OUI_TYPE_SIZE 4 |
| 210 | |
| 211 | #define OSEN_OUI_TYPE "\x50\x6f\x9a\x12" |
| 212 | #define OSEN_OUI_TYPE_SIZE 4 |
| 213 | |
| 214 | #ifdef WLAN_FEATURE_WFD |
| 215 | #define WFD_OUI_TYPE "\x50\x6f\x9a\x0a" |
| 216 | #define WFD_OUI_TYPE_SIZE 4 |
| 217 | #endif |
| 218 | |
Selvaraj, Sridhar | a7fc763 | 2016-09-04 13:13:38 +0530 | [diff] [blame] | 219 | #define MBO_OUI_TYPE "\x50\x6f\x9a\x16" |
| 220 | #define MBO_OUI_TYPE_SIZE 4 |
| 221 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 222 | typedef enum { |
| 223 | eWEXT_WPS_OFF = 0, |
| 224 | eWEXT_WPS_ON = 1, |
| 225 | } hdd_wps_mode_e; |
| 226 | |
| 227 | /* |
| 228 | * This structure contains the interface level (granularity) |
| 229 | * configuration information in support of wireless extensions. |
| 230 | */ |
| 231 | typedef struct hdd_wext_state_s { |
| 232 | /** The CSR "desired" Profile */ |
| 233 | tCsrRoamProfile roamProfile; |
| 234 | |
| 235 | /** BSSID to which connect request is received */ |
Anurag Chouhan | 6d76066 | 2016-02-20 16:05:43 +0530 | [diff] [blame] | 236 | struct qdf_mac_addr req_bssId; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 237 | |
| 238 | /** The association status code */ |
| 239 | uint32_t statusCode; |
| 240 | |
| 241 | /** wpa version WPA/WPA2/None*/ |
| 242 | int32_t wpaVersion; |
| 243 | |
| 244 | /**WPA or RSN IE*/ |
| 245 | uint8_t WPARSNIE[MAX_WPA_RSN_IE_LEN]; |
| 246 | |
| 247 | /**gen IE */ |
| 248 | tSirAddie genIE; |
| 249 | |
| 250 | /**Additional IE for assoc */ |
| 251 | tSirAddie assocAddIE; |
| 252 | |
| 253 | /**auth key mgmt */ |
| 254 | int32_t authKeyMgmt; |
| 255 | |
Anurag Chouhan | f04e84f | 2016-03-03 10:12:12 +0530 | [diff] [blame] | 256 | /* qdf event */ |
| 257 | qdf_event_t hdd_qdf_event; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 258 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 259 | /**Counter measure state, Started/Stopped*/ |
| 260 | bool mTKIPCounterMeasures; |
| 261 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 262 | #ifdef FEATURE_WLAN_ESE |
| 263 | /* ESE state variables */ |
| 264 | bool isESEConnection; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 265 | #endif |
| 266 | } hdd_wext_state_t; |
| 267 | |
| 268 | typedef struct ccp_freq_chan_map_s { |
| 269 | /* List of frequencies */ |
| 270 | uint32_t freq; |
| 271 | uint32_t chan; |
| 272 | } hdd_freq_chan_map_t; |
| 273 | |
| 274 | /* Packet Types. */ |
| 275 | #define WLAN_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2 |
| 276 | #define WLAN_KEEP_ALIVE_NULL_PKT 1 |
| 277 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 278 | #define wlan_hdd_get_wps_ie_ptr(ie, ie_len) \ |
| 279 | wlan_hdd_get_vendor_oui_ie_ptr(WPS_OUI_TYPE, WPS_OUI_TYPE_SIZE, ie, ie_len) |
| 280 | |
| 281 | #define wlan_hdd_get_p2p_ie_ptr(ie, ie_len) \ |
| 282 | wlan_hdd_get_vendor_oui_ie_ptr(P2P_OUI_TYPE, P2P_OUI_TYPE_SIZE, ie, ie_len) |
| 283 | |
| 284 | #ifdef WLAN_FEATURE_WFD |
| 285 | #define wlan_hdd_get_wfd_ie_ptr(ie, ie_len) \ |
| 286 | wlan_hdd_get_vendor_oui_ie_ptr(WFD_OUI_TYPE, WFD_OUI_TYPE_SIZE, ie, ie_len) |
| 287 | #endif |
| 288 | |
Selvaraj, Sridhar | 4ea106e | 2016-08-05 20:34:46 +0530 | [diff] [blame] | 289 | #define wlan_hdd_get_mbo_ie_ptr(ie, ie_len) \ |
| 290 | wlan_hdd_get_vendor_oui_ie_ptr(MBO_OUI_TYPE, MBO_OUI_TYPE_SIZE, ie, ie_len) |
Anurag Chouhan | bf5e0e2 | 2016-09-12 12:54:09 +0530 | [diff] [blame] | 291 | /* |
| 292 | * Defines for fw_test command |
| 293 | */ |
| 294 | #define HDD_FWTEST_PARAMS 3 |
| 295 | #define HDD_FWTEST_SU_PARAM_ID 53 |
| 296 | #define HDD_FWTEST_MU_PARAM_ID 2 |
| 297 | #define HDD_FWTEST_SU_DEFAULT_VALUE 100 |
| 298 | #define HDD_FWTEST_MU_DEFAULT_VALUE 40 |
| 299 | #define HDD_FWTEST_MAX_VALUE 500 |
| 300 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 301 | extern int hdd_unregister_wext(struct net_device *dev); |
| 302 | extern int hdd_register_wext(struct net_device *dev); |
| 303 | extern int hdd_wlan_get_freq(uint32_t chan, uint32_t *freq); |
Arun Khandavalli | a96c2c0 | 2016-05-17 19:15:34 +0530 | [diff] [blame] | 304 | extern void hdd_wlan_get_version(hdd_context_t *hdd_ctx, |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 305 | union iwreq_data *wrqu, char *extra); |
| 306 | |
| 307 | extern void hdd_wlan_get_stats(hdd_adapter_t *pAdapter, uint16_t *length, |
| 308 | char *buffer, uint16_t buf_len); |
Govind Singh | a471e5e | 2015-10-12 17:11:14 +0530 | [diff] [blame] | 309 | extern void hdd_wlan_list_fw_profile(uint16_t *length, |
| 310 | char *buffer, uint16_t buf_len); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 311 | |
Jeff Johnson | 5b90762 | 2017-02-07 10:00:37 -0800 | [diff] [blame] | 312 | int iw_get_rts_threshold(struct net_device *dev, |
| 313 | struct iw_request_info *info, |
| 314 | union iwreq_data *wrqu, char *extra); |
| 315 | |
| 316 | int iw_get_frag_threshold(struct net_device *dev, |
| 317 | struct iw_request_info *info, |
| 318 | union iwreq_data *wrqu, char *extra); |
| 319 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 320 | extern int iw_set_essid(struct net_device *dev, |
| 321 | struct iw_request_info *info, |
| 322 | union iwreq_data *wrqu, char *extra); |
| 323 | |
| 324 | extern int iw_get_essid(struct net_device *dev, |
| 325 | struct iw_request_info *info, |
| 326 | struct iw_point *dwrq, char *extra); |
| 327 | |
| 328 | extern int iw_set_ap_address(struct net_device *dev, |
| 329 | struct iw_request_info *info, |
| 330 | union iwreq_data *wrqu, char *extra); |
| 331 | |
| 332 | extern int iw_get_ap_address(struct net_device *dev, |
| 333 | struct iw_request_info *info, |
| 334 | union iwreq_data *wrqu, char *extra); |
| 335 | |
| 336 | extern int iw_set_auth(struct net_device *dev, struct iw_request_info *info, |
| 337 | union iwreq_data *wrqu, char *extra); |
| 338 | |
| 339 | extern int iw_get_auth(struct net_device *dev, struct iw_request_info *info, |
| 340 | union iwreq_data *wrqu, char *extra); |
| 341 | |
| 342 | extern int iw_set_var_ints_getnone(struct net_device *dev, |
| 343 | struct iw_request_info *info, |
| 344 | union iwreq_data *wrqu, char *extra); |
| 345 | |
| 346 | extern int iw_set_three_ints_getnone(struct net_device *dev, |
| 347 | struct iw_request_info *info, |
| 348 | union iwreq_data *wrqu, char *extra); |
| 349 | |
| 350 | extern int hdd_priv_get_data(struct iw_point *p_priv_data, |
| 351 | union iwreq_data *wrqu); |
| 352 | |
| 353 | extern void *mem_alloc_copy_from_user_helper(const void *wrqu_data, size_t len); |
| 354 | |
Jeff Johnson | e50427c | 2017-01-26 10:54:49 -0800 | [diff] [blame] | 355 | /** |
| 356 | * wlan_hdd_get_linkspeed_for_peermac() - Get link speed for a peer |
| 357 | * @adapter: adapter upon which the peer is active |
| 358 | * @mac_address: MAC address of the peer |
| 359 | * @linkspeed: pointer to memory where returned link speed is to be placed |
| 360 | * |
| 361 | * This function will send a query to SME for the linkspeed of the |
| 362 | * given peer, and then wait for the callback to be invoked. |
| 363 | * |
| 364 | * Return: 0 if linkspeed data is available, negative errno otherwise |
| 365 | */ |
| 366 | int wlan_hdd_get_linkspeed_for_peermac(hdd_adapter_t *adapter, |
| 367 | struct qdf_mac_addr *mac_address, |
| 368 | uint32_t *linkspeed); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 369 | void hdd_clear_roam_profile_ie(hdd_adapter_t *pAdapter); |
| 370 | |
| 371 | uint8_t *wlan_hdd_get_vendor_oui_ie_ptr(uint8_t *oui, uint8_t oui_size, |
| 372 | uint8_t *ie, int ie_len); |
| 373 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 374 | QDF_STATUS wlan_hdd_get_class_astats(hdd_adapter_t *pAdapter); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 375 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 376 | QDF_STATUS wlan_hdd_get_station_stats(hdd_adapter_t *pAdapter); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 377 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 378 | QDF_STATUS wlan_hdd_get_rssi(hdd_adapter_t *pAdapter, int8_t *rssi_value); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 379 | |
Anurag Chouhan | fb54ab0 | 2016-02-18 18:00:46 +0530 | [diff] [blame] | 380 | QDF_STATUS wlan_hdd_get_snr(hdd_adapter_t *pAdapter, int8_t *snr); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 381 | |
Manjeet Singh | e80d6d8 | 2016-09-02 19:04:41 +0530 | [diff] [blame] | 382 | int hdd_get_ldpc(hdd_adapter_t *adapter, int *value); |
| 383 | int hdd_set_ldpc(hdd_adapter_t *adapter, int value); |
| 384 | int hdd_get_tx_stbc(hdd_adapter_t *adapter, int *value); |
| 385 | int hdd_set_tx_stbc(hdd_adapter_t *adapter, int value); |
| 386 | int hdd_get_rx_stbc(hdd_adapter_t *adapter, int *value); |
| 387 | int hdd_set_rx_stbc(hdd_adapter_t *adapter, int value); |
| 388 | |
Krishna Kumaar Natarajan | 9e5339d | 2016-12-05 14:12:13 -0800 | [diff] [blame] | 389 | /** |
| 390 | * hdd_assemble_rate_code() - assemble rate code to be sent to FW |
| 391 | * @preamble: rate preamble |
| 392 | * @nss: number of streams |
| 393 | * @rate: rate index |
| 394 | * |
| 395 | * Rate code assembling is different for targets which are 11ax capable. |
| 396 | * Check for the target support and assemble the rate code accordingly. |
| 397 | * |
| 398 | * Return: assembled rate code |
| 399 | */ |
| 400 | int hdd_assemble_rate_code(uint8_t preamble, uint8_t nss, uint8_t rate); |
| 401 | |
| 402 | /** |
| 403 | * hdd_set_11ax_rate() - set 11ax rate |
| 404 | * @adapter: adapter being modified |
| 405 | * @value: new 11ax rate code |
| 406 | * @sap_config: pointer to SAP config to check HW mode |
| 407 | * this will be NULL for call from STA persona |
| 408 | * |
| 409 | * Return: 0 on success, negative errno on failure |
| 410 | */ |
| 411 | int hdd_set_11ax_rate(hdd_adapter_t *adapter, int value, |
| 412 | struct sap_Config *sap_config); |
| 413 | |
Krishna Kumaar Natarajan | f1581df | 2017-02-21 13:42:08 -0800 | [diff] [blame] | 414 | /** |
| 415 | * hdd_set_peer_rate() - set peer rate |
| 416 | * @adapter: adapter being modified |
| 417 | * @value: rate code with AID |
| 418 | * |
| 419 | * Return: 0 on success, negative errno on failure |
| 420 | */ |
| 421 | int hdd_set_peer_rate(hdd_adapter_t *adapter, int value); |
| 422 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 423 | void wlan_hdd_change_country_code_callback(void *pAdapter); |
| 424 | |
| 425 | int hdd_set_band(struct net_device *dev, u8 ui_band); |
| 426 | int hdd_set_band_helper(struct net_device *dev, const char *command); |
| 427 | int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal, |
| 428 | int new_phymode, hdd_context_t *phddctx); |
| 429 | |
| 430 | int wlan_hdd_get_temperature(hdd_adapter_t *pAdapter, int *temperature); |
| 431 | int wlan_hdd_get_link_speed(hdd_adapter_t *sta_adapter, uint32_t *link_speed); |
Jeff Johnson | 441e1f7 | 2017-02-07 08:50:49 -0800 | [diff] [blame] | 432 | |
| 433 | struct iw_request_info; |
| 434 | /** |
| 435 | * hdd_check_standard_wext_control() - Check to see if standard |
| 436 | * wireless extensions ioctls are allowed |
| 437 | * @hdd_ctx: Global HDD context |
| 438 | * @info: Wireless extensions ioctl information passed by the kernel |
| 439 | * |
| 440 | * This function will examine the "standard_wext_control" configuration |
| 441 | * item to determine whether or not standard wireless extensions ioctls |
| 442 | * are allowed. |
| 443 | * |
| 444 | * Return: 0 if the ioctl is allowed to be processed, -ENOTSUPP if the |
| 445 | * ioctls have been disabled. Note that in addition to returning |
| 446 | * status, this function will log a message if the ioctls are disabled |
| 447 | * or deprecated. |
| 448 | */ |
| 449 | int hdd_check_standard_wext_control(struct hdd_context_s *hdd_ctx, |
| 450 | struct iw_request_info *info); |
| 451 | |
| 452 | /** |
| 453 | * hdd_check_private_wext_control() - Check to see if private |
| 454 | * wireless extensions ioctls are allowed |
| 455 | * @hdd_ctx: Global HDD context |
| 456 | * @info: Wireless extensions ioctl information passed by the kernel |
| 457 | * |
| 458 | * This function will examine the "private_wext_control" configuration |
| 459 | * item to determine whether or not private wireless extensions ioctls |
| 460 | * are allowed. |
| 461 | * |
| 462 | * Return: 0 if the ioctl is allowed to be processed, -ENOTSUPP if the |
| 463 | * ioctls have been disabled. Note that in addition to returning |
| 464 | * status, this function will log a message if the ioctls are disabled |
| 465 | * or deprecated. |
| 466 | */ |
| 467 | int hdd_check_private_wext_control(struct hdd_context_s *hdd_ctx, |
| 468 | struct iw_request_info *info); |
| 469 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 470 | #endif /* __WEXT_IW_H__ */ |