15 #include <linux/kernel.h>
16 #include <linux/device.h>
17 #include <linux/if_ether.h>
19 #include <linux/list.h>
20 #include <linux/netdevice.h>
23 #include <linux/types.h>
39 #define AP_MAX_BC_BUFFER 128
44 #define TOTAL_MAX_TX_BUFFER 512
47 #define IEEE80211_ENCRYPT_HEADROOM 8
48 #define IEEE80211_ENCRYPT_TAILROOM 18
54 #define IEEE80211_FRAGMENT_MAX 4
56 #define TU_TO_JIFFIES(x) (usecs_to_jiffies((x) * 1024))
57 #define TU_TO_EXP_TIME(x) (jiffies + TU_TO_JIFFIES(x))
65 #define IEEE80211_DEFAULT_UAPSD_QUEUES \
66 IEEE80211_WMM_IE_STA_QOSINFO_AC_VO
68 #define IEEE80211_DEFAULT_MAX_SP_LEN \
69 IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL
71 #define IEEE80211_DEAUTH_FRAME_LEN (24 + 2 )
99 #ifdef CONFIG_MAC80211_MESH
105 #define IEEE80211_MAX_SUPP_RATES 32
159 #ifdef CONFIG_MAC80211_MESH
160 return bss->mesh_cfg;
167 #ifdef CONFIG_MAC80211_MESH
175 #ifdef CONFIG_MAC80211_MESH
176 return bss->mesh_id_len;
183 #define TX_CONTINUE ((__force ieee80211_tx_result) 0u)
184 #define TX_DROP ((__force ieee80211_tx_result) 1u)
185 #define TX_QUEUED ((__force ieee80211_tx_result) 2u)
187 #define IEEE80211_TX_UNICAST BIT(1)
188 #define IEEE80211_TX_PS_BUFFERED BIT(2)
203 #define RX_CONTINUE ((__force ieee80211_rx_result) 0u)
204 #define RX_DROP_UNUSABLE ((__force ieee80211_rx_result) 1u)
205 #define RX_DROP_MONITOR ((__force ieee80211_rx_result) 2u)
206 #define RX_QUEUED ((__force ieee80211_rx_result) 3u)
322 #define PREQ_Q_F_START 0x1
323 #define PREQ_Q_F_REFRESH 0x2
331 #define IEEE80211_ROC_MIN_LEFT 1
333 #define IEEE80211_ROC_MIN_LEFT (HZ/100)
619 #ifdef CONFIG_MAC80211_MESH
620 #define IEEE80211_IFSTA_MESH_CTR_INC(msh, name) \
621 do { (msh)->mshstats.name++; } while (0)
623 #define IEEE80211_IFSTA_MESH_CTR_INC(msh, name) \
733 #ifdef CONFIG_MAC80211_DEBUGFS
736 struct dentry *subdir_stations;
777 #ifdef CONFIG_MAC80211_LEDS
778 struct tpt_led_trigger {
779 struct led_trigger trig;
782 unsigned int blink_table_len;
784 unsigned long prev_traffic;
786 unsigned int active, want;
912 #define IEEE80211_IRQSAFE_QUEUE_LIMIT 128
1002 #ifdef CONFIG_MAC80211_LEDS
1003 int tx_led_counter, rx_led_counter;
1004 struct led_trigger *tx_led, *rx_led, *assoc_led, *radio_led;
1005 struct tpt_led_trigger *tpt_led_trigger;
1006 char tx_led_name[32], rx_led_name[32],
1007 assoc_led_name[32], radio_led_name[32];
1010 #ifdef CONFIG_MAC80211_DEBUG_COUNTERS
1012 unsigned int tx_handlers_drop;
1013 unsigned int tx_handlers_queued;
1014 unsigned int tx_handlers_drop_unencrypted;
1015 unsigned int tx_handlers_drop_fragment;
1016 unsigned int tx_handlers_drop_wep;
1017 unsigned int tx_handlers_drop_not_assoc;
1018 unsigned int tx_handlers_drop_unauth_port;
1019 unsigned int rx_handlers_drop;
1020 unsigned int rx_handlers_queued;
1021 unsigned int rx_handlers_drop_nullfunc;
1022 unsigned int rx_handlers_drop_defrag;
1023 unsigned int rx_handlers_drop_short;
1024 unsigned int tx_expand_skb_head;
1025 unsigned int tx_expand_skb_head_cloned;
1026 unsigned int rx_expand_skb_head;
1027 unsigned int rx_expand_skb_head2;
1028 unsigned int rx_handlers_fragments;
1029 unsigned int tx_status_drop;
1030 #define I802_DEBUG_INC(c) (c)++
1032 #define I802_DEBUG_INC(c) do { } while (0)
1068 #ifdef CONFIG_MAC80211_DEBUGFS
1069 struct local_debugfsdentries {
1099 return netdev_priv(dev);
1185 static inline int ieee80211_bssid_match(
const u8 *
raddr,
const u8 *
addr)
1187 return ether_addr_equal(raddr, addr) ||
1188 is_broadcast_ether_addr(raddr);
1279 bool offchannel_ps_enable);
1281 bool offchannel_ps_disable);
1381 "%s: resume with hardware scan still in progress\n",
1382 wiphy_name(hw->
wiphy));
1392 int rate,
int erp,
int short_preamble);
1441 void (*
fn)(
void *
data),
void *data);
1442 static inline void ieee80211_add_pending_skbs(
struct ieee80211_local *local,
1462 const u8 *
ssid,
size_t ssid_len,
1466 const u8 *
ssid,
size_t ssid_len,
1468 u32 ratemask,
bool directed,
bool no_cck,
1472 const size_t supp_rates_len,
1473 const u8 *supp_rates);
1482 const u8 *ids,
int n_ids,
size_t offset);
1515 #ifdef CONFIG_MAC80211_NOINLINE
1516 #define debug_noinline noinline
1518 #define debug_noinline