482
* enum station_info_rate_flags - bitrate info flags
484
* Used by the driver to indicate the specific rate transmission
485
* type for 802.11n transmissions.
487
* @BSS_PARAM_FLAGS_CTS_PROT: whether CTS protection is enabled
488
* @BSS_PARAM_FLAGS_SHORT_PREAMBLE: whether short preamble is enabled
489
* @BSS_PARAM_FLAGS_SHORT_SLOT_TIME: whether short slot time is enabled
491
enum bss_param_flags {
492
BSS_PARAM_FLAGS_CTS_PROT = 1<<0,
493
BSS_PARAM_FLAGS_SHORT_PREAMBLE = 1<<1,
494
BSS_PARAM_FLAGS_SHORT_SLOT_TIME = 1<<2,
498
* struct sta_bss_parameters - BSS parameters for the attached station
500
* Information about the currently associated BSS
502
* @flags: bitflag of flags from &enum bss_param_flags
503
* @dtim_period: DTIM period for the BSS
504
* @beacon_interval: beacon interval
506
struct sta_bss_parameters {
476
513
* struct station_info - station information
478
515
* Station information filled by driver for get_station() and dump_station.
480
517
* @filled: bitflag of flags from &enum station_info_flags
518
* @connected_time: time(in secs) since a station is last connected
481
519
* @inactive_time: time since last station activity (tx/rx) in milliseconds
482
520
* @rx_bytes: bytes received from this station
483
521
* @tx_bytes: bytes transmitted to this station
655
696
* @mesh_id_len: length of the mesh ID, at least 1 and at most 32 bytes
656
697
* @path_sel_proto: which path selection protocol to use
657
698
* @path_metric: which metric to use
658
* @vendor_ie: vendor information elements (optional)
659
* @vendor_ie_len: length of vendor information elements
699
* @ie: vendor information elements (optional)
700
* @ie_len: length of vendor information elements
701
* @is_authenticated: this mesh requires authentication
702
* @is_secure: this mesh uses security
661
704
* These parameters are fixed when the mesh is created.
801
* struct cfg80211_sched_scan_request - scheduled scan request description
803
* @ssids: SSIDs to scan for (passed in the probe_reqs in active scans)
804
* @n_ssids: number of SSIDs
805
* @n_channels: total number of channels to scan
806
* @interval: interval between each scheduled scan cycle
807
* @ie: optional information element(s) to add into Probe Request or %NULL
808
* @ie_len: length of ie in octets
809
* @wiphy: the wiphy this was for
810
* @dev: the interface
811
* @channels: channels to scan
813
struct cfg80211_sched_scan_request {
814
struct cfg80211_ssid *ssids;
823
struct net_device *dev;
826
struct ieee80211_channel *channels[0];
756
830
* enum cfg80211_signal_type - signal type
758
832
* @CFG80211_SIGNAL_TYPE_NONE: no signal strength information available
1125
* struct cfg80211_wowlan_trig_pkt_pattern - packet pattern
1126
* @mask: bitmask where to match pattern and where to ignore bytes,
1127
* one bit per byte, in same format as nl80211
1128
* @pattern: bytes to match where bitmask is 1
1129
* @pattern_len: length of pattern (in bytes)
1131
* Internal note: @mask and @pattern are allocated in one chunk of
1132
* memory, free @mask only!
1134
struct cfg80211_wowlan_trig_pkt_pattern {
1140
* struct cfg80211_wowlan - Wake on Wireless-LAN support info
1142
* This structure defines the enabled WoWLAN triggers for the device.
1143
* @any: wake up on any activity -- special trigger if device continues
1144
* operating as normal during suspend
1145
* @disconnect: wake up if getting disconnected
1146
* @magic_pkt: wake up on receiving magic packet
1147
* @patterns: wake up on receiving packet matching a pattern
1148
* @n_patterns: number of patterns
1150
struct cfg80211_wowlan {
1151
bool any, disconnect, magic_pkt;
1152
struct cfg80211_wowlan_trig_pkt_pattern *patterns;
1051
1157
* struct cfg80211_ops - backend description for wireless configuration
1053
1159
* This struct is registered by fullmac card drivers and/or wireless stacks
1187
1295
* @set_power_mgmt: Configure WLAN power management. A timeout value of -1
1188
1296
* allows the driver to adjust the dynamic ps timeout value.
1189
1297
* @set_cqm_rssi_config: Configure connection quality monitor RSSI threshold.
1298
* @sched_scan_start: Tell the driver to start a scheduled scan.
1299
* @sched_scan_stop: Tell the driver to stop an ongoing scheduled
1300
* scan. The driver_initiated flag specifies whether the driver
1301
* itself has informed that the scan has stopped.
1191
1303
* @mgmt_frame_register: Notify driver that a management frame type was
1192
1304
* registered. Note that this callback may not sleep, and cannot run
1373
1485
int (*set_ringparam)(struct wiphy *wiphy, u32 tx, u32 rx);
1374
1486
void (*get_ringparam)(struct wiphy *wiphy,
1375
1487
u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max);
1489
int (*sched_scan_start)(struct wiphy *wiphy,
1490
struct net_device *dev,
1491
struct cfg80211_sched_scan_request *request);
1492
int (*sched_scan_stop)(struct wiphy *wiphy, struct net_device *dev);
1404
1521
* hints read the documenation for regulatory_hint_found_beacon()
1405
1522
* @WIPHY_FLAG_NETNS_OK: if not set, do not allow changing the netns of this
1524
* @WIPHY_FLAG_ENFORCE_COMBINATIONS: Set this flag to enforce interface
1525
* combinations for this device. This flag is used for backward
1526
* compatibility only until all drivers advertise combinations and
1527
* they will always be enforced.
1407
1528
* @WIPHY_FLAG_PS_ON_BY_DEFAULT: if set to true, powersave will be enabled
1408
1529
* by default -- this flag will be set depending on the kernel's default
1409
1530
* on wiphy_new(), but can be changed by the driver if it has a good
1415
1536
* control port protocol ethertype. The device also honours the
1416
1537
* control_port_no_encrypt flag.
1417
1538
* @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN.
1418
* @WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS: The device supports separate
1419
* unicast and multicast TX keys.
1539
* @WIPHY_FLAG_MESH_AUTH: The device supports mesh authentication by routing
1540
* auth frames to userspace. See @NL80211_MESH_SETUP_USERSPACE_AUTH.
1541
* @WIPHY_FLAG_SUPPORTS_SCHED_SCAN: The device supports scheduled scans.
1421
1543
enum wiphy_flags {
1422
1544
WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
1428
1550
WIPHY_FLAG_4ADDR_STATION = BIT(6),
1429
1551
WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7),
1430
1552
WIPHY_FLAG_IBSS_RSN = BIT(8),
1431
WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS= BIT(9),
1553
WIPHY_FLAG_MESH_AUTH = BIT(10),
1554
WIPHY_FLAG_SUPPORTS_SCHED_SCAN = BIT(11),
1555
WIPHY_FLAG_ENFORCE_COMBINATIONS = BIT(12),
1559
* struct ieee80211_iface_limit - limit on certain interface types
1560
* @max: maximum number of interfaces of these types
1561
* @types: interface types (bits)
1563
struct ieee80211_iface_limit {
1569
* struct ieee80211_iface_combination - possible interface combination
1570
* @limits: limits for the given interface types
1571
* @n_limits: number of limitations
1572
* @num_different_channels: can use up to this many different channels
1573
* @max_interfaces: maximum number of interfaces in total allowed in this
1575
* @beacon_int_infra_match: In this combination, the beacon intervals
1576
* between infrastructure and AP types must match. This is required
1577
* only in special cases.
1579
* These examples can be expressed as follows:
1581
* Allow #STA <= 1, #AP <= 1, matching BI, channels = 1, 2 total:
1583
* struct ieee80211_iface_limit limits1[] = {
1584
* { .max = 1, .types = BIT(NL80211_IFTYPE_STATION), },
1585
* { .max = 1, .types = BIT(NL80211_IFTYPE_AP}, },
1587
* struct ieee80211_iface_combination combination1 = {
1588
* .limits = limits1,
1589
* .n_limits = ARRAY_SIZE(limits1),
1590
* .max_interfaces = 2,
1591
* .beacon_int_infra_match = true,
1595
* Allow #{AP, P2P-GO} <= 8, channels = 1, 8 total:
1597
* struct ieee80211_iface_limit limits2[] = {
1598
* { .max = 8, .types = BIT(NL80211_IFTYPE_AP) |
1599
* BIT(NL80211_IFTYPE_P2P_GO), },
1601
* struct ieee80211_iface_combination combination2 = {
1602
* .limits = limits2,
1603
* .n_limits = ARRAY_SIZE(limits2),
1604
* .max_interfaces = 8,
1605
* .num_different_channels = 1,
1609
* Allow #STA <= 1, #{P2P-client,P2P-GO} <= 3 on two channels, 4 total.
1610
* This allows for an infrastructure connection and three P2P connections.
1612
* struct ieee80211_iface_limit limits3[] = {
1613
* { .max = 1, .types = BIT(NL80211_IFTYPE_STATION), },
1614
* { .max = 3, .types = BIT(NL80211_IFTYPE_P2P_GO) |
1615
* BIT(NL80211_IFTYPE_P2P_CLIENT), },
1617
* struct ieee80211_iface_combination combination3 = {
1618
* .limits = limits3,
1619
* .n_limits = ARRAY_SIZE(limits3),
1620
* .max_interfaces = 4,
1621
* .num_different_channels = 2,
1624
struct ieee80211_iface_combination {
1625
const struct ieee80211_iface_limit *limits;
1626
u32 num_different_channels;
1629
bool beacon_int_infra_match;
1434
1632
struct mac_address {
1641
* enum wiphy_wowlan_support_flags - WoWLAN support flags
1642
* @WIPHY_WOWLAN_ANY: supports wakeup for the special "any"
1643
* trigger that keeps the device operating as-is and
1644
* wakes up the host on any activity, for example a
1645
* received packet that passed filtering; note that the
1646
* packet should be preserved in that case
1647
* @WIPHY_WOWLAN_MAGIC_PKT: supports wakeup on magic packet
1649
* @WIPHY_WOWLAN_DISCONNECT: supports wakeup on disconnect
1651
enum wiphy_wowlan_support_flags {
1652
WIPHY_WOWLAN_ANY = BIT(0),
1653
WIPHY_WOWLAN_MAGIC_PKT = BIT(1),
1654
WIPHY_WOWLAN_DISCONNECT = BIT(2),
1658
* struct wiphy_wowlan_support - WoWLAN support data
1659
* @flags: see &enum wiphy_wowlan_support_flags
1660
* @n_patterns: number of supported wakeup patterns
1661
* (see nl80211.h for the pattern definition)
1662
* @pattern_max_len: maximum length of each pattern
1663
* @pattern_min_len: minimum length of each pattern
1665
struct wiphy_wowlan_support {
1668
int pattern_max_len;
1669
int pattern_min_len;
1443
1673
* struct wiphy - wireless hardware description
1444
1674
* @reg_notifier: the driver's regulatory notification callback,
1445
1675
* note that if your driver uses wiphy_apply_custom_regulatory()
1476
1706
* @priv: driver private data (sized according to wiphy_new() parameter)
1477
1707
* @interface_modes: bitmask of interfaces types valid for this wiphy,
1478
1708
* must be set by driver
1709
* @iface_combinations: Valid interface combinations array, should not
1710
* list single interface types.
1711
* @n_iface_combinations: number of entries in @iface_combinations array.
1712
* @software_iftypes: bitmask of software interface types, these are not
1713
* subject to any restrictions since they are purely managed in SW.
1479
1714
* @flags: wiphy flags, see &enum wiphy_flags
1480
1715
* @bss_priv_size: each BSS struct has private data allocated with it,
1481
1716
* this variable determines its size
1991
2238
* @addr: The device MAC address.
1992
2239
* @iftype: The device interface type.
1993
2240
* @extra_headroom: The hardware extra headroom for SKBs in the @list.
2241
* @has_80211_header: Set it true if SKB is with IEEE 802.11 header.
1995
2243
void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
1996
2244
const u8 *addr, enum nl80211_iftype iftype,
1997
const unsigned int extra_headroom);
2245
const unsigned int extra_headroom,
2246
bool has_80211_header);
2000
2249
* cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame
2214
2463
void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted);
2466
* cfg80211_sched_scan_results - notify that new scan results are available
2468
* @wiphy: the wiphy which got scheduled scan results
2470
void cfg80211_sched_scan_results(struct wiphy *wiphy);
2473
* cfg80211_sched_scan_stopped - notify that the scheduled scan has stopped
2475
* @wiphy: the wiphy on which the scheduled scan stopped
2477
* The driver can call this function to inform cfg80211 that the
2478
* scheduled scan had to be stopped, for whatever reason. The driver
2479
* is then called back via the sched_scan_stop operation when done.
2481
void cfg80211_sched_scan_stopped(struct wiphy *wiphy);
2217
2484
* cfg80211_inform_bss_frame - inform cfg80211 of a received BSS frame
2219
2486
* @wiphy: the wiphy reporting the BSS
2450
2717
void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp);
2720
* cfg80211_notify_new_candidate - notify cfg80211 of a new mesh peer candidate
2722
* @dev: network device
2723
* @macaddr: the MAC address of the new candidate
2724
* @ie: information elements advertised by the peer candidate
2725
* @ie_len: lenght of the information elements buffer
2726
* @gfp: allocation flags
2728
* This function notifies cfg80211 that the mesh peer candidate has been
2729
* detected, most likely via a beacon or, less likely, via a probe response.
2730
* cfg80211 then sends a notification to userspace.
2732
void cfg80211_notify_new_peer_candidate(struct net_device *dev,
2733
const u8 *macaddr, const u8 *ie, u8 ie_len, gfp_t gfp);
2453
2736
* DOC: RFkill integration
2455
2738
* RFkill integration in cfg80211 is almost invisible to drivers,
2606
2890
* It should be called by the underlying driver whenever it roamed
2607
2891
* from one AP to another while connected.
2609
void cfg80211_roamed(struct net_device *dev, const u8 *bssid,
2893
void cfg80211_roamed(struct net_device *dev,
2894
struct ieee80211_channel *channel,
2610
2896
const u8 *req_ie, size_t req_ie_len,
2611
2897
const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp);