iwlwifi: give correct return information for tx power debugfs
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Mon, 26 Apr 2010 23:08:27 +0000 (16:08 -0700)
committerReinette Chatre <reinette.chatre@intel.com>
Mon, 10 May 2010 22:08:49 +0000 (15:08 -0700)
Return -EAGAIN when request tx power information and uCode is not ready;
so it will not confuse with tx power information not available.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
drivers/net/wireless/iwlwifi/iwl-debugfs.c

index df34c3105e1e43f21eeddec7fa37ec925a8bcb9a..06905bb9238d6df0f522103e69629ca1ae521c7b 100644 (file)
@@ -1225,7 +1225,7 @@ static ssize_t iwl_dbgfs_chain_tx_power_read(struct file *file,
        struct statistics_tx *tx;
 
        if (!iwl_is_alive(priv))
-               pos += scnprintf(buf + pos, bufsz - pos, "N/A\n");
+               return -EAGAIN;
        else {
                tx = &priv->statistics.tx;
                if (tx->tx_power.ant_a ||