diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-04-23 16:32:24 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-04-23 16:32:24 +0000 |
commit | e119a8a107ed0fe0f3f9817566959fc95b027a05 (patch) | |
tree | c91e03b82bdad5ebad4efbb0b026869410473697 /package/mac80211 | |
parent | 90986b5581772a3767f5af2cadbde7310a3df296 (diff) | |
download | mtk-20170518-e119a8a107ed0fe0f3f9817566959fc95b027a05.zip mtk-20170518-e119a8a107ed0fe0f3f9817566959fc95b027a05.tar.gz mtk-20170518-e119a8a107ed0fe0f3f9817566959fc95b027a05.tar.bz2 |
mac80211: use the original mac address for the first virtual interface
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 36408
Diffstat (limited to 'package/mac80211')
-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 bb97211..081dc4d 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 } |