diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2013-10-28 11:31:28 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-12-02 23:24:54 +0400 |
commit | babaa80ac567462a8abda067ec70181d559bbdff (patch) | |
tree | 4fe2a5ff0c3a1a84e1e19cd7a80c78be0ef0b387 /drivers/net/wireless/ath/ath9k/wow.c | |
parent | e60001e7167536d99bb2026367751704c623f9f8 (diff) | |
download | linux-babaa80ac567462a8abda067ec70181d559bbdff.tar.xz |
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>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/wow.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/wow.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/wow.c b/drivers/net/wireless/ath/ath9k/wow.c index e161bbc04dbc..f1cde81bb7a2 100644 --- a/drivers/net/wireless/ath/ath9k/wow.c +++ b/drivers/net/wireless/ath/ath9k/wow.c @@ -16,6 +16,13 @@ #include "ath9k.h" +static const struct wiphy_wowlan_support ath9k_wowlan_support = { + .flags = WIPHY_WOWLAN_MAGIC_PKT | WIPHY_WOWLAN_DISCONNECT, + .n_patterns = MAX_NUM_USER_PATTERN, + .pattern_min_len = 1, + .pattern_max_len = MAX_PATTERN_SIZE, +}; + static void ath9k_wow_map_triggers(struct ath_softc *sc, struct cfg80211_wowlan *wowlan, u32 *wow_triggers) @@ -339,3 +346,16 @@ void ath9k_set_wakeup(struct ieee80211_hw *hw, bool enabled) device_set_wakeup_enable(sc->dev, enabled); mutex_unlock(&sc->mutex); } + +void ath9k_init_wow(struct ieee80211_hw *hw) +{ + struct ath_softc *sc = hw->priv; + + if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_WOW_DEVICE_CAPABLE) && + (sc->driver_data & ATH9K_PCI_WOW) && + device_can_wakeup(sc->dev)) + hw->wiphy->wowlan = &ath9k_wowlan_support; + + atomic_set(&sc->wow_sleep_proc_intr, -1); + atomic_set(&sc->wow_got_bmiss_intr, -1); +} |