diff options
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 21 |
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; |