set rate in wificonf from wl0_rate (fixes #159)
authorFelix Fietkau <nbd@openwrt.org>
Tue, 10 Jan 2006 21:10:28 +0000 (21:10 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 10 Jan 2006 21:10:28 +0000 (21:10 +0000)
SVN-Revision: 2882

openwrt/package/wificonf/wificonf.c

index 5e7b200ed721679c45ba440d9cf7dcf4c877db27..aba29245dbeb2ecd8ee2b8ceae35a6b20fb3e7a7 100644 (file)
@@ -366,6 +366,10 @@ static void setup_bcom(int skfd, char *ifname)
                val = atoi(v);
                bcom_ioctl(skfd, ifname, WLC_SET_FRAG, &val, sizeof(val));
        }
+       if ((val = atoi(nvram_safe_get(wl_var("rate")))) > 0) {
+               val *= 2;
+               bcom_ioctl(skfd, ifname, WLC_SET_RATE, &val, sizeof(val));
+       }
        if (v = nvram_get(wl_var("dtim"))) {
                val = atoi(v);
                bcom_ioctl(skfd, ifname, WLC_SET_DTIMPRD, &val, sizeof(val));