diff options
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 5 | ||||
-rw-r--r-- | net/wireless/reg.c | 9 | ||||
-rw-r--r-- | net/wireless/reg.h | 3 | ||||
-rw-r--r-- | net/wireless/scan.c | 7 |
4 files changed, 14 insertions, 10 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 43bdb1372cae..634496b3ed77 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -997,7 +997,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) | |||
997 | 997 | ||
998 | if (IS_ERR(hdr)) { | 998 | if (IS_ERR(hdr)) { |
999 | err = PTR_ERR(hdr); | 999 | err = PTR_ERR(hdr); |
1000 | goto out; | 1000 | goto free_msg; |
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | cookie.msg = msg; | 1003 | cookie.msg = msg; |
@@ -1011,7 +1011,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) | |||
1011 | &cookie, get_key_callback); | 1011 | &cookie, get_key_callback); |
1012 | 1012 | ||
1013 | if (err) | 1013 | if (err) |
1014 | goto out; | 1014 | goto free_msg; |
1015 | 1015 | ||
1016 | if (cookie.error) | 1016 | if (cookie.error) |
1017 | goto nla_put_failure; | 1017 | goto nla_put_failure; |
@@ -1022,6 +1022,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) | |||
1022 | 1022 | ||
1023 | nla_put_failure: | 1023 | nla_put_failure: |
1024 | err = -ENOBUFS; | 1024 | err = -ENOBUFS; |
1025 | free_msg: | ||
1025 | nlmsg_free(msg); | 1026 | nlmsg_free(msg); |
1026 | out: | 1027 | out: |
1027 | cfg80211_put_dev(drv); | 1028 | cfg80211_put_dev(drv); |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 5e14371cda70..75a406d33619 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1089,17 +1089,18 @@ static void handle_reg_beacon(struct wiphy *wiphy, | |||
1089 | 1089 | ||
1090 | chan->beacon_found = true; | 1090 | chan->beacon_found = true; |
1091 | 1091 | ||
1092 | if (wiphy->disable_beacon_hints) | ||
1093 | return; | ||
1094 | |||
1092 | chan_before.center_freq = chan->center_freq; | 1095 | chan_before.center_freq = chan->center_freq; |
1093 | chan_before.flags = chan->flags; | 1096 | chan_before.flags = chan->flags; |
1094 | 1097 | ||
1095 | if ((chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) && | 1098 | if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) { |
1096 | !(chan->orig_flags & IEEE80211_CHAN_PASSIVE_SCAN)) { | ||
1097 | chan->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; | 1099 | chan->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; |
1098 | channel_changed = true; | 1100 | channel_changed = true; |
1099 | } | 1101 | } |
1100 | 1102 | ||
1101 | if ((chan->flags & IEEE80211_CHAN_NO_IBSS) && | 1103 | if (chan->flags & IEEE80211_CHAN_NO_IBSS) { |
1102 | !(chan->orig_flags & IEEE80211_CHAN_NO_IBSS)) { | ||
1103 | chan->flags &= ~IEEE80211_CHAN_NO_IBSS; | 1104 | chan->flags &= ~IEEE80211_CHAN_NO_IBSS; |
1104 | channel_changed = true; | 1105 | channel_changed = true; |
1105 | } | 1106 | } |
diff --git a/net/wireless/reg.h b/net/wireless/reg.h index e37829a49dc4..4e167a8e11be 100644 --- a/net/wireless/reg.h +++ b/net/wireless/reg.h | |||
@@ -30,7 +30,8 @@ int set_regdom(const struct ieee80211_regdomain *rd); | |||
30 | * non-radar 5 GHz channels. | 30 | * non-radar 5 GHz channels. |
31 | * | 31 | * |
32 | * Drivers do not need to call this, cfg80211 will do it for after a scan | 32 | * Drivers do not need to call this, cfg80211 will do it for after a scan |
33 | * on a newly found BSS. | 33 | * on a newly found BSS. If you cannot make use of this feature you can |
34 | * set the wiphy->disable_beacon_hints to true. | ||
34 | */ | 35 | */ |
35 | int regulatory_hint_found_beacon(struct wiphy *wiphy, | 36 | int regulatory_hint_found_beacon(struct wiphy *wiphy, |
36 | struct ieee80211_channel *beacon_chan, | 37 | struct ieee80211_channel *beacon_chan, |
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index f8e71b300001..7e595ce24eeb 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -35,8 +35,6 @@ void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted) | |||
35 | else | 35 | else |
36 | nl80211_send_scan_done(wiphy_to_dev(request->wiphy), dev); | 36 | nl80211_send_scan_done(wiphy_to_dev(request->wiphy), dev); |
37 | 37 | ||
38 | wiphy_to_dev(request->wiphy)->scan_req = NULL; | ||
39 | |||
40 | #ifdef CONFIG_WIRELESS_EXT | 38 | #ifdef CONFIG_WIRELESS_EXT |
41 | if (!aborted) { | 39 | if (!aborted) { |
42 | memset(&wrqu, 0, sizeof(wrqu)); | 40 | memset(&wrqu, 0, sizeof(wrqu)); |
@@ -48,6 +46,7 @@ void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted) | |||
48 | dev_put(dev); | 46 | dev_put(dev); |
49 | 47 | ||
50 | out: | 48 | out: |
49 | wiphy_to_dev(request->wiphy)->scan_req = NULL; | ||
51 | kfree(request); | 50 | kfree(request); |
52 | } | 51 | } |
53 | EXPORT_SYMBOL(cfg80211_scan_done); | 52 | EXPORT_SYMBOL(cfg80211_scan_done); |
@@ -119,7 +118,7 @@ static int cmp_ies(u8 num, u8 *ies1, size_t len1, u8 *ies2, size_t len2) | |||
119 | 118 | ||
120 | if (!ie1 && !ie2) | 119 | if (!ie1 && !ie2) |
121 | return 0; | 120 | return 0; |
122 | if (!ie1) | 121 | if (!ie1 || !ie2) |
123 | return -1; | 122 | return -1; |
124 | 123 | ||
125 | r = memcmp(ie1 + 2, ie2 + 2, min(ie1[1], ie2[1])); | 124 | r = memcmp(ie1 + 2, ie2 + 2, min(ie1[1], ie2[1])); |
@@ -172,6 +171,8 @@ static bool is_mesh(struct cfg80211_bss *a, | |||
172 | ie = find_ie(WLAN_EID_MESH_CONFIG, | 171 | ie = find_ie(WLAN_EID_MESH_CONFIG, |
173 | a->information_elements, | 172 | a->information_elements, |
174 | a->len_information_elements); | 173 | a->len_information_elements); |
174 | if (!ie) | ||
175 | return false; | ||
175 | if (ie[1] != IEEE80211_MESH_CONFIG_LEN) | 176 | if (ie[1] != IEEE80211_MESH_CONFIG_LEN) |
176 | return false; | 177 | return false; |
177 | 178 | ||