1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-24 06:45:31 +02:00

fix setting gmode, when wl0_gmode is unset

git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1336 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2005-07-04 18:22:07 +00:00
parent a889ff9a14
commit 55ec07a715

View File

@ -270,9 +270,14 @@ void setup_bcom(int skfd, char *ifname)
int override = WLC_G_PROTECTION_OFF;
int control = WLC_G_PROTECTION_CTL_OFF;
val = atoi(nvram_safe_get(wl_var("gmode")));
if (v = nvram_get(wl_var("gmode")))
val = atoi(v);
else
val = 1;
if (val > 5)
val = 1;
bcom_ioctl(skfd, ifname, WLC_SET_GMODE, &val, sizeof(val));
if (nvram_match(wl_var("gmode_protection"), "auto")) {