blob: 828d5c684fd7a6f81107677beae3d0f1649b9371 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Jeff Johnson46106882017-01-12 10:39:26 -08002 * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
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 Chouhance0dc992016-02-16 18:18:03 +053037#include "qdf_event.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080038
Krishna Kumaar Natarajan9e5339d2016-12-05 14:12:13 -080039struct sap_Config;
40
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080041/*
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
Srinivas Girigowda48592672017-03-25 14:58:44 -070075enum hdd_wlan_wmm_direction {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080076 HDD_WLAN_WMM_DIRECTION_UPSTREAM = 0,
77 HDD_WLAN_WMM_DIRECTION_DOWNSTREAM = 1,
78 HDD_WLAN_WMM_DIRECTION_BIDIRECTIONAL = 2,
Srinivas Girigowda48592672017-03-25 14:58:44 -070079};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080080
Srinivas Girigowda48592672017-03-25 14:58:44 -070081enum hdd_wlan_wmm_power_save {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080082 HDD_WLAN_WMM_POWER_SAVE_LEGACY = 0,
83 HDD_WLAN_WMM_POWER_SAVE_UAPSD = 1,
Srinivas Girigowda48592672017-03-25 14:58:44 -070084};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080085
86typedef enum {
87 /* TSPEC/re-assoc done, async */
88 HDD_WLAN_WMM_STATUS_SETUP_SUCCESS = 0,
Srinivas Girigowda48592672017-03-25 14:58:44 -070089 /* no need to setup TSPEC since ACM=0 and no UAPSD desired,
90 * sync + async
91 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080092 HDD_WLAN_WMM_STATUS_SETUP_SUCCESS_NO_ACM_NO_UAPSD = 1,
Srinivas Girigowda48592672017-03-25 14:58:44 -070093 /* no need to setup TSPEC since ACM=0 and UAPSD already exists,
94 * sync + async
95 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080096 HDD_WLAN_WMM_STATUS_SETUP_SUCCESS_NO_ACM_UAPSD_EXISTING = 2,
97 /* TSPEC result pending, sync */
98 HDD_WLAN_WMM_STATUS_SETUP_PENDING = 3,
99 /* TSPEC/re-assoc failed, sync + async */
100 HDD_WLAN_WMM_STATUS_SETUP_FAILED = 4,
101 /* Request rejected due to invalid params, sync + async */
102 HDD_WLAN_WMM_STATUS_SETUP_FAILED_BAD_PARAM = 5,
103 /* TSPEC request rejected since AP!=QAP, sync */
104 HDD_WLAN_WMM_STATUS_SETUP_FAILED_NO_WMM = 6,
105
106 /* TSPEC modification/re-assoc successful, async */
107 HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS = 7,
Srinivas Girigowda48592672017-03-25 14:58:44 -0700108 /* TSPEC modification a no-op since ACM=0 and
109 * no change in UAPSD, sync + async
110 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800111 HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS_NO_ACM_NO_UAPSD = 8,
Srinivas Girigowda48592672017-03-25 14:58:44 -0700112 /* TSPEC modification a no-op since ACM=0 and
113 * requested U-APSD already exists, sync + async
114 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800115 HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS_NO_ACM_UAPSD_EXISTING = 9,
116 /* TSPEC result pending, sync */
117 HDD_WLAN_WMM_STATUS_MODIFY_PENDING = 10,
118 /* TSPEC modification failed, prev TSPEC in effect, sync + async */
119 HDD_WLAN_WMM_STATUS_MODIFY_FAILED = 11,
Srinivas Girigowda48592672017-03-25 14:58:44 -0700120 /* TSPEC modification request rejected due to invalid params,
121 * sync + async
122 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800123 HDD_WLAN_WMM_STATUS_MODIFY_FAILED_BAD_PARAM = 12,
124
125 /* TSPEC release successful, sync and also async */
126 HDD_WLAN_WMM_STATUS_RELEASE_SUCCESS = 13,
127 /* TSPEC release pending, sync */
128 HDD_WLAN_WMM_STATUS_RELEASE_PENDING = 14,
129 /* TSPEC release failed, sync + async */
130 HDD_WLAN_WMM_STATUS_RELEASE_FAILED = 15,
131 /* TSPEC release rejected due to invalid params, sync */
132 HDD_WLAN_WMM_STATUS_RELEASE_FAILED_BAD_PARAM = 16,
133 /* TSPEC modified due to the mux'ing of requests on ACs, async */
134
135 HDD_WLAN_WMM_STATUS_MODIFIED = 17,
136 /* TSPEC revoked by AP, async */
137 HDD_WLAN_WMM_STATUS_LOST = 18,
138 /* some internal failure like memory allocation failure, etc, sync */
139 HDD_WLAN_WMM_STATUS_INTERNAL_FAILURE = 19,
140
Srinivas Girigowda48592672017-03-25 14:58:44 -0700141 /* U-APSD failed during setup but OTA setup (whether TSPEC exchnage or
142 * re-assoc) was done so app should release this QoS, async
143 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800144 HDD_WLAN_WMM_STATUS_SETUP_UAPSD_SET_FAILED = 20,
Srinivas Girigowda48592672017-03-25 14:58:44 -0700145 /* U-APSD failed during modify, but OTA setup (whether TSPEC exchnage or
146 * re-assoc) was done so app should release this QoS, async
147 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800148 HDD_WLAN_WMM_STATUS_MODIFY_UAPSD_SET_FAILED = 21
149} hdd_wlan_wmm_status_e;
150
151/** TS Info Ack Policy */
Srinivas Girigowda48592672017-03-25 14:58:44 -0700152enum hdd_wlan_wmm_ts_info_ack_policy {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800153 HDD_WLAN_WMM_TS_INFO_ACK_POLICY_NORMAL_ACK = 0,
154 HDD_WLAN_WMM_TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK = 1,
Srinivas Girigowda48592672017-03-25 14:58:44 -0700155};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800156
157/** Maximum Length of WPA/RSN IE */
158#define MAX_WPA_RSN_IE_LEN 40
159
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800160/** Enable 11d */
161#define ENABLE_11D 1
162
163/** Disable 11d */
164#define DISABLE_11D 0
165
166/*
Srinivas Girigowda48592672017-03-25 14:58:44 -0700167 * refer wpa.h in wpa supplicant code for REASON_MICHAEL_MIC_FAILURE
168 *
169 * supplicant sets REASON_MICHAEL_MIC_FAILURE as the reason code when it
170 * sends the MLME deauth IOCTL for TKIP counter measures
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800171 */
172#define HDD_REASON_MICHAEL_MIC_FAILURE 14
173
174/*
175 * These are for TLV fields in WPS IE
176 */
177#define HDD_WPS_UUID_LEN 16
178#define HDD_WPS_ELEM_VERSION 0x104a
179#define HDD_WPS_ELEM_REQUEST_TYPE 0x103a
180#define HDD_WPS_ELEM_CONFIG_METHODS 0x1008
181#define HDD_WPS_ELEM_UUID_E 0x1047
182#define HDD_WPS_ELEM_PRIMARY_DEVICE_TYPE 0x1054
183#define HDD_WPS_ELEM_RF_BANDS 0x103c
184#define HDD_WPS_ELEM_ASSOCIATION_STATE 0x1002
185#define HDD_WPS_ELEM_CONFIGURATION_ERROR 0x1009
186#define HDD_WPS_ELEM_DEVICE_PASSWORD_ID 0x1012
187
188#define HDD_WPA_ELEM_VENDOR_EXTENSION 0x1049
189
190#define HDD_WPS_MANUFACTURER_LEN 64
191#define HDD_WPS_MODEL_NAME_LEN 32
192#define HDD_WPS_MODEL_NUM_LEN 32
193#define HDD_WPS_SERIAL_NUM_LEN 32
194#define HDD_WPS_DEVICE_OUI_LEN 4
195#define HDD_WPS_DEVICE_NAME_LEN 32
196
197#define HDD_WPS_ELEM_WPS_STATE 0x1044
198#define HDD_WPS_ELEM_APSETUPLOCK 0x1057
199#define HDD_WPS_ELEM_SELECTEDREGISTRA 0x1041
200#define HDD_WPS_ELEM_RSP_TYPE 0x103B
201#define HDD_WPS_ELEM_MANUFACTURER 0x1021
202#define HDD_WPS_ELEM_MODEL_NAME 0x1023
203#define HDD_WPS_ELEM_MODEL_NUM 0x1024
204#define HDD_WPS_ELEM_SERIAL_NUM 0x1042
205#define HDD_WPS_ELEM_DEVICE_NAME 0x1011
206#define HDD_WPS_ELEM_REGISTRA_CONF_METHODS 0x1053
207
208#define HDD_RTSCTS_EN_MASK 0xF
209#define HDD_RTSCTS_ENABLE 1
210#define HDD_CTS_ENABLE 2
211
212#define WPS_OUI_TYPE "\x00\x50\xf2\x04"
213#define WPS_OUI_TYPE_SIZE 4
214
215#define SS_OUI_TYPE "\x00\x16\x32"
216#define SS_OUI_TYPE_SIZE 3
217
218#define P2P_OUI_TYPE "\x50\x6f\x9a\x09"
219#define P2P_OUI_TYPE_SIZE 4
220
221#define HS20_OUI_TYPE "\x50\x6f\x9a\x10"
222#define HS20_OUI_TYPE_SIZE 4
223
224#define OSEN_OUI_TYPE "\x50\x6f\x9a\x12"
225#define OSEN_OUI_TYPE_SIZE 4
226
227#ifdef WLAN_FEATURE_WFD
228#define WFD_OUI_TYPE "\x50\x6f\x9a\x0a"
229#define WFD_OUI_TYPE_SIZE 4
230#endif
231
Selvaraj, Sridhara7fc7632016-09-04 13:13:38 +0530232#define MBO_OUI_TYPE "\x50\x6f\x9a\x16"
233#define MBO_OUI_TYPE_SIZE 4
234
Srinivas Girigowda48592672017-03-25 14:58:44 -0700235enum hdd_wps_mode {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800236 eWEXT_WPS_OFF = 0,
237 eWEXT_WPS_ON = 1,
Srinivas Girigowda48592672017-03-25 14:58:44 -0700238};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800239
240/*
241 * This structure contains the interface level (granularity)
242 * configuration information in support of wireless extensions.
243 */
244typedef struct hdd_wext_state_s {
245 /** The CSR "desired" Profile */
246 tCsrRoamProfile roamProfile;
247
248 /** BSSID to which connect request is received */
Anurag Chouhan6d760662016-02-20 16:05:43 +0530249 struct qdf_mac_addr req_bssId;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800250
251 /** The association status code */
252 uint32_t statusCode;
253
254 /** wpa version WPA/WPA2/None*/
255 int32_t wpaVersion;
256
257 /**WPA or RSN IE*/
258 uint8_t WPARSNIE[MAX_WPA_RSN_IE_LEN];
259
260 /**gen IE */
261 tSirAddie genIE;
262
263 /**Additional IE for assoc */
264 tSirAddie assocAddIE;
265
266 /**auth key mgmt */
267 int32_t authKeyMgmt;
268
Anurag Chouhanf04e84f2016-03-03 10:12:12 +0530269 /* qdf event */
270 qdf_event_t hdd_qdf_event;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800271
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800272 /**Counter measure state, Started/Stopped*/
273 bool mTKIPCounterMeasures;
274
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800275#ifdef FEATURE_WLAN_ESE
276 /* ESE state variables */
277 bool isESEConnection;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800278#endif
279} hdd_wext_state_t;
280
Srinivas Girigowda48592672017-03-25 14:58:44 -0700281struct ccp_freq_chan_map {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800282 /* List of frequencies */
283 uint32_t freq;
284 uint32_t chan;
Srinivas Girigowda48592672017-03-25 14:58:44 -0700285};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800286
287/* Packet Types. */
288#define WLAN_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
289#define WLAN_KEEP_ALIVE_NULL_PKT 1
290
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800291#define wlan_hdd_get_wps_ie_ptr(ie, ie_len) \
Srinivas Girigowda48592672017-03-25 14:58:44 -0700292 wlan_hdd_get_vendor_oui_ie_ptr(WPS_OUI_TYPE, WPS_OUI_TYPE_SIZE, \
293 ie, ie_len)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800294
295#define wlan_hdd_get_p2p_ie_ptr(ie, ie_len) \
Srinivas Girigowda48592672017-03-25 14:58:44 -0700296 wlan_hdd_get_vendor_oui_ie_ptr(P2P_OUI_TYPE, P2P_OUI_TYPE_SIZE, \
297 ie, ie_len)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800298
299#ifdef WLAN_FEATURE_WFD
300#define wlan_hdd_get_wfd_ie_ptr(ie, ie_len) \
Srinivas Girigowda48592672017-03-25 14:58:44 -0700301 wlan_hdd_get_vendor_oui_ie_ptr(WFD_OUI_TYPE, WFD_OUI_TYPE_SIZE, \
302 ie, ie_len)
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800303#endif
304
Selvaraj, Sridhar4ea106e2016-08-05 20:34:46 +0530305#define wlan_hdd_get_mbo_ie_ptr(ie, ie_len) \
Srinivas Girigowda48592672017-03-25 14:58:44 -0700306 wlan_hdd_get_vendor_oui_ie_ptr(MBO_OUI_TYPE, MBO_OUI_TYPE_SIZE, \
307 ie, ie_len)
Anurag Chouhanbf5e0e22016-09-12 12:54:09 +0530308/*
309 * Defines for fw_test command
310 */
311#define HDD_FWTEST_PARAMS 3
312#define HDD_FWTEST_SU_PARAM_ID 53
313#define HDD_FWTEST_MU_PARAM_ID 2
314#define HDD_FWTEST_SU_DEFAULT_VALUE 100
315#define HDD_FWTEST_MU_DEFAULT_VALUE 40
316#define HDD_FWTEST_MAX_VALUE 500
317
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800318extern int hdd_unregister_wext(struct net_device *dev);
319extern int hdd_register_wext(struct net_device *dev);
320extern int hdd_wlan_get_freq(uint32_t chan, uint32_t *freq);
Mohit Khanna3e2115b2016-10-11 13:18:29 -0700321extern void hdd_display_stats_help(void);
Arun Khandavallia96c2c02016-05-17 19:15:34 +0530322extern void hdd_wlan_get_version(hdd_context_t *hdd_ctx,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800323 union iwreq_data *wrqu, char *extra);
324
325extern void hdd_wlan_get_stats(hdd_adapter_t *pAdapter, uint16_t *length,
326 char *buffer, uint16_t buf_len);
Govind Singha471e5e2015-10-12 17:11:14 +0530327extern void hdd_wlan_list_fw_profile(uint16_t *length,
328 char *buffer, uint16_t buf_len);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800329
Jeff Johnson5b907622017-02-07 10:00:37 -0800330int iw_get_rts_threshold(struct net_device *dev,
331 struct iw_request_info *info,
332 union iwreq_data *wrqu, char *extra);
333
334int iw_get_frag_threshold(struct net_device *dev,
335 struct iw_request_info *info,
336 union iwreq_data *wrqu, char *extra);
337
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800338extern int iw_set_essid(struct net_device *dev,
339 struct iw_request_info *info,
340 union iwreq_data *wrqu, char *extra);
341
342extern int iw_get_essid(struct net_device *dev,
343 struct iw_request_info *info,
344 struct iw_point *dwrq, char *extra);
345
346extern int iw_set_ap_address(struct net_device *dev,
347 struct iw_request_info *info,
348 union iwreq_data *wrqu, char *extra);
349
350extern int iw_get_ap_address(struct net_device *dev,
351 struct iw_request_info *info,
352 union iwreq_data *wrqu, char *extra);
353
354extern int iw_set_auth(struct net_device *dev, struct iw_request_info *info,
355 union iwreq_data *wrqu, char *extra);
356
357extern int iw_get_auth(struct net_device *dev, struct iw_request_info *info,
358 union iwreq_data *wrqu, char *extra);
359
360extern int iw_set_var_ints_getnone(struct net_device *dev,
361 struct iw_request_info *info,
362 union iwreq_data *wrqu, char *extra);
363
364extern int iw_set_three_ints_getnone(struct net_device *dev,
365 struct iw_request_info *info,
366 union iwreq_data *wrqu, char *extra);
367
368extern int hdd_priv_get_data(struct iw_point *p_priv_data,
369 union iwreq_data *wrqu);
370
371extern void *mem_alloc_copy_from_user_helper(const void *wrqu_data, size_t len);
372
Jeff Johnsone50427c2017-01-26 10:54:49 -0800373/**
374 * wlan_hdd_get_linkspeed_for_peermac() - Get link speed for a peer
375 * @adapter: adapter upon which the peer is active
376 * @mac_address: MAC address of the peer
377 * @linkspeed: pointer to memory where returned link speed is to be placed
378 *
379 * This function will send a query to SME for the linkspeed of the
380 * given peer, and then wait for the callback to be invoked.
381 *
382 * Return: 0 if linkspeed data is available, negative errno otherwise
383 */
384int wlan_hdd_get_linkspeed_for_peermac(hdd_adapter_t *adapter,
385 struct qdf_mac_addr *mac_address,
386 uint32_t *linkspeed);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800387void hdd_clear_roam_profile_ie(hdd_adapter_t *pAdapter);
388
389uint8_t *wlan_hdd_get_vendor_oui_ie_ptr(uint8_t *oui, uint8_t oui_size,
390 uint8_t *ie, int ie_len);
391
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530392QDF_STATUS wlan_hdd_get_class_astats(hdd_adapter_t *pAdapter);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800393
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530394QDF_STATUS wlan_hdd_get_station_stats(hdd_adapter_t *pAdapter);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800395
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530396QDF_STATUS wlan_hdd_get_rssi(hdd_adapter_t *pAdapter, int8_t *rssi_value);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800397
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530398QDF_STATUS wlan_hdd_get_snr(hdd_adapter_t *pAdapter, int8_t *snr);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800399
Manjeet Singhe80d6d82016-09-02 19:04:41 +0530400int hdd_get_ldpc(hdd_adapter_t *adapter, int *value);
401int hdd_set_ldpc(hdd_adapter_t *adapter, int value);
402int hdd_get_tx_stbc(hdd_adapter_t *adapter, int *value);
403int hdd_set_tx_stbc(hdd_adapter_t *adapter, int value);
404int hdd_get_rx_stbc(hdd_adapter_t *adapter, int *value);
405int hdd_set_rx_stbc(hdd_adapter_t *adapter, int value);
406
Krishna Kumaar Natarajan9e5339d2016-12-05 14:12:13 -0800407/**
408 * hdd_assemble_rate_code() - assemble rate code to be sent to FW
409 * @preamble: rate preamble
410 * @nss: number of streams
411 * @rate: rate index
412 *
413 * Rate code assembling is different for targets which are 11ax capable.
414 * Check for the target support and assemble the rate code accordingly.
415 *
416 * Return: assembled rate code
417 */
418int hdd_assemble_rate_code(uint8_t preamble, uint8_t nss, uint8_t rate);
419
420/**
421 * hdd_set_11ax_rate() - set 11ax rate
422 * @adapter: adapter being modified
423 * @value: new 11ax rate code
424 * @sap_config: pointer to SAP config to check HW mode
425 * this will be NULL for call from STA persona
426 *
427 * Return: 0 on success, negative errno on failure
428 */
429int hdd_set_11ax_rate(hdd_adapter_t *adapter, int value,
430 struct sap_Config *sap_config);
431
Krishna Kumaar Natarajanf1581df2017-02-21 13:42:08 -0800432/**
433 * hdd_set_peer_rate() - set peer rate
434 * @adapter: adapter being modified
435 * @value: rate code with AID
436 *
437 * Return: 0 on success, negative errno on failure
438 */
439int hdd_set_peer_rate(hdd_adapter_t *adapter, int value);
440
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800441void wlan_hdd_change_country_code_callback(void *pAdapter);
442
443int hdd_set_band(struct net_device *dev, u8 ui_band);
444int hdd_set_band_helper(struct net_device *dev, const char *command);
445int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal,
446 int new_phymode, hdd_context_t *phddctx);
447
448int wlan_hdd_get_temperature(hdd_adapter_t *pAdapter, int *temperature);
449int wlan_hdd_get_link_speed(hdd_adapter_t *sta_adapter, uint32_t *link_speed);
Jeff Johnson441e1f72017-02-07 08:50:49 -0800450
451struct iw_request_info;
452/**
453 * hdd_check_standard_wext_control() - Check to see if standard
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 "standard_wext_control" configuration
459 * item to determine whether or not standard 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 */
467int hdd_check_standard_wext_control(struct hdd_context_s *hdd_ctx,
468 struct iw_request_info *info);
469
470/**
471 * hdd_check_private_wext_control() - Check to see if private
472 * wireless extensions ioctls are allowed
473 * @hdd_ctx: Global HDD context
474 * @info: Wireless extensions ioctl information passed by the kernel
475 *
476 * This function will examine the "private_wext_control" configuration
477 * item to determine whether or not private wireless extensions ioctls
478 * are allowed.
479 *
480 * Return: 0 if the ioctl is allowed to be processed, -ENOTSUPP if the
481 * ioctls have been disabled. Note that in addition to returning
482 * status, this function will log a message if the ioctls are disabled
483 * or deprecated.
484 */
485int hdd_check_private_wext_control(struct hdd_context_s *hdd_ctx,
486 struct iw_request_info *info);
487
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800488#endif /* __WEXT_IW_H__ */