Skip to contentSkip to conversation

iwlwifi: change WARN_ON to IWL_WARN in iwl_mac_add_interface

PATCH In review Stanislaw Gruszka 2 participants 2 messages Sep 30, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iwlwifi: change WARN_ON to IWL_WARN in iwl_mac_add_interface

We can start restarting firmware or RF kill switch can be turned on during call to iwl_mac_add_interface(). That are normal working conditions, so do not print call trace, just print simple message instead.

---
 drivers/net/wireless/iwlwifi/iwl-core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/wireless/iwlwifi/iwl-core.c +2 -1
index 5c56893..b7adcf8 100644
@@ -2003,7 +2003,8 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 
 	mutex_lock(&priv->mutex);
 
-	if (WARN_ON(!iwl_is_ready_rf(priv))) {
+	if (!iwl_is_ready_rf(priv)) {
+		IWL_WARN(priv, "Try to add interface when device not ready\n");
 		err = -EINVAL;
 		goto out;
 	}
Signature · 1 line
1.7.1
#1 lore raw
Quoted 6 lines · Stanislaw Gruszka

We can start restarting firmware or RF kill switch can be turned on during call to iwl_mac_add_interface(). That are normal working conditions, so do not print call trace, just print simple message instead.

Quoted 18 lines
---
 drivers/net/wireless/iwlwifi/iwl-core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/wireless/iwlwifi/iwl-core.c +2 -1
index 5c56893..b7adcf8 100644
@@ -2003,7 +2003,8 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 
 	mutex_lock(&priv->mutex);
 
-	if (WARN_ON(!iwl_is_ready_rf(priv))) {
+	if (!iwl_is_ready_rf(priv)) {
+		IWL_WARN(priv, "Try to add interface when device not ready\n");
 		err = -EINVAL;
 		goto out;
 	}