diff options
author | David S. Miller <davem@davemloft.net> | 2018-02-22 15:17:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-22 15:17:01 -0500 |
commit | ed04c46d4e70007e102d88dd2ee648008f7f634d (patch) | |
tree | cf2be2159c7d7ffb2004e7b9107ec1a6039b1e2c /net/wireless | |
parent | a2c0f039bbd0f9ebf375176d05b056e3f3b5c4f7 (diff) | |
parent | 657308f73e674e86b60509a430a46e569bf02846 (diff) |
Merge tag 'mac80211-for-davem-2018-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg says:
====================
Various fixes across the tree, the shortlog basically says it all:
cfg80211: fix cfg80211_beacon_dup
-> old bug in this code
cfg80211: clear wep keys after disconnection
-> certain ways of disconnecting left the keys
mac80211: round IEEE80211_TX_STATUS_HEADROOM up to multiple of 4
-> alignment issues with using 14 bytes
mac80211: Do not disconnect on invalid operating class
-> if the AP has a bogus operating class, let it be
mac80211: Fix sending ADDBA response for an ongoing session
-> don't send the same frame twice
cfg80211: use only 1Mbps for basic rates in mesh
-> interop issue with old versions of our code
mac80211_hwsim: don't use WQ_MEM_RECLAIM
-> it causes splats because it flushes work on a non-reclaim WQ
regulatory: add NUL to request alpha2
-> nla_put_string() issue from Kees
mac80211: mesh: fix wrong mesh TTL offset calculation
-> protocol issue
mac80211: fix a possible leak of station stats
-> error path might leak memory
mac80211: fix calling sleeping function in atomic context
-> percpu allocations need to be made with gfp flags
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/mesh.c | 25 | ||||
-rw-r--r-- | net/wireless/sme.c | 2 |
2 files changed, 24 insertions, 3 deletions
diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c index 51aa55618ef7..b12da6ef3c12 100644 --- a/net/wireless/mesh.c +++ b/net/wireless/mesh.c | |||
@@ -170,9 +170,28 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev, | |||
170 | enum nl80211_bss_scan_width scan_width; | 170 | enum nl80211_bss_scan_width scan_width; |
171 | struct ieee80211_supported_band *sband = | 171 | struct ieee80211_supported_band *sband = |
172 | rdev->wiphy.bands[setup->chandef.chan->band]; | 172 | rdev->wiphy.bands[setup->chandef.chan->band]; |
173 | scan_width = cfg80211_chandef_to_scan_width(&setup->chandef); | 173 | |
174 | setup->basic_rates = ieee80211_mandatory_rates(sband, | 174 | if (setup->chandef.chan->band == NL80211_BAND_2GHZ) { |
175 | scan_width); | 175 | int i; |
176 | |||
177 | /* | ||
178 | * Older versions selected the mandatory rates for | ||
179 | * 2.4 GHz as well, but were broken in that only | ||
180 | * 1 Mbps was regarded as a mandatory rate. Keep | ||
181 | * using just 1 Mbps as the default basic rate for | ||
182 | * mesh to be interoperable with older versions. | ||
183 | */ | ||
184 | for (i = 0; i < sband->n_bitrates; i++) { | ||
185 | if (sband->bitrates[i].bitrate == 10) { | ||
186 | setup->basic_rates = BIT(i); | ||
187 | break; | ||
188 | } | ||
189 | } | ||
190 | } else { | ||
191 | scan_width = cfg80211_chandef_to_scan_width(&setup->chandef); | ||
192 | setup->basic_rates = ieee80211_mandatory_rates(sband, | ||
193 | scan_width); | ||
194 | } | ||
176 | } | 195 | } |
177 | 196 | ||
178 | err = cfg80211_chandef_dfs_required(&rdev->wiphy, | 197 | err = cfg80211_chandef_dfs_required(&rdev->wiphy, |
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index fdb3646274a5..701cfd7acc1b 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -1032,6 +1032,8 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie, | |||
1032 | wdev->current_bss = NULL; | 1032 | wdev->current_bss = NULL; |
1033 | wdev->ssid_len = 0; | 1033 | wdev->ssid_len = 0; |
1034 | wdev->conn_owner_nlportid = 0; | 1034 | wdev->conn_owner_nlportid = 0; |
1035 | kzfree(wdev->connect_keys); | ||
1036 | wdev->connect_keys = NULL; | ||
1035 | 1037 | ||
1036 | nl80211_send_disconnected(rdev, dev, reason, ie, ie_len, from_ap); | 1038 | nl80211_send_disconnected(rdev, dev, reason, ie, ie_len, from_ap); |
1037 | 1039 | ||