blob: 8cbe0f4cfd0059b0a359d1c749b0ae45bc8a1ee0 [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
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080071
Srinivas Girigowda48592672017-03-25 14:58:44 -070072enum hdd_wlan_wmm_direction {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080073 HDD_WLAN_WMM_DIRECTION_UPSTREAM = 0,
74 HDD_WLAN_WMM_DIRECTION_DOWNSTREAM = 1,
75 HDD_WLAN_WMM_DIRECTION_BIDIRECTIONAL = 2,
Srinivas Girigowda48592672017-03-25 14:58:44 -070076};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080077
Srinivas Girigowda48592672017-03-25 14:58:44 -070078enum hdd_wlan_wmm_power_save {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080079 HDD_WLAN_WMM_POWER_SAVE_LEGACY = 0,
80 HDD_WLAN_WMM_POWER_SAVE_UAPSD = 1,
Srinivas Girigowda48592672017-03-25 14:58:44 -070081};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080082
83typedef enum {
84 /* TSPEC/re-assoc done, async */
85 HDD_WLAN_WMM_STATUS_SETUP_SUCCESS = 0,
Srinivas Girigowda48592672017-03-25 14:58:44 -070086 /* no need to setup TSPEC since ACM=0 and no UAPSD desired,
87 * sync + async
88 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080089 HDD_WLAN_WMM_STATUS_SETUP_SUCCESS_NO_ACM_NO_UAPSD = 1,
Srinivas Girigowda48592672017-03-25 14:58:44 -070090 /* no need to setup TSPEC since ACM=0 and UAPSD already exists,
91 * sync + async
92 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080093 HDD_WLAN_WMM_STATUS_SETUP_SUCCESS_NO_ACM_UAPSD_EXISTING = 2,
94 /* TSPEC result pending, sync */
95 HDD_WLAN_WMM_STATUS_SETUP_PENDING = 3,
96 /* TSPEC/re-assoc failed, sync + async */
97 HDD_WLAN_WMM_STATUS_SETUP_FAILED = 4,
98 /* Request rejected due to invalid params, sync + async */
99 HDD_WLAN_WMM_STATUS_SETUP_FAILED_BAD_PARAM = 5,
100 /* TSPEC request rejected since AP!=QAP, sync */
101 HDD_WLAN_WMM_STATUS_SETUP_FAILED_NO_WMM = 6,
102
103 /* TSPEC modification/re-assoc successful, async */
104 HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS = 7,
Srinivas Girigowda48592672017-03-25 14:58:44 -0700105 /* TSPEC modification a no-op since ACM=0 and
106 * no change in UAPSD, sync + async
107 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800108 HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS_NO_ACM_NO_UAPSD = 8,
Srinivas Girigowda48592672017-03-25 14:58:44 -0700109 /* TSPEC modification a no-op since ACM=0 and
110 * requested U-APSD already exists, sync + async
111 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800112 HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS_NO_ACM_UAPSD_EXISTING = 9,
113 /* TSPEC result pending, sync */
114 HDD_WLAN_WMM_STATUS_MODIFY_PENDING = 10,
115 /* TSPEC modification failed, prev TSPEC in effect, sync + async */
116 HDD_WLAN_WMM_STATUS_MODIFY_FAILED = 11,
Srinivas Girigowda48592672017-03-25 14:58:44 -0700117 /* TSPEC modification request rejected due to invalid params,
118 * sync + async
119 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800120 HDD_WLAN_WMM_STATUS_MODIFY_FAILED_BAD_PARAM = 12,
121
122 /* TSPEC release successful, sync and also async */
123 HDD_WLAN_WMM_STATUS_RELEASE_SUCCESS = 13,
124 /* TSPEC release pending, sync */
125 HDD_WLAN_WMM_STATUS_RELEASE_PENDING = 14,
126 /* TSPEC release failed, sync + async */
127 HDD_WLAN_WMM_STATUS_RELEASE_FAILED = 15,
128 /* TSPEC release rejected due to invalid params, sync */
129 HDD_WLAN_WMM_STATUS_RELEASE_FAILED_BAD_PARAM = 16,
130 /* TSPEC modified due to the mux'ing of requests on ACs, async */
131
132 HDD_WLAN_WMM_STATUS_MODIFIED = 17,
133 /* TSPEC revoked by AP, async */
134 HDD_WLAN_WMM_STATUS_LOST = 18,
135 /* some internal failure like memory allocation failure, etc, sync */
136 HDD_WLAN_WMM_STATUS_INTERNAL_FAILURE = 19,
137
Srinivas Girigowda48592672017-03-25 14:58:44 -0700138 /* U-APSD failed during setup but OTA setup (whether TSPEC exchnage or
139 * re-assoc) was done so app should release this QoS, async
140 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800141 HDD_WLAN_WMM_STATUS_SETUP_UAPSD_SET_FAILED = 20,
Srinivas Girigowda48592672017-03-25 14:58:44 -0700142 /* U-APSD failed during modify, but OTA setup (whether TSPEC exchnage or
143 * re-assoc) was done so app should release this QoS, async
144 */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800145 HDD_WLAN_WMM_STATUS_MODIFY_UAPSD_SET_FAILED = 21
146} hdd_wlan_wmm_status_e;
147
148/** TS Info Ack Policy */
Srinivas Girigowda48592672017-03-25 14:58:44 -0700149enum hdd_wlan_wmm_ts_info_ack_policy {
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800150 HDD_WLAN_WMM_TS_INFO_ACK_POLICY_NORMAL_ACK = 0,
151 HDD_WLAN_WMM_TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK = 1,
Srinivas Girigowda48592672017-03-25 14:58:44 -0700152};
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800153
154/** Maximum Length of WPA/RSN IE */
155#define MAX_WPA_RSN_IE_LEN 40
156
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800157/** Enable 11d */
158#define ENABLE_11D 1
159
160/** Disable 11d */
161#define DISABLE_11D 0
162
163/*
Srinivas Girigowda48592672017-03-25 14:58:44 -0700164 * refer wpa.h in wpa supplicant code for REASON_MICHAEL_MIC_FAILURE
165 *
166 * supplicant sets REASON_MICHAEL_MIC_FAILURE as the reason code when it
167 * sends the MLME deauth IOCTL for TKIP counter measures
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800168 */
169#define HDD_REASON_MICHAEL_MIC_FAILURE 14
170
171/*
172 * These are for TLV fields in WPS IE
173 */
174#define HDD_WPS_UUID_LEN 16
175#define HDD_WPS_ELEM_VERSION 0x104a
176#define HDD_WPS_ELEM_REQUEST_TYPE 0x103a
177#define HDD_WPS_ELEM_CONFIG_METHODS 0x1008
178#define HDD_WPS_ELEM_UUID_E 0x1047
179#define HDD_WPS_ELEM_PRIMARY_DEVICE_TYPE 0x1054
180#define HDD_WPS_ELEM_RF_BANDS 0x103c
181#define HDD_WPS_ELEM_ASSOCIATION_STATE 0x1002
182#define HDD_WPS_ELEM_CONFIGURATION_ERROR 0x1009
183#define HDD_WPS_ELEM_DEVICE_PASSWORD_ID 0x1012
184
185#define HDD_WPA_ELEM_VENDOR_EXTENSION 0x1049
186
187#define HDD_WPS_MANUFACTURER_LEN 64
188#define HDD_WPS_MODEL_NAME_LEN 32
189#define HDD_WPS_MODEL_NUM_LEN 32
190#define HDD_WPS_SERIAL_NUM_LEN 32
191#define HDD_WPS_DEVICE_OUI_LEN 4
192#define HDD_WPS_DEVICE_NAME_LEN 32
193
194#define HDD_WPS_ELEM_WPS_STATE 0x1044
195#define HDD_WPS_ELEM_APSETUPLOCK 0x1057
196#define HDD_WPS_ELEM_SELECTEDREGISTRA 0x1041
197#define HDD_WPS_ELEM_RSP_TYPE 0x103B
198#define HDD_WPS_ELEM_MANUFACTURER 0x1021
199#define HDD_WPS_ELEM_MODEL_NAME 0x1023
200#define HDD_WPS_ELEM_MODEL_NUM 0x1024
201#define HDD_WPS_ELEM_SERIAL_NUM 0x1042
202#define HDD_WPS_ELEM_DEVICE_NAME 0x1011
203#define HDD_WPS_ELEM_REGISTRA_CONF_METHODS 0x1053
204
205#define HDD_RTSCTS_EN_MASK 0xF
206#define HDD_RTSCTS_ENABLE 1
207#define HDD_CTS_ENABLE 2
208
209#define WPS_OUI_TYPE "\x00\x50\xf2\x04"
210#define WPS_OUI_TYPE_SIZE 4
211
212#define SS_OUI_TYPE "\x00\x16\x32"
213#define SS_OUI_TYPE_SIZE 3
214
215#define P2P_OUI_TYPE "\x50\x6f\x9a\x09"
216#define P2P_OUI_TYPE_SIZE 4
217
218#define HS20_OUI_TYPE "\x50\x6f\x9a\x10"
219#define HS20_OUI_TYPE_SIZE 4
220
221#define OSEN_OUI_TYPE "\x50\x6f\x9a\x12"
222#define OSEN_OUI_TYPE_SIZE 4
223
224#ifdef WLAN_FEATURE_WFD
225#define WFD_OUI_TYPE "\x50\x6f\x9a\x0a"
226#define WFD_OUI_TYPE_SIZE 4
227#endif
228
Selvaraj, Sridhara7fc7632016-09-04 13:13:38 +0530229#define MBO_OUI_TYPE "\x50\x6f\x9a\x16"
230#define MBO_OUI_TYPE_SIZE 4
231
Selvaraj, Sridhar021ee0a2017-04-07 16:53:31 +0530232#define QCN_OUI_TYPE "\x8c\xfd\xf0\x01"
233#define QCN_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
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800443int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal,
444 int new_phymode, hdd_context_t *phddctx);
445
446int wlan_hdd_get_temperature(hdd_adapter_t *pAdapter, int *temperature);
447int wlan_hdd_get_link_speed(hdd_adapter_t *sta_adapter, uint32_t *link_speed);
Jeff Johnson441e1f72017-02-07 08:50:49 -0800448
449struct iw_request_info;
450/**
451 * hdd_check_standard_wext_control() - Check to see if standard
452 * wireless extensions ioctls are allowed
453 * @hdd_ctx: Global HDD context
454 * @info: Wireless extensions ioctl information passed by the kernel
455 *
456 * This function will examine the "standard_wext_control" configuration
457 * item to determine whether or not standard wireless extensions ioctls
458 * are allowed.
459 *
460 * Return: 0 if the ioctl is allowed to be processed, -ENOTSUPP if the
461 * ioctls have been disabled. Note that in addition to returning
462 * status, this function will log a message if the ioctls are disabled
463 * or deprecated.
464 */
465int hdd_check_standard_wext_control(struct hdd_context_s *hdd_ctx,
466 struct iw_request_info *info);
467
468/**
469 * hdd_check_private_wext_control() - Check to see if private
470 * wireless extensions ioctls are allowed
471 * @hdd_ctx: Global HDD context
472 * @info: Wireless extensions ioctl information passed by the kernel
473 *
474 * This function will examine the "private_wext_control" configuration
475 * item to determine whether or not private wireless extensions ioctls
476 * are allowed.
477 *
478 * Return: 0 if the ioctl is allowed to be processed, -ENOTSUPP if the
479 * ioctls have been disabled. Note that in addition to returning
480 * status, this function will log a message if the ioctls are disabled
481 * or deprecated.
482 */
483int hdd_check_private_wext_control(struct hdd_context_s *hdd_ctx,
484 struct iw_request_info *info);
485
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800486#endif /* __WEXT_IW_H__ */