aboutsummaryrefslogtreecommitdiff
path: root/net/wireless/scan.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-05-08 12:46:17 -0700
committerDavid S. Miller <davem@davemloft.net>2009-05-08 12:46:17 -0700
commita8679be2073392cf22a910bc25da0c7d36459845 (patch)
tree0d25750ea4ba3a85fe683f285261083d77080976 /net/wireless/scan.c
parent22f6dacdfcfdc792d068e9c41234808860498d04 (diff)
parent9dfd6ba353b993d648dcda72480c7ce92cd27c7e (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r--net/wireless/scan.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index dfb53d19fd7..df59440290e 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -377,18 +377,16 @@ cfg80211_bss_update(struct cfg80211_registered_device *dev,
size_t used = dev->wiphy.bss_priv_size + sizeof(*res);
size_t ielen = res->pub.len_information_elements;
- if (ksize(found) >= used + ielen) {
+ if (!found->ies_allocated && ksize(found) >= used + ielen) {
memcpy(found->pub.information_elements,
res->pub.information_elements, ielen);
found->pub.len_information_elements = ielen;
} else {
u8 *ies = found->pub.information_elements;
- if (found->ies_allocated) {
- if (ksize(ies) < ielen)
- ies = krealloc(ies, ielen,
- GFP_ATOMIC);
- } else
+ if (found->ies_allocated)
+ ies = krealloc(ies, ielen, GFP_ATOMIC);
+ else
ies = kmalloc(ielen, GFP_ATOMIC);
if (ies) {