From b929e332549ff2910aa24438e9628145cf432af2 Mon Sep 17 00:00:00 2001 From: Roman Yeryomin Date: Mon, 8 Jul 2013 12:49:50 +0300 Subject: Set wireless mac from /etc/config/wireless if it's defined. References #23. Signed-off-by: Roman Yeryomin --- target/linux/realtek/base-files/lib/wifi/realtek.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/linux/realtek/base-files/lib/wifi/realtek.sh b/target/linux/realtek/base-files/lib/wifi/realtek.sh index 1dd1b90d1..27ba1f1e2 100755 --- a/target/linux/realtek/base-files/lib/wifi/realtek.sh +++ b/target/linux/realtek/base-files/lib/wifi/realtek.sh @@ -193,6 +193,11 @@ enable_realtek() { # dirty workaround for wlan0 not appearing when router is started bridge="br-lan" + # set mac address from /etc/config/wireless + local macaddr + config_get macaddr "$device" macaddr + [ -z "$macaddr" ] || ifconfig "$device" hw ether "$macaddr" + # set led to link/tx/rx (data,management) mode # have to be here because router will lock in wlan0 will be up durig this iwpriv "$ifname" set_mib led_type=11 @@ -216,6 +221,7 @@ enable_realtek() { start_hostapd=1 [ -n "$start_hostapd" ] || { + local htmode config_get htmode "$device" htmode case "$htmode" in *HT40-*) -- cgit v1.2.3