iwlwifi: drop skb silently for Tx request in monitor mode
authorZhu Yi <yi.zhu@intel.com>
Tue, 1 Jul 2008 01:20:34 +0000 (09:20 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 2 Jul 2008 19:26:03 +0000 (15:26 -0400)
This patch fixes the problem to keep mac80211 resubmitting SKBs
when Tx request cannot be met in monitor mode.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwlwifi/iwl4965-base.c

index b1b3c523185de39a2e5f38670cda26cf1aba6b17..6027e1119c3fd8fde2fefae8536b35603ac343d0 100644 (file)
@@ -6687,7 +6687,8 @@ static int iwl3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
 
        if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) {
                IWL_DEBUG_MAC80211("leave - monitor\n");
-               return -1;
+               dev_kfree_skb_any(skb);
+               return 0;
        }
 
        IWL_DEBUG_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
index 5ed16ce784689b9c1439d4fe96a98bd032a03e3f..0bd55bb19739b4f506944ef1c1489d88ae820b86 100644 (file)
@@ -6237,7 +6237,8 @@ static int iwl4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
 
        if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) {
                IWL_DEBUG_MAC80211("leave - monitor\n");
-               return -1;
+               dev_kfree_skb_any(skb);
+               return 0;
        }
 
        IWL_DEBUG_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,