提交 91f39e8e 编写于 作者: J Jay Sternberg 提交者: John W. Linville

iwlwifi: indicate txpower is off in sysfs

The patch checks if the radio is disabled before displaying the tx power
level. Previously when the txpower was set off show_tx_power still
returned the prior power level. Now it will indicate the power has been
turned off.
Signed-off-by: NJay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: NZhu Yi <yi.zhu@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 f1bc4ac6
......@@ -3418,7 +3418,11 @@ static ssize_t show_tx_power(struct device *d,
struct device_attribute *attr, char *buf)
{
struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
return sprintf(buf, "%d\n", priv->tx_power_user_lmt);
if (!iwl_is_ready_rf(priv))
return sprintf(buf, "off\n");
else
return sprintf(buf, "%d\n", priv->tx_power_user_lmt);
}
static ssize_t store_tx_power(struct device *d,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册