aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>2012-10-08 12:00:52 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-10-29 15:18:51 -0400
commit8b0b6be5cb83e871adf8a134e843c01d75b1d128 (patch)
treeb03820b30487100b9e08fc91ac6eb11b268c7abc
parentbe41b052029f75a72df3c437a238bf9d574b6461 (diff)
ath9k_htc: Advertise interface combinations supported
This will allow us to create virtual interface the driver supports. Also this ensures multivif support and limitation advertised by the driver is taken care in cfg80211 itself. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_init.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index d98255eb1b9a..5ecf1287dddd 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -694,6 +694,20 @@ err_hw:
694 return ret; 694 return ret;
695} 695}
696 696
697static const struct ieee80211_iface_limit if_limits[] = {
698 { .max = 2, .types = BIT(NL80211_IFTYPE_STATION) |
699 BIT(NL80211_IFTYPE_P2P_CLIENT) },
700 { .max = 2, .types = BIT(NL80211_IFTYPE_AP) |
701 BIT(NL80211_IFTYPE_P2P_GO) },
702};
703
704static const struct ieee80211_iface_combination if_comb = {
705 .limits = if_limits,
706 .n_limits = ARRAY_SIZE(if_limits),
707 .max_interfaces = 2,
708 .num_different_channels = 1,
709};
710
697static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv, 711static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
698 struct ieee80211_hw *hw) 712 struct ieee80211_hw *hw)
699{ 713{
@@ -716,6 +730,9 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
716 BIT(NL80211_IFTYPE_P2P_GO) | 730 BIT(NL80211_IFTYPE_P2P_GO) |
717 BIT(NL80211_IFTYPE_P2P_CLIENT); 731 BIT(NL80211_IFTYPE_P2P_CLIENT);
718 732
733 hw->wiphy->iface_combinations = &if_comb;
734 hw->wiphy->n_iface_combinations = 1;
735
719 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; 736 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
720 737
721 hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN | 738 hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN |