2008-06-04 21:16:18 +08:00
|
|
|
--- a/ath/if_ath.c
|
|
|
|
+++ b/ath/if_ath.c
|
2008-07-17 00:30:03 +08:00
|
|
|
@@ -2725,6 +2725,9 @@
|
2008-04-23 12:58:34 +08:00
|
|
|
static int
|
|
|
|
ath_set_ack_bitrate(struct ath_softc *sc, int high)
|
|
|
|
{
|
|
|
|
+ if (!sc->sc_ackrate_override)
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
|
|
if (ar_device(sc->devid) == 5212 || ar_device(sc->devid) == 5213) {
|
|
|
|
/* set ack to be sent at low bit-rate */
|
|
|
|
/* registers taken from the OpenBSD 5212 HAL */
|
2008-07-26 06:41:13 +08:00
|
|
|
@@ -10795,8 +10798,13 @@
|
2008-04-23 12:58:34 +08:00
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
case ATH_ACKRATE:
|
|
|
|
- sc->sc_ackrate = val;
|
|
|
|
- ath_set_ack_bitrate(sc, sc->sc_ackrate);
|
|
|
|
+ if (val == -1)
|
|
|
|
+ sc->sc_ackrate_override = 0;
|
|
|
|
+ else {
|
|
|
|
+ sc->sc_ackrate_override = 1;
|
|
|
|
+ sc->sc_ackrate = val;
|
|
|
|
+ ath_set_ack_bitrate(sc, sc->sc_ackrate);
|
|
|
|
+ }
|
|
|
|
break;
|
|
|
|
case ATH_RP:
|
|
|
|
ath_rp_record(sc,
|
2008-06-04 21:16:18 +08:00
|
|
|
--- a/ath/if_athvar.h
|
|
|
|
+++ b/ath/if_athvar.h
|
2008-04-23 12:58:34 +08:00
|
|
|
@@ -681,6 +681,7 @@
|
|
|
|
unsigned int sc_devstopped:1; /* stopped due to of no tx bufs */
|
|
|
|
unsigned int sc_stagbeacons:1; /* use staggered beacons */
|
|
|
|
unsigned int sc_dfswait:1; /* waiting on channel for radar detect */
|
|
|
|
+ unsigned int sc_ackrate_override:1; /* override ack rate */
|
|
|
|
unsigned int sc_ackrate:1; /* send acks at high bitrate */
|
|
|
|
unsigned int sc_dfs_cac:1; /* waiting on channel for radar detect */
|
|
|
|
unsigned int sc_hasintmit:1; /* Interference mitigation */
|