aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qti.qualcomm.com>2014-05-29 05:41:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-05-29 13:10:37 -0400
commit71a5f88120ae8a1662a27f5d17108e7c7162df1e (patch)
tree06afd102de8d9454829d7694be0000342b9c8ce0
parent915f36d2e5cf0219835af0029cb28a24def34c65 (diff)
ath9k: Fix interface combinations for multi-channel concurrency
Currently mac80211 does not support WDS and DFS with channel context drivers. So advertise these features only when the driver is not supporting channel context and modparam "use_chanctx" is introduced for preparing channel context support in ath9k. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 1af77081181e..0246b990fe87 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -61,6 +61,10 @@ static int ath9k_ps_enable;
61module_param_named(ps_enable, ath9k_ps_enable, int, 0444); 61module_param_named(ps_enable, ath9k_ps_enable, int, 0444);
62MODULE_PARM_DESC(ps_enable, "Enable WLAN PowerSave"); 62MODULE_PARM_DESC(ps_enable, "Enable WLAN PowerSave");
63 63
64static int ath9k_use_chanctx;
65module_param_named(use_chanctx, ath9k_use_chanctx, int, 0444);
66MODULE_PARM_DESC(use_chanctx, "Enable channel context for concurrency");
67
64bool is_ath9k_unloaded; 68bool is_ath9k_unloaded;
65 69
66#ifdef CONFIG_MAC80211_LEDS 70#ifdef CONFIG_MAC80211_LEDS
@@ -646,8 +650,7 @@ static void ath9k_init_txpower_limits(struct ath_softc *sc)
646} 650}
647 651
648static const struct ieee80211_iface_limit if_limits[] = { 652static const struct ieee80211_iface_limit if_limits[] = {
649 { .max = 2048, .types = BIT(NL80211_IFTYPE_STATION) | 653 { .max = 2048, .types = BIT(NL80211_IFTYPE_STATION) },
650 BIT(NL80211_IFTYPE_WDS) },
651 { .max = 8, .types = 654 { .max = 8, .types =
652#ifdef CONFIG_MAC80211_MESH 655#ifdef CONFIG_MAC80211_MESH
653 BIT(NL80211_IFTYPE_MESH_POINT) | 656 BIT(NL80211_IFTYPE_MESH_POINT) |
@@ -657,6 +660,10 @@ static const struct ieee80211_iface_limit if_limits[] = {
657 BIT(NL80211_IFTYPE_P2P_GO) }, 660 BIT(NL80211_IFTYPE_P2P_GO) },
658}; 661};
659 662
663static const struct ieee80211_iface_limit wds_limits[] = {
664 { .max = 2048, .types = BIT(NL80211_IFTYPE_WDS) },
665};
666
660static const struct ieee80211_iface_limit if_dfs_limits[] = { 667static const struct ieee80211_iface_limit if_dfs_limits[] = {
661 { .max = 1, .types = BIT(NL80211_IFTYPE_AP) | 668 { .max = 1, .types = BIT(NL80211_IFTYPE_AP) |
662#ifdef CONFIG_MAC80211_MESH 669#ifdef CONFIG_MAC80211_MESH
@@ -673,6 +680,13 @@ static const struct ieee80211_iface_combination if_comb[] = {
673 .num_different_channels = 1, 680 .num_different_channels = 1,
674 .beacon_int_infra_match = true, 681 .beacon_int_infra_match = true,
675 }, 682 },
683 {
684 .limits = wds_limits,
685 .n_limits = ARRAY_SIZE(wds_limits),
686 .max_interfaces = 2048,
687 .num_different_channels = 1,
688 .beacon_int_infra_match = true,
689 },
676#ifdef CONFIG_ATH9K_DFS_CERTIFIED 690#ifdef CONFIG_ATH9K_DFS_CERTIFIED
677 { 691 {
678 .limits = if_dfs_limits, 692 .limits = if_dfs_limits,
@@ -722,12 +736,15 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
722 BIT(NL80211_IFTYPE_P2P_GO) | 736 BIT(NL80211_IFTYPE_P2P_GO) |
723 BIT(NL80211_IFTYPE_P2P_CLIENT) | 737 BIT(NL80211_IFTYPE_P2P_CLIENT) |
724 BIT(NL80211_IFTYPE_AP) | 738 BIT(NL80211_IFTYPE_AP) |
725 BIT(NL80211_IFTYPE_WDS) |
726 BIT(NL80211_IFTYPE_STATION) | 739 BIT(NL80211_IFTYPE_STATION) |
727 BIT(NL80211_IFTYPE_ADHOC) | 740 BIT(NL80211_IFTYPE_ADHOC) |
728 BIT(NL80211_IFTYPE_MESH_POINT); 741 BIT(NL80211_IFTYPE_MESH_POINT);
729 hw->wiphy->iface_combinations = if_comb; 742 hw->wiphy->iface_combinations = if_comb;
730 hw->wiphy->n_iface_combinations = ARRAY_SIZE(if_comb); 743 if (!ath9k_use_chanctx) {
744 hw->wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
745 hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_WDS);
746 } else
747 hw->wiphy->n_iface_combinations = 1;
731 } 748 }
732 749
733 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; 750 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;