diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-rxon.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index 02387430f7fe..a95ad84c5377 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -289,7 +289,6 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
289 | /* cast away the const for active_rxon in this function */ | 289 | /* cast away the const for active_rxon in this function */ |
290 | struct iwl_rxon_cmd *active = (void *)&ctx->active; | 290 | struct iwl_rxon_cmd *active = (void *)&ctx->active; |
291 | bool new_assoc = !!(ctx->staging.filter_flags & RXON_FILTER_ASSOC_MSK); | 291 | bool new_assoc = !!(ctx->staging.filter_flags & RXON_FILTER_ASSOC_MSK); |
292 | bool old_assoc = !!(ctx->active.filter_flags & RXON_FILTER_ASSOC_MSK); | ||
293 | int ret; | 292 | int ret; |
294 | 293 | ||
295 | lockdep_assert_held(&priv->mutex); | 294 | lockdep_assert_held(&priv->mutex); |
@@ -389,11 +388,9 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
389 | * AP station must be done after the BSSID is set to correctly | 388 | * AP station must be done after the BSSID is set to correctly |
390 | * set up filters in the device. | 389 | * set up filters in the device. |
391 | */ | 390 | */ |
392 | if ((old_assoc && new_assoc) || !new_assoc) { | 391 | ret = iwlagn_rxon_disconn(priv, ctx); |
393 | ret = iwlagn_rxon_disconn(priv, ctx); | 392 | if (ret) |
394 | if (ret) | 393 | return ret; |
395 | return ret; | ||
396 | } | ||
397 | 394 | ||
398 | if (new_assoc) | 395 | if (new_assoc) |
399 | return iwlagn_rxon_connect(priv, ctx); | 396 | return iwlagn_rxon_connect(priv, ctx); |