ath9k: Fix up hardware mode and beacons with multiple vifs.
authorBen Greear <greearb@candelatech.com>
Sat, 15 Jan 2011 19:13:48 +0000 (19:13 +0000)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 19 Jan 2011 16:36:11 +0000 (11:36 -0500)
commit4801416c76a3a355076d6d371c00270dfe332e1c
treee445749a5c5549e1f919e0a9a3f2d5956ae699b5
parentf0b8220c64242e19f41ad1b4eec3225d53715cbe
ath9k: Fix up hardware mode and beacons with multiple vifs.

When using a mixture of AP and Station interfaces,
the hardware mode was using the type of the
last VIF registered.  Instead, we should keep track
of the number of different types of vifs and set the
mode accordingly.

In addtion, use the vif type instead of hardware opmode
when dealing with beacons.

Attempt to move some of the common setup code into smaller
methods so we can re-use it when changing vif mode as
well as adding/deleting vifs.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/beacon.c
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/ath/ath9k/virtual.c