linux/drivers/net/wireless/broadcom/brcm80211/include/brcmu_wifi.h

// SPDX-License-Identifier: ISC
/*
 * Copyright (c) 2010 Broadcom Corporation
 */

#ifndef	_BRCMU_WIFI_H_
#define _BRCMU_WIFI_H_

#include <linux/if_ether.h>		/* for ETH_ALEN */
#include <linux/ieee80211.h>		/* for WLAN_PMKID_LEN */

/*
 * A chanspec (u16) holds the channel number, band, bandwidth and control
 * sideband
 */

/* channel defines */
#define CH_UPPER_SB
#define CH_LOWER_SB
#define CH_EWA_VALID
#define CH_70MHZ_APART
#define CH_50MHZ_APART
#define CH_30MHZ_APART
#define CH_20MHZ_APART
#define CH_10MHZ_APART
#define CH_5MHZ_APART
#define CH_MIN_2G_CHANNEL
#define CH_MAX_2G_CHANNEL
#define CH_MIN_5G_CHANNEL

/* bandstate array indices */
#define BAND_2G_INDEX
#define BAND_5G_INDEX

/*
 * max # supported channels. The max channel no is 216, this is that + 1
 * rounded up to a multiple of NBBY (8). DO NOT MAKE it > 255: channels are
 * u8's all over
*/
#define MAXCHANNEL

#define WL_CHANSPEC_CHAN_MASK
#define WL_CHANSPEC_CHAN_SHIFT

#define WL_CHANSPEC_CTL_SB_MASK
#define WL_CHANSPEC_CTL_SB_SHIFT
#define WL_CHANSPEC_CTL_SB_LOWER
#define WL_CHANSPEC_CTL_SB_UPPER
#define WL_CHANSPEC_CTL_SB_NONE

#define WL_CHANSPEC_BW_MASK
#define WL_CHANSPEC_BW_SHIFT
#define WL_CHANSPEC_BW_10
#define WL_CHANSPEC_BW_20
#define WL_CHANSPEC_BW_40
#define WL_CHANSPEC_BW_80

#define WL_CHANSPEC_BAND_MASK
#define WL_CHANSPEC_BAND_SHIFT
#define WL_CHANSPEC_BAND_5G
#define WL_CHANSPEC_BAND_2G
#define INVCHANSPEC

#define WL_CHAN_VALID_HW
#define WL_CHAN_VALID_SW
#define WL_CHAN_BAND_5G
#define WL_CHAN_RADAR
#define WL_CHAN_INACTIVE
#define WL_CHAN_PASSIVE
#define WL_CHAN_RESTRICTED

/* values for band specific 40MHz capabilities  */
#define WLC_N_BW_20ALL
#define WLC_N_BW_40ALL
#define WLC_N_BW_20IN2G_40IN5G

#define WLC_BW_20MHZ_BIT
#define WLC_BW_40MHZ_BIT
#define WLC_BW_80MHZ_BIT
#define WLC_BW_160MHZ_BIT

/* Bandwidth capabilities */
#define WLC_BW_CAP_20MHZ
#define WLC_BW_CAP_40MHZ
#define WLC_BW_CAP_80MHZ
#define WLC_BW_CAP_160MHZ
#define WLC_BW_CAP_UNRESTRICTED

/* band types */
#define WLC_BAND_AUTO
#define WLC_BAND_5G
#define WLC_BAND_2G
#define WLC_BAND_ALL

#define CHSPEC_CHANNEL(chspec)
#define CHSPEC_BAND(chspec)

#define CHSPEC_CTL_SB(chspec)
#define CHSPEC_BW(chspec)

#define CHSPEC_IS10(chspec)

#define CHSPEC_IS20(chspec)

#define CHSPEC_IS40(chspec)

#define CHSPEC_IS80(chspec)

#define CHSPEC_IS5G(chspec)

#define CHSPEC_IS2G(chspec)

#define CHSPEC_SB_NONE(chspec)

#define CHSPEC_SB_UPPER(chspec)

#define CHSPEC_SB_LOWER(chspec)

#define CHSPEC_CTL_CHAN(chspec)

#define CHSPEC2BAND(chspec)

#define CHANSPEC_STR_LEN

static inline int lower_20_sb(int channel)
{}

static inline int upper_20_sb(int channel)
{}

static inline int chspec_bandunit(u16 chspec)
{}

static inline u16 ch20mhz_chspec(int channel)
{}

static inline int next_20mhz_chan(int channel)
{}

/* defined rate in 500kbps */
#define BRCM_MAXRATE
#define BRCM_RATE_1M
#define BRCM_RATE_2M
#define BRCM_RATE_5M5
#define BRCM_RATE_11M
#define BRCM_RATE_6M
#define BRCM_RATE_9M
#define BRCM_RATE_12M
#define BRCM_RATE_18M
#define BRCM_RATE_24M
#define BRCM_RATE_36M
#define BRCM_RATE_48M
#define BRCM_RATE_54M

#define BRCM_2G_25MHZ_OFFSET

#define MCSSET_LEN

static inline bool ac_bitmap_tst(u8 bitmap, int prec)
{}

/* Enumerate crypto algorithms */
#define CRYPTO_ALGO_OFF
#define CRYPTO_ALGO_WEP1
#define CRYPTO_ALGO_TKIP
#define CRYPTO_ALGO_WEP128
#define CRYPTO_ALGO_AES_CCM
#define CRYPTO_ALGO_AES_RESERVED1
#define CRYPTO_ALGO_AES_RESERVED2
#define CRYPTO_ALGO_NALG

/* wireless security bitvec */

#define WEP_ENABLED
#define TKIP_ENABLED
#define AES_ENABLED
#define WSEC_SWFLAG
/* to go into transition mode without setting wep */
#define SES_OW_ENABLED
/* MFP */
#define MFP_CAPABLE
#define MFP_REQUIRED

/* WPA authentication mode bitvec */
#define WPA_AUTH_DISABLED
#define WPA_AUTH_NONE
#define WPA_AUTH_UNSPECIFIED
#define WPA_AUTH_PSK
#define WPA_AUTH_RESERVED1
#define WPA_AUTH_RESERVED2

#define WPA2_AUTH_RESERVED1
#define WPA2_AUTH_UNSPECIFIED
#define WPA2_AUTH_PSK
#define WPA2_AUTH_RESERVED3
#define WPA2_AUTH_RESERVED4
#define WPA2_AUTH_RESERVED5
#define WPA2_AUTH_1X_SHA256
#define WPA2_AUTH_FT
#define WPA2_AUTH_PSK_SHA256

#define WPA3_AUTH_SAE_PSK

#define DOT11_DEFAULT_RTS_LEN
#define DOT11_DEFAULT_FRAG_LEN

#define DOT11_ICV_AES_LEN
#define DOT11_QOS_LEN
#define DOT11_IV_MAX_LEN
#define DOT11_A4_HDR_LEN

#define HT_CAP_RX_STBC_NO
#define HT_CAP_RX_STBC_ONE_STREAM

#endif				/* _BRCMU_WIFI_H_ */