OSDN Git Service

ath9k: Fix beacon configuration for addition/removal of interfaces
authorBenjamin Berg <benjamin.berg@open-mesh.com>
Mon, 4 Jul 2016 12:37:25 +0000 (14:37 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 8 Jul 2016 14:03:41 +0000 (17:03 +0300)
commitcfda2d8e2314d195902653bdd689e23b287e7d45
treebab79aee376f9a95e4794fb4a6da2e4c72ebadbe
parent11b0ac2e0c1c943c71fd89a6029a3995a0ca7e76
ath9k: Fix beacon configuration for addition/removal of interfaces

This patch fixes some issues with interface reconfiguration. It could
for example happen that an AP interface in beacon slot 0 was removed
leaving an IBSS station in one of the other slots. When this happens
the driver never sends out the beacon as it only tries to send a beacon
from slot 0.

Appart from that the tracking of required changes to the beacon config is
relatively complicated and prone to errors.

The approach taken here is to solve reconfiguration issues is to
reconfigure the beacons when any interface changes. This means that
the complexity of deciding whether an interface change may modify the
beacon configuration is gone. It also means that the beacon config will
be reliably updated when an interface is removed.

The issue that a single non-AP interface might not be in beacon
slot 0 and wouldn't be send out is solved by moving it into the
first slot. The TSF value in hardware is adjusted accordingly so
that the timestamp of the beacons stay consistent.

Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/beacon.c
drivers/net/wireless/ath/ath9k/common.h
drivers/net/wireless/ath/ath9k/main.c