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