diff options
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index f38db4d37e5d..a6f1d8a869bc 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -161,12 +161,6 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed) | |||
161 | if (WARN_ON(!netif_running(sdata->dev))) | 161 | if (WARN_ON(!netif_running(sdata->dev))) |
162 | return 0; | 162 | return 0; |
163 | 163 | ||
164 | if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) | ||
165 | return -EINVAL; | ||
166 | |||
167 | if (!local->ops->config_interface) | ||
168 | return 0; | ||
169 | |||
170 | memset(&conf, 0, sizeof(conf)); | 164 | memset(&conf, 0, sizeof(conf)); |
171 | 165 | ||
172 | if (sdata->vif.type == NL80211_IFTYPE_STATION) | 166 | if (sdata->vif.type == NL80211_IFTYPE_STATION) |
@@ -183,6 +177,9 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed) | |||
183 | return -EINVAL; | 177 | return -EINVAL; |
184 | } | 178 | } |
185 | 179 | ||
180 | if (!local->ops->config_interface) | ||
181 | return 0; | ||
182 | |||
186 | switch (sdata->vif.type) { | 183 | switch (sdata->vif.type) { |
187 | case NL80211_IFTYPE_AP: | 184 | case NL80211_IFTYPE_AP: |
188 | case NL80211_IFTYPE_ADHOC: | 185 | case NL80211_IFTYPE_ADHOC: |
@@ -224,9 +221,6 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed) | |||
224 | } | 221 | } |
225 | } | 222 | } |
226 | 223 | ||
227 | if (WARN_ON(!conf.bssid && (changed & IEEE80211_IFCC_BSSID))) | ||
228 | return -EINVAL; | ||
229 | |||
230 | conf.changed = changed; | 224 | conf.changed = changed; |
231 | 225 | ||
232 | return local->ops->config_interface(local_to_hw(local), | 226 | return local->ops->config_interface(local_to_hw(local), |
@@ -780,13 +774,10 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
780 | setup_timer(&local->dynamic_ps_timer, | 774 | setup_timer(&local->dynamic_ps_timer, |
781 | ieee80211_dynamic_ps_timer, (unsigned long) local); | 775 | ieee80211_dynamic_ps_timer, (unsigned long) local); |
782 | 776 | ||
783 | for (i = 0; i < IEEE80211_MAX_AMPDU_QUEUES; i++) | ||
784 | local->ampdu_ac_queue[i] = -1; | ||
785 | /* using an s8 won't work with more than that */ | ||
786 | BUILD_BUG_ON(IEEE80211_MAX_AMPDU_QUEUES > 127); | ||
787 | |||
788 | sta_info_init(local); | 777 | sta_info_init(local); |
789 | 778 | ||
779 | for (i = 0; i < IEEE80211_MAX_QUEUES; i++) | ||
780 | skb_queue_head_init(&local->pending[i]); | ||
790 | tasklet_init(&local->tx_pending_tasklet, ieee80211_tx_pending, | 781 | tasklet_init(&local->tx_pending_tasklet, ieee80211_tx_pending, |
791 | (unsigned long)local); | 782 | (unsigned long)local); |
792 | tasklet_disable(&local->tx_pending_tasklet); | 783 | tasklet_disable(&local->tx_pending_tasklet); |
@@ -799,6 +790,8 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
799 | skb_queue_head_init(&local->skb_queue); | 790 | skb_queue_head_init(&local->skb_queue); |
800 | skb_queue_head_init(&local->skb_queue_unreliable); | 791 | skb_queue_head_init(&local->skb_queue_unreliable); |
801 | 792 | ||
793 | spin_lock_init(&local->ampdu_lock); | ||
794 | |||
802 | return local_to_hw(local); | 795 | return local_to_hw(local); |
803 | } | 796 | } |
804 | EXPORT_SYMBOL(ieee80211_alloc_hw); | 797 | EXPORT_SYMBOL(ieee80211_alloc_hw); |
@@ -876,10 +869,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
876 | */ | 869 | */ |
877 | if (hw->queues > IEEE80211_MAX_QUEUES) | 870 | if (hw->queues > IEEE80211_MAX_QUEUES) |
878 | hw->queues = IEEE80211_MAX_QUEUES; | 871 | hw->queues = IEEE80211_MAX_QUEUES; |
879 | if (hw->ampdu_queues > IEEE80211_MAX_AMPDU_QUEUES) | ||
880 | hw->ampdu_queues = IEEE80211_MAX_AMPDU_QUEUES; | ||
881 | if (hw->queues < 4) | ||
882 | hw->ampdu_queues = 0; | ||
883 | 872 | ||
884 | mdev = alloc_netdev_mq(sizeof(struct ieee80211_master_priv), | 873 | mdev = alloc_netdev_mq(sizeof(struct ieee80211_master_priv), |
885 | "wmaster%d", ieee80211_master_setup, | 874 | "wmaster%d", ieee80211_master_setup, |