madwifi: fix setting outdoor mode

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15694 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Felix Fietkau 2009-05-07 18:30:16 +00:00
parent 3da36e0eb2
commit 72385f436e
1 changed files with 9 additions and 8 deletions

View File

@ -565,13 +565,14 @@
struct ath_hal *ah = sc->sc_ah; struct ath_hal *ah = sc->sc_ah;
u_int val; u_int val;
u_int tab_3_val[3]; u_int tab_3_val[3];
@@ -11030,25 +11135,33 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl @@ -11030,25 +11135,34 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
lenp, ppos); lenp, ppos);
if (ret == 0) { if (ret == 0) {
switch ((long)ctl->extra2) { switch ((long)ctl->extra2) {
+ case ATH_REGDOMAIN: + case ATH_REGDOMAIN:
+ ath_hal_setregdomain(ah, val); + ath_hal_setregdomain(ah, val);
+ break; + break;
+ case ATH_OUTDOOR:
+ case ATH_COUNTRYCODE: + case ATH_COUNTRYCODE:
+ case ATH_CHANBW: + case ATH_CHANBW:
+ ret = ath_sysctl_setchanparam(sc, (long) ctl->extra2, val); + ret = ath_sysctl_setchanparam(sc, (long) ctl->extra2, val);
@ -612,7 +613,7 @@
break; break;
case ATH_SOFTLED: case ATH_SOFTLED:
if (val != sc->sc_softled) { if (val != sc->sc_softled) {
@@ -11201,6 +11314,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl @@ -11201,6 +11315,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
} }
} else { } else {
switch ((long)ctl->extra2) { switch ((long)ctl->extra2) {
@ -622,7 +623,7 @@
case ATH_SLOTTIME: case ATH_SLOTTIME:
val = ath_hal_getslottime(ah); val = ath_hal_getslottime(ah);
break; break;
@@ -11219,6 +11335,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl @@ -11219,6 +11336,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
case ATH_COUNTRYCODE: case ATH_COUNTRYCODE:
ath_hal_getcountrycode(ah, &val); ath_hal_getcountrycode(ah, &val);
break; break;
@ -632,7 +633,7 @@
case ATH_MAXVAPS: case ATH_MAXVAPS:
val = ath_maxvaps; val = ath_maxvaps;
break; break;
@@ -11332,11 +11451,17 @@ static const ctl_table ath_sysctl_templa @@ -11332,11 +11452,17 @@ static const ctl_table ath_sysctl_templa
}, },
{ .ctl_name = CTL_AUTO, { .ctl_name = CTL_AUTO,
.procname = "countrycode", .procname = "countrycode",
@ -651,7 +652,7 @@
.procname = "maxvaps", .procname = "maxvaps",
.mode = 0444, .mode = 0444,
.proc_handler = ath_sysctl_halparam, .proc_handler = ath_sysctl_halparam,
@@ -11344,7 +11469,7 @@ static const ctl_table ath_sysctl_templa @@ -11344,7 +11470,7 @@ static const ctl_table ath_sysctl_templa
}, },
{ .ctl_name = CTL_AUTO, { .ctl_name = CTL_AUTO,
.procname = "regdomain", .procname = "regdomain",
@ -660,7 +661,7 @@
.proc_handler = ath_sysctl_halparam, .proc_handler = ath_sysctl_halparam,
.extra2 = (void *)ATH_REGDOMAIN, .extra2 = (void *)ATH_REGDOMAIN,
}, },
@@ -11407,6 +11532,12 @@ static const ctl_table ath_sysctl_templa @@ -11407,6 +11533,12 @@ static const ctl_table ath_sysctl_templa
.extra2 = (void *)ATH_ACKRATE, .extra2 = (void *)ATH_ACKRATE,
}, },
{ .ctl_name = CTL_AUTO, { .ctl_name = CTL_AUTO,
@ -673,7 +674,7 @@
.procname = "rp", .procname = "rp",
.mode = 0200, .mode = 0200,
.proc_handler = ath_sysctl_halparam, .proc_handler = ath_sysctl_halparam,
@@ -11647,13 +11778,6 @@ static ctl_table ath_static_sysctls[] = @@ -11647,13 +11779,6 @@ static ctl_table ath_static_sysctls[] =
}, },
#endif #endif
{ .ctl_name = CTL_AUTO, { .ctl_name = CTL_AUTO,
@ -687,7 +688,7 @@
.procname = "maxvaps", .procname = "maxvaps",
.mode = 0444, .mode = 0444,
.data = &ath_maxvaps, .data = &ath_maxvaps,
@@ -11661,13 +11785,6 @@ static ctl_table ath_static_sysctls[] = @@ -11661,13 +11786,6 @@ static ctl_table ath_static_sysctls[] =
.proc_handler = proc_dointvec .proc_handler = proc_dointvec
}, },
{ .ctl_name = CTL_AUTO, { .ctl_name = CTL_AUTO,