Changeset 2529

Show
Ignore:
Timestamp:
07/03/07 19:11:18 (2 years ago)
Author:
mentor
Message:

Fix the return value of ath_hardstart in case of a full internal queue. Furthermore, use the appropriate constants from netdevice.h.

Signed-off-by: Arnd Hannemann <hannemann@i4.informatik.rwth-aachen.de>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ath/if_ath.c

    r2527 r2529  
    24882488        struct sk_buff *tskb; 
    24892489        int framecnt; 
     2490        int requeue = 0; 
    24902491#ifdef ATH_SUPERG_FF 
    24912492        unsigned int pktlen; 
     
    25052506        } 
    25062507 
    2507  
    25082508        STAILQ_INIT(&bf_head); 
    25092509 
     
    25122512                if (bf == NULL) 
    25132513                        goto hardstart_fail; 
    2514                 return ath_tx_startraw(dev, bf, skb); 
     2514                ath_tx_startraw(dev, bf, skb); 
     2515                return NETDEV_TX_OK; 
    25152516        } 
    25162517 
     
    25442545        if (txq->axq_depth > TAIL_DROP_COUNT) { 
    25452546                sc->sc_stats.ast_tx_discard++; 
     2547                /* queue is full, let the kernel backlog the skb */ 
     2548                requeue = 1; 
    25462549                goto hardstart_fail; 
    25472550        } 
     
    25952598                        ATH_TXQ_UNLOCK_IRQ_EARLY(txq); 
    25962599 
    2597                         return 0
     2600                        return NETDEV_TX_OK
    25982601                } 
    25992602        } else { 
     
    26432646 
    26442647                        goto ff_flush_done; 
    2645  
    2646  
    26472648                } 
    26482649                /* 
     
    27512752#endif 
    27522753 
    2753         return 0
     2754        return NETDEV_TX_OK
    27542755 
    27552756hardstart_fail: 
     
    27682769        } 
    27692770 
     2771        /* let the kernel requeue the skb (dont free it!) */ 
     2772        if (requeue) 
     2773                return NETDEV_TX_BUSY; 
     2774 
    27702775        /* free sk_buffs */ 
    27712776        while (skb) { 
     
    27752780                skb = tskb; 
    27762781        } 
    2777         return 0;      /* NB: return !0 only in a ``hard error condition'' */ 
     2782        return NETDEV_TX_OK;    
    27782783} 
    27792784#undef ATH_HARDSTART_GET_TX_BUF_WITH_LOCK