mt76: mt76x02: only update the base mac address if necessary
authorFelix Fietkau <nbd@nbd.name>
Fri, 1 Mar 2019 15:51:03 +0000 (16:51 +0100)
committerFelix Fietkau <nbd@nbd.name>
Thu, 7 Mar 2019 11:50:23 +0000 (12:50 +0100)
commit3fd0824a2f800a2870569d385917ae1102647055
treeb9ab7829eda09a46fbd0c31124bac9ed44babc0b
parent7b25d3b8e485c7721cba9c71b44d1c286e61c8e7
mt76: mt76x02: only update the base mac address if necessary

Also update the mask first before calculating the vif index.
Fixes an issue where adding back the same interfaces in a different order
fails because of duplicate vif index use

Fixes: 06662264ce2ad ("mt76x02: use mask for vifs")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76x02_util.c