diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index c3c206a97d54..4cac7ad60f47 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -104,7 +104,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
104 | struct rt2x00_dev *rt2x00dev = hw->priv; | 104 | struct rt2x00_dev *rt2x00dev = hw->priv; |
105 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 105 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
106 | enum data_queue_qid qid = skb_get_queue_mapping(skb); | 106 | enum data_queue_qid qid = skb_get_queue_mapping(skb); |
107 | struct data_queue *queue; | 107 | struct data_queue *queue = NULL; |
108 | 108 | ||
109 | /* | 109 | /* |
110 | * Mac80211 might be calling this function while we are trying | 110 | * Mac80211 might be calling this function while we are trying |
@@ -153,7 +153,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
153 | goto exit_fail; | 153 | goto exit_fail; |
154 | 154 | ||
155 | if (rt2x00queue_threshold(queue)) | 155 | if (rt2x00queue_threshold(queue)) |
156 | ieee80211_stop_queue(rt2x00dev->hw, qid); | 156 | rt2x00queue_pause_queue(queue); |
157 | 157 | ||
158 | return NETDEV_TX_OK; | 158 | return NETDEV_TX_OK; |
159 | 159 | ||
@@ -283,14 +283,8 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw, | |||
283 | * invalid behavior in the device. | 283 | * invalid behavior in the device. |
284 | */ | 284 | */ |
285 | memcpy(&intf->mac, vif->addr, ETH_ALEN); | 285 | memcpy(&intf->mac, vif->addr, ETH_ALEN); |
286 | if (vif->type == NL80211_IFTYPE_AP) { | 286 | rt2x00lib_config_intf(rt2x00dev, intf, vif->type, |
287 | memcpy(&intf->bssid, vif->addr, ETH_ALEN); | 287 | intf->mac, NULL); |
288 | rt2x00lib_config_intf(rt2x00dev, intf, vif->type, | ||
289 | intf->mac, intf->bssid); | ||
290 | } else { | ||
291 | rt2x00lib_config_intf(rt2x00dev, intf, vif->type, | ||
292 | intf->mac, NULL); | ||
293 | } | ||
294 | 288 | ||
295 | /* | 289 | /* |
296 | * Some filters depend on the current working mode. We can force | 290 | * Some filters depend on the current working mode. We can force |
@@ -358,7 +352,7 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed) | |||
358 | * if for any reason the link tuner must be reset, this will be | 352 | * if for any reason the link tuner must be reset, this will be |
359 | * handled by rt2x00lib_config(). | 353 | * handled by rt2x00lib_config(). |
360 | */ | 354 | */ |
361 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF_LINK); | 355 | rt2x00queue_stop_queue(rt2x00dev->rx); |
362 | 356 | ||
363 | /* | 357 | /* |
364 | * When we've just turned on the radio, we want to reprogram | 358 | * When we've just turned on the radio, we want to reprogram |
@@ -376,7 +370,7 @@ int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed) | |||
376 | rt2x00lib_config_antenna(rt2x00dev, rt2x00dev->default_ant); | 370 | rt2x00lib_config_antenna(rt2x00dev, rt2x00dev->default_ant); |
377 | 371 | ||
378 | /* Turn RX back on */ | 372 | /* Turn RX back on */ |
379 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON_LINK); | 373 | rt2x00queue_start_queue(rt2x00dev->rx); |
380 | 374 | ||
381 | return 0; | 375 | return 0; |
382 | } | 376 | } |
@@ -719,3 +713,13 @@ void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw) | |||
719 | wiphy_rfkill_set_hw_state(hw->wiphy, !active); | 713 | wiphy_rfkill_set_hw_state(hw->wiphy, !active); |
720 | } | 714 | } |
721 | EXPORT_SYMBOL_GPL(rt2x00mac_rfkill_poll); | 715 | EXPORT_SYMBOL_GPL(rt2x00mac_rfkill_poll); |
716 | |||
717 | void rt2x00mac_flush(struct ieee80211_hw *hw, bool drop) | ||
718 | { | ||
719 | struct rt2x00_dev *rt2x00dev = hw->priv; | ||
720 | struct data_queue *queue; | ||
721 | |||
722 | tx_queue_for_each(rt2x00dev, queue) | ||
723 | rt2x00queue_flush_queue(queue, drop); | ||
724 | } | ||
725 | EXPORT_SYMBOL_GPL(rt2x00mac_flush); | ||