mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 00:41:17 +00:00
fix setting gmode, when wl0_gmode is unset
SVN-Revision: 1336
This commit is contained in:
parent
d26d551aa5
commit
514eef8415
@ -270,9 +270,14 @@ void setup_bcom(int skfd, char *ifname)
|
|||||||
int override = WLC_G_PROTECTION_OFF;
|
int override = WLC_G_PROTECTION_OFF;
|
||||||
int control = WLC_G_PROTECTION_CTL_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)
|
if (val > 5)
|
||||||
val = 1;
|
val = 1;
|
||||||
|
|
||||||
bcom_ioctl(skfd, ifname, WLC_SET_GMODE, &val, sizeof(val));
|
bcom_ioctl(skfd, ifname, WLC_SET_GMODE, &val, sizeof(val));
|
||||||
|
|
||||||
if (nvram_match(wl_var("gmode_protection"), "auto")) {
|
if (nvram_match(wl_var("gmode_protection"), "auto")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user