aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-09 05:39:59 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-26 06:42:59 -0500
commit4bf88530be971bf95a7830ca61b4120980bf4347 (patch)
tree405d426806cb76551d09f427dafeeee79dac0dea /net/mac80211/main.c
parent3d9d1d6656a73ea8407734cfb00b81d14ef62d4b (diff)
mac80211: convert to channel definition struct
Convert mac80211 (and where necessary, some drivers a little bit) to the new channel definition struct. This will allow extending mac80211 for VHT, which is currently restricted to channel contexts since there are no drivers using that which makes it easier. As I also don't care about VHT for drivers not using the channel context API, I won't convert the previous API to VHT support. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index b229cded4567..6e933409979a 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -798,10 +798,9 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
798 local->_oper_channel = &sband->channels[0]; 798 local->_oper_channel = &sband->channels[0];
799 local->hw.conf.channel_type = NL80211_CHAN_NO_HT; 799 local->hw.conf.channel_type = NL80211_CHAN_NO_HT;
800 } 800 }
801 if (!local->monitor_channel) { 801 cfg80211_chandef_create(&local->monitor_chandef,
802 local->monitor_channel = &sband->channels[0]; 802 &sband->channels[0],
803 local->monitor_channel_type = NL80211_CHAN_NO_HT; 803 NL80211_CHAN_NO_HT);
804 }
805 channels += sband->n_channels; 804 channels += sband->n_channels;
806 805
807 if (max_bitrates < sband->n_bitrates) 806 if (max_bitrates < sband->n_bitrates)
@@ -884,10 +883,22 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
884 if (supp_ht) 883 if (supp_ht)
885 local->scan_ies_len += 2 + sizeof(struct ieee80211_ht_cap); 884 local->scan_ies_len += 2 + sizeof(struct ieee80211_ht_cap);
886 885
887 if (supp_vht) 886 if (supp_vht) {
888 local->scan_ies_len += 887 local->scan_ies_len +=
889 2 + sizeof(struct ieee80211_vht_cap); 888 2 + sizeof(struct ieee80211_vht_cap);
890 889
890 /*
891 * (for now at least), drivers wanting to use VHT must
892 * support channel contexts, as they contain all the
893 * necessary VHT information and the global hw config
894 * doesn't (yet)
895 */
896 if (WARN_ON(!local->use_chanctx)) {
897 result = -EINVAL;
898 goto fail_wiphy_register;
899 }
900 }
901
891 if (!local->ops->hw_scan) { 902 if (!local->ops->hw_scan) {
892 /* For hw_scan, driver needs to set these up. */ 903 /* For hw_scan, driver needs to set these up. */
893 local->hw.wiphy->max_scan_ssids = 4; 904 local->hw.wiphy->max_scan_ssids = 4;