mac80211: rework mac address allocation
authorFelix Fietkau <[email protected]>
Wed, 17 Apr 2013 15:37:36 +0000 (15:37 +0000)
committerFelix Fietkau <[email protected]>
Wed, 17 Apr 2013 15:37:36 +0000 (15:37 +0000)
commitffa419433ad728d7c48e129772f6fad37e7943ed
tree709c958ec3556a8307ecbd8e098ee13976871acb
parentb2c231f950da86828e973fa6d234da6764738306
mac80211: rework mac address allocation

If the first byte is available in the address mask, use only that one -
set the local bit and xor it with the id << 2. This ensures that there
are no hardware BSSID & BSSID-mask conflicts with devices that have
almost the same MAC address with just a small offset. The MAC address
conflict has been observed in a deployment with some devices from the
same batch when running with multiple interfaces.

If only some bits of the last byte are available, xor the id onto the
last MAC address byte (relevant mostly for Ralink devices).

In other cases (should not happen at this point), use the previous MAC
address offset calculation but without the local bit.

Signed-off-by: Felix Fietkau <[email protected]>
Backport of r36353

SVN-Revision: 36354
package/mac80211/files/lib/wifi/mac80211.sh