aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-07-01 15:26:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:01:49 -0400
commite6d6e3420d511cd7552a95d1f04bd4c80a9ddb34 (patch)
tree35f34c9ef8fe4c201da36ca819045995a93eeb44 /net/wireless/mlme.c
parentdad823302135a2d99efd40e35d94a6ff14961c93 (diff)
cfg80211: use proper allocation flags
Instead of hardcoding GFP_ATOMIC everywhere, add a new function parameter that gets the flags from the caller. Obviously then I need to update all callers (all of them in mac80211), and it turns out that now it's ok to use GFP_KERNEL in almost all places. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r--net/wireless/mlme.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index e56bbea10fc8..c4e6d4b84a46 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -12,35 +12,35 @@
12#include "core.h" 12#include "core.h"
13#include "nl80211.h" 13#include "nl80211.h"
14 14
15void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len) 15void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp)
16{ 16{
17 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 17 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
18 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 18 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
19 nl80211_send_rx_auth(rdev, dev, buf, len); 19 nl80211_send_rx_auth(rdev, dev, buf, len, gfp);
20} 20}
21EXPORT_SYMBOL(cfg80211_send_rx_auth); 21EXPORT_SYMBOL(cfg80211_send_rx_auth);
22 22
23void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len) 23void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp)
24{ 24{
25 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 25 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
26 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 26 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
27 nl80211_send_rx_assoc(rdev, dev, buf, len); 27 nl80211_send_rx_assoc(rdev, dev, buf, len, gfp);
28} 28}
29EXPORT_SYMBOL(cfg80211_send_rx_assoc); 29EXPORT_SYMBOL(cfg80211_send_rx_assoc);
30 30
31void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len) 31void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp)
32{ 32{
33 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 33 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
34 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 34 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
35 nl80211_send_deauth(rdev, dev, buf, len); 35 nl80211_send_deauth(rdev, dev, buf, len, gfp);
36} 36}
37EXPORT_SYMBOL(cfg80211_send_deauth); 37EXPORT_SYMBOL(cfg80211_send_deauth);
38 38
39void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len) 39void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp)
40{ 40{
41 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 41 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
42 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 42 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
43 nl80211_send_disassoc(rdev, dev, buf, len); 43 nl80211_send_disassoc(rdev, dev, buf, len, gfp);
44} 44}
45EXPORT_SYMBOL(cfg80211_send_disassoc); 45EXPORT_SYMBOL(cfg80211_send_disassoc);
46 46
@@ -53,33 +53,33 @@ static void cfg80211_wext_disconnected(struct net_device *dev)
53#endif 53#endif
54} 54}
55 55
56void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr) 56void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr, gfp_t gfp)
57{ 57{
58 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 58 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
59 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 59 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
60 nl80211_send_auth_timeout(rdev, dev, addr); 60 nl80211_send_auth_timeout(rdev, dev, addr, gfp);
61 cfg80211_wext_disconnected(dev); 61 cfg80211_wext_disconnected(dev);
62} 62}
63EXPORT_SYMBOL(cfg80211_send_auth_timeout); 63EXPORT_SYMBOL(cfg80211_send_auth_timeout);
64 64
65void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr) 65void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr, gfp_t gfp)
66{ 66{
67 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 67 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
68 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 68 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
69 nl80211_send_assoc_timeout(rdev, dev, addr); 69 nl80211_send_assoc_timeout(rdev, dev, addr, gfp);
70 cfg80211_wext_disconnected(dev); 70 cfg80211_wext_disconnected(dev);
71} 71}
72EXPORT_SYMBOL(cfg80211_send_assoc_timeout); 72EXPORT_SYMBOL(cfg80211_send_assoc_timeout);
73 73
74void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr, 74void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
75 enum nl80211_key_type key_type, int key_id, 75 enum nl80211_key_type key_type, int key_id,
76 const u8 *tsc) 76 const u8 *tsc, gfp_t gfp)
77{ 77{
78 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 78 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
79 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 79 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
80#ifdef CONFIG_WIRELESS_EXT 80#ifdef CONFIG_WIRELESS_EXT
81 union iwreq_data wrqu; 81 union iwreq_data wrqu;
82 char *buf = kmalloc(128, GFP_ATOMIC); 82 char *buf = kmalloc(128, gfp);
83 83
84 if (buf) { 84 if (buf) {
85 sprintf(buf, "MLME-MICHAELMICFAILURE.indication(" 85 sprintf(buf, "MLME-MICHAELMICFAILURE.indication("
@@ -93,6 +93,6 @@ void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
93 } 93 }
94#endif 94#endif
95 95
96 nl80211_michael_mic_failure(rdev, dev, addr, key_type, key_id, tsc); 96 nl80211_michael_mic_failure(rdev, dev, addr, key_type, key_id, tsc, gfp);
97} 97}
98EXPORT_SYMBOL(cfg80211_michael_mic_failure); 98EXPORT_SYMBOL(cfg80211_michael_mic_failure);