[OpenWrt-Devel] [PATCH] brcm-wl: fix bash comparison error
Hauke Mehrtens
hauke at hauke-m.de
Thu Aug 14 17:25:55 EDT 2014
On 08/13/2014 03:48 AM, Álvaro Fernández Rojas wrote:
> Fixes "sh: 0xffff: bad number".
>
> Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
> ---
> diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
> index 83afa06..de3a91f 100644
> --- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
> +++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh
> @@ -209,7 +209,8 @@ enable_broadcom() {
> }
>
> local leddc=$(wlc ifname "$device" leddc)
> - [ "$leddc" -eq 0xffff ] || {
> + local leddc_off=$(printf 0xffff\n)
> + [ "$leddc" -eq "$leddc_off" ] || {
> leddc=0x005a000a;
> }
>
Thanks for looking into this, but I am still getting:
root at OpenWrt:/# wifi up
sh: 0xffff: bad number
Hauke
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list