non-HT bitrate after interface down

Genya genyap
Thu Mar 29 09:33:45 PDT 2012


I have Linux driven (Linux b3 2.6.39.4-9 #1 Wed Jan 18 18:52:34 FET 2012 armv5tel) Wireless AP with  Atheros AR9280 NIC. Using hostapd v0.7.2. Here is my hostapd.conf:


interface=wlan0
bridge=br0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=Home
ieee80211d=1
ieee80211n=1
hw_mode=g
channel=4
macaddr_acl=0
auth_algs=3
own_ip_addr=127.0.0.1
wpa_psk_file=/etc/hostapd/hostapd.wpa_psk
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
country_code=US
wpa=2
wpa_passphrase=password

wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0

tx_queue_data3_aifs=7
tx_queue_data3_cwmin=15
tx_queue_data3_cwmax=1023
tx_queue_data3_burst=0
tx_queue_data2_aifs=3
tx_queue_data2_cwmin=15
tx_queue_data2_cwmax=63
tx_queue_data2_burst=0
tx_queue_data1_aifs=1
tx_queue_data1_cwmin=7
tx_queue_data1_cwmax=15
tx_queue_data1_burst=3.0
tx_queue_data0_aifs=1
tx_queue_data0_cwmin=3
tx_queue_data0_cwmax=7
tx_queue_data0_burst=1.5

ht_capab=[HT40-][HT40+][TX-STBC][RX-STBC1][DSSS_CCK-40]
ignore_broadcast_ssid=1




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
        WIFI_Status="1";

        else
        iw wlan0 set txpower limit 0
        ifconfig wlan0 down
        ifconfig mon.wlan0 down
        WIFI_Status="0";


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.

Seems, hostapd (wireless NIC) don't like ifconfig down/up.

Does anyone have any suggestion how to fix it (without hostapd restart), better avoid happening or at least to debug the issue ?



More information about the Hostap mailing list