diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-03-01 14:46:34 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2018-03-01 15:14:11 +0100 |
commit | 81542331cb1827650f3abd69375d964d0ce2d050 (patch) | |
tree | 7b2c6fd517d3f32ab5c9a4542fb0ff6d9dd5e274 /package/kernel/mac80211/patches/369-cfg80211-use-only-1Mbps-for-basic-rates-in-mesh.patch | |
parent | 1f427bd6166afa2aa11384fa559be9459397a0fe (diff) | |
download | mtk-20170518-81542331cb1827650f3abd69375d964d0ce2d050.zip mtk-20170518-81542331cb1827650f3abd69375d964d0ce2d050.tar.gz mtk-20170518-81542331cb1827650f3abd69375d964d0ce2d050.tar.bz2 |
mac80211: reorder patches putting backports first
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'package/kernel/mac80211/patches/369-cfg80211-use-only-1Mbps-for-basic-rates-in-mesh.patch')
-rw-r--r-- | package/kernel/mac80211/patches/369-cfg80211-use-only-1Mbps-for-basic-rates-in-mesh.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/369-cfg80211-use-only-1Mbps-for-basic-rates-in-mesh.patch b/package/kernel/mac80211/patches/369-cfg80211-use-only-1Mbps-for-basic-rates-in-mesh.patch new file mode 100644 index 0000000..bc4174e --- /dev/null +++ b/package/kernel/mac80211/patches/369-cfg80211-use-only-1Mbps-for-basic-rates-in-mesh.patch @@ -0,0 +1,55 @@ +From: Johannes Berg <johannes.berg@intel.com> +Date: Tue, 30 Jan 2018 13:17:38 +0100 +Subject: [PATCH] cfg80211: use only 1Mbps for basic rates in mesh + +Mesh used to use the mandatory rates as basic rates, but we got +the calculation of mandatory rates wrong until some time ago. +Fix this this broke interoperability with older versions since +now more basic rates are required, and thus the MBSS isn't the +same and the network stops working. + +Fix this by simply using only 1Mbps as the basic rate in 2.4GHz. +Since the changed mandatory rates only affected 2.4GHz, this is +all we need to make it work again. + +Reported-and-tested-by: Matthias Schiffer <mschiffer@universe-factory.net> +Fixes: 1bd773c077de ("wireless: set correct mandatory rate flags") +Signed-off-by: Johannes Berg <johannes.berg@intel.com> +--- + net/wireless/mesh.c | 25 ++++++++++++++++++++++--- + 1 file changed, 22 insertions(+), 3 deletions(-) + +--- a/net/wireless/mesh.c ++++ b/net/wireless/mesh.c +@@ -169,9 +169,28 @@ int __cfg80211_join_mesh(struct cfg80211 + 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, |