Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91f39e8e authored by Jay Sternberg's avatar Jay Sternberg Committed by John W. Linville
Browse files

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: default avatarJay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f1bc4ac6
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -3418,6 +3418,10 @@ static ssize_t show_tx_power(struct device *d,
			     struct device_attribute *attr, char *buf)
			     struct device_attribute *attr, char *buf)
{
{
	struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;
	struct iwl_priv *priv = (struct iwl_priv *)d->driver_data;

	if (!iwl_is_ready_rf(priv))
		return sprintf(buf, "off\n");
	else
		return sprintf(buf, "%d\n", priv->tx_power_user_lmt);
		return sprintf(buf, "%d\n", priv->tx_power_user_lmt);
}
}