diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-04-23 16:34:08 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-04-23 16:34:08 +0000 |
commit | e4b4cff4434985a30b8a42129149778b8968842b (patch) | |
tree | c562f8a0178c25f5ecb79db854362eb4708c7380 | |
parent | 8d2bcfc1b8b6408d4f20182592a493892721b683 (diff) | |
download | upstream-e4b4cff4434985a30b8a42129149778b8968842b.tar.gz upstream-e4b4cff4434985a30b8a42129149778b8968842b.tar.bz2 upstream-e4b4cff4434985a30b8a42129149778b8968842b.zip |
mac80211: use the original mac address for the first virtual interface
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Backport of r36408
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36409 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/mac80211/files/lib/wifi/mac80211.sh | 4 |
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 90282d6547..c3fbc5017e 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -285,7 +285,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 } |