You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
3.4 KiB
90 lines
3.4 KiB
/*
|
|
* WAPI specific types and constants relating to 802.11
|
|
*
|
|
* Copyright (C) 2024 Synaptics Incorporated. All rights reserved.
|
|
*
|
|
* This software is licensed to you under the terms of the
|
|
* GNU General Public License version 2 (the "GPL") with Broadcom special exception.
|
|
*
|
|
* INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS
|
|
* EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
|
|
* AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
|
|
* IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
* SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION
|
|
* WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED
|
|
* AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF
|
|
* THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION
|
|
* DOES NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES,
|
|
* SYNAPTICS' TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT
|
|
* EXCEED ONE HUNDRED U.S. DOLLARS
|
|
*
|
|
* Copyright (C) 2024, Broadcom.
|
|
*
|
|
* Unless you and Broadcom execute a separate written software license
|
|
* agreement governing use of this software, this software is licensed to you
|
|
* under the terms of the GNU General Public License version 2 (the "GPL"),
|
|
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
|
|
* following added to such license:
|
|
*
|
|
* As a special exception, the copyright holders of this software give you
|
|
* permission to link this software with independent modules, and to copy and
|
|
* distribute the resulting executable under terms of your choice, provided that
|
|
* you also meet, for each linked independent module, the terms and conditions of
|
|
* the license of that module. An independent module is a module which is not
|
|
* derived from this software. The special exception does not apply to any
|
|
* modifications of the software.
|
|
*
|
|
*
|
|
* <<Broadcom-WL-IPTag/Dual:>>
|
|
*/
|
|
|
|
#ifndef _802_11wapi_h_
|
|
#define _802_11wapi_h_
|
|
|
|
#include <802.11.h>
|
|
#include <wpa.h>
|
|
|
|
#ifdef BCMWAPI_WPI
|
|
#define SMS4_KEY_LEN 16
|
|
#define SMS4_WPI_CBC_MAC_LEN 16
|
|
#endif
|
|
|
|
#ifdef BCMWAPI_WAI
|
|
#define WAPI_IE_MIN_LEN 20 /* WAPI IE min length */
|
|
#define WAPI_VERSION 1 /* WAPI version */
|
|
#define WAPI_VERSION_LEN 2 /* WAPI version length */
|
|
#define WAPI_OUI "\x00\x14\x72" /* WAPI OUI */
|
|
#define WAPI_OUI_LEN DOT11_OUI_LEN /* WAPI OUI length */
|
|
|
|
#define WAPI_CIPHER_NONE WPA_CIPHER_NONE
|
|
#define WAPI_CIPHER_SMS4 11
|
|
|
|
#define WAPI_CSE_WPI_SMS4 1
|
|
|
|
#define IS_WAPI_CIPHER(cipher) ((cipher) == WAPI_CIPHER_NONE || \
|
|
(cipher) == WAPI_CSE_WPI_SMS4)
|
|
|
|
/* convert WAPI_CSE_WPI_XXX to WAPI_CIPHER_XXX */
|
|
#define WAPI_CSE_WPI_2_CIPHER(cse) ((cse) == WAPI_CSE_WPI_SMS4 ? \
|
|
WAPI_CIPHER_SMS4 : WAPI_CIPHER_NONE)
|
|
|
|
#define WAPI_CIPHER_2_CSE_WPI(cipher) ((cipher) == WAPI_CIPHER_SMS4 ? \
|
|
WAPI_CSE_WPI_SMS4 : WAPI_CIPHER_NONE)
|
|
|
|
#define WAPI_CAP_PREAUTH RSN_CAP_PREAUTH
|
|
|
|
/* Other WAI definition */
|
|
#define WAPI_WAI_REQUEST 0x00F1
|
|
#define WAPI_UNICAST_REKEY 0x00F2
|
|
#define WAPI_STA_AGING 0x00F3
|
|
#define WAPI_MUTIL_REKEY 0x00F4
|
|
#define WAPI_STA_STATS 0x00F5
|
|
|
|
#define WAPI_USK_REKEY_COUNT 0x4000000 /* 0xA00000 */
|
|
#define WAPI_MSK_REKEY_COUNT 0x4000000 /* 0xA00000 */
|
|
#endif /* BCMWAPI_WAI */
|
|
|
|
#endif /* _802_11wapi_h_ */
|