As rt2800 hw can only be configured to mask the last three bits of the programmed MAC addresses, we can't change first byte of the MAC - otherwise it doesn't work. More information about this issue [1].
Should fix #12133. 1. http://marc.info/?l=linux-wireless&m=135387062429809&w=2 Thanks to Paul Fertser and Helmut Shaa. Signed-off-by: Petr Štetiar <yn...@true.cz> --- package/mac80211/files/lib/wifi/mac80211.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh index 1b0bea7..5539fc2 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -272,13 +272,18 @@ get_freq() { iw "$phy" info | grep -E -m1 "(\* ${chan:-....} MHz${chan:+|\\[$chan\\]})" | grep MHz | awk '{print $2}' } +is_not_rt2800() { + grep -E 'Ralink (RT3050|RT3052|RT3350|RT3352)' /proc/cpuinfo >/dev/null && \ + return 1 || return 0 +} + mac80211_generate_mac() { local off="$1" local mac="$2" local oIFS="$IFS"; IFS=":"; set -- $mac; IFS="$oIFS" local b2mask=0x00 - [ $off -gt 0 ] && b2mask=0x02 + [ $off -gt 0 ] && is_not_rt2800 && b2mask=0x02 printf "%02x:%s:%s:%s:%02x:%02x" \ $(( 0x$1 | $b2mask )) $2 $3 $4 \ -- 1.7.9.5 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel