aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2011-05-16 14:55:42 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-16 19:32:19 -0400
commite00cf3b9eb7839b952e434a75bff6b99e47337ac (patch)
treeef583ab8ac09bf703026650d4bc7777e6a3864d3 /include/net
parent1a8218e96271790a07dd7065a2ef173e0f67e328 (diff)
parent3b8ab88acaceb505aa06ef3bbf3a73b92470ae78 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts: drivers/net/wireless/iwlwifi/iwl-agn-tx.c net/mac80211/sta_info.h
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci_core.h1
-rw-r--r--include/net/bluetooth/l2cap.h9
-rw-r--r--include/net/cfg80211.h237
-rw-r--r--include/net/mac80211.h66
4 files changed, 303 insertions, 10 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 14cc3249c1eb..6c994c004d15 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -422,6 +422,7 @@ void hci_conn_check_pending(struct hci_dev *hdev);
422 422
423struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8 sec_level, __u8 auth_type); 423struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8 sec_level, __u8 auth_type);
424int hci_conn_check_link_mode(struct hci_conn *conn); 424int hci_conn_check_link_mode(struct hci_conn *conn);
425int hci_conn_check_secure(struct hci_conn *conn, __u8 sec_level);
425int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type); 426int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type);
426int hci_conn_change_link_key(struct hci_conn *conn); 427int hci_conn_change_link_key(struct hci_conn *conn);
427int hci_conn_switch_role(struct hci_conn *conn, __u8 role); 428int hci_conn_switch_role(struct hci_conn *conn, __u8 role);
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index c34b1c126363..d09c9b1118e3 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -350,6 +350,7 @@ struct l2cap_chan {
350 struct list_head srej_l; 350 struct list_head srej_l;
351 351
352 struct list_head list; 352 struct list_head list;
353 struct list_head global_l;
353}; 354};
354 355
355struct l2cap_conn { 356struct l2cap_conn {
@@ -441,7 +442,6 @@ static inline int l2cap_tx_window_full(struct l2cap_chan *ch)
441#define __is_sar_start(ctrl) (((ctrl) & L2CAP_CTRL_SAR) == L2CAP_SDU_START) 442#define __is_sar_start(ctrl) (((ctrl) & L2CAP_CTRL_SAR) == L2CAP_SDU_START)
442 443
443extern int disable_ertm; 444extern int disable_ertm;
444extern struct bt_sock_list l2cap_sk_list;
445 445
446int l2cap_init_sockets(void); 446int l2cap_init_sockets(void);
447void l2cap_cleanup_sockets(void); 447void l2cap_cleanup_sockets(void);
@@ -458,6 +458,9 @@ void l2cap_do_send(struct l2cap_chan *chan, struct sk_buff *skb);
458void l2cap_streaming_send(struct l2cap_chan *chan); 458void l2cap_streaming_send(struct l2cap_chan *chan);
459int l2cap_ertm_send(struct l2cap_chan *chan); 459int l2cap_ertm_send(struct l2cap_chan *chan);
460 460
461int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm);
462int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid);
463
461void l2cap_sock_set_timer(struct sock *sk, long timeout); 464void l2cap_sock_set_timer(struct sock *sk, long timeout);
462void l2cap_sock_clear_timer(struct sock *sk); 465void l2cap_sock_clear_timer(struct sock *sk);
463void __l2cap_sock_close(struct sock *sk, int reason); 466void __l2cap_sock_close(struct sock *sk, int reason);
@@ -466,9 +469,9 @@ void l2cap_sock_init(struct sock *sk, struct sock *parent);
466struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock, 469struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
467 int proto, gfp_t prio); 470 int proto, gfp_t prio);
468void l2cap_send_disconn_req(struct l2cap_conn *conn, struct l2cap_chan *chan, int err); 471void l2cap_send_disconn_req(struct l2cap_conn *conn, struct l2cap_chan *chan, int err);
469struct l2cap_chan *l2cap_chan_alloc(struct sock *sk); 472struct l2cap_chan *l2cap_chan_create(struct sock *sk);
470void l2cap_chan_del(struct l2cap_chan *chan, int err); 473void l2cap_chan_del(struct l2cap_chan *chan, int err);
471void l2cap_chan_free(struct l2cap_chan *chan); 474void l2cap_chan_destroy(struct l2cap_chan *chan);
472int l2cap_chan_connect(struct l2cap_chan *chan); 475int l2cap_chan_connect(struct l2cap_chan *chan);
473 476
474#endif /* __L2CAP_H */ 477#endif /* __L2CAP_H */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index d30eada7c6cd..bfd6557946be 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -387,6 +387,7 @@ enum plink_actions {
387 * @listen_interval: listen interval or -1 for no change 387 * @listen_interval: listen interval or -1 for no change
388 * @aid: AID or zero for no change 388 * @aid: AID or zero for no change
389 * @plink_action: plink action to take 389 * @plink_action: plink action to take
390 * @plink_state: set the peer link state for a station
390 * @ht_capa: HT capabilities of station 391 * @ht_capa: HT capabilities of station
391 */ 392 */
392struct station_parameters { 393struct station_parameters {
@@ -397,6 +398,7 @@ struct station_parameters {
397 u16 aid; 398 u16 aid;
398 u8 supported_rates_len; 399 u8 supported_rates_len;
399 u8 plink_action; 400 u8 plink_action;
401 u8 plink_state;
400 struct ieee80211_ht_cap *ht_capa; 402 struct ieee80211_ht_cap *ht_capa;
401}; 403};
402 404
@@ -695,7 +697,8 @@ struct mesh_config {
695 * @path_metric: which metric to use 697 * @path_metric: which metric to use
696 * @ie: vendor information elements (optional) 698 * @ie: vendor information elements (optional)
697 * @ie_len: length of vendor information elements 699 * @ie_len: length of vendor information elements
698 * @is_secure: or not 700 * @is_authenticated: this mesh requires authentication
701 * @is_secure: this mesh uses security
699 * 702 *
700 * These parameters are fixed when the mesh is created. 703 * These parameters are fixed when the mesh is created.
701 */ 704 */
@@ -706,6 +709,7 @@ struct mesh_setup {
706 u8 path_metric; 709 u8 path_metric;
707 const u8 *ie; 710 const u8 *ie;
708 u8 ie_len; 711 u8 ie_len;
712 bool is_authenticated;
709 bool is_secure; 713 bool is_secure;
710}; 714};
711 715
@@ -793,6 +797,35 @@ struct cfg80211_scan_request {
793}; 797};
794 798
795/** 799/**
800 * struct cfg80211_sched_scan_request - scheduled scan request description
801 *
802 * @ssids: SSIDs to scan for (passed in the probe_reqs in active scans)
803 * @n_ssids: number of SSIDs
804 * @n_channels: total number of channels to scan
805 * @interval: interval between each scheduled scan cycle
806 * @ie: optional information element(s) to add into Probe Request or %NULL
807 * @ie_len: length of ie in octets
808 * @wiphy: the wiphy this was for
809 * @dev: the interface
810 * @channels: channels to scan
811 */
812struct cfg80211_sched_scan_request {
813 struct cfg80211_ssid *ssids;
814 int n_ssids;
815 u32 n_channels;
816 u32 interval;
817 const u8 *ie;
818 size_t ie_len;
819
820 /* internal */
821 struct wiphy *wiphy;
822 struct net_device *dev;
823
824 /* keep last */
825 struct ieee80211_channel *channels[0];
826};
827
828/**
796 * enum cfg80211_signal_type - signal type 829 * enum cfg80211_signal_type - signal type
797 * 830 *
798 * @CFG80211_SIGNAL_TYPE_NONE: no signal strength information available 831 * @CFG80211_SIGNAL_TYPE_NONE: no signal strength information available
@@ -1088,6 +1121,38 @@ struct cfg80211_pmksa {
1088}; 1121};
1089 1122
1090/** 1123/**
1124 * struct cfg80211_wowlan_trig_pkt_pattern - packet pattern
1125 * @mask: bitmask where to match pattern and where to ignore bytes,
1126 * one bit per byte, in same format as nl80211
1127 * @pattern: bytes to match where bitmask is 1
1128 * @pattern_len: length of pattern (in bytes)
1129 *
1130 * Internal note: @mask and @pattern are allocated in one chunk of
1131 * memory, free @mask only!
1132 */
1133struct cfg80211_wowlan_trig_pkt_pattern {
1134 u8 *mask, *pattern;
1135 int pattern_len;
1136};
1137
1138/**
1139 * struct cfg80211_wowlan - Wake on Wireless-LAN support info
1140 *
1141 * This structure defines the enabled WoWLAN triggers for the device.
1142 * @any: wake up on any activity -- special trigger if device continues
1143 * operating as normal during suspend
1144 * @disconnect: wake up if getting disconnected
1145 * @magic_pkt: wake up on receiving magic packet
1146 * @patterns: wake up on receiving packet matching a pattern
1147 * @n_patterns: number of patterns
1148 */
1149struct cfg80211_wowlan {
1150 bool any, disconnect, magic_pkt;
1151 struct cfg80211_wowlan_trig_pkt_pattern *patterns;
1152 int n_patterns;
1153};
1154
1155/**
1091 * struct cfg80211_ops - backend description for wireless configuration 1156 * struct cfg80211_ops - backend description for wireless configuration
1092 * 1157 *
1093 * This struct is registered by fullmac card drivers and/or wireless stacks 1158 * This struct is registered by fullmac card drivers and/or wireless stacks
@@ -1100,7 +1165,9 @@ struct cfg80211_pmksa {
1100 * wireless extensions but this is subject to reevaluation as soon as this 1165 * wireless extensions but this is subject to reevaluation as soon as this
1101 * code is used more widely and we have a first user without wext. 1166 * code is used more widely and we have a first user without wext.
1102 * 1167 *
1103 * @suspend: wiphy device needs to be suspended 1168 * @suspend: wiphy device needs to be suspended. The variable @wow will
1169 * be %NULL or contain the enabled Wake-on-Wireless triggers that are
1170 * configured for the device.
1104 * @resume: wiphy device needs to be resumed 1171 * @resume: wiphy device needs to be resumed
1105 * 1172 *
1106 * @add_virtual_intf: create a new virtual interface with the given name, 1173 * @add_virtual_intf: create a new virtual interface with the given name,
@@ -1227,6 +1294,10 @@ struct cfg80211_pmksa {
1227 * @set_power_mgmt: Configure WLAN power management. A timeout value of -1 1294 * @set_power_mgmt: Configure WLAN power management. A timeout value of -1
1228 * allows the driver to adjust the dynamic ps timeout value. 1295 * allows the driver to adjust the dynamic ps timeout value.
1229 * @set_cqm_rssi_config: Configure connection quality monitor RSSI threshold. 1296 * @set_cqm_rssi_config: Configure connection quality monitor RSSI threshold.
1297 * @sched_scan_start: Tell the driver to start a scheduled scan.
1298 * @sched_scan_stop: Tell the driver to stop an ongoing scheduled
1299 * scan. The driver_initiated flag specifies whether the driver
1300 * itself has informed that the scan has stopped.
1230 * 1301 *
1231 * @mgmt_frame_register: Notify driver that a management frame type was 1302 * @mgmt_frame_register: Notify driver that a management frame type was
1232 * registered. Note that this callback may not sleep, and cannot run 1303 * registered. Note that this callback may not sleep, and cannot run
@@ -1244,7 +1315,7 @@ struct cfg80211_pmksa {
1244 * @get_ringparam: Get tx and rx ring current and maximum sizes. 1315 * @get_ringparam: Get tx and rx ring current and maximum sizes.
1245 */ 1316 */
1246struct cfg80211_ops { 1317struct cfg80211_ops {
1247 int (*suspend)(struct wiphy *wiphy); 1318 int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
1248 int (*resume)(struct wiphy *wiphy); 1319 int (*resume)(struct wiphy *wiphy);
1249 1320
1250 struct net_device * (*add_virtual_intf)(struct wiphy *wiphy, 1321 struct net_device * (*add_virtual_intf)(struct wiphy *wiphy,
@@ -1413,6 +1484,11 @@ struct cfg80211_ops {
1413 int (*set_ringparam)(struct wiphy *wiphy, u32 tx, u32 rx); 1484 int (*set_ringparam)(struct wiphy *wiphy, u32 tx, u32 rx);
1414 void (*get_ringparam)(struct wiphy *wiphy, 1485 void (*get_ringparam)(struct wiphy *wiphy,
1415 u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max); 1486 u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max);
1487
1488 int (*sched_scan_start)(struct wiphy *wiphy,
1489 struct net_device *dev,
1490 struct cfg80211_sched_scan_request *request);
1491 int (*sched_scan_stop)(struct wiphy *wiphy, struct net_device *dev);
1416}; 1492};
1417 1493
1418/* 1494/*
@@ -1444,6 +1520,10 @@ struct cfg80211_ops {
1444 * hints read the documenation for regulatory_hint_found_beacon() 1520 * hints read the documenation for regulatory_hint_found_beacon()
1445 * @WIPHY_FLAG_NETNS_OK: if not set, do not allow changing the netns of this 1521 * @WIPHY_FLAG_NETNS_OK: if not set, do not allow changing the netns of this
1446 * wiphy at all 1522 * wiphy at all
1523 * @WIPHY_FLAG_ENFORCE_COMBINATIONS: Set this flag to enforce interface
1524 * combinations for this device. This flag is used for backward
1525 * compatibility only until all drivers advertise combinations and
1526 * they will always be enforced.
1447 * @WIPHY_FLAG_PS_ON_BY_DEFAULT: if set to true, powersave will be enabled 1527 * @WIPHY_FLAG_PS_ON_BY_DEFAULT: if set to true, powersave will be enabled
1448 * by default -- this flag will be set depending on the kernel's default 1528 * by default -- this flag will be set depending on the kernel's default
1449 * on wiphy_new(), but can be changed by the driver if it has a good 1529 * on wiphy_new(), but can be changed by the driver if it has a good
@@ -1455,10 +1535,9 @@ struct cfg80211_ops {
1455 * control port protocol ethertype. The device also honours the 1535 * control port protocol ethertype. The device also honours the
1456 * control_port_no_encrypt flag. 1536 * control_port_no_encrypt flag.
1457 * @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN. 1537 * @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN.
1458 * @WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS: The device supports separate
1459 * unicast and multicast TX keys.
1460 * @WIPHY_FLAG_MESH_AUTH: The device supports mesh authentication by routing 1538 * @WIPHY_FLAG_MESH_AUTH: The device supports mesh authentication by routing
1461 * auth frames to userspace. See @NL80211_MESH_SETUP_USERSPACE_AUTH. 1539 * auth frames to userspace. See @NL80211_MESH_SETUP_USERSPACE_AUTH.
1540 * @WIPHY_FLAG_SCHED_SCAN: The device supports scheduled scans.
1462 */ 1541 */
1463enum wiphy_flags { 1542enum wiphy_flags {
1464 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), 1543 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
@@ -1470,8 +1549,83 @@ enum wiphy_flags {
1470 WIPHY_FLAG_4ADDR_STATION = BIT(6), 1549 WIPHY_FLAG_4ADDR_STATION = BIT(6),
1471 WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7), 1550 WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7),
1472 WIPHY_FLAG_IBSS_RSN = BIT(8), 1551 WIPHY_FLAG_IBSS_RSN = BIT(8),
1473 WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS= BIT(9),
1474 WIPHY_FLAG_MESH_AUTH = BIT(10), 1552 WIPHY_FLAG_MESH_AUTH = BIT(10),
1553 WIPHY_FLAG_SUPPORTS_SCHED_SCAN = BIT(11),
1554 WIPHY_FLAG_ENFORCE_COMBINATIONS = BIT(12),
1555};
1556
1557/**
1558 * struct ieee80211_iface_limit - limit on certain interface types
1559 * @max: maximum number of interfaces of these types
1560 * @types: interface types (bits)
1561 */
1562struct ieee80211_iface_limit {
1563 u16 max;
1564 u16 types;
1565};
1566
1567/**
1568 * struct ieee80211_iface_combination - possible interface combination
1569 * @limits: limits for the given interface types
1570 * @n_limits: number of limitations
1571 * @num_different_channels: can use up to this many different channels
1572 * @max_interfaces: maximum number of interfaces in total allowed in this
1573 * group
1574 * @beacon_int_infra_match: In this combination, the beacon intervals
1575 * between infrastructure and AP types must match. This is required
1576 * only in special cases.
1577 *
1578 * These examples can be expressed as follows:
1579 *
1580 * Allow #STA <= 1, #AP <= 1, matching BI, channels = 1, 2 total:
1581 *
1582 * struct ieee80211_iface_limit limits1[] = {
1583 * { .max = 1, .types = BIT(NL80211_IFTYPE_STATION), },
1584 * { .max = 1, .types = BIT(NL80211_IFTYPE_AP}, },
1585 * };
1586 * struct ieee80211_iface_combination combination1 = {
1587 * .limits = limits1,
1588 * .n_limits = ARRAY_SIZE(limits1),
1589 * .max_interfaces = 2,
1590 * .beacon_int_infra_match = true,
1591 * };
1592 *
1593 *
1594 * Allow #{AP, P2P-GO} <= 8, channels = 1, 8 total:
1595 *
1596 * struct ieee80211_iface_limit limits2[] = {
1597 * { .max = 8, .types = BIT(NL80211_IFTYPE_AP) |
1598 * BIT(NL80211_IFTYPE_P2P_GO), },
1599 * };
1600 * struct ieee80211_iface_combination combination2 = {
1601 * .limits = limits2,
1602 * .n_limits = ARRAY_SIZE(limits2),
1603 * .max_interfaces = 8,
1604 * .num_different_channels = 1,
1605 * };
1606 *
1607 *
1608 * Allow #STA <= 1, #{P2P-client,P2P-GO} <= 3 on two channels, 4 total.
1609 * This allows for an infrastructure connection and three P2P connections.
1610 *
1611 * struct ieee80211_iface_limit limits3[] = {
1612 * { .max = 1, .types = BIT(NL80211_IFTYPE_STATION), },
1613 * { .max = 3, .types = BIT(NL80211_IFTYPE_P2P_GO) |
1614 * BIT(NL80211_IFTYPE_P2P_CLIENT), },
1615 * };
1616 * struct ieee80211_iface_combination combination3 = {
1617 * .limits = limits3,
1618 * .n_limits = ARRAY_SIZE(limits3),
1619 * .max_interfaces = 4,
1620 * .num_different_channels = 2,
1621 * };
1622 */
1623struct ieee80211_iface_combination {
1624 const struct ieee80211_iface_limit *limits;
1625 u32 num_different_channels;
1626 u16 max_interfaces;
1627 u8 n_limits;
1628 bool beacon_int_infra_match;
1475}; 1629};
1476 1630
1477struct mac_address { 1631struct mac_address {
@@ -1483,6 +1637,38 @@ struct ieee80211_txrx_stypes {
1483}; 1637};
1484 1638
1485/** 1639/**
1640 * enum wiphy_wowlan_support_flags - WoWLAN support flags
1641 * @WIPHY_WOWLAN_ANY: supports wakeup for the special "any"
1642 * trigger that keeps the device operating as-is and
1643 * wakes up the host on any activity, for example a
1644 * received packet that passed filtering; note that the
1645 * packet should be preserved in that case
1646 * @WIPHY_WOWLAN_MAGIC_PKT: supports wakeup on magic packet
1647 * (see nl80211.h)
1648 * @WIPHY_WOWLAN_DISCONNECT: supports wakeup on disconnect
1649 */
1650enum wiphy_wowlan_support_flags {
1651 WIPHY_WOWLAN_ANY = BIT(0),
1652 WIPHY_WOWLAN_MAGIC_PKT = BIT(1),
1653 WIPHY_WOWLAN_DISCONNECT = BIT(2),
1654};
1655
1656/**
1657 * struct wiphy_wowlan_support - WoWLAN support data
1658 * @flags: see &enum wiphy_wowlan_support_flags
1659 * @n_patterns: number of supported wakeup patterns
1660 * (see nl80211.h for the pattern definition)
1661 * @pattern_max_len: maximum length of each pattern
1662 * @pattern_min_len: minimum length of each pattern
1663 */
1664struct wiphy_wowlan_support {
1665 u32 flags;
1666 int n_patterns;
1667 int pattern_max_len;
1668 int pattern_min_len;
1669};
1670
1671/**
1486 * struct wiphy - wireless hardware description 1672 * struct wiphy - wireless hardware description
1487 * @reg_notifier: the driver's regulatory notification callback, 1673 * @reg_notifier: the driver's regulatory notification callback,
1488 * note that if your driver uses wiphy_apply_custom_regulatory() 1674 * note that if your driver uses wiphy_apply_custom_regulatory()
@@ -1519,6 +1705,11 @@ struct ieee80211_txrx_stypes {
1519 * @priv: driver private data (sized according to wiphy_new() parameter) 1705 * @priv: driver private data (sized according to wiphy_new() parameter)
1520 * @interface_modes: bitmask of interfaces types valid for this wiphy, 1706 * @interface_modes: bitmask of interfaces types valid for this wiphy,
1521 * must be set by driver 1707 * must be set by driver
1708 * @iface_combinations: Valid interface combinations array, should not
1709 * list single interface types.
1710 * @n_iface_combinations: number of entries in @iface_combinations array.
1711 * @software_iftypes: bitmask of software interface types, these are not
1712 * subject to any restrictions since they are purely managed in SW.
1522 * @flags: wiphy flags, see &enum wiphy_flags 1713 * @flags: wiphy flags, see &enum wiphy_flags
1523 * @bss_priv_size: each BSS struct has private data allocated with it, 1714 * @bss_priv_size: each BSS struct has private data allocated with it,
1524 * this variable determines its size 1715 * this variable determines its size
@@ -1549,6 +1740,8 @@ struct ieee80211_txrx_stypes {
1549 * 1740 *
1550 * @max_remain_on_channel_duration: Maximum time a remain-on-channel operation 1741 * @max_remain_on_channel_duration: Maximum time a remain-on-channel operation
1551 * may request, if implemented. 1742 * may request, if implemented.
1743 *
1744 * @wowlan: WoWLAN support information
1552 */ 1745 */
1553struct wiphy { 1746struct wiphy {
1554 /* assign these fields before you register the wiphy */ 1747 /* assign these fields before you register the wiphy */
@@ -1561,6 +1754,10 @@ struct wiphy {
1561 1754
1562 const struct ieee80211_txrx_stypes *mgmt_stypes; 1755 const struct ieee80211_txrx_stypes *mgmt_stypes;
1563 1756
1757 const struct ieee80211_iface_combination *iface_combinations;
1758 int n_iface_combinations;
1759 u16 software_iftypes;
1760
1564 u16 n_addresses; 1761 u16 n_addresses;
1565 1762
1566 /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ 1763 /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */
@@ -1586,6 +1783,8 @@ struct wiphy {
1586 char fw_version[ETHTOOL_BUSINFO_LEN]; 1783 char fw_version[ETHTOOL_BUSINFO_LEN];
1587 u32 hw_version; 1784 u32 hw_version;
1588 1785
1786 struct wiphy_wowlan_support wowlan;
1787
1589 u16 max_remain_on_channel_duration; 1788 u16 max_remain_on_channel_duration;
1590 1789
1591 u8 max_num_pmkids; 1790 u8 max_num_pmkids;
@@ -1769,6 +1968,8 @@ struct cfg80211_cached_keys;
1769 * @mgmt_registrations_lock: lock for the list 1968 * @mgmt_registrations_lock: lock for the list
1770 * @mtx: mutex used to lock data in this struct 1969 * @mtx: mutex used to lock data in this struct
1771 * @cleanup_work: work struct used for cleanup that can't be done directly 1970 * @cleanup_work: work struct used for cleanup that can't be done directly
1971 * @beacon_interval: beacon interval used on this device for transmitting
1972 * beacons, 0 when not valid
1772 */ 1973 */
1773struct wireless_dev { 1974struct wireless_dev {
1774 struct wiphy *wiphy; 1975 struct wiphy *wiphy;
@@ -1809,6 +2010,8 @@ struct wireless_dev {
1809 bool ps; 2010 bool ps;
1810 int ps_timeout; 2011 int ps_timeout;
1811 2012
2013 int beacon_interval;
2014
1812#ifdef CONFIG_CFG80211_WEXT 2015#ifdef CONFIG_CFG80211_WEXT
1813 /* wext data */ 2016 /* wext data */
1814 struct { 2017 struct {
@@ -2034,10 +2237,12 @@ int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr,
2034 * @addr: The device MAC address. 2237 * @addr: The device MAC address.
2035 * @iftype: The device interface type. 2238 * @iftype: The device interface type.
2036 * @extra_headroom: The hardware extra headroom for SKBs in the @list. 2239 * @extra_headroom: The hardware extra headroom for SKBs in the @list.
2240 * @has_80211_header: Set it true if SKB is with IEEE 802.11 header.
2037 */ 2241 */
2038void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, 2242void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
2039 const u8 *addr, enum nl80211_iftype iftype, 2243 const u8 *addr, enum nl80211_iftype iftype,
2040 const unsigned int extra_headroom); 2244 const unsigned int extra_headroom,
2245 bool has_80211_header);
2041 2246
2042/** 2247/**
2043 * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame 2248 * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame
@@ -2257,6 +2462,24 @@ int cfg80211_wext_siwpmksa(struct net_device *dev,
2257void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted); 2462void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted);
2258 2463
2259/** 2464/**
2465 * cfg80211_sched_scan_results - notify that new scan results are available
2466 *
2467 * @wiphy: the wiphy which got scheduled scan results
2468 */
2469void cfg80211_sched_scan_results(struct wiphy *wiphy);
2470
2471/**
2472 * cfg80211_sched_scan_stopped - notify that the scheduled scan has stopped
2473 *
2474 * @wiphy: the wiphy on which the scheduled scan stopped
2475 *
2476 * The driver can call this function to inform cfg80211 that the
2477 * scheduled scan had to be stopped, for whatever reason. The driver
2478 * is then called back via the sched_scan_stop operation when done.
2479 */
2480void cfg80211_sched_scan_stopped(struct wiphy *wiphy);
2481
2482/**
2260 * cfg80211_inform_bss_frame - inform cfg80211 of a received BSS frame 2483 * cfg80211_inform_bss_frame - inform cfg80211 of a received BSS frame
2261 * 2484 *
2262 * @wiphy: the wiphy reporting the BSS 2485 * @wiphy: the wiphy reporting the BSS
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index db4b6b9f3977..8c7189c3f6ed 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -537,6 +537,21 @@ struct ieee80211_tx_info {
537 }; 537 };
538}; 538};
539 539
540/**
541 * ieee80211_sched_scan_ies - scheduled scan IEs
542 *
543 * This structure is used to pass the appropriate IEs to be used in scheduled
544 * scans for all bands. It contains both the IEs passed from the userspace
545 * and the ones generated by mac80211.
546 *
547 * @ie: array with the IEs for each supported band
548 * @len: array with the total length of the IEs for each band
549 */
550struct ieee80211_sched_scan_ies {
551 u8 *ie[IEEE80211_NUM_BANDS];
552 size_t len[IEEE80211_NUM_BANDS];
553};
554
540static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb) 555static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb)
541{ 556{
542 return (struct ieee80211_tx_info *)skb->cb; 557 return (struct ieee80211_tx_info *)skb->cb;
@@ -1606,6 +1621,18 @@ enum ieee80211_ampdu_mlme_action {
1606 * you should ensure to cancel it on this callback. 1621 * you should ensure to cancel it on this callback.
1607 * Must be implemented and can sleep. 1622 * Must be implemented and can sleep.
1608 * 1623 *
1624 * @suspend: Suspend the device; mac80211 itself will quiesce before and
1625 * stop transmitting and doing any other configuration, and then
1626 * ask the device to suspend. This is only invoked when WoWLAN is
1627 * configured, otherwise the device is deconfigured completely and
1628 * reconfigured at resume time.
1629 *
1630 * @resume: If WoWLAN was configured, this indicates that mac80211 is
1631 * now resuming its operation, after this the device must be fully
1632 * functional again. If this returns an error, the only way out is
1633 * to also unregister the device. If it returns 1, then mac80211
1634 * will also go through the regular complete restart on resume.
1635 *
1609 * @add_interface: Called when a netdevice attached to the hardware is 1636 * @add_interface: Called when a netdevice attached to the hardware is
1610 * enabled. Because it is not called for monitor mode devices, @start 1637 * enabled. Because it is not called for monitor mode devices, @start
1611 * and @stop must be implemented. 1638 * and @stop must be implemented.
@@ -1681,6 +1708,13 @@ enum ieee80211_ampdu_mlme_action {
1681 * any error unless this callback returned a negative error code. 1708 * any error unless this callback returned a negative error code.
1682 * The callback can sleep. 1709 * The callback can sleep.
1683 * 1710 *
1711 * @sched_scan_start: Ask the hardware to start scanning repeatedly at
1712 * specific intervals. The driver must call the
1713 * ieee80211_sched_scan_results() function whenever it finds results.
1714 * This process will continue until sched_scan_stop is called.
1715 *
1716 * @sched_scan_stop: Tell the hardware to stop an ongoing scheduled scan.
1717 *
1684 * @sw_scan_start: Notifier function that is called just before a software scan 1718 * @sw_scan_start: Notifier function that is called just before a software scan
1685 * is started. Can be NULL, if the driver doesn't need this notification. 1719 * is started. Can be NULL, if the driver doesn't need this notification.
1686 * The callback can sleep. 1720 * The callback can sleep.
@@ -1831,6 +1865,10 @@ struct ieee80211_ops {
1831 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 1865 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
1832 int (*start)(struct ieee80211_hw *hw); 1866 int (*start)(struct ieee80211_hw *hw);
1833 void (*stop)(struct ieee80211_hw *hw); 1867 void (*stop)(struct ieee80211_hw *hw);
1868#ifdef CONFIG_PM
1869 int (*suspend)(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan);
1870 int (*resume)(struct ieee80211_hw *hw);
1871#endif
1834 int (*add_interface)(struct ieee80211_hw *hw, 1872 int (*add_interface)(struct ieee80211_hw *hw,
1835 struct ieee80211_vif *vif); 1873 struct ieee80211_vif *vif);
1836 int (*change_interface)(struct ieee80211_hw *hw, 1874 int (*change_interface)(struct ieee80211_hw *hw,
@@ -1861,6 +1899,12 @@ struct ieee80211_ops {
1861 u32 iv32, u16 *phase1key); 1899 u32 iv32, u16 *phase1key);
1862 int (*hw_scan)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1900 int (*hw_scan)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1863 struct cfg80211_scan_request *req); 1901 struct cfg80211_scan_request *req);
1902 int (*sched_scan_start)(struct ieee80211_hw *hw,
1903 struct ieee80211_vif *vif,
1904 struct cfg80211_sched_scan_request *req,
1905 struct ieee80211_sched_scan_ies *ies);
1906 void (*sched_scan_stop)(struct ieee80211_hw *hw,
1907 struct ieee80211_vif *vif);
1864 void (*sw_scan_start)(struct ieee80211_hw *hw); 1908 void (*sw_scan_start)(struct ieee80211_hw *hw);
1865 void (*sw_scan_complete)(struct ieee80211_hw *hw); 1909 void (*sw_scan_complete)(struct ieee80211_hw *hw);
1866 int (*get_stats)(struct ieee80211_hw *hw, 1910 int (*get_stats)(struct ieee80211_hw *hw,
@@ -2578,6 +2622,28 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw);
2578void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted); 2622void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted);
2579 2623
2580/** 2624/**
2625 * ieee80211_sched_scan_results - got results from scheduled scan
2626 *
2627 * When a scheduled scan is running, this function needs to be called by the
2628 * driver whenever there are new scan results available.
2629 *
2630 * @hw: the hardware that is performing scheduled scans
2631 */
2632void ieee80211_sched_scan_results(struct ieee80211_hw *hw);
2633
2634/**
2635 * ieee80211_sched_scan_stopped - inform that the scheduled scan has stopped
2636 *
2637 * When a scheduled scan is running, this function can be called by
2638 * the driver if it needs to stop the scan to perform another task.
2639 * Usual scenarios are drivers that cannot continue the scheduled scan
2640 * while associating, for instance.
2641 *
2642 * @hw: the hardware that is performing scheduled scans
2643 */
2644void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw);
2645
2646/**
2581 * ieee80211_iterate_active_interfaces - iterate active interfaces 2647 * ieee80211_iterate_active_interfaces - iterate active interfaces
2582 * 2648 *
2583 * This function iterates over the interfaces associated with a given 2649 * This function iterates over the interfaces associated with a given