aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ar9170
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-02-24 08:42:06 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-02-25 15:32:34 -0500
commit7bb4568372856688bc070917265bce0b88bb7d4d (patch)
treee3ca3e7d233944bbc271c650c8b037c3a6652d98 /drivers/net/wireless/ath/ar9170
parent43f12d47f0580e04e26c14c03cb19cea9687854e (diff)
mac80211: make tx() operation return void
The return value of the tx operation is commonly misused by drivers, leading to errors. All drivers will drop frames if they fail to TX the frame, and they must also properly manage the queues (if they didn't, mac80211 would already warn). Removing the ability for drivers to return a BUSY value also allows significant cleanups of the TX TX handling code in mac80211. Note that this also fixes a bug in ath9k_htc, the old "return -1" there was wrong. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k] Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00] Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi] Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx] Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ar9170')
-rw-r--r--drivers/net/wireless/ath/ar9170/ar9170.h2
-rw-r--r--drivers/net/wireless/ath/ar9170/main.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ar9170/ar9170.h b/drivers/net/wireless/ath/ar9170/ar9170.h
index 4f845f80c098..371e4ce49528 100644
--- a/drivers/net/wireless/ath/ar9170/ar9170.h
+++ b/drivers/net/wireless/ath/ar9170/ar9170.h
@@ -224,7 +224,7 @@ void ar9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len);
224int ar9170_nag_limiter(struct ar9170 *ar); 224int ar9170_nag_limiter(struct ar9170 *ar);
225 225
226/* MAC */ 226/* MAC */
227int ar9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb); 227void ar9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
228int ar9170_init_mac(struct ar9170 *ar); 228int ar9170_init_mac(struct ar9170 *ar);
229int ar9170_set_qos(struct ar9170 *ar); 229int ar9170_set_qos(struct ar9170 *ar);
230int ar9170_update_multicast(struct ar9170 *ar, const u64 mc_hast); 230int ar9170_update_multicast(struct ar9170 *ar, const u64 mc_hast);
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index a9111e1161fd..b761fec0d721 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -1475,7 +1475,7 @@ static void ar9170_tx(struct ar9170 *ar)
1475 msecs_to_jiffies(AR9170_JANITOR_DELAY)); 1475 msecs_to_jiffies(AR9170_JANITOR_DELAY));
1476} 1476}
1477 1477
1478int ar9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 1478void ar9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
1479{ 1479{
1480 struct ar9170 *ar = hw->priv; 1480 struct ar9170 *ar = hw->priv;
1481 struct ieee80211_tx_info *info; 1481 struct ieee80211_tx_info *info;
@@ -1493,11 +1493,10 @@ int ar9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
1493 skb_queue_tail(&ar->tx_pending[queue], skb); 1493 skb_queue_tail(&ar->tx_pending[queue], skb);
1494 1494
1495 ar9170_tx(ar); 1495 ar9170_tx(ar);
1496 return NETDEV_TX_OK; 1496 return;
1497 1497
1498err_free: 1498err_free:
1499 dev_kfree_skb_any(skb); 1499 dev_kfree_skb_any(skb);
1500 return NETDEV_TX_OK;
1501} 1500}
1502 1501
1503static int ar9170_op_add_interface(struct ieee80211_hw *hw, 1502static int ar9170_op_add_interface(struct ieee80211_hw *hw,