[PATCH] ipw2200: Fix NETDEV_TX_BUSY erroneous returned

Two problems in ipw2200:
1. We now have the ieee_device->is_queue_full interface, and it will be
   called at the beginning of ieee80211_xmit function. So no need to call
   it at the driver xmit function.
2. NETDEV_TX_BUSY happens to be 1, and in ipw_net_hard_start_xmit(), we
   will return 1 if the card is not associated, so the NETDEV_TX_BUSY
   message will appear even if queue is not full. The patch change it to
   -1. Note it is not NETDEV_TX_LOCKED here. We return <0 values to
   to indicate the skb needs to be freed by the ieee80211 stack.

Signed-off-by: Hong Liu <[EMAIL PROTECTED]>
Signed-off-by: Zhu Yi <[EMAIL PROTECTED]>
---

--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -9643,11 +9648,6 @@ static inline int ipw_tx_skb(struct ipw_
        u16 remaining_bytes;
        int fc;
 
-       /* If there isn't room in the queue, we return busy and let the
-        * network stack requeue the packet for us */
-       if (ipw_queue_space(q) < q->high_mark)
-               return NETDEV_TX_BUSY;
-
        switch (priv->ieee->iw_mode) {
        case IW_MODE_ADHOC:
                hdr_len = IEEE80211_3ADDR_LEN;
@@ -9863,7 +9865,8 @@ static int ipw_net_hard_start_xmit(struc
 
       fail_unlock:
        spin_unlock_irqrestore(&priv->lock, flags);
-       return 1;
+       /* Indicate ieee80211 the skb is not used by the driver. */
+       return -1;
 }
 
 static struct net_device_stats *ipw_net_get_stats(struct net_device *dev)
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to