aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mac80211_hwsim.c
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/mac80211_hwsim.c
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/mac80211_hwsim.c')
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 5d39b2840584..56f439d58013 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -541,7 +541,7 @@ static bool mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,
541} 541}
542 542
543 543
544static int mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 544static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
545{ 545{
546 bool ack; 546 bool ack;
547 struct ieee80211_tx_info *txi; 547 struct ieee80211_tx_info *txi;
@@ -551,7 +551,7 @@ static int mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
551 if (skb->len < 10) { 551 if (skb->len < 10) {
552 /* Should not happen; just a sanity check for addr1 use */ 552 /* Should not happen; just a sanity check for addr1 use */
553 dev_kfree_skb(skb); 553 dev_kfree_skb(skb);
554 return NETDEV_TX_OK; 554 return;
555 } 555 }
556 556
557 ack = mac80211_hwsim_tx_frame(hw, skb); 557 ack = mac80211_hwsim_tx_frame(hw, skb);
@@ -571,7 +571,6 @@ static int mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
571 if (!(txi->flags & IEEE80211_TX_CTL_NO_ACK) && ack) 571 if (!(txi->flags & IEEE80211_TX_CTL_NO_ACK) && ack)
572 txi->flags |= IEEE80211_TX_STAT_ACK; 572 txi->flags |= IEEE80211_TX_STAT_ACK;
573 ieee80211_tx_status_irqsafe(hw, skb); 573 ieee80211_tx_status_irqsafe(hw, skb);
574 return NETDEV_TX_OK;
575} 574}
576 575
577 576