mac80211: Allow single vif mac address change with addr_mask
authorHelmut Schaa <helmut.schaa@googlemail.com>
Mon, 27 May 2013 08:43:09 +0000 (10:43 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 27 May 2013 09:26:48 +0000 (11:26 +0200)
commitac20976dcaeea3e77e40e9aac8f3799d2a22ea2b
tree7bc556412be7f6af7abf15a500d973e48d993dc9
parentc8aa22db0112f640ac6631347f850879c621840b
mac80211: Allow single vif mac address change with addr_mask

When changing the MAC address of a single vif mac80211 will check if
the new address fits into the address mask specified by the driver.
This only needs to be done when using multiple BSSIDs. Hence, check
the new address only against all other vifs.

Also fix the MAC address assignment on new interfaces if the user
changed the address of a vif such that perm_addr is not covered by
addr_mask anymore.

Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=57371

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Reported-by: Alessandro Lannocca <alessandro.lannocca@gmail.com>
Cc: Alessandro Lannocca <alessandro.lannocca@gmail.com>
Cc: Bruno Randolf <br1@thinktube.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/iface.c