summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c6
-rw-r--r--net/wireless/reg.c8
-rw-r--r--net/wireless/scan.c10
3 files changed, 11 insertions, 13 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b1fc982..3c53c5c 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3696,9 +3696,9 @@ void nl80211_send_disassoc(struct cfg80211_registered_device *rdev,
NL80211_CMD_DISASSOCIATE);
}
-void nl80211_send_mlme_timeout(struct cfg80211_registered_device *rdev,
- struct net_device *netdev, int cmd,
- const u8 *addr)
+static void nl80211_send_mlme_timeout(struct cfg80211_registered_device *rdev,
+ struct net_device *netdev, int cmd,
+ const u8 *addr)
{
struct sk_buff *msg;
void *hdr;
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 139d13f..537af62 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2113,14 +2113,14 @@ void reg_device_remove(struct wiphy *wiphy)
assert_cfg80211_lock();
+ kfree(wiphy->regd);
+
if (last_request)
request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx);
- kfree(wiphy->regd);
- if (!last_request || !request_wiphy)
- return;
- if (request_wiphy != wiphy)
+ if (!request_wiphy || request_wiphy != wiphy)
return;
+
last_request->wiphy_idx = WIPHY_IDX_STALE;
last_request->country_ie_env = ENVIRON_ANY;
}
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index dfb53d1..df59440 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) {
OpenPOWER on IntegriCloud