diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-11-26 14:46:41 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-26 14:46:41 -0500 |
commit | 62c8003ecb973986958e9dade4a7e598349caf48 (patch) | |
tree | 0e831639cd6449c2955234cfc37ef46481c788d1 /net/mac80211/main.c | |
parent | e4cb3ff9311e0817e65cda7bc53898348aab7527 (diff) | |
parent | ec816087e8978b74c1bd5fae0e335dd97d964e9f (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index da2f41610125..f5e4c1f24bf2 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -115,7 +115,7 @@ static u32 ieee80211_hw_conf_chan(struct ieee80211_local *local) | |||
115 | channel_type = NL80211_CHAN_NO_HT; | 115 | channel_type = NL80211_CHAN_NO_HT; |
116 | } else if (local->tmp_channel) { | 116 | } else if (local->tmp_channel) { |
117 | chan = local->tmp_channel; | 117 | chan = local->tmp_channel; |
118 | channel_type = local->tmp_channel_type; | 118 | channel_type = NL80211_CHAN_NO_HT; |
119 | } else { | 119 | } else { |
120 | chan = local->_oper_channel; | 120 | chan = local->_oper_channel; |
121 | channel_type = local->_oper_channel_type; | 121 | channel_type = local->_oper_channel_type; |
@@ -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; |