1
0

qcacld-3.0: Remove obsolete code from CDS

Remove obsolete code from CDS.

Change-Id: I4f4375ed52616eb238697f5edcf0bf099ceb32ba
CRs-Fixed: 2395980
Este cometimento está contido em:
Srinivas Girigowda
2019-02-07 15:28:32 -08:00
cometido por nshrivas
ascendente 7b13ae84d9
cometimento 59053152f0
7 ficheiros modificados com 19 adições e 3545 eliminações

A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande Carregar diff

A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande Carregar diff

Ver ficheiro

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2014, 2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2011, 2014, 2017, 2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -16,18 +16,10 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* #ifndef _NET_IF_ETHERSUBR_H_ */
/* #define _NET_IF_ETHERSUBR_H_ */
#ifndef _NET_IF_UPPERPROTO_H_
#define _NET_IF_UPPERPROTO_H_
#define ETHER_ADDR_LEN 6 /* length of an Ethernet address */
#define ETHER_TYPE_LEN 2 /* length of the Ethernet type field */
#define ETHER_CRC_LEN 4 /* length of the Ethernet CRC */
#define ETHER_HDR_LEN (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN)
#define ETHER_MAX_LEN 1518
#define ETHERMTU (ETHER_MAX_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
/*
* Structure of a 10Mb/s Ethernet header.
@@ -40,190 +32,13 @@ struct ether_header {
} __packed;
#endif
#ifndef ETHERTYPE_PAE
#define ETHERTYPE_PAE 0x888e /* EAPOL PAE/802.1x */
#endif
#ifndef ETHERTYPE_IP
#define ETHERTYPE_IP 0x0800 /* IP protocol */
#endif
#ifndef ETHERTYPE_AARP
#define ETHERTYPE_AARP 0x80f3 /* Appletalk AARP protocol */
#endif
#ifndef ETHERTYPE_IPX
#define ETHERTYPE_IPX 0x8137 /* IPX over DIX protocol */
#endif
#ifndef ETHERTYPE_ARP
#define ETHERTYPE_ARP 0x0806 /* ARP protocol */
#endif
#ifndef ETHERTYPE_IPV6
#define ETHERTYPE_IPV6 0x86dd /* IPv6 */
#endif
#ifndef ETHERTYPE_8021Q
#define ETHERTYPE_8021Q 0x8100 /* 802.1Q vlan protocol */
#endif
#ifndef ETHERTYPE_VLAN
#define ETHERTYPE_VLAN 0x8100 /* VLAN TAG protocol */
#endif
#ifndef TX_QUEUE_FOR_EAPOL_FRAME
#define TX_QUEUE_FOR_EAPOL_FRAME 0x7 /* queue eapol frame to queue 7 to avoid aggregation disorder */
#endif
/*
* define WAI ethertype
*/
#ifndef ETHERTYPE_WAI
#define ETHERTYPE_WAI 0x88b4 /* WAI/WAPI */
#endif
#define ETHERTYPE_OCB_TX 0x8151
#define ETHERTYPE_OCB_RX 0x8152
/*
* Structure of a 48-bit Ethernet address.
*/
#if 0
#ifndef _NET_ETHERNET_H_
struct ether_addr {
uint8_t octet[ETHER_ADDR_LEN];
} __packed;
#endif
#ifndef ETHERTYPE_8021Q
#define ETHERTYPE_8021Q 0x8100 /* 802.1Q vlan protocol */
#endif
#define ETHER_IS_MULTICAST(addr) (*(addr) & 0x01) /* is address mcast/bcast? */
#define VLAN_PRI_SHIFT 13 /* Shift to find VLAN user priority */
#define VLAN_PRI_MASK 7 /* Mask for user priority bits in VLAN */
/*
* Structure of the IP frame
*/
struct ip_header {
uint8_t version_ihl;
uint8_t tos;
uint16_t tot_len;
uint16_t id;
uint16_t frag_off;
uint8_t ttl;
uint8_t protocol;
uint16_t check;
uint32_t saddr;
uint32_t daddr;
/*The options start here. */
};
#ifndef IP_PROTO_TCP
#define IP_PROTO_TCP 0x6 /* TCP protocol */
#endif
#ifndef IP_PROTO_UDP
#define IP_PROTO_UDP 17
#endif
/*
* IGMP protocol structures
*/
/* IGMP record type */
#define IGMP_QUERY_TYPE 0x11
#define IGMPV1_REPORT_TYPE 0x12
#define IGMPV2_REPORT_TYPE 0x16
#define IGMPV2_LEAVE_TYPE 0x17
#define IGMPV3_REPORT_TYPE 0x22
/* Is packet type is either leave or report */
#define IS_IGMP_REPORT_LEAVE_PACKET(type) ( \
(IGMPV1_REPORT_TYPE == type) \
|| (IGMPV2_REPORT_TYPE == type) \
|| (IGMPV2_LEAVE_TYPE == type) \
|| (IGMPV3_REPORT_TYPE == type) \
)
/*
* Header in on cable format
*/
struct igmp_header {
uint8_t type;
uint8_t code; /* For newer IGMP */
uint16_t csum;
uint32_t group;
};
/* V3 group record types [grec_type] */
#define IGMPV3_MODE_IS_INCLUDE 1
#define IGMPV3_MODE_IS_EXCLUDE 2
#define IGMPV3_CHANGE_TO_INCLUDE 3
#define IGMPV3_CHANGE_TO_EXCLUDE 4
#define IGMPV3_ALLOW_NEW_SOURCES 5
#define IGMPV3_BLOCK_OLD_SOURCES 6
/* Group record format
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Record Type | Aux Data Len | Number of Sources (N) |
||+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Multicast Address |
||+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address [1] |
||+- -+
| Source Address [2] |
||+- -+
. . .
. . .
. . .
||+- -+
| Source Address [N] |
||+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. .
. Auxiliary Data .
. .
| |
||+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
struct igmp_v3_grec {
uint8_t grec_type;
uint8_t grec_auxwords;
uint16_t grec_nsrcs;
uint32_t grec_mca;
};
/* IGMPv3 report format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = 0x22 | Reserved | Checksum |
||+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | Number of Group Records (M) |
||+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. .
. Group Record [1] .
. .
| |
||+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. .
. Group Record [2] .
. .
| |
||+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
. . .
| . |
||+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. .
. Group Record [M] .
. .
| |
||+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
struct igmp_v3_report {
uint8_t type;
uint8_t resv1;
uint16_t csum;
uint16_t resv2;
uint16_t ngrec;
};
/* Calculate the group record length*/
#define IGMPV3_GRP_REC_LEN(x) (8 + (4 * x->grec_nsrcs) + (4 * x->grec_auxwords))
#endif /* _NET_IF_ETHERSUBR_H_ */
#endif /* _NET_IF_UPPERPROTO_H_ */

Ver ficheiro

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2017, 2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -16,7 +16,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
#if !defined __CDS_REG_SERVICE_H
#ifndef __CDS_REG_SERVICE_H
#define __CDS_REG_SERVICE_H
/**=========================================================================
@@ -33,7 +33,6 @@
#define CDS_COUNTRY_CODE_LEN 2
#define CDS_MAC_ADDRESS_LEN 6
#define CDS_SBS_SEPARATION_THRESHOLD 100
#define HT40PLUS_2G_FCC_CH_END 7
#define HT40PLUS_2G_EURJAP_CH_END 9
#define HT40MINUS_2G_CH_START 5

Ver ficheiro

@@ -16,7 +16,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
#if !defined(__CDS_SCHED_H)
#ifndef __CDS_SCHED_H
#define __CDS_SCHED_H
/**=========================================================================
@@ -42,20 +42,10 @@
#include "cds_config.h"
#include "qdf_cpuhp.h"
#define TX_POST_EVENT 0x001
#define TX_SUSPEND_EVENT 0x002
#define MC_POST_EVENT 0x001
#define MC_SUSPEND_EVENT 0x002
#define RX_POST_EVENT 0x001
#define RX_SUSPEND_EVENT 0x002
#define TX_SHUTDOWN_EVENT 0x010
#define MC_SHUTDOWN_EVENT 0x010
#define RX_SHUTDOWN_EVENT 0x010
#define WD_POST_EVENT 0x001
#define WD_SHUTDOWN_EVENT 0x002
#define WD_CHIP_RESET_EVENT 0x004
#define WD_WLAN_SHUTDOWN_EVENT 0x008
#define WD_WLAN_REINIT_EVENT 0x010
#ifdef QCA_CONFIG_SMP
/*
@@ -527,4 +517,4 @@ void cds_shutdown_notifier_call(void);
*/
void cds_resume_rx_thread(void);
#endif /* #if !defined __CDS_SCHED_H */
#endif /* #ifndef __CDS_SCHED_H */

Ver ficheiro

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -16,7 +16,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
#if !defined(__CDS_UTILS_H)
#ifndef __CDS_UTILS_H
#define __CDS_UTILS_H
/**=========================================================================
@@ -41,14 +41,9 @@
/*--------------------------------------------------------------------------
Preprocessor definitions and constants
------------------------------------------------------------------------*/
#define CDS_DIGEST_SHA1_SIZE (20)
#define CDS_DIGEST_MD5_SIZE (16)
#define CDS_24_GHZ_BASE_FREQ (2407)
#define CDS_5_GHZ_BASE_FREQ (5000)
#define CDS_24_GHZ_CHANNEL_6 (6)
#define CDS_24_GHZ_CHANNEL_1 (1)
#define CDS_5_GHZ_CHANNEL_36 (36)
#define CDS_24_GHZ_CHANNEL_14 (14)
#define CDS_24_GHZ_CHANNEL_15 (15)
#define CDS_24_GHZ_CHANNEL_27 (27)
@@ -165,4 +160,4 @@ void cds_copy_hlp_info(struct qdf_mac_addr *input_dst_mac,
struct qdf_mac_addr *output_src_mac,
uint16_t *output_hlp_data_len,
uint8_t *output_hlp_data);
#endif /* #if !defined __CDS_UTILS_H */
#endif /* #ifndef __CDS_UTILS_H */

Ver ficheiro

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2017,2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -89,70 +89,6 @@ enum ieee80211_phymode {
IEEE80211_MODE_MAX = IEEE80211_MODE_11AX_HE160,
};
/**
* enum ieee80211_opmode - operating mode
* @IEEE80211_M_IBSS - IBSS (adhoc) station
* @IEEE80211_M_HOSTAP - Software Access Point
* @IEEE80211_OPMODE_MAX = Highest numbered opmode in the list
* @IEEE80211_M_ANY - Any of the above; used by NDIS 6.x
*
*/
enum ieee80211_opmode {
IEEE80211_M_IBSS = 0,
IEEE80211_M_HOSTAP = 6,
/* Do not add after this line */
IEEE80211_OPMODE_MAX = IEEE80211_M_HOSTAP,
IEEE80211_M_ANY = 0xFF,
};
/*
* 802.11n
*/
#define IEEE80211_CWM_EXTCH_BUSY_THRESHOLD 30
enum ieee80211_cwm_mode {
IEEE80211_CWM_MODE20,
IEEE80211_CWM_MODE2040,
IEEE80211_CWM_MODE40,
IEEE80211_CWM_MODEMAX
};
enum ieee80211_cwm_extprotspacing {
IEEE80211_CWM_EXTPROTSPACING20,
IEEE80211_CWM_EXTPROTSPACING25,
IEEE80211_CWM_EXTPROTSPACINGMAX
};
enum ieee80211_cwm_width {
IEEE80211_CWM_WIDTH20,
IEEE80211_CWM_WIDTH40,
IEEE80211_CWM_WIDTH80,
IEEE80211_CWM_WIDTHINVALID = 0xff /* user invalid value */
};
enum ieee80211_cwm_extprotmode {
IEEE80211_CWM_EXTPROTNONE, /* no protection */
IEEE80211_CWM_EXTPROTCTSONLY, /* CTS to self */
IEEE80211_CWM_EXTPROTRTSCTS, /* RTS-CTS */
IEEE80211_CWM_EXTPROTMAX
};
enum ieee80211_fixed_rate_mode {
IEEE80211_FIXED_RATE_NONE = 0,
IEEE80211_FIXED_RATE_MCS = 1, /* HT rates */
IEEE80211_FIXED_RATE_LEGACY = 2, /* legacy rates */
IEEE80211_FIXED_RATE_VHT = 3 /* VHT rates */
};
/* Holds the fixed rate information for each VAP */
struct ieee80211_fixed_rate {
enum ieee80211_fixed_rate_mode mode;
uint32_t series;
uint32_t retries;
};
/*
* 802.11g protection mode.
*/
@@ -162,53 +98,6 @@ enum ieee80211_protmode {
IEEE80211_PROT_RTSCTS = 2, /* RTS-CTS */
};
/*
* Roaming mode is effectively who controls the operation
* of the 802.11 state machine when operating as a station.
* State transitions are controlled either by the driver
* (typically when management frames are processed by the
* hardware/firmware), the host (auto/normal operation of
* the 802.11 layer), or explicitly through ioctl requests
* when applications like wpa_supplicant want control.
*/
enum ieee80211_roamingmode {
IEEE80211_ROAMING_DEVICE = 0, /* driver/hardware control */
IEEE80211_ROAMING_AUTO = 1, /* 802.11 layer control */
IEEE80211_ROAMING_MANUAL = 2, /* application control */
};
/*
* Scanning mode controls station scanning work; this is
* used only when roaming mode permits the host to select
* the bss to join/channel to use.
*/
enum ieee80211_scanmode {
IEEE80211_SCAN_DEVICE = 0, /* driver/hardware control */
IEEE80211_SCAN_BEST = 1, /* 802.11 layer selects best */
IEEE80211_SCAN_FIRST = 2, /* take first suitable candidate */
};
#define IEEE80211_NWID_LEN 32
#define IEEE80211_CHAN_MAX 255
#define IEEE80211_CHAN_BYTES 32 /* howmany(IEEE80211_CHAN_MAX, NBBY) */
#define IEEE80211_CHAN_ANY (-1) /* token for ``any channel'' */
#define IEEE80211_CHAN_ANYC \
((struct ieee80211_channel *) IEEE80211_CHAN_ANY)
#define IEEE80211_CHAN_DEFAULT 11
#define IEEE80211_CHAN_DEFAULT_11A 52
#define IEEE80211_CHAN_ADHOC_DEFAULT1 10
#define IEEE80211_CHAN_ADHOC_DEFAULT2 11
#define IEEE80211_RADAR_11HCOUNT 5
#define IEEE80211_RADAR_TEST_MUTE_CHAN_11A 36 /* Move to channel 36 for mute test */
#define IEEE80211_RADAR_TEST_MUTE_CHAN_11NHT20 36
#define IEEE80211_RADAR_TEST_MUTE_CHAN_11NHT40U 36
#define IEEE80211_RADAR_TEST_MUTE_CHAN_11NHT40D 40 /* Move to channel 40 for HT40D mute test */
#define IEEE80211_RADAR_DETECT_DEFAULT_DELAY 60000 /* STA ignore AP beacons during this period in millisecond */
#define IEEE80211_2GCSA_TBTTCOUNT 3
/* bits 0-3 are for private use by drivers */
/* channel attributes */
#define IEEE80211_CHAN_TURBO 0x00000010 /* Turbo channel */
@@ -231,8 +120,6 @@ enum ieee80211_scanmode {
#define IEEE80211_CHAN_VHT40PLUS 0x00200000 /* VHT 40 with extension channel above */
#define IEEE80211_CHAN_VHT40MINUS 0x00400000 /* VHT 40 with extension channel below */
#define IEEE80211_CHAN_VHT80 0x00800000 /* VHT 80 channel */
/* HT 40 Intolerant mark bit for ACS use */
#define IEEE80211_CHAN_HT40INTOLMARK 0x01000000
/* channel temporarily blocked due to noise */
#define IEEE80211_CHAN_BLOCKED 0x02000000
/* VHT 160 channel */
@@ -241,338 +128,11 @@ enum ieee80211_scanmode {
#define IEEE80211_CHAN_VHT80_80 0x08000000
/* flagext */
#define IEEE80211_CHAN_RADAR_FOUND 0x01
#define IEEE80211_CHAN_DFS 0x0002 /* DFS required on channel */
#define IEEE80211_CHAN_DFS_CLEAR 0x0008 /* if channel has been checked for DFS */
#define IEEE80211_CHAN_11D_EXCLUDED 0x0010 /* excluded in 11D */
#define IEEE80211_CHAN_CSA_RECEIVED 0x0020 /* Channel Switch Announcement received on this channel */
#define IEEE80211_CHAN_DISALLOW_ADHOC 0x0040 /* ad-hoc is not allowed */
#define IEEE80211_CHAN_DISALLOW_HOSTAP 0x0080 /* Station only channel */
/*
* Useful combinations of channel characteristics.
*/
#define IEEE80211_CHAN_FHSS \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_GFSK)
#define IEEE80211_CHAN_A \
(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM)
#define IEEE80211_CHAN_B \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_CCK)
#define IEEE80211_CHAN_PUREG \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM)
#define IEEE80211_CHAN_G \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN)
#define IEEE80211_CHAN_108A \
(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO)
#define IEEE80211_CHAN_108G \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO)
#define IEEE80211_CHAN_ST \
(IEEE80211_CHAN_108A | IEEE80211_CHAN_STURBO)
#define IEEE80211_IS_CHAN_11AC_2G(_c) \
(IEEE80211_IS_CHAN_2GHZ((_c)) && IEEE80211_IS_CHAN_VHT((_c)))
#define IEEE80211_CHAN_11AC_VHT20_2G \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_VHT20)
#define IEEE80211_CHAN_11AC_VHT40_2G \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_VHT40PLUS | IEEE80211_CHAN_VHT40MINUS)
#define IEEE80211_CHAN_11AC_VHT80_2G \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_VHT80)
#define IEEE80211_IS_CHAN_11AC_VHT20_2G(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11AC_VHT20_2G) == IEEE80211_CHAN_11AC_VHT20_2G)
#define IEEE80211_IS_CHAN_11AC_VHT40_2G(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11AC_VHT40_2G) != 0)
#define IEEE80211_IS_CHAN_11AC_VHT80_2G(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11AC_VHT80_2G) == IEEE80211_CHAN_11AC_VHT80_2G)
#define IEEE80211_CHAN_11NG_HT20 \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_HT20)
#define IEEE80211_CHAN_11NA_HT20 \
(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_HT20)
#define IEEE80211_CHAN_11NG_HT40PLUS \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_HT40PLUS)
#define IEEE80211_CHAN_11NG_HT40MINUS \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_HT40MINUS)
#define IEEE80211_CHAN_11NA_HT40PLUS \
(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_HT40PLUS)
#define IEEE80211_CHAN_11NA_HT40MINUS \
(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_HT40MINUS)
#define IEEE80211_CHAN_ALL \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_GFSK | \
IEEE80211_CHAN_CCK | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_DYN | \
IEEE80211_CHAN_HT20 | IEEE80211_CHAN_HT40PLUS | IEEE80211_CHAN_HT40MINUS | \
IEEE80211_CHAN_VHT20 | IEEE80211_CHAN_VHT40PLUS | IEEE80211_CHAN_VHT40MINUS | IEEE80211_CHAN_VHT80 | \
IEEE80211_CHAN_HALF | IEEE80211_CHAN_QUARTER)
#define IEEE80211_CHAN_ALLTURBO \
(IEEE80211_CHAN_ALL | IEEE80211_CHAN_TURBO | IEEE80211_CHAN_STURBO)
#define IEEE80211_IS_CHAN_FHSS(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_FHSS) == IEEE80211_CHAN_FHSS)
#define IEEE80211_IS_CHAN_A(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_A) == IEEE80211_CHAN_A)
#define IEEE80211_IS_CHAN_B(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_B) == IEEE80211_CHAN_B)
#define IEEE80211_IS_CHAN_PUREG(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_PUREG) == IEEE80211_CHAN_PUREG)
#define IEEE80211_IS_CHAN_G(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_G) == IEEE80211_CHAN_G)
#define IEEE80211_IS_CHAN_ANYG(_c) \
(IEEE80211_IS_CHAN_PUREG(_c) || IEEE80211_IS_CHAN_G(_c))
#define IEEE80211_IS_CHAN_ST(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_ST) == IEEE80211_CHAN_ST)
#define IEEE80211_IS_CHAN_108A(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_108A) == IEEE80211_CHAN_108A)
#define IEEE80211_IS_CHAN_108G(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_108G) == IEEE80211_CHAN_108G)
#define IEEE80211_IS_CHAN_2GHZ(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_2GHZ) != 0)
#define IEEE80211_IS_CHAN_5GHZ(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_5GHZ) != 0)
#define IEEE80211_IS_CHAN_OFDM(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_OFDM) != 0)
#define IEEE80211_IS_CHAN_CCK(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_CCK) != 0)
#define IEEE80211_IS_CHAN_GFSK(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_GFSK) != 0)
#define IEEE80211_IS_CHAN_TURBO(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_TURBO) != 0)
#define IEEE80211_IS_CHAN_WEATHER_RADAR(_c) \
((((_c)->ic_freq >= 5600) && ((_c)->ic_freq <= 5650)) \
|| (((_c)->ic_flags & IEEE80211_CHAN_HT40PLUS) && (5580 == (_c)->ic_freq)))
#define IEEE80211_IS_CHAN_STURBO(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_STURBO) != 0)
#define IEEE80211_IS_CHAN_DTURBO(_c) \
(((_c)->ic_flags & \
(IEEE80211_CHAN_TURBO | IEEE80211_CHAN_STURBO)) == IEEE80211_CHAN_TURBO)
#define IEEE80211_IS_CHAN_HALF(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_HALF) != 0)
#define IEEE80211_IS_CHAN_QUARTER(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_QUARTER) != 0)
#define IEEE80211_IS_CHAN_PASSIVE(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_PASSIVE) != 0)
#define IEEE80211_IS_CHAN_DFS(_c) \
(((_c)->ic_flagext & (IEEE80211_CHAN_DFS|IEEE80211_CHAN_DFS_CLEAR)) == IEEE80211_CHAN_DFS)
#define IEEE80211_IS_CHAN_DFSFLAG(_c) \
(((_c)->ic_flagext & IEEE80211_CHAN_DFS) == IEEE80211_CHAN_DFS)
#define IEEE80211_IS_CHAN_DISALLOW_ADHOC(_c) \
(((_c)->ic_flagext & IEEE80211_CHAN_DISALLOW_ADHOC) != 0)
#define IEEE80211_IS_CHAN_11D_EXCLUDED(_c) \
(((_c)->ic_flagext & IEEE80211_CHAN_11D_EXCLUDED) != 0)
#define IEEE80211_IS_CHAN_CSA(_c) \
(((_c)->ic_flagext & IEEE80211_CHAN_CSA_RECEIVED) != 0)
#define IEEE80211_IS_CHAN_ODD(_c) \
(((_c)->ic_freq == 5170) || ((_c)->ic_freq == 5190) || \
((_c)->ic_freq == 5210) || ((_c)->ic_freq == 5230))
#define IEEE80211_IS_CHAN_DISALLOW_HOSTAP(_c) \
(((_c)->ic_flagext & IEEE80211_CHAN_DISALLOW_HOSTAP) != 0)
#define IEEE80211_IS_CHAN_11NG_HT20(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11NG_HT20) == IEEE80211_CHAN_11NG_HT20)
#define IEEE80211_IS_CHAN_11NA_HT20(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11NA_HT20) == IEEE80211_CHAN_11NA_HT20)
#define IEEE80211_IS_CHAN_11NG_HT40PLUS(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11NG_HT40PLUS) == IEEE80211_CHAN_11NG_HT40PLUS)
#define IEEE80211_IS_CHAN_11NG_HT40MINUS(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11NG_HT40MINUS) == IEEE80211_CHAN_11NG_HT40MINUS)
#define IEEE80211_IS_CHAN_11NA_HT40PLUS(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11NA_HT40PLUS) == IEEE80211_CHAN_11NA_HT40PLUS)
#define IEEE80211_IS_CHAN_11NA_HT40MINUS(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11NA_HT40MINUS) == IEEE80211_CHAN_11NA_HT40MINUS)
#define IEEE80211_IS_CHAN_11N(_c) \
(((_c)->ic_flags & (IEEE80211_CHAN_HT20 | IEEE80211_CHAN_HT40PLUS | IEEE80211_CHAN_HT40MINUS)) != 0)
#define IEEE80211_IS_CHAN_11N_HT20(_c) \
(((_c)->ic_flags & (IEEE80211_CHAN_HT20)) != 0)
#define IEEE80211_IS_CHAN_11N_HT40(_c) \
(((_c)->ic_flags & (IEEE80211_CHAN_HT40PLUS | IEEE80211_CHAN_HT40MINUS)) != 0)
#define IEEE80211_IS_CHAN_11NG(_c) \
(IEEE80211_IS_CHAN_2GHZ((_c)) && IEEE80211_IS_CHAN_11N((_c)))
#define IEEE80211_IS_CHAN_11NA(_c) \
(IEEE80211_IS_CHAN_5GHZ((_c)) && IEEE80211_IS_CHAN_11N((_c)))
#define IEEE80211_IS_CHAN_11N_HT40PLUS(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_HT40PLUS) != 0)
#define IEEE80211_IS_CHAN_11N_HT40MINUS(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_HT40MINUS) != 0)
#define IEEE80211_IS_CHAN_HT20_CAPABLE(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_HT20) == IEEE80211_CHAN_HT20)
#define IEEE80211_IS_CHAN_HT40PLUS_CAPABLE(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_HT40PLUS) == IEEE80211_CHAN_HT40PLUS)
#define IEEE80211_IS_CHAN_HT40MINUS_CAPABLE(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_HT40MINUS) == IEEE80211_CHAN_HT40MINUS)
#define IEEE80211_IS_CHAN_HT40_CAPABLE(_c) \
(IEEE80211_IS_CHAN_HT40PLUS_CAPABLE(_c) || IEEE80211_IS_CHAN_HT40MINUS_CAPABLE(_c))
#define IEEE80211_IS_CHAN_HT_CAPABLE(_c) \
(IEEE80211_IS_CHAN_HT20_CAPABLE(_c) || IEEE80211_IS_CHAN_HT40_CAPABLE(_c))
#define IEEE80211_IS_CHAN_11N_CTL_CAPABLE(_c) IEEE80211_IS_CHAN_HT20_CAPABLE(_c)
#define IEEE80211_IS_CHAN_11N_CTL_U_CAPABLE(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_HT40PLUS) == IEEE80211_CHAN_HT40PLUS)
#define IEEE80211_IS_CHAN_11N_CTL_L_CAPABLE(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_HT40MINUS) == IEEE80211_CHAN_HT40MINUS)
#define IEEE80211_IS_CHAN_11N_CTL_40_CAPABLE(_c) \
(IEEE80211_IS_CHAN_11N_CTL_U_CAPABLE((_c)) || IEEE80211_IS_CHAN_11N_CTL_L_CAPABLE((_c)))
#define IEEE80211_IS_CHAN_VHT(_c) \
(((_c)->ic_flags & (IEEE80211_CHAN_VHT20 | \
IEEE80211_CHAN_VHT40PLUS | IEEE80211_CHAN_VHT40MINUS | IEEE80211_CHAN_VHT80)) != 0)
#define IEEE80211_IS_CHAN_11AC(_c) \
(IEEE80211_IS_CHAN_5GHZ((_c)) && IEEE80211_IS_CHAN_VHT((_c)))
#define IEEE80211_CHAN_11AC_VHT20 \
(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_VHT20)
#define IEEE80211_CHAN_11AC_VHT40 \
(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_VHT40PLUS | IEEE80211_CHAN_VHT40MINUS)
#define IEEE80211_CHAN_11AC_VHT40PLUS \
(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_VHT40PLUS)
#define IEEE80211_CHAN_11AC_VHT40MINUS \
(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_VHT40MINUS)
#define IEEE80211_CHAN_11AC_VHT80 \
(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_VHT80)
#define IEEE80211_IS_CHAN_11AC_VHT20(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11AC_VHT20) == IEEE80211_CHAN_11AC_VHT20)
#define IEEE80211_IS_CHAN_11AC_VHT40(_c) \
(((_c)->ic_flags & (IEEE80211_CHAN_VHT40PLUS | IEEE80211_CHAN_VHT40MINUS)) != 0)
#define IEEE80211_IS_CHAN_11AC_VHT40PLUS(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11AC_VHT40PLUS) == IEEE80211_CHAN_11AC_VHT40PLUS)
#define IEEE80211_IS_CHAN_11AC_VHT40MINUS(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11AC_VHT40MINUS) == IEEE80211_CHAN_11AC_VHT40MINUS)
#define IEEE80211_IS_CHAN_11AC_VHT80(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_11AC_VHT80) == IEEE80211_CHAN_11AC_VHT80)
#define IEEE80211_IS_CHAN_RADAR(_c) \
(((_c)->ic_flags & IEEE80211_CHAN_RADAR_DFS) == IEEE80211_CHAN_RADAR_DFS)
#define IEEE80211_CHAN_SET_RADAR(_c) \
((_c)->ic_flags |= IEEE80211_CHAN_RADAR_DFS)
#define IEEE80211_CHAN_CLR_RADAR(_c) \
((_c)->ic_flags &= ~IEEE80211_CHAN_RADAR_DFS)
#define IEEE80211_CHAN_SET_DISALLOW_ADHOC(_c) \
((_c)->ic_flagext |= IEEE80211_CHAN_DISALLOW_ADHOC)
#define IEEE80211_CHAN_SET_DISALLOW_HOSTAP(_c) \
((_c)->ic_flagext |= IEEE80211_CHAN_DISALLOW_HOSTAP)
#define IEEE80211_CHAN_SET_DFS(_c) \
((_c)->ic_flagext |= IEEE80211_CHAN_DFS)
#define IEEE80211_CHAN_SET_DFS_CLEAR(_c) \
((_c)->ic_flagext |= IEEE80211_CHAN_DFS_CLEAR)
#define IEEE80211_CHAN_EXCLUDE_11D(_c) \
((_c)->ic_flagext |= IEEE80211_CHAN_11D_EXCLUDED)
/* channel encoding for FH phy */
#define IEEE80211_FH_CHANMOD 80
#define IEEE80211_FH_CHAN(set, pat) (((set) - 1) * IEEE80211_FH_CHANMOD + (pat))
#define IEEE80211_FH_CHANSET(chan) ((chan) / IEEE80211_FH_CHANMOD + 1)
#define IEEE80211_FH_CHANPAT(chan) ((chan) % IEEE80211_FH_CHANMOD)
/*
* 802.11 rate set.
*/
#define IEEE80211_RATE_SIZE 8 /* 802.11 standard */
#define IEEE80211_RATE_MAXSIZE 36 /* max rates we'll handle */
#define IEEE80211_HT_RATE_SIZE 128
#define IEEE80211_RATE_SINGLE_STREAM_MCS_MAX 7 /* MCS7 */
#define IEEE80211_RATE_MCS 0x8000
#define IEEE80211_RATE_MCS_VAL 0x7FFF
#define IEEE80211_RATE_IDX_ENTRY(val, idx) (((val & (0xff << (idx * 8))) >> (idx * 8)))
/*
* RSSI range
*/
#define IEEE80211_RSSI_MAX -10 /* in db */
#define IEEE80211_RSSI_MIN -200
/*
* 11n A-MPDU & A-MSDU limits
*/
#define IEEE80211_AMPDU_LIMIT_MIN (1 * 1024)
#define IEEE80211_AMPDU_LIMIT_MAX (64 * 1024 - 1)
#define IEEE80211_AMPDU_LIMIT_DEFAULT IEEE80211_AMPDU_LIMIT_MAX
#define IEEE80211_AMPDU_SUBFRAME_MIN 2
#define IEEE80211_AMPDU_SUBFRAME_MAX 64
#define IEEE80211_AMPDU_SUBFRAME_DEFAULT 32
#define IEEE80211_AMSDU_LIMIT_MAX 4096
#define IEEE80211_RIFS_AGGR_DIV 10
#define IEEE80211_MAX_AMPDU_MIN 0
#define IEEE80211_MAX_AMPDU_MAX 3
/*
* 11ac A-MPDU limits
*/
#define IEEE80211_VHT_MAX_AMPDU_MIN 0
#define IEEE80211_VHT_MAX_AMPDU_MAX 7
struct ieee80211_rateset {
uint8_t rs_nrates;
uint8_t rs_rates[IEEE80211_RATE_MAXSIZE];
};
struct ieee80211_beacon_info {
uint8_t essid[IEEE80211_NWID_LEN + 1];
uint8_t esslen;
uint8_t rssi_ctl_0;
uint8_t rssi_ctl_1;
uint8_t rssi_ctl_2;
int numchains;
};
#define IEEE80211_ADDR_LEN 6 /* size of 802.11 address */
struct ieee80211_ibss_peer_list {
uint8_t bssid[IEEE80211_ADDR_LEN];
};
struct ieee80211_roam {
int8_t rssi11a; /* rssi thresh for 11a bss */
int8_t rssi11b; /* for 11g sta in 11b bss */
int8_t rssi11bOnly; /* for 11b sta */
uint8_t pad1;
uint8_t rate11a; /* rate thresh for 11a bss */
uint8_t rate11b; /* for 11g sta in 11b bss */
uint8_t rate11bOnly; /* for 11b sta */
uint8_t pad2;
};
#define IEEE80211_TID_SIZE 17 /* total number of TIDs */
#define IEEE80211_NON_QOS_SEQ 16 /* index for non-QoS (including management) sequence number space */
#define IEEE80211_SEQ_MASK 0xfff /* sequence generator mask */
#define MIN_SW_SEQ 0x100 /* minimum sequence for SW generate packect */
/* crypto related defines*/
#define IEEE80211_KEYBUF_SIZE 16
#define IEEE80211_MICBUF_SIZE (8+8) /* space for both tx+rx keys */
enum ieee80211_clist_cmd {
CLIST_UPDATE,
CLIST_DFS_UPDATE,
CLIST_NEW_COUNTRY,
CLIST_NOL_UPDATE
};
enum ieee80211_nawds_param {
IEEE80211_NAWDS_PARAM_NUM = 0,
IEEE80211_NAWDS_PARAM_MODE,
IEEE80211_NAWDS_PARAM_DEFCAPS,
IEEE80211_NAWDS_PARAM_OVERRIDE,
};
struct ieee80211_mib_cycle_cnts {
uint32_t tx_frame_count;
uint32_t rx_frame_count;
uint32_t rx_clear_count;
uint32_t cycle_count;
uint8_t is_rx_active;
uint8_t is_tx_active;
};
struct ieee80211_chanutil_info {
uint32_t rx_clear_count;
uint32_t cycle_count;
uint8_t value;
uint32_t beacon_count;
uint8_t beacon_intervals;
};
#endif /* CDS_COMMON__IEEE80211_I_H_ */