aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-10-10 06:43:23 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-10-10 11:08:33 -0400
commit486cf4c08fe8b2b049bfccb76ce445ec1088fa25 (patch)
treec9080b814add0e48d5f4963f9516cbe0505480c9 /net/mac80211/main.c
parent408b18abf677841f49d64ceb884e2b196ca1cf05 (diff)
mac80211: enable DFS with channel contexts
It is okay to enable DFS for channel contexts based drivers as long as no combination advertises radar detection and multi-channel operation at the same time. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 107d1c884de3..9e322dce64ec 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -785,13 +785,14 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
785 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_WDS)) 785 if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_WDS))
786 return -EINVAL; 786 return -EINVAL;
787 787
788 /* DFS currently not supported with channel context drivers */ 788 /* DFS is not supported with multi-channel combinations yet */
789 for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) { 789 for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) {
790 const struct ieee80211_iface_combination *comb; 790 const struct ieee80211_iface_combination *comb;
791 791
792 comb = &local->hw.wiphy->iface_combinations[i]; 792 comb = &local->hw.wiphy->iface_combinations[i];
793 793
794 if (comb->radar_detect_widths) 794 if (comb->radar_detect_widths &&
795 comb->num_different_channels > 1)
795 return -EINVAL; 796 return -EINVAL;
796 } 797 }
797 } 798 }