Ticket #1428: fix_returncodes_of_ath_hardstart.patch
| File fix_returncodes_of_ath_hardstart.patch, 1.5 kB (added by hannemann@i4.informatik.rwth-aachen.de, 2 years ago) |
|---|
-
a/ath/if_ath.c
old new 2487 2487 struct ath_buf *tbf, *tempbf; 2488 2488 struct sk_buff *tskb; 2489 2489 int framecnt; 2490 int requeue = 0; 2490 2491 #ifdef ATH_SUPERG_FF 2491 2492 unsigned int pktlen; 2492 2493 struct ieee80211com *ic = &sc->sc_ic; … … 2511 2512 ATH_HARDSTART_GET_TX_BUF_WITH_LOCK; 2512 2513 if (bf == NULL) 2513 2514 goto hardstart_fail; 2514 return ath_tx_startraw(dev, bf, skb); 2515 ath_tx_startraw(dev, bf, skb); 2516 return NETDEV_TX_OK; 2515 2517 } 2516 2518 2517 2519 eh = (struct ether_header *) skb->data; … … 2543 2545 2544 2546 if (txq->axq_depth > TAIL_DROP_COUNT) { 2545 2547 sc->sc_stats.ast_tx_discard++; 2548 /* queue is full, let the kernel backlog the skb */ 2549 requeue = 1; 2546 2550 goto hardstart_fail; 2547 2551 } 2548 2552 … … 2594 2598 2595 2599 ATH_TXQ_UNLOCK_IRQ_EARLY(txq); 2596 2600 2597 return 0;2601 return NETDEV_TX_OK; 2598 2602 } 2599 2603 } else { 2600 2604 if (ff_flush) { … … 2751 2755 ath_ffstageq_flush(sc, txq, ath_ff_ageflushtestdone); 2752 2756 #endif 2753 2757 2754 return 0;2758 return NETDEV_TX_OK; 2755 2759 2756 2760 hardstart_fail: 2757 2761 if (!STAILQ_EMPTY(&bf_head)) { … … 2768 2772 ATH_TXBUF_UNLOCK_IRQ(sc); 2769 2773 } 2770 2774 2775 /* let the kernel requeue the skb (dont free it!) */ 2776 if (requeue) 2777 return NETDEV_TX_BUSY; 2778 2771 2779 /* free sk_buffs */ 2772 2780 while (skb) { 2773 2781 tskb = skb->next; … … 2775 2783 dev_kfree_skb(skb); 2776 2784 skb = tskb; 2777 2785 } 2778 return 0; /* NB: return !0 only in a ``hard error condition'' */2786 return NETDEV_TX_OK; 2779 2787 } 2780 2788 #undef ATH_HARDSTART_GET_TX_BUF_WITH_LOCK 2781 2789
