non-HT bitrate after interface down
Sat Mar 31 10:50:21 PDT 2012
On Thu, Mar 29, 2012 at 07:33:45PM +0300, Genya wrote:
> Pretty common configuration with 802.11n enabled. Usually (after normal startup) I get 40-50 Mb/s real bitrate to AP by using 802.11n capable laptop (Atheros NIC). In order to toggle WIFI I use simple bash script like:
> if [ $WIFI_Status == "0" ]; then
> iw wlan0 set txpower auto
> ifconfig wlan0 up
> ifconfig mon.wlan0 up
> iw wlan0 set txpower limit 0
> ifconfig wlan0 down
> ifconfig mon.wlan0 down
That's broken - you should stop hostapd in the down case and start
hostapd in the up case for this to work.
> Everything works flawlessly: I get wireless network down and then up again. But when I get WIFI up again my real connection bitrate drops down to 21 Mb/s (802.11g maximum bitrate) although Windows still show same 130 Mb/s connection. The only way to get back full 50 Mb/s is to restart hostapd process. It could be solution in case hostapd's restart did not take about 10sec. It is far from real time like behavior. So, it's not the way.
Huh.. 10 seconds? I have not seen such delay.. Are you sure this is used
in hostapd restart? Or are you including the time it takes the bridge
interface to start forwarding packets in its default configuration
(which can be changed..)?
> Seems, hostapd (wireless NIC) don't like ifconfig down/up.
Correct. mac80211 drops quite a bit of the configuration parameters on
ifdown and hostapd would need to re-initialize everything when you bring
up the interface again.
> Does anyone have any suggestion how to fix it (without hostapd restart), better avoid happening or at least to debug the issue ?
I have no problems restarting hostapd in less than a second and don't
really see why any extra complexity to avoid restarting the process
would be justifiable here if you are setting the netdev down anyway
(this drops number of IP parameters).
Jouni Malinen PGP id EFC895FA
More information about the Hostap