mirror of
https://github.com/openwrt/openwrt.git
synced 2025-12-21 17:04:28 +04:00
Broadcom BCM43602 needs certain NVRAM variables to be set to function. Add a quirk for it and add ASUS RT-AC3200 which has got Broadcom BCM43602 to the quirk. Thanks to Tom Brautaset for finding the needed variables. Signed-off-by: Chester A. Unal <chester.a.unal@arinc9.com>
83 lines
1.7 KiB
Bash
Executable File
83 lines
1.7 KiB
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
# NVRAM setup
|
|
#
|
|
# This file handles the NVRAM quirks of various hardware of the bcm53xx target.
|
|
|
|
START=02
|
|
|
|
clear_partialboots() {
|
|
# clear partialboots
|
|
|
|
case $(board_name) in
|
|
linksys,ea9200|\
|
|
linksys,panamera)
|
|
COMMIT=1
|
|
nvram set partialboots=0
|
|
;;
|
|
esac
|
|
}
|
|
|
|
set_wireless_led_behaviour() {
|
|
# set Broadcom wireless LED behaviour for both radios
|
|
# 0:ledbh9 -> Behaviour of 2.4GHz LED of Broadcom BCM4366
|
|
# 1:ledbh9 -> Behaviour of 5GHz LED of Broadcom BCM4366
|
|
# 0:ledbh10 -> Behaviour of 2.4GHz LED of Broadcom BCM43602
|
|
# 1:ledbh10 -> Behaviour of 5GHz LED of Broadcom BCM43602
|
|
# 0x7 makes the wireless LEDs on, when radios are enabled, and blink when there's activity
|
|
|
|
case $(board_name) in
|
|
asus,rt-ac3100|\
|
|
asus,rt-ac5300|\
|
|
asus,rt-ac88u)
|
|
COMMIT=1
|
|
nvram set 0:ledbh9=0x7 set 1:ledbh9=0x7
|
|
;;
|
|
asus,rt-ac3200)
|
|
COMMIT=1
|
|
nvram set 0:ledbh10=0x7 set 1:ledbh10=0x7
|
|
;;
|
|
esac
|
|
}
|
|
|
|
set_bcm43602_variables() {
|
|
# set variables needed for Broadcom BCM43602
|
|
|
|
case $(board_name) in
|
|
asus,rt-ac3200)
|
|
COMMIT=1
|
|
|
|
# radio 0 (5 GHz)
|
|
nvram set devpath0=pcie/1/3
|
|
nvram set 0:devpath0=sb/1/
|
|
nvram set 0:devid=0x43bc
|
|
nvram set 0:sromrev=11
|
|
nvram set 0:boardflags=0x30040000
|
|
|
|
# radio 1 (2.4 GHz)
|
|
nvram set devpath1=pcie/1/4
|
|
nvram set 1:devpath1=sb/1/
|
|
nvram set 1:devid=0x43bb
|
|
nvram set 1:boardrev=0x1421
|
|
nvram set 1:sromrev=11
|
|
nvram set 1:boardflags=0x20001000
|
|
|
|
# radio 2 (5 GHz)
|
|
nvram set devpath2=pcie/2/1
|
|
nvram set 2:devpath2=sb/1/
|
|
nvram set 2:devid=0x43bc
|
|
nvram set 2:sromrev=11
|
|
nvram set 2:boardflags=0x30040000
|
|
;;
|
|
esac
|
|
}
|
|
|
|
boot() {
|
|
. /lib/functions.sh
|
|
|
|
clear_partialboots
|
|
set_wireless_led_behaviour
|
|
set_bcm43602_variables
|
|
|
|
[ "$COMMIT" = "1" ] && nvram commit
|
|
}
|