diff options
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r-- | net/wireless/core.h | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h index 3563097169cb..8396f7671c8d 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h | |||
@@ -18,6 +18,9 @@ | |||
18 | #include <net/cfg80211.h> | 18 | #include <net/cfg80211.h> |
19 | #include "reg.h" | 19 | #include "reg.h" |
20 | 20 | ||
21 | |||
22 | #define WIPHY_IDX_INVALID -1 | ||
23 | |||
21 | struct cfg80211_registered_device { | 24 | struct cfg80211_registered_device { |
22 | const struct cfg80211_ops *ops; | 25 | const struct cfg80211_ops *ops; |
23 | struct list_head list; | 26 | struct list_head list; |
@@ -86,7 +89,7 @@ struct cfg80211_registered_device { | |||
86 | 89 | ||
87 | /* must be last because of the way we do wiphy_priv(), | 90 | /* must be last because of the way we do wiphy_priv(), |
88 | * and it should at least be aligned to NETDEV_ALIGN */ | 91 | * and it should at least be aligned to NETDEV_ALIGN */ |
89 | struct wiphy wiphy __attribute__((__aligned__(NETDEV_ALIGN))); | 92 | struct wiphy wiphy __aligned(NETDEV_ALIGN); |
90 | }; | 93 | }; |
91 | 94 | ||
92 | static inline | 95 | static inline |
@@ -96,13 +99,6 @@ struct cfg80211_registered_device *wiphy_to_dev(struct wiphy *wiphy) | |||
96 | return container_of(wiphy, struct cfg80211_registered_device, wiphy); | 99 | return container_of(wiphy, struct cfg80211_registered_device, wiphy); |
97 | } | 100 | } |
98 | 101 | ||
99 | /* Note 0 is valid, hence phy0 */ | ||
100 | static inline | ||
101 | bool wiphy_idx_valid(int wiphy_idx) | ||
102 | { | ||
103 | return wiphy_idx >= 0; | ||
104 | } | ||
105 | |||
106 | static inline void | 102 | static inline void |
107 | cfg80211_rdev_free_wowlan(struct cfg80211_registered_device *rdev) | 103 | cfg80211_rdev_free_wowlan(struct cfg80211_registered_device *rdev) |
108 | { | 104 | { |
@@ -126,12 +122,6 @@ static inline void assert_cfg80211_lock(void) | |||
126 | lockdep_assert_held(&cfg80211_mutex); | 122 | lockdep_assert_held(&cfg80211_mutex); |
127 | } | 123 | } |
128 | 124 | ||
129 | /* | ||
130 | * You can use this to mark a wiphy_idx as not having an associated wiphy. | ||
131 | * It guarantees cfg80211_rdev_by_wiphy_idx(wiphy_idx) will return NULL | ||
132 | */ | ||
133 | #define WIPHY_IDX_STALE -1 | ||
134 | |||
135 | struct cfg80211_internal_bss { | 125 | struct cfg80211_internal_bss { |
136 | struct list_head list; | 126 | struct list_head list; |
137 | struct rb_node rbn; | 127 | struct rb_node rbn; |
@@ -435,7 +425,8 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, | |||
435 | struct wireless_dev *wdev, | 425 | struct wireless_dev *wdev, |
436 | enum nl80211_iftype iftype, | 426 | enum nl80211_iftype iftype, |
437 | struct ieee80211_channel *chan, | 427 | struct ieee80211_channel *chan, |
438 | enum cfg80211_chan_mode chanmode); | 428 | enum cfg80211_chan_mode chanmode, |
429 | u8 radar_detect); | ||
439 | 430 | ||
440 | static inline int | 431 | static inline int |
441 | cfg80211_can_change_interface(struct cfg80211_registered_device *rdev, | 432 | cfg80211_can_change_interface(struct cfg80211_registered_device *rdev, |
@@ -443,7 +434,7 @@ cfg80211_can_change_interface(struct cfg80211_registered_device *rdev, | |||
443 | enum nl80211_iftype iftype) | 434 | enum nl80211_iftype iftype) |
444 | { | 435 | { |
445 | return cfg80211_can_use_iftype_chan(rdev, wdev, iftype, NULL, | 436 | return cfg80211_can_use_iftype_chan(rdev, wdev, iftype, NULL, |
446 | CHAN_MODE_UNDEFINED); | 437 | CHAN_MODE_UNDEFINED, 0); |
447 | } | 438 | } |
448 | 439 | ||
449 | static inline int | 440 | static inline int |
@@ -460,7 +451,7 @@ cfg80211_can_use_chan(struct cfg80211_registered_device *rdev, | |||
460 | enum cfg80211_chan_mode chanmode) | 451 | enum cfg80211_chan_mode chanmode) |
461 | { | 452 | { |
462 | return cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype, | 453 | return cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype, |
463 | chan, chanmode); | 454 | chan, chanmode, 0); |
464 | } | 455 | } |
465 | 456 | ||
466 | void | 457 | void |