mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-26 08:32:38 +00:00
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> SVN-Revision: 41518
This commit is contained in:
parent
8e4efd42d9
commit
4ec8908669
@ -120,6 +120,7 @@ disable_broadcom() {
|
|||||||
|
|
||||||
wlc ifname "$device" stdin <<EOF
|
wlc ifname "$device" stdin <<EOF
|
||||||
$ifdown
|
$ifdown
|
||||||
|
leddc 0xffff
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
true
|
true
|
||||||
@ -207,6 +208,11 @@ enable_broadcom() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local leddc = $(wlc ifname "$device" leddc)
|
||||||
|
if [ "$leddc" -eq 0xffff ]; then
|
||||||
|
leddc = 0x0;
|
||||||
|
fi
|
||||||
|
|
||||||
local _c=0
|
local _c=0
|
||||||
local nas="$(which nas)"
|
local nas="$(which nas)"
|
||||||
local if_pre_up if_up nas_cmd
|
local if_pre_up if_up nas_cmd
|
||||||
@ -384,6 +390,7 @@ band ${band:-0}
|
|||||||
${nmode:+nmode $nmode}
|
${nmode:+nmode $nmode}
|
||||||
${nmode:+${nreqd:+nreqd $nreqd}}
|
${nmode:+${nreqd:+nreqd $nreqd}}
|
||||||
${gmode:+gmode $gmode}
|
${gmode:+gmode $gmode}
|
||||||
|
leddc $leddc
|
||||||
apsta $apsta
|
apsta $apsta
|
||||||
ap $ap
|
ap $ap
|
||||||
${mssid:+mssid $mssid}
|
${mssid:+mssid $mssid}
|
||||||
|
@ -999,6 +999,14 @@ static const struct wlc_call wlc_calls[] = {
|
|||||||
.data.str = "cap",
|
.data.str = "cap",
|
||||||
.desc = "Number of VIF's supported"
|
.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))
|
#define wlc_calls_size (sizeof(wlc_calls) / sizeof(struct wlc_call))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user