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 <nbd@openwrt.org>

Backport of r36353

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36354 3c298f89-4303-0410-b956-a3cf2f4a3e73
mac80211: use the original mac address for the first virtual interface

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

Backport of r36408

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36409 3c298f89-4303-0410-b956-a3cf2f4a3e73
attitude_adjustment: change default version number to 12.09 instead of -rc1

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36420 3c298f89-4303-0410-b956-a3cf2f4a3e73
attitude_adjustment: fix default opkg url in version.mk


git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36421 3c298f89-4303-0410-b956-a3cf2f4a3e73
AA: base-files: backport r36107


git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36423 3c298f89-4303-0410-b956-a3cf2f4a3e73
build: fix one more instance of a stray -rc1

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36425 3c298f89-4303-0410-b956-a3cf2f4a3e73
AA: uci: merge r36377

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36464 3c298f89-4303-0410-b956-a3cf2f4a3e73
AA: iwinfo: merge r34982, r35005, r35007, r35471, r36292, r36339, r36417, r36449, r36450

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36465 3c298f89-4303-0410-b956-a3cf2f4a3e73
mac80211: update to 2013-02-22 from trunk + backports

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36470 3c298f89-4303-0410-b956-a3cf2f4a3e73
AA: iwinfo: merge r36471

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36472 3c298f89-4303-0410-b956-a3cf2f4a3e73