Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

brcmfmac: Add multi channel support for P2P.

Multi channel support was disabled. This patch will enable it and
configure the P2P GO on the correct frequency when multi channel
is used.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Hante Meuleman and committed by
John W. Linville
1c9d30cf cbb371da

+25 -1
+25 -1
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
··· 3672 3672 } 3673 3673 3674 3674 static s32 3675 + brcmf_cfg80211_set_channel(struct brcmf_cfg80211_info *cfg, 3676 + struct brcmf_if *ifp, 3677 + struct ieee80211_channel *channel) 3678 + { 3679 + u16 chanspec; 3680 + s32 err; 3681 + 3682 + brcmf_dbg(TRACE, "band=%d, center_freq=%d\n", channel->band, 3683 + channel->center_freq); 3684 + 3685 + chanspec = channel_to_chanspec(&cfg->d11inf, channel); 3686 + err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec); 3687 + 3688 + return err; 3689 + } 3690 + 3691 + static s32 3675 3692 brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, 3676 3693 struct cfg80211_ap_settings *settings) 3677 3694 { 3678 3695 s32 ie_offset; 3696 + struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); 3679 3697 struct brcmf_if *ifp = netdev_priv(ndev); 3680 3698 struct brcmf_tlv *ssid_ie; 3681 3699 struct brcmf_ssid_le ssid_le; ··· 3763 3745 } 3764 3746 3765 3747 brcmf_config_ap_mgmt_ie(ifp->vif, &settings->beacon); 3748 + 3749 + err = brcmf_cfg80211_set_channel(cfg, ifp, settings->chandef.chan); 3750 + if (err < 0) { 3751 + brcmf_err("Set Channel failed, %d\n", err); 3752 + goto exit; 3753 + } 3766 3754 3767 3755 if (settings->beacon_interval) { 3768 3756 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_BCNPRD, ··· 4208 4184 static const struct ieee80211_iface_combination brcmf_iface_combos[] = { 4209 4185 { 4210 4186 .max_interfaces = BRCMF_IFACE_MAX_CNT, 4211 - .num_different_channels = 1, /* no multi-channel for now */ 4187 + .num_different_channels = 2, 4212 4188 .n_limits = ARRAY_SIZE(brcmf_iface_limits), 4213 4189 .limits = brcmf_iface_limits 4214 4190 }