|
@@ -21,10 +21,22 @@ rt2x00_eeprom_extract() {
|
|
rt2x00_eeprom_die "failed to extract from $mtd"
|
|
rt2x00_eeprom_die "failed to extract from $mtd"
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+rt2x00_eeprom_set_macaddr() {
|
|
|
|
+ local macaddr=$1
|
|
|
|
+
|
|
|
|
+ [ -n "$macaddr" ] || \
|
|
|
|
+ rt2x00_eeprom_die "invalid wlan mac address"
|
|
|
|
+
|
|
|
|
+ macaddr_2bin $macaddr | dd of=/lib/firmware/$FIRMWARE \
|
|
|
|
+ conv=notrunc bs=1 seek=4 count=6 2>/dev/null || \
|
|
|
|
+ rt2x00_eeprom_die "failed to write mac address to eeprom file"
|
|
|
|
+}
|
|
|
|
+
|
|
FW="/lib/firmware/$FIRMWARE"
|
|
FW="/lib/firmware/$FIRMWARE"
|
|
[ -e "$FW" ] && exit 0
|
|
[ -e "$FW" ] && exit 0
|
|
|
|
|
|
. /lib/ramips.sh
|
|
. /lib/ramips.sh
|
|
|
|
+. /lib/functions/system.sh
|
|
|
|
|
|
board=$(ramips_board_name)
|
|
board=$(ramips_board_name)
|
|
|
|
|