blob: 8d519f32ec975510848ccfef0feb3ad9d7c6cf23 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam842dad02014-02-18 18:44:02 -08002 * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
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.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080020 */
Kiet Lam842dad02014-02-18 18:44:02 -080021
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
Jeff Johnson295189b2012-06-20 16:38:30 -070028#if !defined( WLAN_HDD_HOSTAPD_H )
29#define WLAN_HDD_HOSTAPD_H
30
31/**===========================================================================
Jeff Johnson7dda7772013-02-27 08:36:13 -080032
Jeff Johnson295189b2012-06-20 16:38:30 -070033 \file WLAN_HDD_HOSTAPD_H.h
Jeff Johnson7dda7772013-02-27 08:36:13 -080034
Jeff Johnson295189b2012-06-20 16:38:30 -070035 \brief Linux HDD HOSTAPD include file
Madan Mohan Koyyalamudicd784992013-01-11 15:30:36 -080036 Copyright 2008-2013 (c) Qualcomm, Incorporated.
Jeff Johnson295189b2012-06-20 16:38:30 -070037 All Rights Reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070038 ==========================================================================*/
Jeff Johnson7dda7772013-02-27 08:36:13 -080039
40/*---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -070041 Include files
Jeff Johnson7dda7772013-02-27 08:36:13 -080042 -------------------------------------------------------------------------*/
43
Jeff Johnson295189b2012-06-20 16:38:30 -070044#include <linux/netdevice.h>
45#include <linux/skbuff.h>
46#include <vos_list.h>
47#include <vos_types.h>
48
49#include <wlan_qct_tl.h>
50#include <wlan_hdd_main.h>
51
Jeff Johnson7dda7772013-02-27 08:36:13 -080052/*---------------------------------------------------------------------------
Jeff Johnson295189b2012-06-20 16:38:30 -070053 Preprocessor definitions and constants
Jeff Johnson7dda7772013-02-27 08:36:13 -080054 -------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -070055
Rajesh Chauhana0516c62014-01-30 16:11:18 -080056/* max length of command string in hostapd ioctl */
Atul Mittal1d722422014-03-19 11:15:07 +053057#define HOSTAPD_IOCTL_COMMAND_STRLEN_MAX 8192
Rajesh Chauhana0516c62014-01-30 16:11:18 -080058
Jeff Johnson295189b2012-06-20 16:38:30 -070059hdd_adapter_t* hdd_wlan_create_ap_dev( hdd_context_t *pHddCtx, tSirMacAddr macAddr, tANI_U8 *name);
60
61VOS_STATUS hdd_register_hostapd(hdd_adapter_t *pAdapter, tANI_U8 rtnl_held);
62
63VOS_STATUS hdd_unregister_hostapd(hdd_adapter_t *pAdapter);
64
65eCsrAuthType
66hdd_TranslateRSNToCsrAuthType( u_int8_t auth_suite[4]);
67
68eCsrEncryptionType
69hdd_TranslateRSNToCsrEncryptionType(u_int8_t cipher_suite[4]);
70
71eCsrEncryptionType
72hdd_TranslateRSNToCsrEncryptionType(u_int8_t cipher_suite[4]);
73
74eCsrAuthType
75hdd_TranslateWPAToCsrAuthType(u_int8_t auth_suite[4]);
76
77eCsrEncryptionType
78hdd_TranslateWPAToCsrEncryptionType(u_int8_t cipher_suite[4]);
79
Madan Mohan Koyyalamudicd784992013-01-11 15:30:36 -080080VOS_STATUS hdd_softap_sta_deauth(hdd_adapter_t*,v_U8_t*);
Jeff Johnson295189b2012-06-20 16:38:30 -070081void hdd_softap_sta_disassoc(hdd_adapter_t*,v_U8_t*);
82void hdd_softap_tkip_mic_fail_counter_measure(hdd_adapter_t*,v_BOOL_t);
83int hdd_softap_unpackIE( tHalHandle halHandle,
Chet Lanctot8cecea22014-02-11 19:09:36 -080084 eCsrEncryptionType *pEncryptType,
85 eCsrEncryptionType *mcEncryptType,
86 eCsrAuthType *pAuthType,
87 v_BOOL_t *pMFPCapable,
88 v_BOOL_t *pMFPRequired,
89 u_int16_t gen_ie_len,
Jeff Johnson295189b2012-06-20 16:38:30 -070090 u_int8_t *gen_ie );
91
Jeff Johnson295189b2012-06-20 16:38:30 -070092VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCallback);
93VOS_STATUS hdd_init_ap_mode( hdd_adapter_t *pAdapter );
94void hdd_set_ap_ops( struct net_device *pWlanHostapdDev );
Arun Kumar Khandavallia3bd8002014-01-17 16:21:19 +053095int hdd_hostapd_stop (struct net_device *dev);
Sushant Kaushikba6764e2014-06-30 19:52:09 +053096void hdd_restart_softap (hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter);
Leo Chang0b0e45a2013-12-15 15:18:55 -080097#ifdef FEATURE_WLAN_CH_AVOID
98void hdd_hostapd_ch_avoid_cb(void *pAdapter, void *indParam);
99#endif /* FEATURE_WLAN_CH_AVOID */
Jeff Johnson295189b2012-06-20 16:38:30 -0700100#endif // end #if !defined( WLAN_HDD_HOSTAPD_H )