broadcom-wl: fix led support
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 5 Jul 2014 22:55:40 +0000 (22:55 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 5 Jul 2014 22:55:40 +0000 (22:55 +0000)
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

package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
package/kernel/broadcom-wl/src/wlc.c

index ba31518c1f97efb036a2bfa39f35d0f5fe5ced16..df5072c5b0992d833f1aa90950662f7c2532fde7 100644 (file)
@@ -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}
index 50c40e802f93ce0040eb68116467fcd2378cffe6..db48b736570765fb4b130216d812fef5800b4b5d 100644 (file)
@@ -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))