diff options
-rw-r--r-- | package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 6ca12084cf..e12a804271 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -409,7 +409,7 @@ mac80211_generate_mac() { [ "$mask" = "00:00:00:00:00:00" ] && { mask="ff:ff:ff:ff:ff:ff"; - [ "$(wc -l < /sys/class/ieee80211/${phy}/addresses)" -gt 1 ] && { + [ "$(wc -l < /sys/class/ieee80211/${phy}/addresses)" -gt $id ] && { addr="$(mac80211_get_addr "$phy" "$id")" [ -n "$addr" ] && { echo "$addr" @@ -429,7 +429,7 @@ mac80211_generate_mac() { [ "$((0x$mask1))" -gt 0 ] && { b1="0x$1" [ "$id" -gt 0 ] && \ - b1=$(($b1 ^ ((($id - !($b1 & 2)) << 2) | 0x2))) + b1=$(($b1 ^ ((($id - !($b1 & 2)) << 2)) | 0x2)) printf "%02x:%s:%s:%s:%s:%s" $b1 $2 $3 $4 $5 $6 return } |