aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-07-20 12:30:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-07-20 12:30:48 -0400
commit90b90f60c4f8e3a8525dfeb4aec46a9c7a29c857 (patch)
tree9b1d8ca6084012a02b302520bc26e5be65ba7b2a /include/net
parent769162e38b91e1d300752e666260fa6c7b203fbc (diff)
parent36eb22e97a2b621fb707eead58ef915ab0f46e9e (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci.h11
-rw-r--r--include/net/bluetooth/hci_core.h8
-rw-r--r--include/net/bluetooth/l2cap.h5
-rw-r--r--include/net/bluetooth/mgmt.h2
-rw-r--r--include/net/cfg80211.h107
-rw-r--r--include/net/mac80211.h40
-rw-r--r--include/net/regulatory.h5
7 files changed, 111 insertions, 67 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 2a6b0b8b7120..ccd723e0f783 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -139,11 +139,12 @@ enum {
139#define HCIINQUIRY _IOR('H', 240, int) 139#define HCIINQUIRY _IOR('H', 240, int)
140 140
141/* HCI timeouts */ 141/* HCI timeouts */
142#define HCI_DISCONN_TIMEOUT (2000) /* 2 seconds */ 142#define HCI_DISCONN_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */
143#define HCI_PAIRING_TIMEOUT (60000) /* 60 seconds */ 143#define HCI_PAIRING_TIMEOUT msecs_to_jiffies(60000) /* 60 seconds */
144#define HCI_INIT_TIMEOUT (10000) /* 10 seconds */ 144#define HCI_INIT_TIMEOUT msecs_to_jiffies(10000) /* 10 seconds */
145#define HCI_CMD_TIMEOUT (1000) /* 1 seconds */ 145#define HCI_CMD_TIMEOUT msecs_to_jiffies(1000) /* 1 second */
146#define HCI_ACL_TX_TIMEOUT (45000) /* 45 seconds */ 146#define HCI_ACL_TX_TIMEOUT msecs_to_jiffies(45000) /* 45 seconds */
147#define HCI_AUTO_OFF_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */
147 148
148/* HCI data types */ 149/* HCI data types */
149#define HCI_COMMAND_PKT 0x01 150#define HCI_COMMAND_PKT 0x01
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 20fd57367ddc..475b8c04ba52 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -587,18 +587,24 @@ void hci_conn_put_device(struct hci_conn *conn);
587 587
588static inline void hci_conn_hold(struct hci_conn *conn) 588static inline void hci_conn_hold(struct hci_conn *conn)
589{ 589{
590 BT_DBG("hcon %p refcnt %d -> %d", conn, atomic_read(&conn->refcnt),
591 atomic_read(&conn->refcnt) + 1);
592
590 atomic_inc(&conn->refcnt); 593 atomic_inc(&conn->refcnt);
591 cancel_delayed_work(&conn->disc_work); 594 cancel_delayed_work(&conn->disc_work);
592} 595}
593 596
594static inline void hci_conn_put(struct hci_conn *conn) 597static inline void hci_conn_put(struct hci_conn *conn)
595{ 598{
599 BT_DBG("hcon %p refcnt %d -> %d", conn, atomic_read(&conn->refcnt),
600 atomic_read(&conn->refcnt) - 1);
601
596 if (atomic_dec_and_test(&conn->refcnt)) { 602 if (atomic_dec_and_test(&conn->refcnt)) {
597 unsigned long timeo; 603 unsigned long timeo;
598 if (conn->type == ACL_LINK || conn->type == LE_LINK) { 604 if (conn->type == ACL_LINK || conn->type == LE_LINK) {
599 del_timer(&conn->idle_timer); 605 del_timer(&conn->idle_timer);
600 if (conn->state == BT_CONNECTED) { 606 if (conn->state == BT_CONNECTED) {
601 timeo = msecs_to_jiffies(conn->disc_timeout); 607 timeo = conn->disc_timeout;
602 if (!conn->out) 608 if (!conn->out)
603 timeo *= 2; 609 timeo *= 2;
604 } else { 610 } else {
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index d80e3f0691b4..a7679f8913d2 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -464,6 +464,7 @@ struct l2cap_chan {
464 464
465 __u16 tx_win; 465 __u16 tx_win;
466 __u16 tx_win_max; 466 __u16 tx_win_max;
467 __u16 ack_win;
467 __u8 max_tx; 468 __u8 max_tx;
468 __u16 retrans_timeout; 469 __u16 retrans_timeout;
469 __u16 monitor_timeout; 470 __u16 monitor_timeout;
@@ -672,11 +673,15 @@ enum {
672 673
673static inline void l2cap_chan_hold(struct l2cap_chan *c) 674static inline void l2cap_chan_hold(struct l2cap_chan *c)
674{ 675{
676 BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt));
677
675 atomic_inc(&c->refcnt); 678 atomic_inc(&c->refcnt);
676} 679}
677 680
678static inline void l2cap_chan_put(struct l2cap_chan *c) 681static inline void l2cap_chan_put(struct l2cap_chan *c)
679{ 682{
683 BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt));
684
680 if (atomic_dec_and_test(&c->refcnt)) 685 if (atomic_dec_and_test(&c->refcnt))
681 kfree(c); 686 kfree(c);
682} 687}
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 23fd0546fccb..4348ee8bda69 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -444,7 +444,7 @@ struct mgmt_ev_auth_failed {
444struct mgmt_ev_device_found { 444struct mgmt_ev_device_found {
445 struct mgmt_addr_info addr; 445 struct mgmt_addr_info addr;
446 __s8 rssi; 446 __s8 rssi;
447 __u8 flags[4]; 447 __le32 flags;
448 __le16 eir_len; 448 __le16 eir_len;
449 __u8 eir[0]; 449 __u8 eir[0];
450} __packed; 450} __packed;
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 51f67a9003a9..493fa0c79005 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -999,7 +999,7 @@ struct cfg80211_ssid {
999 * @ie_len: length of ie in octets 999 * @ie_len: length of ie in octets
1000 * @rates: bitmap of rates to advertise for each band 1000 * @rates: bitmap of rates to advertise for each band
1001 * @wiphy: the wiphy this was for 1001 * @wiphy: the wiphy this was for
1002 * @dev: the interface 1002 * @wdev: the wireless device to scan for
1003 * @aborted: (internal) scan request was notified as aborted 1003 * @aborted: (internal) scan request was notified as aborted
1004 * @no_cck: used to send probe requests at non CCK rate in 2GHz band 1004 * @no_cck: used to send probe requests at non CCK rate in 2GHz band
1005 */ 1005 */
@@ -1012,9 +1012,10 @@ struct cfg80211_scan_request {
1012 1012
1013 u32 rates[IEEE80211_NUM_BANDS]; 1013 u32 rates[IEEE80211_NUM_BANDS];
1014 1014
1015 struct wireless_dev *wdev;
1016
1015 /* internal */ 1017 /* internal */
1016 struct wiphy *wiphy; 1018 struct wiphy *wiphy;
1017 struct net_device *dev;
1018 bool aborted; 1019 bool aborted;
1019 bool no_cck; 1020 bool no_cck;
1020 1021
@@ -1435,10 +1436,10 @@ struct cfg80211_gtk_rekey_data {
1435 * 1436 *
1436 * @add_virtual_intf: create a new virtual interface with the given name, 1437 * @add_virtual_intf: create a new virtual interface with the given name,
1437 * must set the struct wireless_dev's iftype. Beware: You must create 1438 * must set the struct wireless_dev's iftype. Beware: You must create
1438 * the new netdev in the wiphy's network namespace! Returns the netdev, 1439 * the new netdev in the wiphy's network namespace! Returns the struct
1439 * or an ERR_PTR. 1440 * wireless_dev, or an ERR_PTR.
1440 * 1441 *
1441 * @del_virtual_intf: remove the virtual interface determined by ifindex. 1442 * @del_virtual_intf: remove the virtual interface
1442 * 1443 *
1443 * @change_virtual_intf: change type/configuration of virtual interface, 1444 * @change_virtual_intf: change type/configuration of virtual interface,
1444 * keep the struct wireless_dev's iftype updated. 1445 * keep the struct wireless_dev's iftype updated.
@@ -1503,8 +1504,6 @@ struct cfg80211_gtk_rekey_data {
1503 * interfaces are active this callback should reject the configuration. 1504 * interfaces are active this callback should reject the configuration.
1504 * If no interfaces are active or the device is down, the channel should 1505 * If no interfaces are active or the device is down, the channel should
1505 * be stored for when a monitor interface becomes active. 1506 * be stored for when a monitor interface becomes active.
1506 * @set_monitor_enabled: Notify driver that there are only monitor
1507 * interfaces running.
1508 * 1507 *
1509 * @scan: Request to do a scan. If returning zero, the scan request is given 1508 * @scan: Request to do a scan. If returning zero, the scan request is given
1510 * the driver, and will be valid until passed to cfg80211_scan_done(). 1509 * the driver, and will be valid until passed to cfg80211_scan_done().
@@ -1574,6 +1573,8 @@ struct cfg80211_gtk_rekey_data {
1574 * @set_power_mgmt: Configure WLAN power management. A timeout value of -1 1573 * @set_power_mgmt: Configure WLAN power management. A timeout value of -1
1575 * allows the driver to adjust the dynamic ps timeout value. 1574 * allows the driver to adjust the dynamic ps timeout value.
1576 * @set_cqm_rssi_config: Configure connection quality monitor RSSI threshold. 1575 * @set_cqm_rssi_config: Configure connection quality monitor RSSI threshold.
1576 * @set_cqm_txe_config: Configure connection quality monitor TX error
1577 * thresholds.
1577 * @sched_scan_start: Tell the driver to start a scheduled scan. 1578 * @sched_scan_start: Tell the driver to start a scheduled scan.
1578 * @sched_scan_stop: Tell the driver to stop an ongoing scheduled 1579 * @sched_scan_stop: Tell the driver to stop an ongoing scheduled
1579 * scan. The driver_initiated flag specifies whether the driver 1580 * scan. The driver_initiated flag specifies whether the driver
@@ -1611,18 +1612,23 @@ struct cfg80211_gtk_rekey_data {
1611 * @get_et_strings: Ethtool API to get a set of strings to describe stats 1612 * @get_et_strings: Ethtool API to get a set of strings to describe stats
1612 * and perhaps other supported types of ethtool data-sets. 1613 * and perhaps other supported types of ethtool data-sets.
1613 * See @ethtool_ops.get_strings 1614 * See @ethtool_ops.get_strings
1615 *
1616 * @get_channel: Get the current operating channel for the virtual interface.
1617 * For monitor interfaces, it should return %NULL unless there's a single
1618 * current monitoring channel.
1614 */ 1619 */
1615struct cfg80211_ops { 1620struct cfg80211_ops {
1616 int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); 1621 int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
1617 int (*resume)(struct wiphy *wiphy); 1622 int (*resume)(struct wiphy *wiphy);
1618 void (*set_wakeup)(struct wiphy *wiphy, bool enabled); 1623 void (*set_wakeup)(struct wiphy *wiphy, bool enabled);
1619 1624
1620 struct net_device * (*add_virtual_intf)(struct wiphy *wiphy, 1625 struct wireless_dev * (*add_virtual_intf)(struct wiphy *wiphy,
1621 char *name, 1626 char *name,
1622 enum nl80211_iftype type, 1627 enum nl80211_iftype type,
1623 u32 *flags, 1628 u32 *flags,
1624 struct vif_params *params); 1629 struct vif_params *params);
1625 int (*del_virtual_intf)(struct wiphy *wiphy, struct net_device *dev); 1630 int (*del_virtual_intf)(struct wiphy *wiphy,
1631 struct wireless_dev *wdev);
1626 int (*change_virtual_intf)(struct wiphy *wiphy, 1632 int (*change_virtual_intf)(struct wiphy *wiphy,
1627 struct net_device *dev, 1633 struct net_device *dev,
1628 enum nl80211_iftype type, u32 *flags, 1634 enum nl80211_iftype type, u32 *flags,
@@ -1699,7 +1705,7 @@ struct cfg80211_ops {
1699 struct ieee80211_channel *chan, 1705 struct ieee80211_channel *chan,
1700 enum nl80211_channel_type channel_type); 1706 enum nl80211_channel_type channel_type);
1701 1707
1702 int (*scan)(struct wiphy *wiphy, struct net_device *dev, 1708 int (*scan)(struct wiphy *wiphy,
1703 struct cfg80211_scan_request *request); 1709 struct cfg80211_scan_request *request);
1704 1710
1705 int (*auth)(struct wiphy *wiphy, struct net_device *dev, 1711 int (*auth)(struct wiphy *wiphy, struct net_device *dev,
@@ -1753,23 +1759,23 @@ struct cfg80211_ops {
1753 int (*flush_pmksa)(struct wiphy *wiphy, struct net_device *netdev); 1759 int (*flush_pmksa)(struct wiphy *wiphy, struct net_device *netdev);
1754 1760
1755 int (*remain_on_channel)(struct wiphy *wiphy, 1761 int (*remain_on_channel)(struct wiphy *wiphy,
1756 struct net_device *dev, 1762 struct wireless_dev *wdev,
1757 struct ieee80211_channel *chan, 1763 struct ieee80211_channel *chan,
1758 enum nl80211_channel_type channel_type, 1764 enum nl80211_channel_type channel_type,
1759 unsigned int duration, 1765 unsigned int duration,
1760 u64 *cookie); 1766 u64 *cookie);
1761 int (*cancel_remain_on_channel)(struct wiphy *wiphy, 1767 int (*cancel_remain_on_channel)(struct wiphy *wiphy,
1762 struct net_device *dev, 1768 struct wireless_dev *wdev,
1763 u64 cookie); 1769 u64 cookie);
1764 1770
1765 int (*mgmt_tx)(struct wiphy *wiphy, struct net_device *dev, 1771 int (*mgmt_tx)(struct wiphy *wiphy, struct wireless_dev *wdev,
1766 struct ieee80211_channel *chan, bool offchan, 1772 struct ieee80211_channel *chan, bool offchan,
1767 enum nl80211_channel_type channel_type, 1773 enum nl80211_channel_type channel_type,
1768 bool channel_type_valid, unsigned int wait, 1774 bool channel_type_valid, unsigned int wait,
1769 const u8 *buf, size_t len, bool no_cck, 1775 const u8 *buf, size_t len, bool no_cck,
1770 bool dont_wait_for_ack, u64 *cookie); 1776 bool dont_wait_for_ack, u64 *cookie);
1771 int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy, 1777 int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy,
1772 struct net_device *dev, 1778 struct wireless_dev *wdev,
1773 u64 cookie); 1779 u64 cookie);
1774 1780
1775 int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, 1781 int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev,
@@ -1779,8 +1785,12 @@ struct cfg80211_ops {
1779 struct net_device *dev, 1785 struct net_device *dev,
1780 s32 rssi_thold, u32 rssi_hyst); 1786 s32 rssi_thold, u32 rssi_hyst);
1781 1787
1788 int (*set_cqm_txe_config)(struct wiphy *wiphy,
1789 struct net_device *dev,
1790 u32 rate, u32 pkts, u32 intvl);
1791
1782 void (*mgmt_frame_register)(struct wiphy *wiphy, 1792 void (*mgmt_frame_register)(struct wiphy *wiphy,
1783 struct net_device *dev, 1793 struct wireless_dev *wdev,
1784 u16 frame_type, bool reg); 1794 u16 frame_type, bool reg);
1785 1795
1786 int (*set_antenna)(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant); 1796 int (*set_antenna)(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant);
@@ -1818,7 +1828,10 @@ struct cfg80211_ops {
1818 void (*get_et_strings)(struct wiphy *wiphy, struct net_device *dev, 1828 void (*get_et_strings)(struct wiphy *wiphy, struct net_device *dev,
1819 u32 sset, u8 *data); 1829 u32 sset, u8 *data);
1820 1830
1821 void (*set_monitor_enabled)(struct wiphy *wiphy, bool enabled); 1831 struct ieee80211_channel *
1832 (*get_channel)(struct wiphy *wiphy,
1833 struct wireless_dev *wdev,
1834 enum nl80211_channel_type *type);
1822}; 1835};
1823 1836
1824/* 1837/*
@@ -2341,17 +2354,25 @@ struct cfg80211_internal_bss;
2341struct cfg80211_cached_keys; 2354struct cfg80211_cached_keys;
2342 2355
2343/** 2356/**
2344 * struct wireless_dev - wireless per-netdev state 2357 * struct wireless_dev - wireless device state
2358 *
2359 * For netdevs, this structure must be allocated by the driver
2360 * that uses the ieee80211_ptr field in struct net_device (this
2361 * is intentional so it can be allocated along with the netdev.)
2362 * It need not be registered then as netdev registration will
2363 * be intercepted by cfg80211 to see the new wireless device.
2345 * 2364 *
2346 * This structure must be allocated by the driver/stack 2365 * For non-netdev uses, it must also be allocated by the driver
2347 * that uses the ieee80211_ptr field in struct net_device 2366 * in response to the cfg80211 callbacks that require it, as
2348 * (this is intentional so it can be allocated along with 2367 * there's no netdev registration in that case it may not be
2349 * the netdev.) 2368 * allocated outside of callback operations that return it.
2350 * 2369 *
2351 * @wiphy: pointer to hardware description 2370 * @wiphy: pointer to hardware description
2352 * @iftype: interface type 2371 * @iftype: interface type
2353 * @list: (private) Used to collect the interfaces 2372 * @list: (private) Used to collect the interfaces
2354 * @netdev: (private) Used to reference back to the netdev 2373 * @netdev: (private) Used to reference back to the netdev, may be %NULL
2374 * @identifier: (private) Identifier used in nl80211 to identify this
2375 * wireless device if it has no netdev
2355 * @current_bss: (private) Used by the internal configuration code 2376 * @current_bss: (private) Used by the internal configuration code
2356 * @channel: (private) Used by the internal configuration code to track 2377 * @channel: (private) Used by the internal configuration code to track
2357 * the user-set AP, monitor and WDS channel 2378 * the user-set AP, monitor and WDS channel
@@ -2383,6 +2404,8 @@ struct wireless_dev {
2383 struct list_head list; 2404 struct list_head list;
2384 struct net_device *netdev; 2405 struct net_device *netdev;
2385 2406
2407 u32 identifier;
2408
2386 struct list_head mgmt_registrations; 2409 struct list_head mgmt_registrations;
2387 spinlock_t mgmt_registrations_lock; 2410 spinlock_t mgmt_registrations_lock;
2388 2411
@@ -3269,7 +3292,7 @@ void cfg80211_disconnected(struct net_device *dev, u16 reason,
3269 3292
3270/** 3293/**
3271 * cfg80211_ready_on_channel - notification of remain_on_channel start 3294 * cfg80211_ready_on_channel - notification of remain_on_channel start
3272 * @dev: network device 3295 * @wdev: wireless device
3273 * @cookie: the request cookie 3296 * @cookie: the request cookie
3274 * @chan: The current channel (from remain_on_channel request) 3297 * @chan: The current channel (from remain_on_channel request)
3275 * @channel_type: Channel type 3298 * @channel_type: Channel type
@@ -3277,21 +3300,20 @@ void cfg80211_disconnected(struct net_device *dev, u16 reason,
3277 * channel 3300 * channel
3278 * @gfp: allocation flags 3301 * @gfp: allocation flags
3279 */ 3302 */
3280void cfg80211_ready_on_channel(struct net_device *dev, u64 cookie, 3303void cfg80211_ready_on_channel(struct wireless_dev *wdev, u64 cookie,
3281 struct ieee80211_channel *chan, 3304 struct ieee80211_channel *chan,
3282 enum nl80211_channel_type channel_type, 3305 enum nl80211_channel_type channel_type,
3283 unsigned int duration, gfp_t gfp); 3306 unsigned int duration, gfp_t gfp);
3284 3307
3285/** 3308/**
3286 * cfg80211_remain_on_channel_expired - remain_on_channel duration expired 3309 * cfg80211_remain_on_channel_expired - remain_on_channel duration expired
3287 * @dev: network device 3310 * @wdev: wireless device
3288 * @cookie: the request cookie 3311 * @cookie: the request cookie
3289 * @chan: The current channel (from remain_on_channel request) 3312 * @chan: The current channel (from remain_on_channel request)
3290 * @channel_type: Channel type 3313 * @channel_type: Channel type
3291 * @gfp: allocation flags 3314 * @gfp: allocation flags
3292 */ 3315 */
3293void cfg80211_remain_on_channel_expired(struct net_device *dev, 3316void cfg80211_remain_on_channel_expired(struct wireless_dev *wdev, u64 cookie,
3294 u64 cookie,
3295 struct ieee80211_channel *chan, 3317 struct ieee80211_channel *chan,
3296 enum nl80211_channel_type channel_type, 3318 enum nl80211_channel_type channel_type,
3297 gfp_t gfp); 3319 gfp_t gfp);
@@ -3319,7 +3341,7 @@ void cfg80211_del_sta(struct net_device *dev, const u8 *mac_addr, gfp_t gfp);
3319 3341
3320/** 3342/**
3321 * cfg80211_rx_mgmt - notification of received, unprocessed management frame 3343 * cfg80211_rx_mgmt - notification of received, unprocessed management frame
3322 * @dev: network device 3344 * @wdev: wireless device receiving the frame
3323 * @freq: Frequency on which the frame was received in MHz 3345 * @freq: Frequency on which the frame was received in MHz
3324 * @sig_dbm: signal strength in mBm, or 0 if unknown 3346 * @sig_dbm: signal strength in mBm, or 0 if unknown
3325 * @buf: Management frame (header + body) 3347 * @buf: Management frame (header + body)
@@ -3334,12 +3356,12 @@ void cfg80211_del_sta(struct net_device *dev, const u8 *mac_addr, gfp_t gfp);
3334 * This function is called whenever an Action frame is received for a station 3356 * This function is called whenever an Action frame is received for a station
3335 * mode interface, but is not processed in kernel. 3357 * mode interface, but is not processed in kernel.
3336 */ 3358 */
3337bool cfg80211_rx_mgmt(struct net_device *dev, int freq, int sig_dbm, 3359bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm,
3338 const u8 *buf, size_t len, gfp_t gfp); 3360 const u8 *buf, size_t len, gfp_t gfp);
3339 3361
3340/** 3362/**
3341 * cfg80211_mgmt_tx_status - notification of TX status for management frame 3363 * cfg80211_mgmt_tx_status - notification of TX status for management frame
3342 * @dev: network device 3364 * @wdev: wireless device receiving the frame
3343 * @cookie: Cookie returned by cfg80211_ops::mgmt_tx() 3365 * @cookie: Cookie returned by cfg80211_ops::mgmt_tx()
3344 * @buf: Management frame (header + body) 3366 * @buf: Management frame (header + body)
3345 * @len: length of the frame data 3367 * @len: length of the frame data
@@ -3350,7 +3372,7 @@ bool cfg80211_rx_mgmt(struct net_device *dev, int freq, int sig_dbm,
3350 * transmitted with cfg80211_ops::mgmt_tx() to report the TX status of the 3372 * transmitted with cfg80211_ops::mgmt_tx() to report the TX status of the
3351 * transmission attempt. 3373 * transmission attempt.
3352 */ 3374 */
3353void cfg80211_mgmt_tx_status(struct net_device *dev, u64 cookie, 3375void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie,
3354 const u8 *buf, size_t len, bool ack, gfp_t gfp); 3376 const u8 *buf, size_t len, bool ack, gfp_t gfp);
3355 3377
3356 3378
@@ -3380,6 +3402,21 @@ void cfg80211_cqm_pktloss_notify(struct net_device *dev,
3380 const u8 *peer, u32 num_packets, gfp_t gfp); 3402 const u8 *peer, u32 num_packets, gfp_t gfp);
3381 3403
3382/** 3404/**
3405 * cfg80211_cqm_txe_notify - TX error rate event
3406 * @dev: network device
3407 * @peer: peer's MAC address
3408 * @num_packets: how many packets were lost
3409 * @rate: % of packets which failed transmission
3410 * @intvl: interval (in s) over which the TX failure threshold was breached.
3411 * @gfp: context flags
3412 *
3413 * Notify userspace when configured % TX failures over number of packets in a
3414 * given interval is exceeded.
3415 */
3416void cfg80211_cqm_txe_notify(struct net_device *dev, const u8 *peer,
3417 u32 num_packets, u32 rate, u32 intvl, gfp_t gfp);
3418
3419/**
3383 * cfg80211_gtk_rekey_notify - notify userspace about driver rekeying 3420 * cfg80211_gtk_rekey_notify - notify userspace about driver rekeying
3384 * @dev: network device 3421 * @dev: network device
3385 * @bssid: BSSID of AP (to avoid races) 3422 * @bssid: BSSID of AP (to avoid races)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index e3fa90ce9ecb..bb86aa6f98dd 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -233,8 +233,10 @@ enum ieee80211_rssi_event {
233 * valid in station mode only while @assoc is true and if also 233 * valid in station mode only while @assoc is true and if also
234 * requested by %IEEE80211_HW_NEED_DTIM_PERIOD (cf. also hw conf 234 * requested by %IEEE80211_HW_NEED_DTIM_PERIOD (cf. also hw conf
235 * @ps_dtim_period) 235 * @ps_dtim_period)
236 * @last_tsf: last beacon's/probe response's TSF timestamp (could be old 236 * @sync_tsf: last beacon's/probe response's TSF timestamp (could be old
237 * as it may have been received during scanning long ago) 237 * as it may have been received during scanning long ago)
238 * @sync_device_ts: the device timestamp corresponding to the sync_tsf,
239 * the driver/device can use this to calculate synchronisation
238 * @beacon_int: beacon interval 240 * @beacon_int: beacon interval
239 * @assoc_capability: capabilities taken from assoc resp 241 * @assoc_capability: capabilities taken from assoc resp
240 * @basic_rates: bitmap of basic rates, each bit stands for an 242 * @basic_rates: bitmap of basic rates, each bit stands for an
@@ -281,7 +283,8 @@ struct ieee80211_bss_conf {
281 u8 dtim_period; 283 u8 dtim_period;
282 u16 beacon_int; 284 u16 beacon_int;
283 u16 assoc_capability; 285 u16 assoc_capability;
284 u64 last_tsf; 286 u64 sync_tsf;
287 u32 sync_device_ts;
285 u32 basic_rates; 288 u32 basic_rates;
286 int mcast_rate[IEEE80211_NUM_BANDS]; 289 int mcast_rate[IEEE80211_NUM_BANDS];
287 u16 ht_operation_mode; 290 u16 ht_operation_mode;
@@ -696,6 +699,8 @@ enum mac80211_rx_flags {
696 * 699 *
697 * @mactime: value in microseconds of the 64-bit Time Synchronization Function 700 * @mactime: value in microseconds of the 64-bit Time Synchronization Function
698 * (TSF) timer when the first data symbol (MPDU) arrived at the hardware. 701 * (TSF) timer when the first data symbol (MPDU) arrived at the hardware.
702 * @device_timestamp: arbitrary timestamp for the device, mac80211 doesn't use
703 * it but can store it and pass it back to the driver for synchronisation
699 * @band: the active band when this frame was received 704 * @band: the active band when this frame was received
700 * @freq: frequency the radio was tuned to when receiving this frame, in MHz 705 * @freq: frequency the radio was tuned to when receiving this frame, in MHz
701 * @signal: signal strength when receiving this frame, either in dBm, in dB or 706 * @signal: signal strength when receiving this frame, either in dBm, in dB or
@@ -709,13 +714,14 @@ enum mac80211_rx_flags {
709 */ 714 */
710struct ieee80211_rx_status { 715struct ieee80211_rx_status {
711 u64 mactime; 716 u64 mactime;
712 enum ieee80211_band band; 717 u32 device_timestamp;
713 int freq; 718 u16 flag;
714 int signal; 719 u16 freq;
715 int antenna; 720 u8 rate_idx;
716 int rate_idx; 721 u8 rx_flags;
717 int flag; 722 u8 band;
718 unsigned int rx_flags; 723 u8 antenna;
724 s8 signal;
719}; 725};
720 726
721/** 727/**
@@ -3592,22 +3598,6 @@ void ieee80211_request_smps(struct ieee80211_vif *vif,
3592 enum ieee80211_smps_mode smps_mode); 3598 enum ieee80211_smps_mode smps_mode);
3593 3599
3594/** 3600/**
3595 * ieee80211_key_removed - disable hw acceleration for key
3596 * @key_conf: The key hw acceleration should be disabled for
3597 *
3598 * This allows drivers to indicate that the given key has been
3599 * removed from hardware acceleration, due to a new key that
3600 * was added. Don't use this if the key can continue to be used
3601 * for TX, if the key restriction is on RX only it is permitted
3602 * to keep the key for TX only and not call this function.
3603 *
3604 * Due to locking constraints, it may only be called during
3605 * @set_key. This function must be allowed to sleep, and the
3606 * key it tries to disable may still be used until it returns.
3607 */
3608void ieee80211_key_removed(struct ieee80211_key_conf *key_conf);
3609
3610/**
3611 * ieee80211_ready_on_channel - notification of remain-on-channel start 3601 * ieee80211_ready_on_channel - notification of remain-on-channel start
3612 * @hw: pointer as obtained from ieee80211_alloc_hw() 3602 * @hw: pointer as obtained from ieee80211_alloc_hw()
3613 */ 3603 */
diff --git a/include/net/regulatory.h b/include/net/regulatory.h
index a5f79933e211..7dcaa2794fde 100644
--- a/include/net/regulatory.h
+++ b/include/net/regulatory.h
@@ -52,6 +52,10 @@ enum environment_cap {
52 * DFS master operation on a known DFS region (NL80211_DFS_*), 52 * DFS master operation on a known DFS region (NL80211_DFS_*),
53 * dfs_region represents that region. Drivers can use this and the 53 * dfs_region represents that region. Drivers can use this and the
54 * @alpha2 to adjust their device's DFS parameters as required. 54 * @alpha2 to adjust their device's DFS parameters as required.
55 * @user_reg_hint_type: if the @initiator was of type
56 * %NL80211_REGDOM_SET_BY_USER, this classifies the type
57 * of hint passed. This could be any of the %NL80211_USER_REG_HINT_*
58 * types.
55 * @intersect: indicates whether the wireless core should intersect 59 * @intersect: indicates whether the wireless core should intersect
56 * the requested regulatory domain with the presently set regulatory 60 * the requested regulatory domain with the presently set regulatory
57 * domain. 61 * domain.
@@ -70,6 +74,7 @@ enum environment_cap {
70struct regulatory_request { 74struct regulatory_request {
71 int wiphy_idx; 75 int wiphy_idx;
72 enum nl80211_reg_initiator initiator; 76 enum nl80211_reg_initiator initiator;
77 enum nl80211_user_reg_hint_type user_reg_hint_type;
73 char alpha2[2]; 78 char alpha2[2];
74 u8 dfs_region; 79 u8 dfs_region;
75 bool intersect; 80 bool intersect;