diff options
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r-- | net/wireless/core.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h index 26a0a084e16b..bf0fb40e3c8b 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h | |||
@@ -60,8 +60,10 @@ struct cfg80211_registered_device { | |||
60 | struct rb_root bss_tree; | 60 | struct rb_root bss_tree; |
61 | u32 bss_generation; | 61 | u32 bss_generation; |
62 | struct cfg80211_scan_request *scan_req; /* protected by RTNL */ | 62 | struct cfg80211_scan_request *scan_req; /* protected by RTNL */ |
63 | struct cfg80211_sched_scan_request *sched_scan_req; | ||
63 | unsigned long suspend_at; | 64 | unsigned long suspend_at; |
64 | struct work_struct scan_done_wk; | 65 | struct work_struct scan_done_wk; |
66 | struct work_struct sched_scan_results_wk; | ||
65 | 67 | ||
66 | #ifdef CONFIG_NL80211_TESTMODE | 68 | #ifdef CONFIG_NL80211_TESTMODE |
67 | struct genl_info *testmode_info; | 69 | struct genl_info *testmode_info; |
@@ -70,6 +72,8 @@ struct cfg80211_registered_device { | |||
70 | struct work_struct conn_work; | 72 | struct work_struct conn_work; |
71 | struct work_struct event_work; | 73 | struct work_struct event_work; |
72 | 74 | ||
75 | struct cfg80211_wowlan *wowlan; | ||
76 | |||
73 | /* must be last because of the way we do wiphy_priv(), | 77 | /* must be last because of the way we do wiphy_priv(), |
74 | * and it should at least be aligned to NETDEV_ALIGN */ | 78 | * and it should at least be aligned to NETDEV_ALIGN */ |
75 | struct wiphy wiphy __attribute__((__aligned__(NETDEV_ALIGN))); | 79 | struct wiphy wiphy __attribute__((__aligned__(NETDEV_ALIGN))); |
@@ -89,6 +93,18 @@ bool wiphy_idx_valid(int wiphy_idx) | |||
89 | return wiphy_idx >= 0; | 93 | return wiphy_idx >= 0; |
90 | } | 94 | } |
91 | 95 | ||
96 | static inline void | ||
97 | cfg80211_rdev_free_wowlan(struct cfg80211_registered_device *rdev) | ||
98 | { | ||
99 | int i; | ||
100 | |||
101 | if (!rdev->wowlan) | ||
102 | return; | ||
103 | for (i = 0; i < rdev->wowlan->n_patterns; i++) | ||
104 | kfree(rdev->wowlan->patterns[i].mask); | ||
105 | kfree(rdev->wowlan->patterns); | ||
106 | kfree(rdev->wowlan); | ||
107 | } | ||
92 | 108 | ||
93 | extern struct workqueue_struct *cfg80211_wq; | 109 | extern struct workqueue_struct *cfg80211_wq; |
94 | extern struct mutex cfg80211_mutex; | 110 | extern struct mutex cfg80211_mutex; |
@@ -397,12 +413,26 @@ void cfg80211_sme_rx_auth(struct net_device *dev, const u8 *buf, size_t len); | |||
397 | void cfg80211_sme_disassoc(struct net_device *dev, int idx); | 413 | void cfg80211_sme_disassoc(struct net_device *dev, int idx); |
398 | void __cfg80211_scan_done(struct work_struct *wk); | 414 | void __cfg80211_scan_done(struct work_struct *wk); |
399 | void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev, bool leak); | 415 | void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev, bool leak); |
416 | void __cfg80211_sched_scan_results(struct work_struct *wk); | ||
417 | int __cfg80211_stop_sched_scan(struct cfg80211_registered_device *rdev, | ||
418 | bool driver_initiated); | ||
400 | void cfg80211_upload_connect_keys(struct wireless_dev *wdev); | 419 | void cfg80211_upload_connect_keys(struct wireless_dev *wdev); |
401 | int cfg80211_change_iface(struct cfg80211_registered_device *rdev, | 420 | int cfg80211_change_iface(struct cfg80211_registered_device *rdev, |
402 | struct net_device *dev, enum nl80211_iftype ntype, | 421 | struct net_device *dev, enum nl80211_iftype ntype, |
403 | u32 *flags, struct vif_params *params); | 422 | u32 *flags, struct vif_params *params); |
404 | void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev); | 423 | void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev); |
405 | 424 | ||
425 | int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev, | ||
426 | struct wireless_dev *wdev, | ||
427 | enum nl80211_iftype iftype); | ||
428 | |||
429 | static inline int | ||
430 | cfg80211_can_add_interface(struct cfg80211_registered_device *rdev, | ||
431 | enum nl80211_iftype iftype) | ||
432 | { | ||
433 | return cfg80211_can_change_interface(rdev, NULL, iftype); | ||
434 | } | ||
435 | |||
406 | struct ieee80211_channel * | 436 | struct ieee80211_channel * |
407 | rdev_freq_to_chan(struct cfg80211_registered_device *rdev, | 437 | rdev_freq_to_chan(struct cfg80211_registered_device *rdev, |
408 | int freq, enum nl80211_channel_type channel_type); | 438 | int freq, enum nl80211_channel_type channel_type); |
@@ -412,6 +442,9 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev, | |||
412 | 442 | ||
413 | u16 cfg80211_calculate_bitrate(struct rate_info *rate); | 443 | u16 cfg80211_calculate_bitrate(struct rate_info *rate); |
414 | 444 | ||
445 | int cfg80211_validate_beacon_int(struct cfg80211_registered_device *rdev, | ||
446 | u32 beacon_int); | ||
447 | |||
415 | #ifdef CONFIG_CFG80211_DEVELOPER_WARNINGS | 448 | #ifdef CONFIG_CFG80211_DEVELOPER_WARNINGS |
416 | #define CFG80211_DEV_WARN_ON(cond) WARN_ON(cond) | 449 | #define CFG80211_DEV_WARN_ON(cond) WARN_ON(cond) |
417 | #else | 450 | #else |