Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2013-2015 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. |
| 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> |
| 41 | #include <cdf_list.h> |
| 42 | #include <cdf_types.h> |
| 43 | #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 | |
| 50 | hdd_adapter_t *hdd_wlan_create_ap_dev(hdd_context_t *pHddCtx, |
| 51 | tSirMacAddr macAddr, uint8_t *name); |
| 52 | |
| 53 | CDF_STATUS hdd_register_hostapd(hdd_adapter_t *pAdapter, uint8_t rtnl_held); |
| 54 | |
| 55 | CDF_STATUS hdd_unregister_hostapd(hdd_adapter_t *pAdapter, bool rtnl_held); |
| 56 | |
| 57 | eCsrAuthType |
| 58 | hdd_translate_rsn_to_csr_auth_type(uint8_t auth_suite[4]); |
| 59 | |
| 60 | eCsrEncryptionType |
| 61 | hdd_translate_rsn_to_csr_encryption_type(uint8_t cipher_suite[4]); |
| 62 | |
| 63 | eCsrEncryptionType |
| 64 | hdd_translate_rsn_to_csr_encryption_type(uint8_t cipher_suite[4]); |
| 65 | |
| 66 | eCsrAuthType |
| 67 | hdd_translate_wpa_to_csr_auth_type(uint8_t auth_suite[4]); |
| 68 | |
| 69 | eCsrEncryptionType |
| 70 | hdd_translate_wpa_to_csr_encryption_type(uint8_t cipher_suite[4]); |
| 71 | |
| 72 | CDF_STATUS hdd_softap_sta_deauth(hdd_adapter_t *, |
| 73 | struct tagCsrDelStaParams *); |
| 74 | void hdd_softap_sta_disassoc(hdd_adapter_t *, uint8_t *); |
| 75 | void hdd_softap_tkip_mic_fail_counter_measure(hdd_adapter_t *, bool); |
| 76 | int hdd_softap_unpack_ie(tHalHandle halHandle, |
| 77 | eCsrEncryptionType *pEncryptType, |
| 78 | eCsrEncryptionType *mcEncryptType, |
| 79 | eCsrAuthType *pAuthType, |
| 80 | bool *pMFPCapable, |
| 81 | bool *pMFPRequired, |
| 82 | uint16_t gen_ie_len, uint8_t *gen_ie); |
| 83 | |
| 84 | CDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, |
| 85 | void *usrDataForCallback); |
| 86 | CDF_STATUS hdd_init_ap_mode(hdd_adapter_t *pAdapter); |
| 87 | void hdd_set_ap_ops(struct net_device *pWlanHostapdDev); |
| 88 | int hdd_hostapd_stop(struct net_device *dev); |
| 89 | void hdd_hostapd_channel_wakelock_init(hdd_context_t *pHddCtx); |
| 90 | void hdd_hostapd_channel_wakelock_deinit(hdd_context_t *pHddCtx); |
| 91 | #ifdef FEATURE_WLAN_FORCE_SAP_SCC |
| 92 | void hdd_restart_softap(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter); |
| 93 | #endif /* FEATURE_WLAN_FORCE_SAP_SCC */ |
| 94 | #ifdef QCA_HT_2040_COEX |
| 95 | CDF_STATUS hdd_set_sap_ht2040_mode(hdd_adapter_t *pHostapdAdapter, |
| 96 | uint8_t channel_type); |
| 97 | #endif |
| 98 | |
| 99 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)) |
| 100 | int wlan_hdd_cfg80211_add_beacon(struct wiphy *wiphy, |
| 101 | struct net_device *dev, |
| 102 | struct beacon_parameters *params); |
| 103 | |
| 104 | int wlan_hdd_cfg80211_set_beacon(struct wiphy *wiphy, |
| 105 | struct net_device *dev, |
| 106 | struct beacon_parameters *params); |
| 107 | #endif |
| 108 | |
| 109 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)) |
| 110 | int wlan_hdd_cfg80211_del_beacon(struct wiphy *wiphy, |
| 111 | struct net_device *dev); |
| 112 | #else |
| 113 | int wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, |
| 114 | struct net_device *dev); |
| 115 | #endif |
| 116 | |
| 117 | #if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 3, 0)) |
| 118 | int wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, |
| 119 | struct net_device *dev, |
| 120 | struct cfg80211_ap_settings *params); |
| 121 | #endif |
| 122 | |
| 123 | int wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy, |
| 124 | struct net_device *dev, |
| 125 | struct cfg80211_beacon_data *params); |
| 126 | |
| 127 | CDF_STATUS wlan_hdd_config_acs(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter); |
| 128 | #endif /* end #if !defined(WLAN_HDD_HOSTAPD_H) */ |