diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2009-10-13 07:28:13 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:48:16 -0400 |
commit | ce470613cdfde70f25419cc52a4816315825f5d9 (patch) | |
tree | 0b5d002515bdf4fc34452eb836c57278f27a826b /net/wireless/mlme.c | |
parent | b54853f1b157a173fe5ac9145623670c66a9e7b9 (diff) |
cfg80211: no cookies in cfg80211_send_XXX()
Get rid of cookies in cfg80211_send_XXX() functions.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r-- | net/wireless/mlme.c | 39 |
1 files changed, 12 insertions, 27 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index ceb2c14c8f47..a13a71205240 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -121,7 +121,7 @@ void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len) | |||
121 | } | 121 | } |
122 | EXPORT_SYMBOL(cfg80211_send_rx_assoc); | 122 | EXPORT_SYMBOL(cfg80211_send_rx_assoc); |
123 | 123 | ||
124 | static void __cfg80211_send_deauth(struct net_device *dev, | 124 | void __cfg80211_send_deauth(struct net_device *dev, |
125 | const u8 *buf, size_t len) | 125 | const u8 *buf, size_t len) |
126 | { | 126 | { |
127 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 127 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
@@ -177,27 +177,19 @@ static void __cfg80211_send_deauth(struct net_device *dev, | |||
177 | false, NULL); | 177 | false, NULL); |
178 | } | 178 | } |
179 | } | 179 | } |
180 | EXPORT_SYMBOL(__cfg80211_send_deauth); | ||
180 | 181 | ||
181 | 182 | void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len) | |
182 | void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len, | ||
183 | void *cookie) | ||
184 | { | 183 | { |
185 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 184 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
186 | 185 | ||
187 | BUG_ON(cookie && wdev != cookie); | 186 | wdev_lock(wdev); |
188 | 187 | __cfg80211_send_deauth(dev, buf, len); | |
189 | if (cookie) { | 188 | wdev_unlock(wdev); |
190 | /* called within callback */ | ||
191 | __cfg80211_send_deauth(dev, buf, len); | ||
192 | } else { | ||
193 | wdev_lock(wdev); | ||
194 | __cfg80211_send_deauth(dev, buf, len); | ||
195 | wdev_unlock(wdev); | ||
196 | } | ||
197 | } | 189 | } |
198 | EXPORT_SYMBOL(cfg80211_send_deauth); | 190 | EXPORT_SYMBOL(cfg80211_send_deauth); |
199 | 191 | ||
200 | static void __cfg80211_send_disassoc(struct net_device *dev, | 192 | void __cfg80211_send_disassoc(struct net_device *dev, |
201 | const u8 *buf, size_t len) | 193 | const u8 *buf, size_t len) |
202 | { | 194 | { |
203 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 195 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
@@ -238,22 +230,15 @@ static void __cfg80211_send_disassoc(struct net_device *dev, | |||
238 | from_ap = memcmp(mgmt->sa, dev->dev_addr, ETH_ALEN) != 0; | 230 | from_ap = memcmp(mgmt->sa, dev->dev_addr, ETH_ALEN) != 0; |
239 | __cfg80211_disconnected(dev, NULL, 0, reason_code, from_ap); | 231 | __cfg80211_disconnected(dev, NULL, 0, reason_code, from_ap); |
240 | } | 232 | } |
233 | EXPORT_SYMBOL(__cfg80211_send_disassoc); | ||
241 | 234 | ||
242 | void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len, | 235 | void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len) |
243 | void *cookie) | ||
244 | { | 236 | { |
245 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 237 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
246 | 238 | ||
247 | BUG_ON(cookie && wdev != cookie); | 239 | wdev_lock(wdev); |
248 | 240 | __cfg80211_send_disassoc(dev, buf, len); | |
249 | if (cookie) { | 241 | wdev_unlock(wdev); |
250 | /* called within callback */ | ||
251 | __cfg80211_send_disassoc(dev, buf, len); | ||
252 | } else { | ||
253 | wdev_lock(wdev); | ||
254 | __cfg80211_send_disassoc(dev, buf, len); | ||
255 | wdev_unlock(wdev); | ||
256 | } | ||
257 | } | 242 | } |
258 | EXPORT_SYMBOL(cfg80211_send_disassoc); | 243 | EXPORT_SYMBOL(cfg80211_send_disassoc); |
259 | 244 | ||