Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sujith Manoharan and committed by
Kalle Valo
e68e9c10 a28815db

+14 -2
+14 -2
drivers/net/wireless/ath/ath9k/wow.c
··· 16 16 17 17 #include "ath9k.h" 18 18 19 - static const struct wiphy_wowlan_support ath9k_wowlan_support = { 19 + static const struct wiphy_wowlan_support ath9k_wowlan_support_legacy = { 20 20 .flags = WIPHY_WOWLAN_MAGIC_PKT | WIPHY_WOWLAN_DISCONNECT, 21 21 .n_patterns = MAX_NUM_USER_PATTERN, 22 + .pattern_min_len = 1, 23 + .pattern_max_len = MAX_PATTERN_SIZE, 24 + }; 25 + 26 + static const struct wiphy_wowlan_support ath9k_wowlan_support = { 27 + .flags = WIPHY_WOWLAN_MAGIC_PKT | WIPHY_WOWLAN_DISCONNECT, 28 + .n_patterns = MAX_NUM_PATTERN - 2, 22 29 .pattern_min_len = 1, 23 30 .pattern_max_len = MAX_PATTERN_SIZE, 24 31 }; ··· 327 320 void ath9k_init_wow(struct ieee80211_hw *hw) 328 321 { 329 322 struct ath_softc *sc = hw->priv; 323 + struct ath_hw *ah = sc->sc_ah; 330 324 331 325 if ((sc->driver_data & ATH9K_PCI_WOW) || sc->force_wow) { 332 - hw->wiphy->wowlan = &ath9k_wowlan_support; 326 + if (AR_SREV_9462_20_OR_LATER(ah) || AR_SREV_9565_11_OR_LATER(ah)) 327 + hw->wiphy->wowlan = &ath9k_wowlan_support; 328 + else 329 + hw->wiphy->wowlan = &ath9k_wowlan_support_legacy; 330 + 333 331 device_init_wakeup(sc->dev, 1); 334 332 } 335 333 }