mirror of
https://github.com/pine64/bl_iot_sdk.git
synced 2024-09-15 15:14:03 +00:00
183 lines
6.4 KiB
C
183 lines
6.4 KiB
C
/*
|
|
* Copyright (c) 2020 Bouffalolab.
|
|
*
|
|
* This file is part of
|
|
* *** Bouffalolab Software Dev Kit ***
|
|
* (see www.bouffalolab.com).
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without modification,
|
|
* are permitted provided that the following conditions are met:
|
|
* 1. Redistributions of source code must retain the above copyright notice,
|
|
* this list of conditions and the following disclaimer.
|
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
* this list of conditions and the following disclaimer in the documentation
|
|
* and/or other materials provided with the distribution.
|
|
* 3. Neither the name of Bouffalo Lab nor the names of its contributors
|
|
* may be used to endorse or promote products derived from this software
|
|
* without specific prior written permission.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
*/
|
|
#ifndef __NL80211_H__
|
|
#define __NL80211_H__
|
|
|
|
#define NL80211_MAX_NR_CIPHER_SUITES 5
|
|
#define NL80211_MAX_NR_AKM_SUITES 2
|
|
|
|
|
|
/**
|
|
****************************************************************************************
|
|
*
|
|
* @file nl80211.h
|
|
* Copyright (C) Bouffalo Lab 2016-2018
|
|
*
|
|
****************************************************************************************
|
|
*/
|
|
|
|
enum nl80211_bss_select_attr {
|
|
__NL80211_BSS_SELECT_ATTR_INVALID,
|
|
NL80211_BSS_SELECT_ATTR_RSSI,
|
|
NL80211_BSS_SELECT_ATTR_BAND_PREF,
|
|
NL80211_BSS_SELECT_ATTR_RSSI_ADJUST,
|
|
|
|
/* keep last */
|
|
__NL80211_BSS_SELECT_ATTR_AFTER_LAST,
|
|
NL80211_BSS_SELECT_ATTR_MAX = __NL80211_BSS_SELECT_ATTR_AFTER_LAST - 1
|
|
};
|
|
|
|
/**
|
|
* enum nl80211_auth_type - AuthenticationType
|
|
*
|
|
* @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication
|
|
* @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only)
|
|
* @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r)
|
|
* @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP)
|
|
* @NL80211_AUTHTYPE_SAE: Simultaneous authentication of equals
|
|
* @NL80211_AUTHTYPE_FILS_SK: Fast Initial Link Setup shared key
|
|
* @NL80211_AUTHTYPE_FILS_SK_PFS: Fast Initial Link Setup shared key with PFS
|
|
* @NL80211_AUTHTYPE_FILS_PK: Fast Initial Link Setup public key
|
|
* @__NL80211_AUTHTYPE_NUM: internal
|
|
* @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm
|
|
* @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by
|
|
* trying multiple times); this is invalid in netlink -- leave out
|
|
* the attribute for this on CONNECT commands.
|
|
*/
|
|
enum nl80211_auth_type {
|
|
NL80211_AUTHTYPE_OPEN_SYSTEM,
|
|
NL80211_AUTHTYPE_SHARED_KEY,
|
|
NL80211_AUTHTYPE_FT,
|
|
NL80211_AUTHTYPE_NETWORK_EAP,
|
|
NL80211_AUTHTYPE_SAE,
|
|
NL80211_AUTHTYPE_FILS_SK,
|
|
NL80211_AUTHTYPE_FILS_SK_PFS,
|
|
NL80211_AUTHTYPE_FILS_PK,
|
|
|
|
/* keep last */
|
|
__NL80211_AUTHTYPE_NUM,
|
|
NL80211_AUTHTYPE_MAX = __NL80211_AUTHTYPE_NUM - 1,
|
|
NL80211_AUTHTYPE_AUTOMATIC
|
|
};
|
|
|
|
/**
|
|
* enum nl80211_dfs_state - DFS states for channels
|
|
*
|
|
* Channel states used by the DFS code.
|
|
*
|
|
* @NL80211_DFS_USABLE: The channel can be used, but channel availability
|
|
* check (CAC) must be performed before using it for AP or IBSS.
|
|
* @NL80211_DFS_UNAVAILABLE: A radar has been detected on this channel, it
|
|
* is therefore marked as not available.
|
|
* @NL80211_DFS_AVAILABLE: The channel has been CAC checked and is available.
|
|
*/
|
|
enum nl80211_dfs_state {
|
|
NL80211_DFS_USABLE,
|
|
NL80211_DFS_UNAVAILABLE,
|
|
NL80211_DFS_AVAILABLE,
|
|
};
|
|
|
|
/**
|
|
* enum nl80211_band - Frequency band
|
|
* @NL80211_BAND_2GHZ: 2.4 GHz ISM band
|
|
* @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz)
|
|
* @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 64.80 GHz)
|
|
* @NUM_NL80211_BANDS: number of bands, avoid using this in userspace
|
|
* since newer kernel versions may support more bands
|
|
*/
|
|
enum nl80211_band {
|
|
NL80211_BAND_2GHZ,
|
|
NL80211_BAND_5GHZ,
|
|
NL80211_BAND_60GHZ,
|
|
|
|
NUM_NL80211_BANDS,
|
|
};
|
|
|
|
/**
|
|
* enum nl80211_iftype - (virtual) interface types
|
|
*
|
|
* @NL80211_IFTYPE_UNSPECIFIED: unspecified type, driver decides
|
|
* @NL80211_IFTYPE_ADHOC: independent BSS member
|
|
* @NL80211_IFTYPE_STATION: managed BSS member
|
|
* @NL80211_IFTYPE_AP: access point
|
|
* @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points; VLAN interfaces
|
|
* are a bit special in that they must always be tied to a pre-existing
|
|
* AP type interface.
|
|
* @NL80211_IFTYPE_WDS: wireless distribution interface
|
|
* @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames
|
|
* @NL80211_IFTYPE_MESH_POINT: mesh point
|
|
* @NL80211_IFTYPE_P2P_CLIENT: P2P client
|
|
* @NL80211_IFTYPE_P2P_GO: P2P group owner
|
|
* @NL80211_IFTYPE_P2P_DEVICE: P2P device interface type, this is not a netdev
|
|
* and therefore can't be created in the normal ways, use the
|
|
* %NL80211_CMD_START_P2P_DEVICE and %NL80211_CMD_STOP_P2P_DEVICE
|
|
* commands to create and destroy one
|
|
* @NL80211_IF_TYPE_OCB: Outside Context of a BSS
|
|
* This mode corresponds to the MIB variable dot11OCBActivated=true
|
|
* @NL80211_IFTYPE_NAN: NAN device interface type (not a netdev)
|
|
* @NL80211_IFTYPE_MAX: highest interface type number currently defined
|
|
* @NUM_NL80211_IFTYPES: number of defined interface types
|
|
*
|
|
* These values are used with the %NL80211_ATTR_IFTYPE
|
|
* to set the type of an interface.
|
|
*
|
|
*/
|
|
enum nl80211_iftype {
|
|
NL80211_IFTYPE_UNSPECIFIED,
|
|
NL80211_IFTYPE_ADHOC,
|
|
NL80211_IFTYPE_STATION,
|
|
NL80211_IFTYPE_AP,
|
|
NL80211_IFTYPE_AP_VLAN,
|
|
NL80211_IFTYPE_WDS,
|
|
NL80211_IFTYPE_MONITOR,
|
|
NL80211_IFTYPE_MESH_POINT,
|
|
NL80211_IFTYPE_P2P_CLIENT,
|
|
NL80211_IFTYPE_P2P_GO,
|
|
NL80211_IFTYPE_P2P_DEVICE,
|
|
NL80211_IFTYPE_OCB,
|
|
NL80211_IFTYPE_NAN,
|
|
|
|
/* keep last */
|
|
NUM_NL80211_IFTYPES,
|
|
NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
|
|
};
|
|
|
|
/**
|
|
* enum nl80211_mfp - Management frame protection state
|
|
* @NL80211_MFP_NO: Management frame protection not used
|
|
* @NL80211_MFP_REQUIRED: Management frame protection required
|
|
*/
|
|
enum nl80211_mfp {
|
|
NL80211_MFP_NO,
|
|
NL80211_MFP_REQUIRED,
|
|
};
|
|
|
|
#endif
|