diff options
author | Rob Herring <robh@kernel.org> | 2018-03-08 09:21:07 -0600 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2018-03-08 09:21:07 -0600 |
commit | c679fa6e3aaa5c58fc514b5b88cfa82774b8d390 (patch) | |
tree | 0c10b339368bd1795152a66a4e245e6f654fb3ec /net/wireless/mesh.c | |
parent | bdb7013df910681f84eff27b07791d4c160cb76f (diff) | |
parent | 4fd98e374fd377ae0458a9dc44aa779cf9631ddd (diff) |
Merge branch 'dtc-update' into dt/next
Diffstat (limited to 'net/wireless/mesh.c')
-rw-r--r-- | net/wireless/mesh.c | 25 |
1 files changed, 22 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, enum nl80211_bss_scan_width scan_width; struct ieee80211_supported_band *sband = rdev->wiphy.bands[setup->chandef.chan->band]; - scan_width = cfg80211_chandef_to_scan_width(&setup->chandef); - setup->basic_rates = ieee80211_mandatory_rates(sband, - scan_width); + + if (setup->chandef.chan->band == NL80211_BAND_2GHZ) { + int i; + + /* + * Older versions selected the mandatory rates for + * 2.4 GHz as well, but were broken in that only + * 1 Mbps was regarded as a mandatory rate. Keep + * using just 1 Mbps as the default basic rate for + * mesh to be interoperable with older versions. + */ + for (i = 0; i < sband->n_bitrates; i++) { + if (sband->bitrates[i].bitrate == 10) { + setup->basic_rates = BIT(i); + break; + } + } + } else { + scan_width = cfg80211_chandef_to_scan_width(&setup->chandef); + setup->basic_rates = ieee80211_mandatory_rates(sband, + scan_width); + } } err = cfg80211_chandef_dfs_required(&rdev->wiphy, |