summaryrefslogtreecommitdiffstats
path: root/package/mac80211/files/lib
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-04-23 16:32:24 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-04-23 16:32:24 +0000
commit4afc89a82e6a8e4c3fbced2f15c99ad17b8b126b (patch)
treee933c520f24e6d628a78f41f827d3b68a1423a33 /package/mac80211/files/lib
parente2428ebd83861f693ac94cbe2662021d4e7f3775 (diff)
mac80211: use the original mac address for the first virtual interface
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36408 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/files/lib')
-rw-r--r--package/mac80211/files/lib/wifi/mac80211.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh
index bb9721142..081dc4d88 100644
--- a/package/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/mac80211/files/lib/wifi/mac80211.sh
@@ -282,7 +282,9 @@ mac80211_generate_mac() {
local oIFS="$IFS"; IFS=":"; set -- $ref; IFS="$oIFS"
[ "$((0x$mask1))" -gt 0 ] && {
- b1=$(((0x$1 | 0x2) ^ ($id << 2)))
+ b1="0x$1"
+ [ "$id" -gt 0 ] && \
+ b1=$((($b1 | 0x2) ^ (($id - 1) << 2)))
printf "%02x:%s:%s:%s:%s:%s" $b1 $2 $3 $4 $5 $6
return
}