packages: nvram: add asus,rt-ac3100 to set_wireless_led_behaviour quirk
[openwrt/openwrt.git] / package / utils / nvram / files / nvram-bcm53xx.init
1 #!/bin/sh /etc/rc.common
2 # NVRAM setup
3 #
4 # This file handles the NVRAM quirks of various hardware of the bcm53xx target.
5
6 START=02
7
8 clear_partialboots() {
9 # clear partialboots
10
11 case $(board_name) in
12 linksys,panamera)
13 COMMIT=1
14 nvram set partialboots=0
15 ;;
16 esac
17 }
18
19 set_wireless_led_behaviour() {
20 # set Broadcom wireless LED behaviour for both radios
21 # 0:ledbh9 -> Behaviour of 2.4GHz LED
22 # 1:ledbh9 -> Behaviour of 5GHz LED
23 # 0x7 makes the wireless LEDs on, when radios are enabled, and blink when there's activity
24
25 case $(board_name) in
26 asus,rt-ac3100|\
27 asus,rt-ac88u)
28 COMMIT=1
29 nvram set 0:ledbh9=0x7 set 1:ledbh9=0x7
30 ;;
31 esac
32 }
33
34 boot() {
35 . /lib/functions.sh
36
37 clear_partialboots
38 set_wireless_led_behaviour
39
40 [ "$COMMIT" = "1" ] && nvram commit
41 }