huge madwifi update (work in progress, disabled by default, compiles but breaks at...
[openwrt/svn-archive/archive.git] / package / madwifi / patches-r3776 / 126-rxerr_frames.patch
1 Index: madwifi-trunk-r3776/ath/if_ath.c
2 ===================================================================
3 --- madwifi-trunk-r3776.orig/ath/if_ath.c 2008-07-17 00:52:28.000000000 +0200
4 +++ madwifi-trunk-r3776/ath/if_ath.c 2008-07-17 00:53:04.000000000 +0200
5 @@ -6451,9 +6451,6 @@
6 rs = &bf->bf_dsstatus.ds_rxstat;
7
8 len = rs->rs_datalen;
9 - /* DMA sync. dies spectacularly if len == 0 */
10 - if (len == 0)
11 - goto rx_next;
12 if (rs->rs_more) {
13 /* Frame spans multiple descriptors; this
14 * cannot happen yet as we don't support
15 @@ -6513,8 +6510,12 @@
16 * setup again to receive another frame.
17 * NB: Meta-data (rs, noise, tsf) in the ath_buf is still
18 * used. */
19 - bus_dma_sync_single(sc->sc_bdev,
20 - bf->bf_skbaddr, len, BUS_DMA_FROMDEVICE);
21 +
22 + /* DMA sync. dies spectacularly if len == 0 */
23 + if (len != 0) {
24 + bus_dma_sync_single(sc->sc_bdev,
25 + bf->bf_skbaddr, len, BUS_DMA_FROMDEVICE);
26 + }
27 skb = ath_rxbuf_take_skb(sc, bf);
28
29 sc->sc_stats.ast_ant_rx[rs->rs_antenna]++;