mac80211: fix use of local variable
authorLeon M. George <leon@georgemail.eu>
Thu, 30 Apr 2020 08:26:36 +0000 (10:26 +0200)
committerRISCi_ATOM <bob@bobcall.me>
Sun, 2 Aug 2020 15:10:41 +0000 (11:10 -0400)
commitfeac660813b09f1a9e26fcdf7be4987d2a89fac7
treeb97d1650bb0c4f506cdb744919cfbaee3af08f3e
parentd019a44c2dd82eaa2dff23516431f72542cd492b
mac80211: fix use of local variable

mac80211_get_addr is called from mac80211_generate_mac, where the local variable
initialisation id="${macidx:-0}" suggests that macidx is not always defined.
Probably, idx was supposed to be used instead of $(($macidx + 1)).

Fixes: 4d99db168cf7 ("mac80211: try to get interface addresses from wiphy sysfs 'addresses' if no mask is set")

Signed-off-by: Leon M. George <leon@georgemail.eu>
(cherry picked from commit 8f95220bcb554b1b668114e5264ebce4028c5f93)
package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh