diff options
author | Hante Meuleman <meuleman@broadcom.com> | 2013-05-27 15:09:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-05-28 13:43:10 -0400 |
commit | 1c9d30cfac9901c4f7447deacdfb6b77eee1a096 (patch) | |
tree | 7620991ca67c8e22fef252e6e45b63c2d71e485d | |
parent | cbb371da233eb2b4c200010a5372579b880b4ae6 (diff) |
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>
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index 656ce8765863..6a8717820b9f 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
@@ -3672,10 +3672,28 @@ brcmf_config_ap_mgmt_ie(struct brcmf_cfg80211_vif *vif, | |||
3672 | } | 3672 | } |
3673 | 3673 | ||
3674 | static s32 | 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 | brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, | 3692 | brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, |
3676 | struct cfg80211_ap_settings *settings) | 3693 | struct cfg80211_ap_settings *settings) |
3677 | { | 3694 | { |
3678 | s32 ie_offset; | 3695 | s32 ie_offset; |
3696 | struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); | ||
3679 | struct brcmf_if *ifp = netdev_priv(ndev); | 3697 | struct brcmf_if *ifp = netdev_priv(ndev); |
3680 | struct brcmf_tlv *ssid_ie; | 3698 | struct brcmf_tlv *ssid_ie; |
3681 | struct brcmf_ssid_le ssid_le; | 3699 | struct brcmf_ssid_le ssid_le; |
@@ -3746,6 +3764,12 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, | |||
3746 | 3764 | ||
3747 | brcmf_config_ap_mgmt_ie(ifp->vif, &settings->beacon); | 3765 | brcmf_config_ap_mgmt_ie(ifp->vif, &settings->beacon); |
3748 | 3766 | ||
3767 | err = brcmf_cfg80211_set_channel(cfg, ifp, settings->chandef.chan); | ||
3768 | if (err < 0) { | ||
3769 | brcmf_err("Set Channel failed, %d\n", err); | ||
3770 | goto exit; | ||
3771 | } | ||
3772 | |||
3749 | if (settings->beacon_interval) { | 3773 | if (settings->beacon_interval) { |
3750 | err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_BCNPRD, | 3774 | err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_BCNPRD, |
3751 | settings->beacon_interval); | 3775 | settings->beacon_interval); |
@@ -4184,7 +4208,7 @@ static const struct ieee80211_iface_limit brcmf_iface_limits[] = { | |||
4184 | static const struct ieee80211_iface_combination brcmf_iface_combos[] = { | 4208 | static const struct ieee80211_iface_combination brcmf_iface_combos[] = { |
4185 | { | 4209 | { |
4186 | .max_interfaces = BRCMF_IFACE_MAX_CNT, | 4210 | .max_interfaces = BRCMF_IFACE_MAX_CNT, |
4187 | .num_different_channels = 1, /* no multi-channel for now */ | 4211 | .num_different_channels = 2, |
4188 | .n_limits = ARRAY_SIZE(brcmf_iface_limits), | 4212 | .n_limits = ARRAY_SIZE(brcmf_iface_limits), |
4189 | .limits = brcmf_iface_limits | 4213 | .limits = brcmf_iface_limits |
4190 | } | 4214 | } |