diff options
author | Felix Fietkau <nbd@openwrt.org> | 2005-10-01 17:39:57 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2005-10-01 17:39:57 +0000 |
commit | 6745fbced506a5105cd14f9116606c3eff9a75b9 (patch) | |
tree | dd90c6c1caede7a352d319a0001ef366ba99af93 /package/wificonf/wificonf.c | |
parent | cf3caac306f813cef05f00c4fc1a80196dcc3f01 (diff) | |
download | master-187ad058-6745fbced506a5105cd14f9116606c3eff9a75b9.tar.gz master-187ad058-6745fbced506a5105cd14f9116606c3eff9a75b9.tar.bz2 master-187ad058-6745fbced506a5105cd14f9116606c3eff9a75b9.zip |
disable speedbooster if wds is enabled
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2016 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/wificonf/wificonf.c')
-rw-r--r-- | package/wificonf/wificonf.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/package/wificonf/wificonf.c b/package/wificonf/wificonf.c index 5feab6ee0a..0d652ee159 100644 --- a/package/wificonf/wificonf.c +++ b/package/wificonf/wificonf.c @@ -172,6 +172,7 @@ void setup_bcom(int skfd, char *ifname) char buf[8192]; char wbuf[80]; char *v; + int wds_enabled = 0; if (bcom_ioctl(skfd, ifname, WLC_GET_MAGIC, &val, sizeof(val)) < 0) return; @@ -185,16 +186,9 @@ void setup_bcom(int skfd, char *ifname) buf[3] = 0; bcom_ioctl(skfd, ifname, WLC_SET_COUNTRY, buf, 4); - /* Set up afterburner */ - val = ABO_AUTO; - if (nvram_enabled(wl_var("afterburner"))) - val = ABO_ON; - if (nvram_disabled(wl_var("afterburner"))) - val = ABO_OFF; - bcom_set_val(skfd, ifname, "afterburner_override", &val, sizeof(val)); - /* Set other options */ val = nvram_enabled(wl_var("lazywds")); + wds_enabled = val; bcom_ioctl(skfd, ifname, WLC_SET_LAZYWDS, &val, sizeof(val)); if (v = nvram_get(wl_var("frag"))) { @@ -270,11 +264,25 @@ void setup_bcom(int skfd, char *ifname) if (ether_atoe(wbuf, addr->ether_addr_octet)) { wdslist->count++; addr++; + wds_enabled = 1; } } bcom_ioctl(skfd, ifname, WLC_SET_WDSLIST, buf, sizeof(buf)); } + /* Set up afterburner, disabled it if WDS is enabled */ + if (wds_enabled) { + val = ABO_OFF; + } else { + val = ABO_AUTO; + if (nvram_enabled(wl_var("afterburner"))) + val = ABO_ON; + if (nvram_disabled(wl_var("afterburner"))) + val = ABO_OFF; + } + + bcom_set_val(skfd, ifname, "afterburner_override", &val, sizeof(val)); + /* Set up G mode */ bcom_ioctl(skfd, ifname, WLC_GET_PHYTYPE, &val, sizeof(val)); if (val == 2) { |