aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2014-07-05 22:55:40 +0000
committerHauke Mehrtens <hauke@openwrt.org>2014-07-05 22:55:40 +0000
commita91dd18ada61fab16b1cd2a0cd701d94dd02057c (patch)
tree364f31f675aa9412c0bf07d288c4a8020bff3cff /package
parent736bb2f1a567359b332faf2ac57d8b3fa8644d35 (diff)
downloadmaster-187ad058-a91dd18ada61fab16b1cd2a0cd701d94dd02057c.tar.gz
master-187ad058-a91dd18ada61fab16b1cd2a0cd701d94dd02057c.tar.bz2
master-187ad058-a91dd18ada61fab16b1cd2a0cd701d94dd02057c.zip
broadcom-wl: fix led support
Some devices have an nvram setting, which make broadcom-wl turn of the led all the time. When the driver is switched on and we find such a setting we replace it with a better value. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41518 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh7
-rw-r--r--package/kernel/broadcom-wl/src/wlc.c8
2 files changed, 15 insertions, 0 deletions
diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
index ba31518c1f..df5072c5b0 100644
--- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
+++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
@@ -120,6 +120,7 @@ disable_broadcom() {
wlc ifname "$device" stdin <<EOF
$ifdown
+leddc 0xffff
EOF
)
true
@@ -207,6 +208,11 @@ enable_broadcom() {
esac
}
+ local leddc = $(wlc ifname "$device" leddc)
+ if [ "$leddc" -eq 0xffff ]; then
+ leddc = 0x0;
+ fi
+
local _c=0
local nas="$(which nas)"
local if_pre_up if_up nas_cmd
@@ -384,6 +390,7 @@ band ${band:-0}
${nmode:+nmode $nmode}
${nmode:+${nreqd:+nreqd $nreqd}}
${gmode:+gmode $gmode}
+leddc $leddc
apsta $apsta
ap $ap
${mssid:+mssid $mssid}
diff --git a/package/kernel/broadcom-wl/src/wlc.c b/package/kernel/broadcom-wl/src/wlc.c
index 50c40e802f..db48b73657 100644
--- a/package/kernel/broadcom-wl/src/wlc.c
+++ b/package/kernel/broadcom-wl/src/wlc.c
@@ -999,6 +999,14 @@ static const struct wlc_call wlc_calls[] = {
.data.str = "cap",
.desc = "Number of VIF's supported"
},
+ {
+ .name = "leddc",
+ .param = INT,
+ .handler = wlc_iovar,
+ .data.str = "leddc",
+ .desc = "LED Duty Cycle"
+ },
+
};
#define wlc_calls_size (sizeof(wlc_calls) / sizeof(struct wlc_call))