int override = WLC_G_PROTECTION_OFF;
int control = WLC_G_PROTECTION_CTL_OFF;
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;
+
bcom_ioctl(skfd, ifname, WLC_SET_GMODE, &val, sizeof(val));
if (nvram_match(wl_var("gmode_protection"), "auto")) {
bcom_ioctl(skfd, ifname, WLC_SET_GMODE, &val, sizeof(val));
if (nvram_match(wl_var("gmode_protection"), "auto")) {