ath9k: remove software descriptor swapping, hw already does that
[openwrt.git] / package / ath9k / patches / 140-no_desc_swap.patch
1 Remove the descriptor swap, as the driver already configures the hardware for
2 descriptor swapping on big endian systems
3
4 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
5
6 --- a/drivers/net/wireless/ath9k/core.c
7 +++ b/drivers/net/wireless/ath9k/core.c
8 @@ -2141,22 +2141,6 @@
9         memzero(dd, sizeof(*dd));
10  }
11  
12 -/*
13 - *  Endian Swap for transmit descriptor
14 - *
15 - * XXX: Move cpu_to_le32() into hw.c and anywhere we set them, then
16 - * remove this.
17 -*/
18 -void ath_desc_swap(struct ath_desc *ds)
19 -{
20 -       ds->ds_link = cpu_to_le32(ds->ds_link);
21 -       ds->ds_data = cpu_to_le32(ds->ds_data);
22 -       ds->ds_ctl0 = cpu_to_le32(ds->ds_ctl0);
23 -       ds->ds_ctl1 = cpu_to_le32(ds->ds_ctl1);
24 -       ds->ds_hw[0] = cpu_to_le32(ds->ds_hw[0]);
25 -       ds->ds_hw[1] = cpu_to_le32(ds->ds_hw[1]);
26 -}
27 -
28  /*************/
29  /* Utilities */
30  /*************/
31 --- a/drivers/net/wireless/ath9k/beacon.c
32 +++ b/drivers/net/wireless/ath9k/beacon.c
33 @@ -140,11 +140,6 @@
34         series[0].RateFlags = (ctsrate) ? HAL_RATESERIES_RTS_CTS : 0;
35         ath9k_hw_set11n_ratescenario(ah, ds, ds, 0,
36                 ctsrate, ctsduration, series, 4, 0);
37 -
38 -       /* NB: The desc swap function becomes void,
39 -        * if descriptor swapping is not enabled
40 -        */
41 -       ath_desc_swap(ds);
42  }
43  
44  /* Move everything from the vap's mcast queue to the hardware cab queue.
45 --- a/drivers/net/wireless/ath9k/core.h
46 +++ b/drivers/net/wireless/ath9k/core.h
47 @@ -384,7 +384,6 @@
48  void ath_descdma_cleanup(struct ath_softc *sc,
49                          struct ath_descdma *dd,
50                          struct list_head *head);
51 -void ath_desc_swap(struct ath_desc *ds);
52  
53  /******/
54  /* RX */
55 --- a/drivers/net/wireless/ath9k/xmit.c
56 +++ b/drivers/net/wireless/ath9k/xmit.c
57 @@ -2062,7 +2062,6 @@
58                             AH_TRUE,            /* first segment */
59                             (n_sg == 1) ? AH_TRUE : AH_FALSE, /* last segment */
60                             ds);                /* first descriptor */
61 -       ath_desc_swap(ds);
62  
63         bf->bf_lastfrm = bf;
64         bf->bf_ht = txctl->ht;