Gmane
From: Steve Glass <stevie.glass <at> gmail.com>
Subject: Re: How to disable sending of MAC level ACKs?
Newsgroups: gmane.linux.drivers.madwifi.devel
Date: 2008-07-22 11:01:22 GMT (24 weeks, 3 days, 17 hours and 40 minutes ago)

Hi Dave,

I've been using exactly the approach you describe and it works in ad hoc and infrastructure modes.

In if_ath.c
> First, in the ath_attach(), add the codes "OS_REG_WRITE(ah, 0x8048,
> 0x00000002);", which writes register to disable the hardware auto ACK;
> And in the ath_reset(), do the same thing.

I do this and it works nicely. This disables the auto-ACK usually done by the WNIC for *received* frames.

> Then, in the ath_tx_start(), before the call of
> ath_hal_setuptxdesc(), add the codes "flags |= HAL_TXDESC_NOACK;",
> which sets the flags to stop the hw ACK waiting.
>      Done.

This does the opposite - it causes *sent* frames not to wait for an ACK. You may also need to set the tx count (try0) to "1".

*       if (ah->ah_abi != HAL_ABI_VERSION) {
*               printk(KERN_ERR "%s: HAL ABI mismatch; "
*                       "driver expects 0x%x, HAL reports 0x%x\n",
*                       dev->name, HAL_ABI_VERSION, ah->ah_abi);
*               error = ENXIO;          /* XXX */
*               goto bad;
*       }
*       sc->sc_ah = ah;
*       OS_REG_WRITE(ah, 0x8048, 0x00000002);
*
*       /*
*        * Check if the MAC has multi-rate retry support.

The second reg write (approx line 2180):

*static int
*ath_reset(struct net_device *dev)
*{
*       struct ath_softc *sc = dev->priv;
*       struct ieee80211com *ic = &sc->sc_ic;
*       struct ath_hal *ah = sc->sc_ah;
*       struct ieee80211_channel *c;
*       HAL_STATUS status;
*       OS_REG_WRITE(ah, 0x8048, 0x00000002);
*
*       /*
*        * Convert to a HAL channel description with the flags

The final flags to prevent nodes waiting for an ack (approx line 7135):

*flags |= HAL_TXDESC_NOACK;
*
*       /*
*        * Formulate first tx descriptor with tx controls.
*        */
*       /* XXX check return value? */
*       ath_hal_setuptxdesc(ah, ds
*                           , pktlen            /* packet length */
*                           , hdrlen            /* header length */


If anyone who has been successful in disabling L2 ACKs could take a
look at where I may have gone wrong I would be very grateful.

Thanks
Dave

These look pretty good but...  you are doing the register write too early (i.e. before the ath_hal_reset). Move it to the end of the function or else you risk the HAL resetting the register back to the default (hw-generated ACK) value. At a guess that is what is happening in your patched version.

Steve
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Madwifi-devel mailing list
Madwifi-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/madwifi-devel