diff mbox

[OpenWrt-Devel] Improve wifi speed up to 2 times in AP mode.

Message ID CALcFQX4ok_E8_awSDiVkUqGJ4ixPVy6Qev0hVZjHTdWiu8NFYA@mail.gmail.com
State Rejected
Headers show

Commit Message

N.Leiten June 28, 2015, 6:16 p.m. UTC
Hi.

There's some general problem in hostapd configuration for several devices
was observed. In vanilla trunk versions of openwrt I got nearly 40-45Mbit/s
speed on Ralink RT5350 based devices and Atheros AR71xx platform (tp-link
wr841nd). The problem was in /var/run/hostapd-phy0.conf. It seems it is not
enough just set 'wmm_enable=1' to actually enable WME/WMM on interface, it
also need all WMM related keys be set. So I just added it with standart
definitions from hostapd.conf to /lib/netifd/hostapd.sh.

As a result I got full 100Mbit/s on AR71XX platform and 70-80Mbit on
Ralink. I think it is good performance improvement at this moment.

Patch was created against current trunk version.

Comments

Linus Lüssing June 28, 2015, 9:21 p.m. UTC | #1
On Sun, Jun 28, 2015 at 09:16:58PM +0300, N.Leiten wrote:
> As a result I got full 100Mbit/s on AR71XX platform and 70-80Mbit on
> Ralink. I think it is good performance improvement at this moment.

Interesting, thanks for sharing your results!

If these settings are generally diserable, maybe it might make
sense to patch hostapd to set them by default if they aren't set
explicitly, instead of through netifd? That way anyone, not only
OpenWRT users might benefit from it.

Cheers, Linus
N.Leiten June 28, 2015, 9:59 p.m. UTC | #2
The thing is - this parameters I've got from hostapd.conf on my host
machine and due to comments they are strictly set from 802.11. As for
hostapd itself, I don't gone in deep inspection of WMM part but I saw
some default values regarding tx_queue* parameters (according to
comments this section is used to prioritize traffic from AP to STAs,
and WMM part is in opposite direction, in my oppinion last one is also
used to determine WMM capable stations which gives us such speed
improvements) in source code of hostapd, maybe there's some analogue
for WMM but somehow it don't get applied when configuration file
loaded. So for now the easiest and fast way to fix this is to set
config with parameters that hostapd expects.

2015-06-29 0:21 GMT+03:00 Linus Lüssing <linus.luessing@c0d3.blue>:
> On Sun, Jun 28, 2015 at 09:16:58PM +0300, N.Leiten wrote:
>> As a result I got full 100Mbit/s on AR71XX platform and 70-80Mbit on
>> Ralink. I think it is good performance improvement at this moment.
>
> Interesting, thanks for sharing your results!
>
> If these settings are generally diserable, maybe it might make
> sense to patch hostapd to set them by default if they aren't set
> explicitly, instead of through netifd? That way anyone, not only
> OpenWRT users might benefit from it.
>
> Cheers, Linus
Daniel Petre July 14, 2015, 7:43 p.m. UTC | #3
On 06/28/2015 09:16 PM, N.Leiten wrote:
> Hi.
> 
> There's some general problem in hostapd configuration for several devices was observed. In vanilla trunk versions of openwrt I got nearly 40-45Mbit/s speed on Ralink RT5350 based devices and Atheros AR71xx platform (tp-link wr841nd). The problem was in /var/run/hostapd-phy0.conf. It seems it is not enough just set 'wmm_enable=1' to actually enable WME/WMM on interface, it also need all WMM related keys be set. So I just added it with standart definitions from hostapd.conf to /lib/netifd/hostapd.sh.
> 
> As a result I got full 100Mbit/s on AR71XX platform and 70-80Mbit on Ralink. I think it is good performance improvement at this moment.
> 

Hi, this does not seem to make any difference in CC with a tp-link wdr3600..

> Patch was created against current trunk version.
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
N.Leiten July 15, 2015, 5:24 a.m. UTC | #4
Sorry, I must admit that there was a mistake in my tests.
Patch already declined.


In email dated Вторник - 14 июля 2015 22:43:36 user Daniel Petre wrote:
> On 06/28/2015 09:16 PM, N.Leiten wrote:
> > Hi.
> > 
> > There's some general problem in hostapd configuration for several devices was observed. In vanilla trunk versions of openwrt I got nearly 40-45Mbit/s speed on Ralink RT5350 based devices and Atheros AR71xx platform (tp-link wr841nd). The problem was in /var/run/hostapd-phy0.conf. It seems it is not enough just set 'wmm_enable=1' to actually enable WME/WMM on interface, it also need all WMM related keys be set. So I just added it with standart definitions from hostapd.conf to /lib/netifd/hostapd.sh.
> > 
> > As a result I got full 100Mbit/s on AR71XX platform and 70-80Mbit on Ralink. I think it is good performance improvement at this moment.
> > 
> 
> Hi, this does not seem to make any difference in CC with a tp-link wdr3600..
> 
> > Patch was created against current trunk version.
> > 
> > 
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> > 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
diff mbox

Patch

diff -c -r a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
*** a/package/network/services/hostapd/files/netifd.sh	2015-06-09 15:00:07.000000000 +0300
--- b/package/network/services/hostapd/files/netifd.sh	2015-06-28 21:01:39.054827123 +0300
***************
*** 207,212 ****
--- 207,235 ----
  	append bss_conf "disassoc_low_ack=$disassoc_low_ack" "$N"
  	append bss_conf "preamble=$short_preamble" "$N"
  	append bss_conf "wmm_enabled=$wmm" "$N"
+ 	if [ "$wmm" -gt 0 ];then
+ 		append bss_conf "wmm_ac_bk_cwmin=4" "$N"
+ 		append bss_conf "wmm_ac_bk_cwmax=10" "$N"
+ 		append bss_conf "wmm_ac_bk_aifs=7" "$N"
+ 		append bss_conf "wmm_ac_bk_txop_limit=0" "$N"
+ 		append bss_conf "wmm_ac_bk_acm=0" "$N"
+ 		append bss_conf "wmm_ac_be_aifs=3" "$N"
+ 		append bss_conf "wmm_ac_be_cwmin=4" "$N"
+ 		append bss_conf "wmm_ac_be_cwmax=10" "$N"
+ 		append bss_conf "wmm_ac_be_txop_limit=0" "$N"
+ 		append bss_conf "wmm_ac_be_acm=0" "$N"
+ 		append bss_conf "wmm_ac_vi_aifs=2" "$N"
+ 		append bss_conf "wmm_ac_vi_cwmin=3" "$N"
+ 		append bss_conf "wmm_ac_vi_cwmax=4" "$N"
+ 		append bss_conf "wmm_ac_vi_txop_limit=94" "$N"
+ 		append bss_conf "wmm_ac_vi_acm=0" "$N"
+ 		append bss_conf "wmm_ac_vo_aifs=2" "$N"
+ 		append bss_conf "wmm_ac_vo_cwmin=2" "$N"
+ 		append bss_conf "wmm_ac_vo_cwmax=3" "$N"
+ 		append bss_conf "wmm_ac_vo_txop_limit=47" "$N"
+ 		append bss_conf "wmm_ac_vo_acm=0" "$N"
+ 	fi
+ 
  	append bss_conf "ignore_broadcast_ssid=$hidden" "$N"
  	append bss_conf "uapsd_advertisement_enabled=$uapsd" "$N"