iwlwifi: avoid "Error sending TX power (-5)"
PATCH 1/1 iwlwifi: avoid "Error sending TX power (-5)"
We can have this error message when loading or unloading module, when device is not marked as ready, but we want to set tx power from commit_rxon. Perhaps something better should be done like call lib->send_tx_power() directly from commit_rxon, but for now just do not return error.
--- drivers/net/wireless/iwlwifi/iwl-core.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/net/wireless/iwlwifi/iwl-core.c +6 -1
@@ -1169,8 +1169,13 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force)return -EINVAL ; } +/* +* (FIXME ?) Do not report error, we can be called through commit_rxon +* from iwl_set_mode() and iwl_bg_alive_start() when device is not +* marked as ready +*/ if (!iwl_is_ready_rf (priv)) -return -EIO ; +return 0 ;/* scan complete use tx_power_next, need to be updated */ priv->tx_power_next = tx_power;
Signature · 1 line
1.7.1
Johannes Berg
maintainerQuoted 5 lines · Stanislaw Gruszka
We can have this error message when loading or unloading module, when device is not marked as ready, but we want to set tx power from
commit_rxon. Perhaps something better should be done like calllib->send_tx_power()directly fromcommit_rxon, but for now just do not return error.
I think this actually fixes it, as opposed to hiding it:
johannes
Quoted 10 lines · Johannes Berg
Quoted 5 lines · Stanislaw Gruszka
We can have this error message when loading or unloading module, when device is not marked as ready, but we want to set tx power from
commit_rxon. Perhaps something better should be done like calllib->send_tx_power()directly fromcommit_rxon, but for now just do not return error.I think this actually fixes it, as opposed to hiding it:
Yes.
Thanks
Stanislaw
Quoted 8 lines · Stanislaw Gruszka
Quoted 7 lines · Johannes Berg
Quoted 5 lines · Stanislaw Gruszka
We can have this error message when loading or unloading module, when device is not marked as ready, but we want to set tx power from
commit_rxon. Perhaps something better should be done like calllib->send_tx_power()directly fromcommit_rxon, but for now just do not return error.
Quoted 5 lines
Quoted 3 lines
I think this actually fixes it, as opposed to hiding it:
Yes.
Not fully, message disappears at start, but not when module is unloaded.
Stanislaw
Hi Stanislaw,
Quoted 9 lines · Stanislaw Gruszka
Quoted 8 lines · Stanislaw Gruszka
Quoted 7 lines · Johannes Berg
Quoted 5 lines · Stanislaw Gruszka
We can have this error message when loading or unloading module, when device is not marked as ready, but we want to set tx power from
commit_rxon. Perhaps something better should be done like calllib->send_tx_power()directly fromcommit_rxon, but for now just do not return error.
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
I think this actually fixes it, as opposed to hiding it:
Yes.
Not fully, message disappears at start, but not when module is unloaded.
you are correct, I miss that. Would you like to address that? or I can fix it
Thanks
Wey
Hi
Quoted 5 lines · Wey-Yi
Quoted 3 lines
Not fully, message disappears at start, but not when module is unloaded.
you are correct, I miss that. Would you like to address that? or I can fix it
Please fix it, I could again do some crappy workaround instead of proper fix.
Stanislaw