ath79/mikrotik: use standard caldata functions
[openwrt/staging/rmilecki.git] / target / linux / ath79 / mikrotik / base-files / etc / hotplug.d / firmware / 10-ath9k-eeprom
1 #!/bin/sh
2
3 [ -e /lib/firmware/$FIRMWARE ] && exit 0
4
5 . /lib/functions/caldata.sh
6
7 wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data"
8 mac_base="$(cat /sys/firmware/mikrotik/hard_config/mac_base)"
9
10 board=$(board_name)
11
12 case "$FIRMWARE" in
13 "ath9k-eeprom-ahb-18100000.wmac.bin")
14 case $board in
15 mikrotik,routerboard-wap-g-5hact2hnd)
16 caldata_from_file $wlan_data 0x1000 0x440
17 ath9k_patch_mac $(macaddr_add "$mac_base" +2)
18 ;;
19 *)
20 caldata_die "board $board is not supported yet"
21 ;;
22 esac
23 ;;
24 esac