diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-06-18 07:32:34 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2018-06-23 14:29:39 +0200 |
commit | c437adb02473accadeec252e9d87d58ce44cd6ed (patch) | |
tree | c75b1e29d86268dbcdf7c443771b4f795d524860 /package/kernel/mac80211/patches/330-v4.18-0003-brcmfmac-use-nl80211_band-directly-to-get-ieee80211-.patch | |
parent | 2811c97803e50e9964a2c23b9d8271f0265bcdca (diff) | |
download | upstream-c437adb02473accadeec252e9d87d58ce44cd6ed.tar.gz upstream-c437adb02473accadeec252e9d87d58ce44cd6ed.tar.bz2 upstream-c437adb02473accadeec252e9d87d58ce44cd6ed.zip |
mac80211: backport brcmfmac changes from kernel 4.18
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit c446e38c862201dd4d6a4fb8ea6e49172980952d)
Diffstat (limited to 'package/kernel/mac80211/patches/330-v4.18-0003-brcmfmac-use-nl80211_band-directly-to-get-ieee80211-.patch')
-rw-r--r-- | package/kernel/mac80211/patches/330-v4.18-0003-brcmfmac-use-nl80211_band-directly-to-get-ieee80211-.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/330-v4.18-0003-brcmfmac-use-nl80211_band-directly-to-get-ieee80211-.patch b/package/kernel/mac80211/patches/330-v4.18-0003-brcmfmac-use-nl80211_band-directly-to-get-ieee80211-.patch new file mode 100644 index 0000000000..2d60c0d9ee --- /dev/null +++ b/package/kernel/mac80211/patches/330-v4.18-0003-brcmfmac-use-nl80211_band-directly-to-get-ieee80211-.patch @@ -0,0 +1,43 @@ +From aed14219067ab96e5eeb7730e9bceed10d9be989 Mon Sep 17 00:00:00 2001 +From: Franky Lin <franky.lin@broadcom.com> +Date: Thu, 26 Apr 2018 12:16:48 +0200 +Subject: [PATCH] brcmfmac: use nl80211_band directly to get ieee80211 channel + +The enum nl80211_band used to retrieve wiphy->bands is the same as +wiphy->bands->band which is checked by wiphy_register(). So it can be used +directly as parameter of ieee80211_channel_to_frequency(). + +Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com> +Signed-off-by: Franky Lin <franky.lin@broadcom.com> +Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> +Signed-off-by: Kalle Valo <kvalo@codeaurora.org> +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -2729,7 +2729,7 @@ static s32 brcmf_inform_single_bss(struc + { + struct wiphy *wiphy = cfg_to_wiphy(cfg); + struct cfg80211_bss *bss; +- struct ieee80211_supported_band *band; ++ enum nl80211_band band; + struct brcmu_chan ch; + u16 channel; + u32 freq; +@@ -2752,11 +2752,11 @@ static s32 brcmf_inform_single_bss(struc + channel = bi->ctl_ch; + + if (channel <= CH_MAX_2G_CHANNEL) +- band = wiphy->bands[NL80211_BAND_2GHZ]; ++ band = NL80211_BAND_2GHZ; + else +- band = wiphy->bands[NL80211_BAND_5GHZ]; ++ band = NL80211_BAND_5GHZ; + +- freq = ieee80211_channel_to_frequency(channel, band->band); ++ freq = ieee80211_channel_to_frequency(channel, band); + bss_data.chan = ieee80211_get_channel(wiphy, freq); + bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20; + bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime()); |