/* Maximum number of broadcast/multicast frames to buffer when some of the
* associated stations are using power saving. */ #define AP_MAX_BC_BUFFER 128
/* Maximum number of frames buffered to all STAs, including multicast frames. * Note: increasing this limit increases the potential memory requirement. Each
* frame can be up to about 2 kB long. */ #define TOTAL_MAX_TX_BUFFER 512
/* Required encryption head and tailroom */ #define IEEE80211_ENCRYPT_HEADROOM 8 #define IEEE80211_ENCRYPT_TAILROOM 18
/* power level hasn't been configured (or set to automatic) */ #define IEEE80211_UNSET_POWER_LEVEL INT_MIN
/* * Some APs experience problems when working with U-APSD. Decreasing the * probability of that happening by using legacy mode for all ACs but VO isn't * enough. * * Cisco 4410N originally forced us to enable VO by default only because it * treated non-VO ACs as legacy. * * However some APs (notably Netgear R7000) silently reclassify packets to * different ACs. Since u-APSD ACs require trigger frames for frame retrieval * clients would never see some frames (e.g. ARP responses) or would fetch them * accidentally after a long time. * * It makes little sense to enable u-APSD queues by default because it needs * userspace applications to be aware of it to actually take advantage of the * possible additional powersavings. Implicitly depending on driver autotrigger * frame support doesn't make much sense.
*/ #define IEEE80211_DEFAULT_UAPSD_QUEUES 0
staticinlinebool
ieee80211_sta_keep_active(struct sta_info *sta, u8 ac)
{ /* Keep a station's queues on the active list for deficit accounting * purposes if it was active or queued during the last 100ms.
*/ return time_before_eq(jiffies, sta->airtime[ac].last_active + HZ / 10);
}
/* * During association, we save an ERP value from a probe response so * that we can feed ERP info to the driver when handling the * association completes. these fields probably won't be up-to-date * otherwise, you probably don't want to use them.
*/ bool has_erp_value;
u8 erp_value;
/* Keep track of the corruption of the last beacon/probe response. */
u8 corrupt_data;
/* Keep track of what bits of information we have valid info for. */
u8 valid_data;
};
/** * enum ieee80211_bss_corrupt_data_flags - BSS data corruption flags * @IEEE80211_BSS_CORRUPT_BEACON: last beacon frame received was corrupted * @IEEE80211_BSS_CORRUPT_PROBE_RESP: last probe response received was corrupted * * These are bss flags that are attached to a bss in the * @corrupt_data field of &struct ieee80211_bss.
*/ enum ieee80211_bss_corrupt_data_flags {
IEEE80211_BSS_CORRUPT_BEACON = BIT(0),
IEEE80211_BSS_CORRUPT_PROBE_RESP = BIT(1)
};
/** * enum ieee80211_bss_valid_data_flags - BSS valid data flags * @IEEE80211_BSS_VALID_WMM: WMM/UAPSD data was gathered from non-corrupt IE * @IEEE80211_BSS_VALID_RATES: Supported rates were gathered from non-corrupt IE * @IEEE80211_BSS_VALID_ERP: ERP flag was gathered from non-corrupt IE * * These are bss flags that are attached to a bss in the * @valid_data field of &struct ieee80211_bss. They show which parts * of the data structure were received as a result of an un-corrupted * beacon/probe response.
*/ enum ieee80211_bss_valid_data_flags {
IEEE80211_BSS_VALID_WMM = BIT(1),
IEEE80211_BSS_VALID_RATES = BIT(2),
IEEE80211_BSS_VALID_ERP = BIT(3)
};
/** * enum ieee80211_packet_rx_flags - packet RX flags * @IEEE80211_RX_AMSDU: a-MSDU packet * @IEEE80211_RX_MALFORMED_ACTION_FRM: action frame is malformed * @IEEE80211_RX_DEFERRED_RELEASE: frame was subjected to receive reordering * * These are per-frame flags that are attached to a frame in the * @rx_flags field of &struct ieee80211_rx_status.
*/ enum ieee80211_packet_rx_flags {
IEEE80211_RX_AMSDU = BIT(3),
IEEE80211_RX_MALFORMED_ACTION_FRM = BIT(4),
IEEE80211_RX_DEFERRED_RELEASE = BIT(5),
};
/** * enum ieee80211_rx_flags - RX data flags * * @IEEE80211_RX_BEACON_REPORTED: This frame was already reported * to cfg80211_report_obss_beacon(). * * These flags are used across handling multiple interfaces * for a single frame.
*/ enum ieee80211_rx_flags {
IEEE80211_RX_BEACON_REPORTED = BIT(0),
};
/* * Index into sequence numbers array, 0..16 * since the last (16) is used for non-QoS, * will be 16 on non-QoS frames.
*/ int seqno_idx;
/* * Index into the security IV/PN arrays, 0..16 * since the last (16) is used for CCMP-encrypted * management frames, will be set to 16 on mgmt * frames and 0 on non-QoS frames.
*/ int security_idx;
struct s1g_short_beacon_data { struct rcu_head rcu_head;
u8 *short_head;
u8 *short_tail; int short_head_len; int short_tail_len;
};
struct ps_data { /* yes, this looks ugly, but guarantees that we can later use * bitmap_empty :)
* NB: don't touch this bitmap, use sta_info_{set,clear}_tim_bit */
u8 tim[sizeof(unsignedlong) * BITS_TO_LONGS(IEEE80211_MAX_AID + 1)]
__aligned(__alignof__(unsignedlong)); struct sk_buff_head bc_buf;
atomic_t num_sta_ps; /* number of stations in PS mode */ int dtim_count; bool dtim_bc_mc; int sb_count; /* num short beacons til next long beacon */
};
struct ieee80211_if_ap { struct list_head vlans; /* write-protected with RTNL and local->mtx */
struct ps_data ps;
atomic_t num_mcast_sta; /* number of stations receiving multicast */
bool multicast_to_unicast; bool active;
};
struct ieee80211_if_vlan { struct list_head list; /* write-protected with RTNL and local->mtx */
/* used for all tx if the VLAN is configured to 4-addr mode */ struct sta_info __rcu *sta;
atomic_t num_mcast_sta; /* number of stations receiving multicast */
};
struct mesh_stats {
__u32 fwded_mcast; /* Mesh forwarded multicast frames */
__u32 fwded_unicast; /* Mesh forwarded unicast frames */
__u32 fwded_frames; /* Mesh total forwarded frames */
__u32 dropped_frames_ttl; /* Not transmitted since mesh_ttl == 0*/
__u32 dropped_frames_no_route; /* Not transmitted, no route found */
};
size_t ie_len;
u8 *ie_pos; /* used to fill ie[] with link[].elems */
u8 ie[];
};
struct ieee80211_sta_tx_tspec { /* timestamp of the first packet in the time slice */ unsignedlong time_slice_start;
u32 admitted_time; /* in usecs, unlike over the air */
u8 tsid;
s8 up; /* signed to be able to invalidate with -1 during teardown */
/* consumed TX time in microseconds in the time slice */
u32 consumed_tx_time; enum {
TX_TSPEC_ACTION_NONE = 0,
TX_TSPEC_ACTION_DOWNGRADE,
TX_TSPEC_ACTION_STOP_DOWNGRADE,
} action; bool downgraded;
};
/* Advertised TID-to-link mapping info */ struct ieee80211_adv_ttlm_info { /* time in TUs at which the new mapping is established, or 0 if there is * no planned advertised TID-to-link mapping
*/
u16 switch_time;
u32 duration; /* duration of the planned T2L map in TUs */
u16 map; /* map of usable links for all TIDs */ bool active; /* whether the advertised mapping is active or not */
};
/* * Bitmask of enabled u-apsd queues, * IEEE80211_WMM_IE_STA_QOSINFO_AC_BE & co. Needs a new association * to take effect.
*/ unsignedint uapsd_queues;
/* * Maximum number of buffered frames AP can deliver during a * service period, IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL or similar. * Needs a new association to take effect.
*/ unsignedint uapsd_max_sp_len;
u8 use_4addr;
/* * State variables for keeping track of RSSI of the AP currently * connected to and informing driver when RSSI has gone * below/above a certain threshold.
*/ int rssi_min_thold, rssi_max_thold;
/* TDLS support */
u8 tdls_peer[ETH_ALEN] __aligned(2); struct wiphy_delayed_work tdls_peer_del_work; struct sk_buff *orig_teardown_skb; /* The original teardown skb */ struct sk_buff *teardown_skb; /* A copy to send through the AP */
spinlock_t teardown_lock; /* To lock changing teardown_skb */ bool tdls_wider_bw_prohibited;
/* WMM-AC TSPEC support */ struct ieee80211_sta_tx_tspec tx_tspec[IEEE80211_NUM_ACS]; /* Use a separate work struct so that we can do something here * while the sdata->work is flushing the queues, for example. * otherwise, in scenarios where we hardly get any traffic out * on the BE queue, but there's a lot of VO traffic, we might * get stuck in a downgraded situation and flush takes forever.
*/ struct wiphy_delayed_work tx_tspec_wk;
/* Information elements from the last transmitted (Re)Association * Request frame.
*/
u8 *assoc_req_ies;
size_t assoc_req_ies_len;
/** * struct ieee80211_if_ocb - OCB mode state * * @housekeeping_timer: timer for periodic invocation of a housekeeping task * @wrkq_flags: OCB deferred task action * @incomplete_lock: delayed STA insertion lock * @incomplete_stations: list of STAs waiting for delayed insertion * @joined: indication if the interface is connected to an OCB network
*/ struct ieee80211_if_ocb { struct timer_list housekeeping_timer; unsignedlong wrkq_flags;
/* should be called with beacon_data under RCU read lock */ void (*adjust_tsf)(struct ieee80211_sub_if_data *sdata, struct beacon_data *beacon); /* add other framework functions here */
};
/** * struct mesh_table - mesh hash table * * @known_gates: list of known mesh gates and their mpaths by the station. The * gate's mpath may or may not be resolved and active. * @gates_lock: protects updates to known_gates * @rhead: the rhashtable containing struct mesh_paths, keyed by dest addr * @walk_head: linked list containing all mesh_path objects * @walk_lock: lock protecting walk_head * @entries: number of entries in the table
*/ struct mesh_table { struct hlist_head known_gates;
spinlock_t gates_lock; struct rhashtable rhead; struct hlist_head walk_head;
spinlock_t walk_lock;
atomic_t entries; /* Up to MAX_MESH_NEIGHBOURS */
};
/** * struct mesh_tx_cache - mesh fast xmit header cache * * @rht: hash table containing struct ieee80211_mesh_fast_tx, using skb DA as key * @walk_head: linked list containing all ieee80211_mesh_fast_tx objects * @walk_lock: lock protecting walk_head and rht
*/ struct mesh_tx_cache { struct rhashtable rht; struct hlist_head walk_head;
spinlock_t walk_lock;
};
u8 mesh_id[IEEE80211_MAX_MESH_ID_LEN];
size_t mesh_id_len; /* Active Path Selection Protocol Identifier */
u8 mesh_pp_id; /* Active Path Selection Metric Identifier */
u8 mesh_pm_id; /* Congestion Control Mode Identifier */
u8 mesh_cc_id; /* Synchronization Protocol Identifier */
u8 mesh_sp_id; /* Authentication Protocol Identifier */
u8 mesh_auth_id; /* Local mesh Sequence Number */
u32 sn; /* Last used PREQ ID */
u32 preq_id;
atomic_t mpaths; /* Timestamp of last SN update */ unsignedlong last_sn_update; /* Time when it's ok to send next PERR */ unsignedlong next_perr; /* Timestamp of last PREQ sent */ unsignedlong last_preq; struct mesh_rmc *rmc;
spinlock_t mesh_preq_queue_lock; struct mesh_preq_queue preq_queue; int preq_queue_len; struct mesh_stats mshstats; struct mesh_config mshcfg;
atomic_t estab_plinks;
atomic_t mesh_seqnum; bool accepting_plinks; int num_gates; struct beacon_data __rcu *beacon; const u8 *ie;
u8 ie_len; enum {
IEEE80211_MESH_SEC_NONE = 0x0,
IEEE80211_MESH_SEC_AUTHED = 0x1,
IEEE80211_MESH_SEC_SECURED = 0x2,
} security; bool user_mpm; /* Extensible Synchronization Framework */ conststruct ieee80211_mesh_sync_ops *sync_ops;
s64 sync_offset_clockdrift_max;
spinlock_t sync_offset_lock; /* mesh power save */ enum nl80211_mesh_power_mode nonpeer_pm; int ps_peers_light_sleep; int ps_peers_deep_sleep; struct ps_data ps; /* Channel Switching Support */ struct mesh_csa_settings __rcu *csa; enum {
IEEE80211_MESH_CSA_ROLE_NONE,
IEEE80211_MESH_CSA_ROLE_INIT,
IEEE80211_MESH_CSA_ROLE_REPEATER,
} csa_role;
u8 chsw_ttl;
u16 pre_value;
/* offset from skb->data while building IE */ int meshconf_offset;
struct mesh_table mesh_paths; struct mesh_table mpp_paths; /* Store paths for MPP&MAP */ int mesh_paths_generation; int mpp_paths_generation; struct mesh_tx_cache tx_cache;
};
#ifdef CONFIG_MAC80211_MESH #define IEEE80211_IFSTA_MESH_CTR_INC(msh, name) \ do { (msh)->mshstats.name++; } while (0) #else #define IEEE80211_IFSTA_MESH_CTR_INC(msh, name) \ do { } while (0) #endif
/** * enum ieee80211_sub_if_data_flags - virtual interface flags * * @IEEE80211_SDATA_ALLMULTI: interface wants all multicast packets * @IEEE80211_SDATA_DONT_BRIDGE_PACKETS: bridge packets between * associated stations and deliver multicast frames both * back to wireless media and to the local net stack. * @IEEE80211_SDATA_DISCONNECT_RESUME: Disconnect after resume. * @IEEE80211_SDATA_IN_DRIVER: indicates interface was added to driver * @IEEE80211_SDATA_DISCONNECT_HW_RESTART: Disconnect after hardware restart * recovery
*/ enum ieee80211_sub_if_data_flags {
IEEE80211_SDATA_ALLMULTI = BIT(0),
IEEE80211_SDATA_DONT_BRIDGE_PACKETS = BIT(3),
IEEE80211_SDATA_DISCONNECT_RESUME = BIT(4),
IEEE80211_SDATA_IN_DRIVER = BIT(5),
IEEE80211_SDATA_DISCONNECT_HW_RESTART = BIT(6),
};
/** * enum ieee80211_sdata_state_bits - virtual interface state bits * @SDATA_STATE_RUNNING: virtual interface is up & running; this * mirrors netif_running() but is separate for interface type * change handling while the interface is up * @SDATA_STATE_OFFCHANNEL: This interface is currently in offchannel * mode, so queues are stopped * @SDATA_STATE_OFFCHANNEL_BEACON_STOPPED: Beaconing was stopped due * to offchannel, reset when offchannel returns
*/ enum ieee80211_sdata_state_bits {
SDATA_STATE_RUNNING,
SDATA_STATE_OFFCHANNEL,
SDATA_STATE_OFFCHANNEL_BEACON_STOPPED,
};
/** * enum ieee80211_chanctx_mode - channel context configuration mode * * @IEEE80211_CHANCTX_SHARED: channel context may be used by * multiple interfaces * @IEEE80211_CHANCTX_EXCLUSIVE: channel context can be used * only by a single interface. This can be used for example for * non-fixed channel IBSS.
*/ enum ieee80211_chanctx_mode {
IEEE80211_CHANCTX_SHARED,
IEEE80211_CHANCTX_EXCLUSIVE
};
/** * enum ieee80211_chanctx_replace_state - channel context replacement state * * This is used for channel context in-place reservations that require channel * context switch/swap. * * @IEEE80211_CHANCTX_REPLACE_NONE: no replacement is taking place * @IEEE80211_CHANCTX_WILL_BE_REPLACED: this channel context will be replaced * by a (not yet registered) channel context pointed by %replace_ctx. * @IEEE80211_CHANCTX_REPLACES_OTHER: this (not yet registered) channel context * replaces an existing channel context pointed to by %replace_ctx.
*/ enum ieee80211_chanctx_replace_state {
IEEE80211_CHANCTX_REPLACE_NONE,
IEEE80211_CHANCTX_WILL_BE_REPLACED,
IEEE80211_CHANCTX_REPLACES_OTHER,
};
/** * struct txq_info - per tid queue * * @tin: contains packets split into multiple flows * @def_cvars: codel vars for the @tin's default_flow * @cstats: code statistics for this queue * @frags: used to keep fragments created after dequeue * @schedule_order: used with ieee80211_local->active_txqs * @schedule_round: counter to prevent infinite loops on TXQ scheduling * @flags: TXQ flags from &enum txq_info_flags * @txq: the driver visible part
*/ struct txq_info { struct fq_tin tin; struct codel_vars def_cvars; struct codel_stats cstats;
/** * struct ieee80211_if_nan - NAN state * * @conf: current NAN configuration * @started: true iff NAN is started * @func_lock: lock for @func_inst_ids * @function_inst_ids: a bitmap of available instance_id's
*/ struct ieee80211_if_nan { struct cfg80211_nan_conf conf; bool started;
struct wiphy_work request_smps_work; /* used to reconfigure hardware SM PS */ struct wiphy_work recalc_smps;
bool beacon_crc_valid;
u32 beacon_crc; struct ewma_beacon_signal ave_beacon_signal; int last_ave_beacon_signal;
/* * Number of Beacon frames used in ave_beacon_signal. This can be used * to avoid generating less reliable cqm events that would be based * only on couple of received frames.
*/ unsignedint count_beacon_signal;
/* Number of times beacon loss was invoked. */ unsignedint beacon_loss_count;
/* * Last Beacon frame signal strength average (ave_beacon_signal / 16) * that triggered a cqm event. 0 indicates that no event has been * generated for the current association.
*/ int last_cqm_event_signal;
int wmm_last_param_set; int mu_edca_last_param_set;
};
/* count for keys needing tailroom space allocation */ int crypto_tx_tailroom_needed_cnt; int crypto_tx_tailroom_pending_dec; struct wiphy_delayed_work dec_tailroom_needed_wk;
/* * AP this belongs to: self in AP mode and * corresponding AP in VLAN mode, NULL for * all others (might be needed later in IBSS)
*/ struct ieee80211_if_ap *bss;
/* bitmap of allowed (non-MCS) rate indexes for rate control */
u32 rc_rateidx_mask[NUM_NL80211_BANDS];
#define for_each_sdata_link(_local, _link) \ /* outer loop just to define the variables ... */ \ for (struct ieee80211_sub_if_data *___sdata = NULL; \
!___sdata; \
___sdata = (void *)~0 /* always stop */) \
list_for_each_entry(___sdata, &(_local)->interfaces, list) \ if (ieee80211_sdata_running(___sdata)) \ for (int ___link_id = 0; \
___link_id < ARRAY_SIZE(___sdata->link); \
___link_id++) \ if ((_link = wiphy_dereference((_local)->hw.wiphy, \
___sdata->link[___link_id])))
/* * for_each_sdata_link_rcu() must be used under RCU read lock.
*/ #define for_each_sdata_link_rcu(_local, _link) \ /* outer loop just to define the variables ... */ \ for (struct ieee80211_sub_if_data *___sdata = NULL; \
!___sdata; \
___sdata = (void *)~0 /* always stop */) \
list_for_each_entry_rcu(___sdata, &(_local)->interfaces, list) \ if (ieee80211_sdata_running(___sdata)) \ for (int ___link_id = 0; \
___link_id < ARRAY_SIZE((___sdata)->link); \
___link_id++) \ if ((_link = rcu_dereference((___sdata)->link[___link_id])))
#define for_each_link_data(sdata, __link) \ /* outer loop just to define the variable ... */ \ for (struct ieee80211_sub_if_data *__sdata = (sdata); __sdata; \
__sdata = NULL /* always stop */) \ for (int __link_id = 0; \
__link_id < ARRAY_SIZE((__sdata)->link); __link_id++) \ if ((!(__sdata)->vif.valid_links || \
(__sdata)->vif.valid_links & BIT(__link_id)) && \
((__link) = sdata_dereference((__sdata)->link[__link_id], \
(__sdata))))
/* * for_each_link_data_rcu should be used under RCU read lock.
*/ #define for_each_link_data_rcu(sdata, __link) \ /* outer loop just to define the variable ... */ \ for (struct ieee80211_sub_if_data *__sdata = (sdata); __sdata; \
__sdata = NULL /* always stop */) \ for (int __link_id = 0; \
__link_id < ARRAY_SIZE((__sdata)->link); __link_id++) \ if ((!(__sdata)->vif.valid_links || \
(__sdata)->vif.valid_links & BIT(__link_id)) && \
((__link) = rcu_dereference((__sdata)->link[__link_id]))) \
staticinlineint
ieee80211_get_mbssid_beacon_len(struct cfg80211_mbssid_elems *elems, struct cfg80211_rnr_elems *rnr_elems,
u8 i)
{ int len = 0;
if (!elems || !elems->cnt || i > elems->cnt) return 0;
if (i < elems->cnt) {
len = elems->elem[i].len; if (rnr_elems) {
len += rnr_elems->elem[i].len; for (i = elems->cnt; i < rnr_elems->cnt; i++)
len += rnr_elems->elem[i].len;
} return len;
}
/* i == elems->cnt, calculate total length of all MBSSID elements */ for (i = 0; i < elems->cnt; i++)
len += elems->elem[i].len;
if (rnr_elems) { for (i = 0; i < rnr_elems->cnt; i++)
len += rnr_elems->elem[i].len;
}
/** * enum mac80211_scan_flags - currently active scan mode * * @SCAN_SW_SCANNING: We're currently in the process of scanning but may as * well be on the operating channel * @SCAN_HW_SCANNING: The hardware is scanning for us, we have no way to * determine if we are on the operating channel or not * @SCAN_ONCHANNEL_SCANNING: Do a software scan on only the current operating * channel. This should not interrupt normal traffic. * @SCAN_COMPLETED: Set for our scan work function when the driver reported * that the scan completed. * @SCAN_ABORTED: Set for our scan work function when the driver reported * a scan complete for an aborted scan. * @SCAN_HW_CANCELLED: Set for our scan work function when the scan is being * cancelled. * @SCAN_BEACON_WAIT: Set whenever we're passive scanning because of radar/no-IR * and could send a probe request after receiving a beacon. * @SCAN_BEACON_DONE: Beacon received, we can now send a probe request
*/ enum mac80211_scan_flags {
SCAN_SW_SCANNING,
SCAN_HW_SCANNING,
SCAN_ONCHANNEL_SCANNING,
SCAN_COMPLETED,
SCAN_ABORTED,
SCAN_HW_CANCELLED,
SCAN_BEACON_WAIT,
SCAN_BEACON_DONE,
};
/** * enum mac80211_scan_state - scan state machine states * * @SCAN_DECISION: Main entry point to the scan state machine, this state * determines if we should keep on scanning or switch back to the * operating channel * @SCAN_SET_CHANNEL: Set the next channel to be scanned * @SCAN_SEND_PROBE: Send probe requests and wait for probe responses * @SCAN_SUSPEND: Suspend the scan and go back to operating channel to * send out data * @SCAN_RESUME: Resume the scan and scan the next channel * @SCAN_ABORT: Abort the scan and go back to operating channel
*/ enum mac80211_scan_state {
SCAN_DECISION,
SCAN_SET_CHANNEL,
SCAN_SEND_PROBE,
SCAN_SUSPEND,
SCAN_RESUME,
SCAN_ABORT,
};
DECLARE_STATIC_KEY_FALSE(aql_disable);
struct ieee80211_local { /* embed the driver visible part. * don't cast (use the static inlines below), but we keep
* it first anyway so they become a no-op */ struct ieee80211_hw hw;
/* * private workqueue to mac80211. mac80211 makes this accessible * via ieee80211_queue_work()
*/ struct workqueue_struct *workqueue;
unsignedlong queue_stop_reasons[IEEE80211_MAX_QUEUES]; int q_stop_reasons[IEEE80211_MAX_QUEUES][IEEE80211_QUEUE_STOP_REASONS]; /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */
spinlock_t queue_stop_reason_lock;
int open_count; int monitors, virt_monitors, tx_mntrs; /* number of interfaces with corresponding FIF_ flags */ int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll,
fif_probe_req; bool probe_req_reg; bool rx_mcast_action_reg; unsignedint filter_flags; /* FIF_* */
/* protects the aggregated multicast list and filter calls */
spinlock_t filter_lock;
/* used for uploading changed mc list */ struct wiphy_work reconfig_filter;
/* aggregated multicast list */ struct netdev_hw_addr_list mc_list;
bool tim_in_locked_section; /* see ieee80211_beacon_get() */
/* * suspended is true if we finished all the suspend _and_ we have * not yet come up from resume. This is to be used by mac80211 * to ensure driver sanity during suspend and mac80211's own * sanity. It can eventually be used for WoW as well.
*/ bool suspended;
/* suspending is true during the whole suspend process */ bool suspending;
/* * Resuming is true while suspended, but when we're reprogramming the * hardware -- at that time it's allowed to use ieee80211_queue_work() * again even though some other parts of the stack are still suspended * and we still drop received frames to avoid waking the stack.
*/ bool resuming;
/* * quiescing is true during the suspend process _only_ to * ease timer cancelling etc.
*/ bool quiescing;
/* device is started */ bool started;
/* device is during a HW reconfig */ bool in_reconfig;
/* reconfiguration failed ... suppress some warnings etc. */ bool reconfig_failure;
/* wowlan is enabled -- don't reconfig on resume */ bool wowlan;
struct wiphy_work radar_detected_work;
/* number of RX chains the hardware has */
u8 rx_chains;
/* bitmap of which sbands were copied */
u8 sband_allocated;
int tx_headroom; /* required headroom for hardware/radiotap */
/* Tasklet and skb queue to process calls from IRQ mode. All frames * added to skb_queue will be processed, but frames in * skb_queue_unreliable may be dropped if the total length of these
* queues increases over the limit. */ #define IEEE80211_IRQSAFE_QUEUE_LIMIT 128 struct tasklet_struct tasklet; struct sk_buff_head skb_queue; struct sk_buff_head skb_queue_unreliable;
spinlock_t rx_path_lock;
/* Station data */ /* * The list, hash table and counter are protected * by the wiphy mutex, reads are done with RCU.
*/
spinlock_t tim_lock; unsignedlong num_sta; struct list_head sta_list; struct rhltable sta_hash; struct rhltable link_sta_hash; struct timer_list sta_cleanup; int sta_generation;
int total_ps_buffered; /* total number of all buffered unicast and * multicast packets for power saving stations
*/
bool pspolling; /* * PS can only be enabled when we have exactly one managed * interface (and monitors) in PS, this then points there.
*/ struct ieee80211_sub_if_data *ps_sdata; struct wiphy_work dynamic_ps_enable_work; struct wiphy_work dynamic_ps_disable_work; struct timer_list dynamic_ps_timer; struct notifier_block ifa_notifier; struct notifier_block ifa6_notifier;
/* * The dynamic ps timeout configured from user space via WEXT - * this will override whatever chosen by mac80211 internally.
*/ int dynamic_ps_forced_timeout;
int user_power_level; /* in dBm, for all interfaces */
/* mult-link element can be de-fragmented and thus u8 is not sufficient */
size_t ml_basic_len;
size_t ml_reconf_len;
size_t ml_epcs_len;
u8 ttlm_num;
/* * store the per station profile pointer and length in case that the * parsing also handled Multi-Link element parsing for a specific link * ID.
*/ struct ieee80211_mle_per_sta_profile *prof;
size_t sta_prof_len;
/* whether/which parse error occurred while retrieving these elements */
u8 parse_error;
};
/* This function returns the number of multicast stations connected to this * interface. It returns -1 if that number is not tracked, that is for netdevs * not in AP or AP_VLAN mode or when using 4addr.
*/ staticinlineint
ieee80211_vif_get_num_mcast_if(struct ieee80211_sub_if_data *sdata)
{ if (sdata->vif.type == NL80211_IFTYPE_AP) return atomic_read(&sdata->u.ap.num_mcast_sta); if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN && !sdata->u.vlan.sta) return atomic_read(&sdata->u.vlan.num_mcast_sta); return -1;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.