OpenWrt Forum Archive

Topic: wrtsl54gs mac address problem (possible bug?)

The content of this topic has been archived on 10 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi All,

I have a wrtsl54gs and I am using Kamikaze 7.07 (2.4 kernel).

I noticed that the mac address of the wireless interface was incorrect (00:10:18:90:20:DB) so I erased the nvram because I was told that the NIC mac address was set via cfe using settings stored the nvram.   This did not work either, but I noticed an nvram setting "il0macaddr" with the correct mac address.   Hrmm.  So I reinstalled the stock linksys firmware and checked the mac addresses listed on the status page.  Everything was correct.   So I re-flashed over tftp back to Kamikaze again, and the mac address for the wireless was incorrect again!

Any ideas?  I know it is possible to set the mac address in the config files (that is what I have done for now)  but still something seems wrong.  I shouldn't have to do that.


Thanks,
Sam

Hello Sam,

I had the same problem under WR 0.9 ....
It can be "fixed" by adding an init script ..
Create an init script in /etc/init.d/ named S98fix_wl0_mac:

#!/bin/sh
wifi down
ifconfig `nvram get wl0_ifname` down
ifconfig `nvram get wl0_ifname` hw ether `nvram get wl0_hwaddr`
ifconfig `nvram get wl0_ifname` up
wifi up

chmod +x /etc/init.d/S98fix_wl0_mac

This works in WR 0.9 but not sure about Kamikaze ...
Should work if the nvram variable are set ...

Noel

This is a problem under Whiterussian and Kamikaze.  Fortunately, there is an easy one-time fix for both.  I agree that this is probably a bug because it seems to be specific to WRTSL54GS.

Whiterussian:

nvram set wifi_hwaddr=$(nvram get wl0_hwaddr)
nvram commit

Kamikaze:
(Note: change the wl0 in network.wl0.macaddr to whatever you named your wireless device in /etc/config/wireless and /etc/config/network)

uci set network.wl0.macaddr=$(nvram get wl0_hwaddr)
uci commit

The discussion might have continued from here.