Académique Documents
Professionnel Documents
Culture Documents
1733 *
1734 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
1735 * @sta: station table entry, %NULL for per-vif queue
1736 * @tid: the TID for this queue (unused for per-vif queue)
1737 * @ac: the AC for this queue
1738 * @drv_priv: driver private area, sized by hw->txq_data_size
1739 *
1740 * The driver can obtain packets from this queue by calling
1741 * ieee80211_tx_dequeue().
1742 */
1743 struct ieee80211_txq {
1744
struct ieee80211_vif *vif;
1745
struct ieee80211_sta *sta;
1746
u8 tid;
1747
u8 ac;
1748
1749
/* must be last */
1750
u8 drv_priv[0] __aligned(sizeof(void *));
1751 };
5460 /**
5461 * ieee80211_tx_dequeue - dequeue a packet from a software tx queue
5462 *
5463 * @hw: pointer as obtained from ieee80211_alloc_hw()
5464 * @txq: pointer obtained from station or virtual interface
5465 *
5466 * Returns the skb if successful, %NULL if no frame was available.
5467 */
5468 struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
5469
struct ieee80211_txq *txq);
5470 #endif /* MAC80211_H */
5471
/**
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296 *
as it may have been received during scanning long ago). If the
297 *
HW flag %IEEE80211_HW_TIMING_BEACON_ONLY is set, then this can
*
only come from a beacon, but might not become valid until after
299 *
association when a beacon is received (which is notified with the
300 *
%BSS_CHANGED_DTIM flag.)
301 * @sync_device_ts: the device timestamp corresponding to the sync_tsf,
302 *
the driver/device can use this to calculate synchronisation
303 *
(see @sync_tsf)
304 * @sync_dtim_count: Only valid when %IEEE80211_HW_TIMING_BEACON_ONLY
305 *
is requested, see @sync_tsf/@sync_device_ts.
306 * @beacon_int: beacon interval
307 * @assoc_capability: capabilities taken from assoc resp
308 * @basic_rates: bitmap of basic rates, each bit stands for an
309 *
index into the rate table configured by the driver in
310 *
the current band.
311 * @beacon_rate: associated AP's beacon TX rate
312 * @mcast_rate: per-band multicast rate index + 1 (0: disabled)
313 * @bssid: The BSSID for this BSS
314 * @enable_beacon: whether beaconing should be enabled or not
315 * @chandef: Channel definition for this BSS -- the hardware might be
316 *
configured a higher bandwidth than this BSS uses, for example.
317 * @ht_operation_mode: HT operation mode like in &struct ieee80211_ht_operation.
318 * This field is only valid when the channel type is one of the HT types.
319 * @cqm_rssi_thold: Connection quality monitor RSSI threshold, a zero value
320 *
implies disabled
321 * @cqm_rssi_hyst: Connection quality monitor RSSI hysteresis
322 * @arp_addr_list: List of IPv4 addresses for hardware ARP filtering. The
323 *
may filter ARP queries targeted for other addresses than listed here.
324 * The driver must allow ARP queries targeted for all address listed here
325 *
to pass through. An empty list implies no ARP queries need to pass.
326 * @arp_addr_cnt: Number of addresses currently on the list. Note that this
327 *
may be larger than %IEEE80211_BSS_ARP_ADDR_LIST_LEN (the arp_addr_list
328 *
array size), it's up to the driver what to do in that case.
329 * @qos: This is a QoS-enabled BSS.
330 * @idle: This interface is idle. There's also a global idle flag in the
331 *
hardware config which may be more appropriate depending on what
332 *
your driver/device needs to do.
333 * @ps: power-save mode (STA only). This flag is NOT affected by
334 *
offchannel/dynamic_ps operations.
335 * @ssid: The SSID of the current vif. Valid in AP and IBSS mode.
336 * @ssid_len: Length of SSID given in @ssid.
337 * @hidden_ssid: The SSID of the current vif is hidden. Only valid in AP-mode.
338 * @txpower: TX power in dBm
* @p2p_noa_attr: P2P NoA attribute for P2P powersave
340 */
341 struct ieee80211_bss_conf {
342
const u8 *bssid;
343
/* association related data */
344
bool assoc, ibss_joined;
345
bool ibss_creator;
346
u16 aid;
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375 };
**
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
struct ieee80211_tx_info {
667
/* common information */
668
u32 flags;
669
u8 band;
670
671
u8 hw_queue;
672
673
u16 ack_frame_id;
674
675
union {
676
struct {
677
union {
678
/* rate control */
679
struct {
680
struct ieee80211_tx_rate rates[
681
IEEE80211_TX_MAX_RATES];
682
s8 rts_cts_rate_idx;
683
u8 use_rts:1;
684
u8 use_cts_prot:1;
685
u8 short_preamble:1;
686
u8 skip_table:1;
687
/* 2 bytes free */
688
};
689
/* only needed before rate control */
690
unsigned long jiffies;
691
};
692
/* NB: vif can be NULL for injected frames */
693
struct ieee80211_vif *vif;
694
struct ieee80211_key_conf *hw_key;
695
u32 flags;
696
/* 4 bytes free */
697
} control;
698
struct {
699
struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES];
700
s32 ack_signal;
701
u8 ampdu_ack_len;
702
u8 ampdu_len;
703
u8 antenna;
704
void *status_driver_data[21 / sizeof(void *)];
705
} status;
706
struct {
707
struct ieee80211_tx_rate driver_rates[
708
IEEE80211_TX_MAX_RATES];
709
u8 pad[4];
710
711
void *rate_driver_data[
712
IEEE80211_TX_INFO_RATE_DRIVER_DATA_SIZE / sizeof(void *)];
713
};
714
void *driver_data[
715
IEEE80211_TX_INFO_DRIVER_DATA_SIZE / sizeof(void *)];
716
};
717 };
1013 /**
1014 * struct ieee80211_conf - configuration of the device
1015 *
1016 * This struct indicates how the driver shall configure the hardware.
1017 *
1018 * @flags: configuration flags defined above
1019 *
1020 * @listen_interval: listen interval in units of beacon interval
1021 * @max_sleep_period: the maximum number of beacon intervals to sleep for
1022 *
before checking the beacon for a TIM bit (managed mode only); this
1023 *
value will be only achievable between DTIM frames, the hardware
1024 *
needs to check for the multicast traffic bit in DTIM beacons.
1025 * This variable is valid only when the CONF_PS flag is set.
1026 * @ps_dtim_period: The DTIM period of the AP we're connected to, for use
1027 *
in power saving. Power saving will not be enabled until a beacon
1028 *
has been received and the DTIM period is known.
1029 * @dynamic_ps_timeout: The dynamic powersave timeout (in ms), see the
1030 *
powersave documentation below. This variable is valid only when
1031 *
the CONF_PS flag is set.
1032 *
1033 * @power_level: requested transmit power (in dBm), backward compatibility
1034 *
value only that is set to the minimum of all interfaces
1035 * @max_antenna_gain: maximum antenna gain adjusted by user config (in dBi)
1036 *
1037 * @chandef: the channel definition to tune to
1038 * @radar_enabled: whether radar detection is enabled
1039 *
1040 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame
1041 *
(a frame not RTS protected), called "dot11LongRetryLimit" in 802.11,
1040 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame
1041 *
(a frame not RTS protected), called "dot11LongRetryLimit" in 802.11,
1042 *
but actually means the number of transmissions not the number of retries
1043 * @short_frame_max_tx_count: Maximum number of transmissions for a "short"
1044 *
frame, called "dot11ShortRetryLimit" in 802.11, but actually means the
1045 *
number of transmissions not the number of retries
1046 *
1047 * @smps_mode: spatial multiplexing powersave mode; note that
1048 *
%IEEE80211_SMPS_STATIC is used when the device is not
1049 *
configured for an HT channel.
1050 *
Note that this is only valid if channel contexts are not used,
1051 *
otherwise each channel context has the number of chains listed.
1052 */
1053 struct ieee80211_conf {
1054
u32 flags;
1055
int power_level, dynamic_ps_timeout;
1056
int max_sleep_period;
1057
int max_antenna_gain;
1058
1059
u16 listen_interval;
1060
u8 ps_dtim_period;
1061
1062
1063
1064
1065
1066
1067 };
u8 long_frame_max_tx_count, short_frame_max_tx_count;
struct cfg80211_chan_def chandef;
bool radar_enabled;
enum ieee80211_smps_mode smps_mode;
1298 /**
1299 * enum ieee80211_sta_state - station state
1300 *
1301 * @IEEE80211_STA_NOTEXIST: station doesn't exist at all,
1302 *
this is a special state for add/remove transitions
1303 * @IEEE80211_STA_NONE: station exists without special state
1304 * @IEEE80211_STA_AUTH: station is authenticated
1305 * @IEEE80211_STA_ASSOC: station is associated
1306 * @IEEE80211_STA_AUTHORIZED: station is authorized (802.1X)
1307 */
1308 enum ieee80211_sta_state {
1309
/* NOTE: These need to be ordered correctly! */
1310
IEEE80211_STA_NOTEXIST,
1311
IEEE80211_STA_NONE,
1312
IEEE80211_STA_AUTH,
1313
IEEE80211_STA_ASSOC,
1314
IEEE80211_STA_AUTHORIZED,
1315 };
/**
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634 *
only when @IEEE80211_HW_SIGNAL_UNSPEC or
@IEEE80211_HW_SIGNAL_DB
1635 *
1594,45-64
*
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
33%
*
(if %IEEE80211_HW_QUEUE_CONTROL is set)
1673 *
1674 * @radiotap_mcs_details: lists which MCS information can the HW
1675 *
reports, by default it is set to _MCS, _GI and _BW but doesn't
1676 *
include _FMT. Use %IEEE80211_RADIOTAP_MCS_HAVE_* values, only
1677 *
adding _BW is supported today.
1678 *
1679 * @radiotap_vht_details: lists which VHT MCS information the HW reports,
1680 *
the default is _GI | _BANDWIDTH.
1681 *
Use the %IEEE80211_RADIOTAP_VHT_KNOWN_* values.
1682 *
1683 * @netdev_features: netdev features to be set in each netdev created
1684 *
from this HW. Note only HW checksum features are currently
1685 *
compatible with mac80211. Other feature bits will be rejected.
1686 *
1687 * @uapsd_queues: This bitmap is included in (re)association frame to indicate
1688 *
for each access category if it is uAPSD trigger-enabled and delivery1689 *
enabled. Use IEEE80211_WMM_IE_STA_QOSINFO_AC_* to set this bitmap.
1690 *
Each bit corresponds to different AC. Value '1' in specific bit means
1691 *
that corresponding AC is both trigger- and delivery-enabled. '0' means
1692 *
neither enabled.
1693 *
1694 * @uapsd_max_sp_len: maximum number of total buffered frames the WMM AP may
1695 *
deliver to a WMM STA during any Service Period triggered by the WMM STA.
1696 *
Use IEEE80211_WMM_IE_STA_QOSINFO_SP_* for correct values.
1697 *
1698 * @n_cipher_schemes: a size of an array of cipher schemes definitions.
1699 * @cipher_schemes: a pointer to an array of cipher scheme definitions
1700 *
supported by HW.
1701 */
struct ieee80211_hw {
1703
struct ieee80211_conf conf;
1704
struct wiphy *wiphy;
1705
const char *rate_control_algorithm;
1706
void *priv;
1707
u32 flags;
1708
unsigned int extra_tx_headroom;
1709
unsigned int extra_beacon_tailroom;
1710
int vif_data_size;
1711
int sta_data_size;
1712
int chanctx_data_size;
1713
u16 queues;
1714
u16 max_listen_interval;
1715
s8 max_signal;
1716
u8 max_rates;
1717
u8 max_report_rates;
1718
u8 max_rate_tries;
1719
u8 max_rx_aggregation_subframes;
1720
u8 max_tx_aggregation_subframes;
1721
u8 offchannel_tx_hw_queue;
1722
u8 radiotap_mcs_details;
1723
s8 cur_power_level;
1724
u16 radiotap_vht_details;
1725
netdev_features_t netdev_features;
1726
u8 uapsd_queues;
1727
u8 uapsd_max_sp_len;
1728
u8 n_cipher_schemes;
1729
const struct ieee80211_cipher_scheme *cipher_schemes;
1730 };
* vif.hw_queue[IEEE80211_AC_BK] = 3
* vif.cab_queue = 8 // if AP mode, otherwise %IEEE80211_INVAL_HW_QUEUE
* and the second virtual interface with 4-7.
*
* If queue 6 gets full, for example, mac80211 would only stop the second
* virtual interface's BE queue since virtual interface queues are per AC.
*
* Note that the vif.cab_queue value should be set to %IEEE80211_INVAL_HW_QUEUE
* whenever the queue is not used (i.e. the interface is not in AP mode) if the
* queue could potentially be shared since mac80211 will look at cab_queue when
make menuconfig:
Target System (Ralink RT288x/RT3xxx) --->