aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.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/mwl8k.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/mwl8k.c')
-rw-r--r--drivers/net/wireless/mwl8k.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 03f2584aed12..df5959f36d0b 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1573,7 +1573,7 @@ static void mwl8k_txq_deinit(struct ieee80211_hw *hw, int index)
1573 txq->txd = NULL; 1573 txq->txd = NULL;
1574} 1574}
1575 1575
1576static int 1576static void
1577mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb) 1577mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
1578{ 1578{
1579 struct mwl8k_priv *priv = hw->priv; 1579 struct mwl8k_priv *priv = hw->priv;
@@ -1635,7 +1635,7 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
1635 wiphy_debug(hw->wiphy, 1635 wiphy_debug(hw->wiphy,
1636 "failed to dma map skb, dropping TX frame.\n"); 1636 "failed to dma map skb, dropping TX frame.\n");
1637 dev_kfree_skb(skb); 1637 dev_kfree_skb(skb);
1638 return NETDEV_TX_OK; 1638 return;
1639 } 1639 }
1640 1640
1641 spin_lock_bh(&priv->tx_lock); 1641 spin_lock_bh(&priv->tx_lock);
@@ -1672,8 +1672,6 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
1672 mwl8k_tx_start(priv); 1672 mwl8k_tx_start(priv);
1673 1673
1674 spin_unlock_bh(&priv->tx_lock); 1674 spin_unlock_bh(&priv->tx_lock);
1675
1676 return NETDEV_TX_OK;
1677} 1675}
1678 1676
1679 1677
@@ -3742,22 +3740,19 @@ static void mwl8k_rx_poll(unsigned long data)
3742/* 3740/*
3743 * Core driver operations. 3741 * Core driver operations.
3744 */ 3742 */
3745static int mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 3743static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
3746{ 3744{
3747 struct mwl8k_priv *priv = hw->priv; 3745 struct mwl8k_priv *priv = hw->priv;
3748 int index = skb_get_queue_mapping(skb); 3746 int index = skb_get_queue_mapping(skb);
3749 int rc;
3750 3747
3751 if (!priv->radio_on) { 3748 if (!priv->radio_on) {
3752 wiphy_debug(hw->wiphy, 3749 wiphy_debug(hw->wiphy,
3753 "dropped TX frame since radio disabled\n"); 3750 "dropped TX frame since radio disabled\n");
3754 dev_kfree_skb(skb); 3751 dev_kfree_skb(skb);
3755 return NETDEV_TX_OK; 3752 return;
3756 } 3753 }
3757 3754
3758 rc = mwl8k_txq_xmit(hw, index, skb); 3755 mwl8k_txq_xmit(hw, index, skb);
3759
3760 return rc;
3761} 3756}
3762 3757
3763static int mwl8k_start(struct ieee80211_hw *hw) 3758static int mwl8k_start(struct ieee80211_hw *hw)