diff options
Diffstat (limited to 'net/wireless/ibss.c')
-rw-r--r-- | net/wireless/ibss.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index c88338911979..6a5acf750174 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <linux/etherdevice.h> | 7 | #include <linux/etherdevice.h> |
8 | #include <linux/if_arp.h> | 8 | #include <linux/if_arp.h> |
9 | #include <linux/slab.h> | ||
9 | #include <net/cfg80211.h> | 10 | #include <net/cfg80211.h> |
10 | #include "wext-compat.h" | 11 | #include "wext-compat.h" |
11 | #include "nl80211.h" | 12 | #include "nl80211.h" |
@@ -15,7 +16,7 @@ void __cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid) | |||
15 | { | 16 | { |
16 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 17 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
17 | struct cfg80211_bss *bss; | 18 | struct cfg80211_bss *bss; |
18 | #ifdef CONFIG_WIRELESS_EXT | 19 | #ifdef CONFIG_CFG80211_WEXT |
19 | union iwreq_data wrqu; | 20 | union iwreq_data wrqu; |
20 | #endif | 21 | #endif |
21 | 22 | ||
@@ -44,7 +45,7 @@ void __cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid) | |||
44 | 45 | ||
45 | nl80211_send_ibss_bssid(wiphy_to_dev(wdev->wiphy), dev, bssid, | 46 | nl80211_send_ibss_bssid(wiphy_to_dev(wdev->wiphy), dev, bssid, |
46 | GFP_KERNEL); | 47 | GFP_KERNEL); |
47 | #ifdef CONFIG_WIRELESS_EXT | 48 | #ifdef CONFIG_CFG80211_WEXT |
48 | memset(&wrqu, 0, sizeof(wrqu)); | 49 | memset(&wrqu, 0, sizeof(wrqu)); |
49 | memcpy(wrqu.ap_addr.sa_data, bssid, ETH_ALEN); | 50 | memcpy(wrqu.ap_addr.sa_data, bssid, ETH_ALEN); |
50 | wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); | 51 | wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); |
@@ -70,7 +71,7 @@ void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp) | |||
70 | spin_lock_irqsave(&wdev->event_lock, flags); | 71 | spin_lock_irqsave(&wdev->event_lock, flags); |
71 | list_add_tail(&ev->list, &wdev->event_list); | 72 | list_add_tail(&ev->list, &wdev->event_list); |
72 | spin_unlock_irqrestore(&wdev->event_lock, flags); | 73 | spin_unlock_irqrestore(&wdev->event_lock, flags); |
73 | schedule_work(&rdev->event_work); | 74 | queue_work(cfg80211_wq, &rdev->event_work); |
74 | } | 75 | } |
75 | EXPORT_SYMBOL(cfg80211_ibss_joined); | 76 | EXPORT_SYMBOL(cfg80211_ibss_joined); |
76 | 77 | ||
@@ -96,7 +97,7 @@ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, | |||
96 | kfree(wdev->connect_keys); | 97 | kfree(wdev->connect_keys); |
97 | wdev->connect_keys = connkeys; | 98 | wdev->connect_keys = connkeys; |
98 | 99 | ||
99 | #ifdef CONFIG_WIRELESS_EXT | 100 | #ifdef CONFIG_CFG80211_WEXT |
100 | wdev->wext.ibss.channel = params->channel; | 101 | wdev->wext.ibss.channel = params->channel; |
101 | #endif | 102 | #endif |
102 | err = rdev->ops->join_ibss(&rdev->wiphy, dev, params); | 103 | err = rdev->ops->join_ibss(&rdev->wiphy, dev, params); |
@@ -154,7 +155,7 @@ static void __cfg80211_clear_ibss(struct net_device *dev, bool nowext) | |||
154 | 155 | ||
155 | wdev->current_bss = NULL; | 156 | wdev->current_bss = NULL; |
156 | wdev->ssid_len = 0; | 157 | wdev->ssid_len = 0; |
157 | #ifdef CONFIG_WIRELESS_EXT | 158 | #ifdef CONFIG_CFG80211_WEXT |
158 | if (!nowext) | 159 | if (!nowext) |
159 | wdev->wext.ibss.ssid_len = 0; | 160 | wdev->wext.ibss.ssid_len = 0; |
160 | #endif | 161 | #endif |
@@ -169,8 +170,8 @@ void cfg80211_clear_ibss(struct net_device *dev, bool nowext) | |||
169 | wdev_unlock(wdev); | 170 | wdev_unlock(wdev); |
170 | } | 171 | } |
171 | 172 | ||
172 | static int __cfg80211_leave_ibss(struct cfg80211_registered_device *rdev, | 173 | int __cfg80211_leave_ibss(struct cfg80211_registered_device *rdev, |
173 | struct net_device *dev, bool nowext) | 174 | struct net_device *dev, bool nowext) |
174 | { | 175 | { |
175 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 176 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
176 | int err; | 177 | int err; |
@@ -203,7 +204,7 @@ int cfg80211_leave_ibss(struct cfg80211_registered_device *rdev, | |||
203 | return err; | 204 | return err; |
204 | } | 205 | } |
205 | 206 | ||
206 | #ifdef CONFIG_WIRELESS_EXT | 207 | #ifdef CONFIG_CFG80211_WEXT |
207 | int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev, | 208 | int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev, |
208 | struct wireless_dev *wdev) | 209 | struct wireless_dev *wdev) |
209 | { | 210 | { |