diff options
author | David S. Miller <davem@davemloft.net> | 2009-05-08 15:46:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-08 15:46:17 -0400 |
commit | a8679be2073392cf22a910bc25da0c7d36459845 (patch) | |
tree | 0d25750ea4ba3a85fe683f285261083d77080976 /net/wireless | |
parent | 22f6dacdfcfdc792d068e9c41234808860498d04 (diff) | |
parent | 9dfd6ba353b993d648dcda72480c7ce92cd27c7e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 6 | ||||
-rw-r--r-- | net/wireless/reg.c | 8 | ||||
-rw-r--r-- | net/wireless/scan.c | 10 |
3 files changed, 11 insertions, 13 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b1fc98225fd1..3c53c5cbc3a9 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -3696,9 +3696,9 @@ void nl80211_send_disassoc(struct cfg80211_registered_device *rdev, | |||
3696 | NL80211_CMD_DISASSOCIATE); | 3696 | NL80211_CMD_DISASSOCIATE); |
3697 | } | 3697 | } |
3698 | 3698 | ||
3699 | void nl80211_send_mlme_timeout(struct cfg80211_registered_device *rdev, | 3699 | static void nl80211_send_mlme_timeout(struct cfg80211_registered_device *rdev, |
3700 | struct net_device *netdev, int cmd, | 3700 | struct net_device *netdev, int cmd, |
3701 | const u8 *addr) | 3701 | const u8 *addr) |
3702 | { | 3702 | { |
3703 | struct sk_buff *msg; | 3703 | struct sk_buff *msg; |
3704 | void *hdr; | 3704 | void *hdr; |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 139d13fdc94f..537af62ec42b 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -2113,14 +2113,14 @@ void reg_device_remove(struct wiphy *wiphy) | |||
2113 | 2113 | ||
2114 | assert_cfg80211_lock(); | 2114 | assert_cfg80211_lock(); |
2115 | 2115 | ||
2116 | kfree(wiphy->regd); | ||
2117 | |||
2116 | if (last_request) | 2118 | if (last_request) |
2117 | request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx); | 2119 | request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx); |
2118 | 2120 | ||
2119 | kfree(wiphy->regd); | 2121 | if (!request_wiphy || request_wiphy != wiphy) |
2120 | if (!last_request || !request_wiphy) | ||
2121 | return; | ||
2122 | if (request_wiphy != wiphy) | ||
2123 | return; | 2122 | return; |
2123 | |||
2124 | last_request->wiphy_idx = WIPHY_IDX_STALE; | 2124 | last_request->wiphy_idx = WIPHY_IDX_STALE; |
2125 | last_request->country_ie_env = ENVIRON_ANY; | 2125 | last_request->country_ie_env = ENVIRON_ANY; |
2126 | } | 2126 | } |
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index dfb53d19fd77..df59440290e5 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -377,18 +377,16 @@ cfg80211_bss_update(struct cfg80211_registered_device *dev, | |||
377 | size_t used = dev->wiphy.bss_priv_size + sizeof(*res); | 377 | size_t used = dev->wiphy.bss_priv_size + sizeof(*res); |
378 | size_t ielen = res->pub.len_information_elements; | 378 | size_t ielen = res->pub.len_information_elements; |
379 | 379 | ||
380 | if (ksize(found) >= used + ielen) { | 380 | if (!found->ies_allocated && ksize(found) >= used + ielen) { |
381 | memcpy(found->pub.information_elements, | 381 | memcpy(found->pub.information_elements, |
382 | res->pub.information_elements, ielen); | 382 | res->pub.information_elements, ielen); |
383 | found->pub.len_information_elements = ielen; | 383 | found->pub.len_information_elements = ielen; |
384 | } else { | 384 | } else { |
385 | u8 *ies = found->pub.information_elements; | 385 | u8 *ies = found->pub.information_elements; |
386 | 386 | ||
387 | if (found->ies_allocated) { | 387 | if (found->ies_allocated) |
388 | if (ksize(ies) < ielen) | 388 | ies = krealloc(ies, ielen, GFP_ATOMIC); |
389 | ies = krealloc(ies, ielen, | 389 | else |
390 | GFP_ATOMIC); | ||
391 | } else | ||
392 | ies = kmalloc(ielen, GFP_ATOMIC); | 390 | ies = kmalloc(ielen, GFP_ATOMIC); |
393 | 391 | ||
394 | if (ies) { | 392 | if (ies) { |