diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-11-10 04:10:10 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-11-24 01:30:28 -0500 |
commit | 6fd1fb63abeb78fd7fe30f08f478732ad601702c (patch) | |
tree | 89b4e6cd7395272c0ab72d3aafb2d77a9cb4908f | |
parent | 48a256e8aed05df3a90a0e9cdfcc558d139ec7f5 (diff) |
iwlwifi: mvm: return the actual error code when switch_vif_chanctx fails
We have code to recover and go back to the original channel context if
something fails in the middle of switch_vif_chanctx, but we return the
error code of the recover calls instead of the original code, so if
the recovery succeeds, we will return 0 (success). Fix this by not
assigning the return value of the recovery calls to ret.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 542e59f61d1c..1d556173fcb6 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -2988,15 +2988,13 @@ out_remove: | |||
2988 | __iwl_mvm_remove_chanctx(mvm, vifs[0].new_ctx); | 2988 | __iwl_mvm_remove_chanctx(mvm, vifs[0].new_ctx); |
2989 | 2989 | ||
2990 | out_reassign: | 2990 | out_reassign: |
2991 | ret = __iwl_mvm_add_chanctx(mvm, vifs[0].old_ctx); | 2991 | if (__iwl_mvm_add_chanctx(mvm, vifs[0].old_ctx)) { |
2992 | if (ret) { | ||
2993 | IWL_ERR(mvm, "failed to add old_ctx back after failure.\n"); | 2992 | IWL_ERR(mvm, "failed to add old_ctx back after failure.\n"); |
2994 | goto out_restart; | 2993 | goto out_restart; |
2995 | } | 2994 | } |
2996 | 2995 | ||
2997 | ret = __iwl_mvm_assign_vif_chanctx(mvm, vifs[0].vif, vifs[0].old_ctx, | 2996 | if (__iwl_mvm_assign_vif_chanctx(mvm, vifs[0].vif, vifs[0].old_ctx, |
2998 | true); | 2997 | true)) { |
2999 | if (ret) { | ||
3000 | IWL_ERR(mvm, "failed to reassign old_ctx after failure.\n"); | 2998 | IWL_ERR(mvm, "failed to reassign old_ctx after failure.\n"); |
3001 | goto out_restart; | 2999 | goto out_restart; |
3002 | } | 3000 | } |