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 #1443 (new defect)

Opened 14 years ago

Unable to set the bitrate in turbo mode after recreating the interface

Reported by: Tomasz Rostanski <> Assigned to:
Priority: minor Milestone:
Component: madwifi: driver Version: trunk
Keywords: Cc:
Patch is attached: 0 Pending:


I've got the script on the device which creates the interfaces and configures them. At the beginning it destroys the interface ath if exists and then recreates it. Then it sets the interface parameters like channel, rate, etc. I found that when I run the script (well, actually it's being run automatically) for the first time on the device and the interface is in turbo-a mode the bitrate is being set correctly. However when I run the script again, the bitrate will not be set and the following error will appear:

# iwconfig ath0 rate 24M
Error for wireless request "Set Bit Rate" (8B20) :
    SET failed on device ath0 ; Invalid argument.

I have debug the ieee80211_ioctl_siwrate function which is called when setting the bitrate. The ifr.ifr_media values are as follows during this function:

for first run:

1: 0x10080
2: 0x80
3: 0x97
ifmedia_match: match for 0x97/0xffffffff

for the second run:

1: 0x11080
2: 0x1080
3: 0x1097
ifmedia_match: no match for 0x1097/0xffffffff

where: 1: ifr.ifr_media = vap->iv_media.ifm_cur->ifm_media &~ (IFM_MMASK|IFM_TMASK); 2: ifr.ifr_media |= mopts[vap->iv_des_mode]; 3: ifr.ifr_media |= IFM_SUBTYPE(rate);

the difference is 0x1000 (IFM_IEEE80211_TURBO) so I have added the following line:

ifr.ifr_media &= ~IFM_IEEE80211_TURBO;

before ifmedia_removeall() call and now the iwconfig sets the bitrate, however I'm not sure if it is proper solution...

I have checked this on r1860 and r2478