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
AA: toolchain: gcc: backport fixes for gcc bug 54295

Backport of r36486.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36500 3c298f89-4303-0410-b956-a3cf2f4a3e73
Fix ARV4518PW wifi issue. AA/12.09-rc2.

This patch corrects an issue with the wifi for the ARV4518PW in Attitude Adjustment that involves the PCI bus configuration in this board. The bootlog shows: ath5k: phy0: failed to warm reset the MAC Chip.
Commenting this line forces the board definition to be configured with the default PCI_GNT1 | PCI_REQ1 defined in line 138.
The wifi and the usb have been deeply tested and they worked without problems. Maybe would be a good idea to make stress tests.
Once applied this ticket should be closed:
https://dev.openwrt.org/ticket/11704

Signed-off-by: José Vázquez Fernández <ppvazquezfer@gmail.com>
Signed-off-by: Daniel González <dgcbueu@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36510 3c298f89-4303-0410-b956-a3cf2f4a3e73
AA: atheros: backport r36513

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36514 3c298f89-4303-0410-b956-a3cf2f4a3e73
tools/mtools: disable iconv support, it breaks on some systems

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

Backport of r36516

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

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36519 3c298f89-4303-0410-b956-a3cf2f4a3e73
mac80211: fix compile errors on platforms with power management enabled

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

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36520 3c298f89-4303-0410-b956-a3cf2f4a3e73
AA: bcm63xx: fix/enable livebox minipci

Enable the livebox-1 minipci, otherwise, the board won't detect
any device connected on it (included wifi cards).

I've made a patch against current AA svn. I didn't notice this issue
earlier since I'm currently using CFE on this board. It's just a missed
line.

Signed-off-by: Daniel Gonzalez <dgcbueu@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@36528 3c298f89-4303-0410-b956-a3cf2f4a3e73
AA: feeds: use openwrt-routing feed

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