[PATCH] wme_ac_??_cw{min,max} parameters are in log form
Lennert Buytenhek
buytenh
Wed Jan 6 05:42:54 PST 2010
When the wme_ac_??_cw{min,max} parameters aren't specified in
hostapd.conf, hostapd uses an incorrect set of default values, as the
defaults are in 2^x-1 form instead of in log form. This patch changes
them over to the expected log form.
--
PS: I need this patch for hostapd 0.6.9, and while I didn't retest on
git HEAD, from a quick glance at gitweb it seems that this might
still be needed.
PS2: Please CC on replies, not on the list.
PS3: Note how the aCWmax = 1024 is doubly wrong -- neither in log
form nor in 2^x-1 form.
--- hostapd/config.c.orig 2010-01-06 07:41:54.127282642 +0100
+++ hostapd/config.c 2010-01-06 07:42:11.717273262 +0100
@@ -201,15 +201,15 @@
struct hostapd_config *conf;
struct hostapd_bss_config *bss;
int i;
- const int aCWmin = 15, aCWmax = 1024;
+ const int aCWmin = 4, aCWmax = 10;
const struct hostapd_wme_ac_params ac_bk =
{ aCWmin, aCWmax, 7, 0, 0 }; /* background traffic */
const struct hostapd_wme_ac_params ac_be =
{ aCWmin, aCWmax, 3, 0, 0 }; /* best effort traffic */
const struct hostapd_wme_ac_params ac_vi = /* video traffic */
- { aCWmin >> 1, aCWmin, 2, 3000 / 32, 1 };
+ { aCWmin - 1, aCWmin, 2, 3000 / 32, 1 };
const struct hostapd_wme_ac_params ac_vo = /* voice traffic */
- { aCWmin >> 2, aCWmin >> 1, 2, 1500 / 32, 1 };
+ { aCWmin - 2, aCWmin - 1, 2, 1500 / 32, 1 };
conf = os_zalloc(sizeof(*conf));
bss = os_zalloc(sizeof(*bss));
More information about the Hostap
mailing list