madwifi: refresh patches
[openwrt/svn-archive/archive.git] / package / madwifi / patches / 348-ackcts.patch
1 Index: madwifi-trunk-r3314/ath/if_ath.c
2 ===================================================================
3 --- madwifi-trunk-r3314.orig/ath/if_ath.c
4 +++ madwifi-trunk-r3314/ath/if_ath.c
5 @@ -2721,6 +2721,9 @@
6 static int
7 ath_set_ack_bitrate(struct ath_softc *sc, int high)
8 {
9 + if (!sc->sc_ackrate_override)
10 + return 0;
11 +
12 if (ar_device(sc->devid) == 5212 || ar_device(sc->devid) == 5213) {
13 /* set ack to be sent at low bit-rate */
14 /* registers taken from the OpenBSD 5212 HAL */
15 @@ -10780,8 +10783,13 @@
16 break;
17 #endif
18 case ATH_ACKRATE:
19 - sc->sc_ackrate = val;
20 - ath_set_ack_bitrate(sc, sc->sc_ackrate);
21 + if (val == -1)
22 + sc->sc_ackrate_override = 0;
23 + else {
24 + sc->sc_ackrate_override = 1;
25 + sc->sc_ackrate = val;
26 + ath_set_ack_bitrate(sc, sc->sc_ackrate);
27 + }
28 break;
29 case ATH_RP:
30 ath_rp_record(sc,
31 Index: madwifi-trunk-r3314/ath/if_athvar.h
32 ===================================================================
33 --- madwifi-trunk-r3314.orig/ath/if_athvar.h
34 +++ madwifi-trunk-r3314/ath/if_athvar.h
35 @@ -681,6 +681,7 @@
36 unsigned int sc_devstopped:1; /* stopped due to of no tx bufs */
37 unsigned int sc_stagbeacons:1; /* use staggered beacons */
38 unsigned int sc_dfswait:1; /* waiting on channel for radar detect */
39 + unsigned int sc_ackrate_override:1; /* override ack rate */
40 unsigned int sc_ackrate:1; /* send acks at high bitrate */
41 unsigned int sc_dfs_cac:1; /* waiting on channel for radar detect */
42 unsigned int sc_hasintmit:1; /* Interference mitigation */