Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #553 (new enhancement)

Opened 16 years ago

Last modified 14 years ago

"iwconfig ath0 retry 0" broken - [incorporate injection patch from aircrack-ng]

Reported by: Assigned to:
Priority: minor Milestone: version 0.9.x - progressive release candidate phase
Component: madwifi: driver Version: trunk
Keywords: injection Cc:
Patch is attached: 1 Pending:


The aircrack-ng source contains a patch which claims to be required to make injection work properly. Based on my reading of the source, it seems to be correct. This assumes that the txTries0 argument to ah_setupTxDesc is used to determine how many times to try before giving up on getting a response.

The patch just sets try0 in the ath_tx_startraw function to be equal to 1 if the interface is in monitor mode.

A recent version of this patch can be found here:


madwifi-ng-r1486.patch (0.9 kB) - added by on 04/20/06 22:08:28.
patch to remove retries in monitor mode

Change History

04/20/06 22:08:28 changed by

  • attachment madwifi-ng-r1486.patch added.

patch to remove retries in monitor mode

04/21/06 09:21:45 changed by mrenzmann

The patch would have to be signed off by its original author, otherwise it can not be committed to the repository. If you have contact to the author, please let him know.

04/21/06 18:15:59 changed by Mister_X

Signed-off-by: Thomas d'Otreppe <>

04/21/06 18:32:36 changed by dyqith

I'm wondering if this is the best way to allow aircrack-ng to work, since it'll change the functionality for other people who needs packet injection with retries.

The best way is probably to have the 'iwconfig ath0 retry' command working, I think.

04/22/06 16:02:41 changed by Mister_X

04/23/06 17:47:09 changed by jbicket

I don't understand why any packets that get send over the raw device should have no retries. You can set this by running "iwconfig ath0 retry 0"


04/23/06 23:52:36 changed by dyqith

TODO: someone needs to back the patch out of svn, and then check on "iwconfig ath0 retry"

05/07/06 19:54:46 changed by Mister_X

Someone I know tested "iwconfig ath0 retry 0" on r1543 and get this result:

Error for wireless request "Set Retry Limit" (8B28) :
SET failed on device ath0 ; Operation not supported.

05/16/06 05:17:14 changed by dyqith

  • summary changed from incorporate injection patch from aircrack-ng to "iwconfig ath0 retry 0" broken - [incorporate injection patch from aircrack-ng].

Looks like this patch isn't needed anymore as its not what the driver should, but someone needs to get the "iwconfig ath0 retry 0" fixed...

05/19/06 21:13:49 changed by

  • type changed from enhancement to defect.


is anyone working on this? "iwconfig ath0 retry 0" needs to be fixed

The aircrack patches are no longer required, however retry needs to be configurable and needs to be honored while in monitor mode.

I'm changing the type from enhancement to defect because the enhancements have been made (injection no longer requires external patch to function) however the iwconfig retry doesn't work.


05/21/06 09:53:50 changed by mrenzmann

  • milestone set to version 0.9.x - progressive release candidate phase.

05/21/06 14:05:43 changed by Mister_X

Patches are needed under certain conditions. I had a user complaining that it doesn't worked, the packet sequence number was overwritten without the patch ( see ).

05/21/06 18:30:52 changed by dyqith

I read through the code for retry (really short). Basically, the user checks look at IEEE80211_C_SWRETRY and IEEE80211_F_SWRETRY in ieee80211_wireless.c

Because vap->iv_caps does not have IEEE80211_C_SWRETRY set, it reports unsupported to the user.

No where in the code (checked with grep) does IEEE80211_C_SWRETRY is set (which means the dev. driver doesn't support it).

So the question becomes, how to add this functionality so it works ? The thing we're going against is the ath_rate_*() functions. (Rate Control Algorithms + retries).

09/07/06 02:41:54 changed by

I've done some testing with 0.9.2

Looks like "retry 0" is still broken. Applying the aircrack-ng patch for r1526 doesn't seem to help. I don't have any C experience, so this isn't a criticism, just a heads-up that the issue should be addressed when someone finds the time for it.

Cheers, Stan

03/19/07 20:09:36 changed by

There is a new version of the patch, this seems to be still needed to work with aircrack-ng http / madwifi-ng-r1886.patch This "seems" to apply fine on the new 9.3 release...

But as stated by Mister_X on irc #madwifi This is not a proper way to allow injection ( such as using iwpriv to change the value )

Can someone can work on getting this upstream ?

03/20/07 07:03:50 changed by mrenzmann

The author of the patch would have to submit it, and the patch would need to be signed off, before we can start talking about committing it.

04/14/07 16:05:56 changed by tdotreppe at

An updated version exists:

Signed-off-by: Thomas d'Otreppe <>

04/24/07 02:48:46 changed by mentor

Hmm, I'm fairly sure that patch is the wrong way to fix things.

04/24/07 03:54:45 changed by mentor

This should be fixed in ieee80211_monitor_encap...

06/20/07 19:29:31 changed by mtaylor

I've been asked to look at this by Zero_Chaos. I will need a submission of the latest signed off patch and some discussion with Mentor once I've seen the proposed change before I can do anything with this.

07/19/07 17:25:42 changed by

Will anybody take care of handling the command "iwconfig ath0 retry XX" ? I would need to modify this retry parameter !


05/04/08 22:59:15 changed by hirte at

There is an new patch, fixing the retries again (the same way the older patches did it):

signed-off-by: Martin Beck <>

05/05/08 04:37:09 changed by mentor

  • type changed from defect to enhancement.

Again, the way that patch does it is wrong. It should be fixed in ieee80211_monitor_encap in net80211/ieee80211_monitor.c