diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 44 |
1 files changed, 3 insertions, 41 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 4ff26c2159b..98a9e48f8e4 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -99,7 +99,9 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, | |||
99 | return retval; | 99 | return retval; |
100 | } | 100 | } |
101 | 101 | ||
102 | void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | 102 | void rt2x00mac_tx(struct ieee80211_hw *hw, |
103 | struct ieee80211_tx_control *control, | ||
104 | struct sk_buff *skb) | ||
103 | { | 105 | { |
104 | struct rt2x00_dev *rt2x00dev = hw->priv; | 106 | struct rt2x00_dev *rt2x00dev = hw->priv; |
105 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 107 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
@@ -212,46 +214,6 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw, | |||
212 | !test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags)) | 214 | !test_bit(DEVICE_STATE_STARTED, &rt2x00dev->flags)) |
213 | return -ENODEV; | 215 | return -ENODEV; |
214 | 216 | ||
215 | switch (vif->type) { | ||
216 | case NL80211_IFTYPE_AP: | ||
217 | /* | ||
218 | * We don't support mixed combinations of | ||
219 | * sta and ap interfaces. | ||
220 | */ | ||
221 | if (rt2x00dev->intf_sta_count) | ||
222 | return -ENOBUFS; | ||
223 | |||
224 | /* | ||
225 | * Check if we exceeded the maximum amount | ||
226 | * of supported interfaces. | ||
227 | */ | ||
228 | if (rt2x00dev->intf_ap_count >= rt2x00dev->ops->max_ap_intf) | ||
229 | return -ENOBUFS; | ||
230 | |||
231 | break; | ||
232 | case NL80211_IFTYPE_STATION: | ||
233 | case NL80211_IFTYPE_ADHOC: | ||
234 | case NL80211_IFTYPE_MESH_POINT: | ||
235 | case NL80211_IFTYPE_WDS: | ||
236 | /* | ||
237 | * We don't support mixed combinations of | ||
238 | * sta and ap interfaces. | ||
239 | */ | ||
240 | if (rt2x00dev->intf_ap_count) | ||
241 | return -ENOBUFS; | ||
242 | |||
243 | /* | ||
244 | * Check if we exceeded the maximum amount | ||
245 | * of supported interfaces. | ||
246 | */ | ||
247 | if (rt2x00dev->intf_sta_count >= rt2x00dev->ops->max_sta_intf) | ||
248 | return -ENOBUFS; | ||
249 | |||
250 | break; | ||
251 | default: | ||
252 | return -EINVAL; | ||
253 | } | ||
254 | |||
255 | /* | 217 | /* |
256 | * Loop through all beacon queues to find a free | 218 | * Loop through all beacon queues to find a free |
257 | * entry. Since there are as much beacon entries | 219 | * entry. Since there are as much beacon entries |