History log of /linux-master/drivers/net/wireless/ath/ath9k/wow.c
Revision Date Author Comments
# e68e9c10 02-Feb-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Register correct WOW details with mac80211

Since the number of user patterns is higher for
newer chips, make sure that this is registered
during initialization.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 6af75e4d 30-Jan-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Fix max pattern check

Since the maximum number of configurable patterns
is chip-specific, use the HW capability instead
of a fixed value for checking if a free pattern
slot is available.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 34d102c9 30-Jan-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Simplify user pattern configuration

There is no need to allocate a new structure and
free it for every user pattern, instead use local
variables.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 8b861715 30-Jan-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Add a debugfs file for WOW

This can be used to force WOW for cards that
are not present in the supported PCI ID list.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# e094c337 30-Jan-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Remove ath9k_hw_wow_event_to_string

Printing the value of the wakeup status is sufficient.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# c4d0975b 30-Jan-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Remove unused BMISS processing

The various variables tracking bmiss interrupts
are not really used anywhere except in a debug
message. Remove them since they have no functional
purpose.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 249943a2 30-Jan-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Check WOW triggers properly

This patch makes sure that valid WOW triggers
are present before trying to suspend the device.
Also, introduce and use ATH_OP_WOW_ENABLED to
bypass PCI suspend and clear it in resume().

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 661d2581 30-Jan-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Fix wow init/deinit

Registering the card as a wakeup source needs to
be done once, during initialization. When the WOW
configuration changes, the card's status as wakeup
source needs to be changed too and this is done
via the set_wakeup() callback. Also, make sure
the device is removed properly using ath9k_deinit_wow().

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 1331f5a7 30-Jan-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Check multi-channel context for WOW

If CONFIG_ATH9K_CHANNEL_CONTEXT is enabled, check whether
multiple contexts are active and if so, return 1 without
enabling WOW since we don't support it in this case.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# dc4b277d 30-Jan-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Check early for multi-vif/STA conditions

If multiple interfaces are active or there is no
associated station interface, bail out early and
return 1 so that mac80211 can proceed with the normal
suspend routine.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 410b4e27 30-Jan-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Remove redundant device_can_wakeup() check

WOW capability is registered with mac80211 only when
the device has the ability to wakeup, so there is no
need to check in the suspend() routine.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 13084c2d 30-Jan-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Return early for error conditions

Do not try to cancel work instances and ANI when
the device is not present or WOW triggers are
not configured. Bail out early and use ath_err()
for such error conditions.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 4895efc9 30-Jan-2015 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Remove ATH9K_HW_WOW_DEVICE_CAPABLE

Enabling WOW based on the chip is incorrect since
it needs to be done for specific sub-devices which
have proper platform support.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# ca529c93 04-Sep-2014 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Fix interface accounting

Currently, the interface count is maintained globally,
but this causes problems in RX filter calculation.
Make the interface count a per-channel-context variable
to fix this.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# ea22df29 23-Aug-2014 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Add a routine to tear down channel contexts

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# bff11766 11-Jun-2014 Felix Fietkau <nbd@openwrt.org>

ath9k: Add channel context worker thread

The channel context worker is used to switch to next requested
channel context.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# eefa01dd 27-Feb-2014 Oleksij Rempel <linux@rempel-privat.de>

ath9k: move sc_flags to ath_common

we will need it for ath9k_htc, may be other drivers too

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 415ec61b 23-Dec-2013 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Remove RX Poll

This patch removes the convoluted and hacky method of
monitoring for connectivity. We rely on mac80211's connection
loss logic and doing it in the driver is not necessary.

The HW check for MAC/BB hangs is also simplified, there
is no need to have a separate work instance for it.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# babaa80a 28-Oct-2013 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Add an initialization routine for WoW

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# e60001e7 27-Oct-2013 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Use CONFIG_ATH9K_WOW

Move the WoW code to wow.c and compile it conditionally
based on CONFIG_ATH9K_WOW.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 846e438f 02-Jun-2013 Sujith Manoharan <c_manoha@qca.qualcomm.com>

ath9k: Enable WoW only for AR9462

The only card with which WoW has been tested and verified is
AR9462. Do not enable it for all cards since WoW is really quirky
and needs to be tested properly with each chip.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 506ed95c 15-Oct-2012 Rajkumar Manoharan <rmanohar@qca.qualcomm.com>

ath9k_hw: Configure new switch table for AR9565 BTCOEX

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 6a73f507 26-Sep-2012 Bala Shanmugam <bkamatch@qca.qualcomm.com>

ath9k: Enable MCI for AR9565

Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 64875c63 10-Jul-2012 Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

ath9k_hw: Add hardware code for WoW

add a new file wow.c which takes care of the hardware code
for WoW.

*program the descriptors and data words to periodically
send Keep Alive Frames.
*program the user defined patterns/masks and pattern length
in the hardware registers.
*'ath9k_hw_wow_enable' is called during the drivers suspend
callback which takes care of the following
- tracking wow event mask (to suppress spurious
wow events)
- properly configure suspend/resume WAR registers
- configure PCIE PM control register
- configure MAC WoW registers and their timeouts
- enabling wow configuration like magic packet,
user patterns based on users configuration
- configuring timeouts for KAL, beacon miss,
aifs, slot time, backoff
- create Keep Alive Pattern ('KAL')
*'ath9k_hw_wow_wakeup' is called during the drivers resume
callback which takes care of the following
- primary task is to find the reason for wakeup
from the wow status register
- configure/restore AR_PCIE_PM_CTRL register
- clear all WoW events
- configure/restore suspend/resume WAR registers

Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: vadivel@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>