projects
/
openwrt
/
staging
/
ynezz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20daaf7
)
mac80211: fix mac address handling for multiple phy/vif
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 17 Jan 2010 01:52:45 +0000
(
01:52
+0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 17 Jan 2010 01:52:45 +0000
(
01:52
+0000)
SVN-Revision: 19177
package/mac80211/files/lib/wifi/mac80211.sh
patch
|
blob
|
history
diff --git
a/package/mac80211/files/lib/wifi/mac80211.sh
b/package/mac80211/files/lib/wifi/mac80211.sh
index 82ff95822293220e1e2016d178bb6cf107028a83..dea57223bc7a2a5471f7c63cfe224addfb664ed3 100644
(file)
--- a/
package/mac80211/files/lib/wifi/mac80211.sh
+++ b/
package/mac80211/files/lib/wifi/mac80211.sh
@@
-81,6
+81,7
@@
enable_mac80211() {
find_mac80211_phy "$device" || return 0
config_get phy "$device" phy
local i=0
+ local macidx=0
fixed=""
[ -n "$country" ] && iw reg set "$country"
@@
-147,12
+148,13
@@
enable_mac80211() {
config_get vif_mac "$vif" macaddr
[ -n "$vif_mac" ] || {
- if [ "$
i
" -gt 0 ]; then
- offset="$(( 2 + $
i
* 4 ))"
+ if [ "$
macidx
" -gt 0 ]; then
+ offset="$(( 2 + $
macidx
* 4 ))"
else
offset="0"
fi
vif_mac="$( printf %02x $((0x$mac_1 + $offset)) ):$mac_2"
+ macidx="$(($macidx + 1))"
}
ifconfig "$ifname" hw ether "$vif_mac"