hostapd slow with Ralink RT5372 chipset

Robert Milasan rmilasan at suse.com
Thu May 1 04:37:42 EDT 2014


I've got a Ralink (RT5372) wireless adapter setup as an AP on an Atom
machine (Intel Atom N270 with 2GB RAM). The adapter suppose to go up to
300Mbps, but I'm not getting the speed I suppose to.

With my TP-Link router, I get 16-17Mb/s which is expected, but
connected to the Ralink, I start with 16Mb/s and drop to around 12Mb/s.

I'm running this speed test using speedtest.net and with the TP-Links
is always consistent, but with hostapd and Ralink no.

The machine is a Debian 7, with kernel 3.14.2 (custom build). I've also
tried the original kernel (3.2.0 from Debian), but I get even worst
results, like 8-9Mb/s.

I've even tried to rebuild hostapd 2.1, set it up and getting worst
results, I lose about 1-2Mb/s with 2.1 (OK, could be that I didn't
build it properly).

# /etc/hostapd/hostapd.conf:
logger_syslog=-1
logger_syslog_level=1
logger_stdout=-1
logger_stdout_level=1
interface=wlan0
ctrl_interface=/var/run/hostap-wlan0
driver=nl80211
country_code=CZ
ssid=XXXXX
wpa_passphrase=XXXXXX
hw_mode=g
channel=1
wpa=2
auth_algs=1
macaddr_acl=0
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
ignore_broadcast_ssid=0
ieee80211n=1
ieee80211d=1
preamble=0
disassoc_low_ack=1
ht_capab=[HT40+][SHORT-GI-40][GF][TX-STBC][RX-STBC1]
bssid=e8:4e:06:12:25:bd

# tunning
wmm_enabled=1
# Low priority / AC_BK = background
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

# Normal priority / AC_BE = best effort
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

# High priority / AC_VI = video
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

# Highest priority / AC_VO = voice
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

beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
eap_server=0
eapol_key_index_workaround=0

# lsusb:
Bus 001 Device 002: ID 0b95:772b ASIX Electronics Corp. 
Bus 001 Device 003: ID 148f:5372 Ralink Technology, Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

# uname -a
Linux dhcp.visualserver.local 3.14.2-debian #2 SMP Wed Apr 30
13:42:17 CEST 2014 i686 GNU/Linux

# dpkg -l hostapd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                 Version                 Architecture            Description
+++-====================================-=======================-=======================-=============================================================================
ii  hostapd                              1:1.0-3+b1              i386                    user space IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator

or

# /opt/hostapd/sbin/hostapd -v
hostapd v2.1
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2014, Jouni Malinen <j at w1.fi> and contributors

hostapd 2.1 build config:
# cat .config |grep -v ^#|sed '/^$/d'
CONFIG_DRIVER_HOSTAP=y
CONFIG_DRIVER_WIRED=y
CONFIG_DRIVER_NL80211=y
CONFIG_IAPP=y
CONFIG_RSN_PREAUTH=y
CONFIG_PEERKEY=y
CONFIG_IEEE80211W=y
CONFIG_EAP=n
CONFIG_EAP_MD5=n
CONFIG_EAP_TLS=n
CONFIG_EAP_MSCHAPV2=n
CONFIG_EAP_PEAP=n
CONFIG_EAP_GTC=n
CONFIG_EAP_TTLS=n
CONFIG_WPS=n
CONFIG_WPS2=n
CONFIG_WPS_UPNP=n
CONFIG_WPS_NFC=n
CONFIG_PKCS12=y
CONFIG_IPV6=y
CONFIG_IEEE80211R=y
CONFIG_IEEE80211N=y
CONFIG_WNM=n
CONFIG_IEEE80211AC=y
CONFIG_NO_ACCOUNTING=y
CONFIG_NO_RADIUS=y
CONFIG_TLSV11=y
CONFIG_TLSV12=y
CONFIG_INTERWORKING=y
CONFIG_HS20=y
CONFIG_ACS=n

Any thoughts or ideas what is going on?

Also, when I connect to the Ralink setup I get a better bit rate, link
quality and signal level then when I connect to the TP-Link router.

-- 
Robert Milasan

L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmilasan at suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402  6FE7 2F64 167C 1909 6D1A


More information about the HostAP mailing list