aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/carl9170
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/carl9170
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/carl9170')
-rw-r--r--drivers/net/wireless/ath/carl9170/carl9170.h2
-rw-r--r--drivers/net/wireless/ath/carl9170/tx.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h
index 420d437f9580..c6a5fae634a0 100644
--- a/drivers/net/wireless/ath/carl9170/carl9170.h
+++ b/drivers/net/wireless/ath/carl9170/carl9170.h
@@ -534,7 +534,7 @@ void carl9170_rx(struct ar9170 *ar, void *buf, unsigned int len);
534void carl9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len); 534void carl9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len);
535 535
536/* TX */ 536/* TX */
537int carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb); 537void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
538void carl9170_tx_janitor(struct work_struct *work); 538void carl9170_tx_janitor(struct work_struct *work);
539void carl9170_tx_process_status(struct ar9170 *ar, 539void carl9170_tx_process_status(struct ar9170 *ar,
540 const struct carl9170_rsp *cmd); 540 const struct carl9170_rsp *cmd);
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index 6f41e21d3a1c..0ef70b6fc512 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -1339,7 +1339,7 @@ err_unlock_rcu:
1339 return false; 1339 return false;
1340} 1340}
1341 1341
1342int carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 1342void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
1343{ 1343{
1344 struct ar9170 *ar = hw->priv; 1344 struct ar9170 *ar = hw->priv;
1345 struct ieee80211_tx_info *info; 1345 struct ieee80211_tx_info *info;
@@ -1373,12 +1373,11 @@ int carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
1373 } 1373 }
1374 1374
1375 carl9170_tx(ar); 1375 carl9170_tx(ar);
1376 return NETDEV_TX_OK; 1376 return;
1377 1377
1378err_free: 1378err_free:
1379 ar->tx_dropped++; 1379 ar->tx_dropped++;
1380 dev_kfree_skb_any(skb); 1380 dev_kfree_skb_any(skb);
1381 return NETDEV_TX_OK;
1382} 1381}
1383 1382
1384void carl9170_tx_scheduler(struct ar9170 *ar) 1383void carl9170_tx_scheduler(struct ar9170 *ar)