Message ID | 1524737811-1965-2-git-send-email-arend.vanspriel@broadcom.com (mailing list archive) |
---|---|
State | Accepted |
Commit | aed14219067ab96e5eeb7730e9bceed10d9be989 |
Delegated to: | Kalle Valo |
Headers | show |
Arend Van Spriel <arend.vanspriel@broadcom.com> wrote: > From: Franky Lin <franky.lin@broadcom.com> > > 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> 4 patches applied to wireless-drivers-next.git, thanks. aed14219067a brcmfmac: use nl80211_band directly to get ieee80211 channel ff68c9f9c06d brcmfmac: constify firmware mapping tables 84ad327d18de brcmfmac: add hostready indication f56324baf329 brcmfmac: coarse support for PCIe shared structure rev7
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 5d891cb..ff6b351 100644 --- 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(struct brcmf_cfg80211_info *cfg, { 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(struct brcmf_cfg80211_info *cfg, 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());