浏览代码

ath9k_hw: warn if we cannot change the power to the chip

Suspend requires the device to be in fullsleep otherwise upon
resume the device becomes unresponsive. We need to ensure
that when we want the device to go to sleep it yields to
the request, otherwise we'll have a useless devices upon
resume. Warn when changing the power fails as we need
to look into these issues.

Cc: Paul Stewart <pstew@google.com>
Cc: Amod Bodas <amod.bodas@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez 14 年之前
父节点
当前提交
69f4aab115
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      drivers/net/wireless/ath/ath9k/hw.c

+ 7 - 0
drivers/net/wireless/ath/ath9k/hw.c

@@ -1608,6 +1608,13 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
 	}
 	}
 	ah->power_mode = mode;
 	ah->power_mode = mode;
 
 
+	/*
+	 * XXX: If this warning never comes up after a while then
+	 * simply keep the ATH_DBG_WARN_ON_ONCE() but make
+	 * ath9k_hw_setpower() return type void.
+	 */
+	ATH_DBG_WARN_ON_ONCE(!status);
+
 	return status;
 	return status;
 }
 }
 EXPORT_SYMBOL(ath9k_hw_setpower);
 EXPORT_SYMBOL(ath9k_hw_setpower);