blob: 4cd70afd5f1895e9eeb0159cd8a23d912fcf7684 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Chandrasekaran, Manishekara74bb022016-01-12 18:37:43 +05302 * Copyright (c) 2013-2016 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#if !defined(WLAN_HDD_HOSTAPD_H)
29#define WLAN_HDD_HOSTAPD_H
30
31/**
32 * DOC: wlan_hdd_hostapd.h
33 *
34 * WLAN Host Device driver hostapd header file
35 */
36
37/* Include files */
38
39#include <linux/netdevice.h>
40#include <linux/skbuff.h>
Anurag Chouhanffb21542016-02-17 14:33:03 +053041#include <qdf_list.h>
Anurag Chouhan6d760662016-02-20 16:05:43 +053042#include <qdf_types.h>
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080043#include <wlan_hdd_main.h>
44
45/* Preprocessor definitions and constants */
46
47/* max length of command string in hostapd ioctl */
48#define HOSTAPD_IOCTL_COMMAND_STRLEN_MAX 8192
49
50hdd_adapter_t *hdd_wlan_create_ap_dev(hdd_context_t *pHddCtx,
Ryan Hsu07495ea2016-01-21 15:25:39 -080051 tSirMacAddr macAddr,
52 unsigned char name_assign_type,
53 uint8_t *name);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080054
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053055QDF_STATUS hdd_register_hostapd(hdd_adapter_t *pAdapter, uint8_t rtnl_held);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080056
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053057QDF_STATUS hdd_unregister_hostapd(hdd_adapter_t *pAdapter, bool rtnl_held);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080058
59eCsrAuthType
60hdd_translate_rsn_to_csr_auth_type(uint8_t auth_suite[4]);
61
Abhishek Singh1bdb1572015-10-16 16:24:19 +053062int hdd_softap_set_channel_change(struct net_device *dev,
Amar Singhale4f28ee2015-10-21 14:36:56 -070063 int target_channel,
64 enum ch_width target_bw);
Abhishek Singh1bdb1572015-10-16 16:24:19 +053065
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080066eCsrEncryptionType
67hdd_translate_rsn_to_csr_encryption_type(uint8_t cipher_suite[4]);
68
69eCsrEncryptionType
70hdd_translate_rsn_to_csr_encryption_type(uint8_t cipher_suite[4]);
71
72eCsrAuthType
73hdd_translate_wpa_to_csr_auth_type(uint8_t auth_suite[4]);
74
75eCsrEncryptionType
76hdd_translate_wpa_to_csr_encryption_type(uint8_t cipher_suite[4]);
77
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053078QDF_STATUS hdd_softap_sta_deauth(hdd_adapter_t *,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080079 struct tagCsrDelStaParams *);
80void hdd_softap_sta_disassoc(hdd_adapter_t *, uint8_t *);
81void hdd_softap_tkip_mic_fail_counter_measure(hdd_adapter_t *, bool);
82int hdd_softap_unpack_ie(tHalHandle halHandle,
83 eCsrEncryptionType *pEncryptType,
84 eCsrEncryptionType *mcEncryptType,
85 eCsrAuthType *pAuthType,
86 bool *pMFPCapable,
87 bool *pMFPRequired,
88 uint16_t gen_ie_len, uint8_t *gen_ie);
89
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053090QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080091 void *usrDataForCallback);
Anurag Chouhanfb54ab02016-02-18 18:00:46 +053092QDF_STATUS hdd_init_ap_mode(hdd_adapter_t *pAdapter);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080093void hdd_set_ap_ops(struct net_device *pWlanHostapdDev);
94int hdd_hostapd_stop(struct net_device *dev);
95void hdd_hostapd_channel_wakelock_init(hdd_context_t *pHddCtx);
96void hdd_hostapd_channel_wakelock_deinit(hdd_context_t *pHddCtx);
97#ifdef FEATURE_WLAN_FORCE_SAP_SCC
98void hdd_restart_softap(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter);
99#endif /* FEATURE_WLAN_FORCE_SAP_SCC */
100#ifdef QCA_HT_2040_COEX
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530101QDF_STATUS hdd_set_sap_ht2040_mode(hdd_adapter_t *pHostapdAdapter,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800102 uint8_t channel_type);
103#endif
104
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800105
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800106int wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
107 struct net_device *dev);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800108
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800109int wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
110 struct net_device *dev,
111 struct cfg80211_ap_settings *params);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800112
113int wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy,
114 struct net_device *dev,
115 struct cfg80211_beacon_data *params);
116
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530117QDF_STATUS wlan_hdd_config_acs(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800118#endif /* end #if !defined(WLAN_HDD_HOSTAPD_H) */