diff options
author | David S. Miller <davem@davemloft.net> | 2012-08-24 15:18:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-24 15:18:07 -0400 |
commit | 85c21049fc588e0a51b443fe2bad348d18f4992c (patch) | |
tree | 66d800593c25b6be792969152e2dd1fb64581206 /include/net/cfg80211.h | |
parent | 2c33bb37cb69dc6d86d2ee8edd1d4814990a65fe (diff) | |
parent | f20b6213f193f455a62ef9299ceca11f5531dff8 (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
John W. Linville says:
====================
This is a batch of updates intended for 3.7. The bulk of it is
mac80211 changes, including some mesh work from Thomas Pederson and
some multi-channel work from Johannes. A variety of driver updates
and other bits are scattered in there as well.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 3d254e10ff30..ba2e6160fad1 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1439,7 +1439,8 @@ struct cfg80211_gtk_rekey_data { | |||
1439 | * @add_virtual_intf: create a new virtual interface with the given name, | 1439 | * @add_virtual_intf: create a new virtual interface with the given name, |
1440 | * must set the struct wireless_dev's iftype. Beware: You must create | 1440 | * must set the struct wireless_dev's iftype. Beware: You must create |
1441 | * the new netdev in the wiphy's network namespace! Returns the struct | 1441 | * the new netdev in the wiphy's network namespace! Returns the struct |
1442 | * wireless_dev, or an ERR_PTR. | 1442 | * wireless_dev, or an ERR_PTR. For P2P device wdevs, the driver must |
1443 | * also set the address member in the wdev. | ||
1443 | * | 1444 | * |
1444 | * @del_virtual_intf: remove the virtual interface | 1445 | * @del_virtual_intf: remove the virtual interface |
1445 | * | 1446 | * |
@@ -1618,6 +1619,9 @@ struct cfg80211_gtk_rekey_data { | |||
1618 | * @get_channel: Get the current operating channel for the virtual interface. | 1619 | * @get_channel: Get the current operating channel for the virtual interface. |
1619 | * For monitor interfaces, it should return %NULL unless there's a single | 1620 | * For monitor interfaces, it should return %NULL unless there's a single |
1620 | * current monitoring channel. | 1621 | * current monitoring channel. |
1622 | * | ||
1623 | * @start_p2p_device: Start the given P2P device. | ||
1624 | * @stop_p2p_device: Stop the given P2P device. | ||
1621 | */ | 1625 | */ |
1622 | struct cfg80211_ops { | 1626 | struct cfg80211_ops { |
1623 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); | 1627 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); |
@@ -1834,6 +1838,11 @@ struct cfg80211_ops { | |||
1834 | (*get_channel)(struct wiphy *wiphy, | 1838 | (*get_channel)(struct wiphy *wiphy, |
1835 | struct wireless_dev *wdev, | 1839 | struct wireless_dev *wdev, |
1836 | enum nl80211_channel_type *type); | 1840 | enum nl80211_channel_type *type); |
1841 | |||
1842 | int (*start_p2p_device)(struct wiphy *wiphy, | ||
1843 | struct wireless_dev *wdev); | ||
1844 | void (*stop_p2p_device)(struct wiphy *wiphy, | ||
1845 | struct wireless_dev *wdev); | ||
1837 | }; | 1846 | }; |
1838 | 1847 | ||
1839 | /* | 1848 | /* |
@@ -2397,6 +2406,8 @@ struct cfg80211_cached_keys; | |||
2397 | * @cleanup_work: work struct used for cleanup that can't be done directly | 2406 | * @cleanup_work: work struct used for cleanup that can't be done directly |
2398 | * @beacon_interval: beacon interval used on this device for transmitting | 2407 | * @beacon_interval: beacon interval used on this device for transmitting |
2399 | * beacons, 0 when not valid | 2408 | * beacons, 0 when not valid |
2409 | * @address: The address for this device, valid only if @netdev is %NULL | ||
2410 | * @p2p_started: true if this is a P2P Device that has been started | ||
2400 | */ | 2411 | */ |
2401 | struct wireless_dev { | 2412 | struct wireless_dev { |
2402 | struct wiphy *wiphy; | 2413 | struct wiphy *wiphy; |
@@ -2415,7 +2426,9 @@ struct wireless_dev { | |||
2415 | 2426 | ||
2416 | struct work_struct cleanup_work; | 2427 | struct work_struct cleanup_work; |
2417 | 2428 | ||
2418 | bool use_4addr; | 2429 | bool use_4addr, p2p_started; |
2430 | |||
2431 | u8 address[ETH_ALEN] __aligned(sizeof(u16)); | ||
2419 | 2432 | ||
2420 | /* currently used for IBSS and SME - might be rearranged later */ | 2433 | /* currently used for IBSS and SME - might be rearranged later */ |
2421 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 2434 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
@@ -2463,6 +2476,13 @@ struct wireless_dev { | |||
2463 | #endif | 2476 | #endif |
2464 | }; | 2477 | }; |
2465 | 2478 | ||
2479 | static inline u8 *wdev_address(struct wireless_dev *wdev) | ||
2480 | { | ||
2481 | if (wdev->netdev) | ||
2482 | return wdev->netdev->dev_addr; | ||
2483 | return wdev->address; | ||
2484 | } | ||
2485 | |||
2466 | /** | 2486 | /** |
2467 | * wdev_priv - return wiphy priv from wireless_dev | 2487 | * wdev_priv - return wiphy priv from wireless_dev |
2468 | * | 2488 | * |
@@ -3530,6 +3550,22 @@ void cfg80211_ch_switch_notify(struct net_device *dev, int freq, | |||
3530 | */ | 3550 | */ |
3531 | u32 cfg80211_calculate_bitrate(struct rate_info *rate); | 3551 | u32 cfg80211_calculate_bitrate(struct rate_info *rate); |
3532 | 3552 | ||
3553 | /** | ||
3554 | * cfg80211_unregister_wdev - remove the given wdev | ||
3555 | * @wdev: struct wireless_dev to remove | ||
3556 | * | ||
3557 | * Call this function only for wdevs that have no netdev assigned, | ||
3558 | * e.g. P2P Devices. It removes the device from the list so that | ||
3559 | * it can no longer be used. It is necessary to call this function | ||
3560 | * even when cfg80211 requests the removal of the interface by | ||
3561 | * calling the del_virtual_intf() callback. The function must also | ||
3562 | * be called when the driver wishes to unregister the wdev, e.g. | ||
3563 | * when the device is unbound from the driver. | ||
3564 | * | ||
3565 | * Requires the RTNL to be held. | ||
3566 | */ | ||
3567 | void cfg80211_unregister_wdev(struct wireless_dev *wdev); | ||
3568 | |||
3533 | /* Logging, debugging and troubleshooting/diagnostic helpers. */ | 3569 | /* Logging, debugging and troubleshooting/diagnostic helpers. */ |
3534 | 3570 | ||
3535 | /* wiphy_printk helpers, similar to dev_printk */ | 3571 | /* wiphy_printk helpers, similar to dev_printk */ |