ath9k: Check multi-channel context for WOW
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Fri, 30 Jan 2015 13:35:25 +0000 (19:05 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 3 Feb 2015 13:31:02 +0000 (15:31 +0200)
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>
drivers/net/wireless/ath/ath9k/wow.c

index 1799a1d69ebdd40b18dca9e101e85bdf7e048c06..1b005c697c03d886e0c4c8871e66b0880e6e4558 100644 (file)
@@ -215,6 +215,15 @@ int ath9k_suspend(struct ieee80211_hw *hw,
                goto fail_wow;
        }
 
+       if (ath9k_is_chanctx_enabled()) {
+               if (test_bit(ATH_OP_MULTI_CHANNEL, &common->op_flags)) {
+                       ath_dbg(common, WOW,
+                               "Multi-channel WOW is not supported\n");
+                       ret = 1;
+                       goto fail_wow;
+               }
+       }
+
        if (!test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags)) {
                ath_dbg(common, WOW, "None of the STA vifs are associated\n");
                ret = 1;