diff options
author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2009-03-06 16:52:54 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-16 18:09:36 -0400 |
commit | 8337031ef393c8c4f9a25049fd4edd32c9911edc (patch) | |
tree | 95390897a3ba5524789dcc383d09d9b1bf8043a1 /drivers/net/wireless/iwlwifi | |
parent | 346de732cbd11bdc364ae80def2380a5002d7e6b (diff) |
iwl3945: add test for new association
Add check for new association to ease reading.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index d37679c69a5c..12166cea3860 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -328,6 +328,8 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv) | |||
328 | struct iwl3945_rxon_cmd *active_rxon = (void *)&priv->active_rxon; | 328 | struct iwl3945_rxon_cmd *active_rxon = (void *)&priv->active_rxon; |
329 | struct iwl3945_rxon_cmd *staging_rxon = (void *)&priv->staging_rxon; | 329 | struct iwl3945_rxon_cmd *staging_rxon = (void *)&priv->staging_rxon; |
330 | int rc = 0; | 330 | int rc = 0; |
331 | bool new_assoc = | ||
332 | !!(priv->staging_rxon.filter_flags & RXON_FILTER_ASSOC_MSK); | ||
331 | 333 | ||
332 | if (!iwl_is_alive(priv)) | 334 | if (!iwl_is_alive(priv)) |
333 | return -1; | 335 | return -1; |
@@ -366,8 +368,7 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv) | |||
366 | * an RXON_ASSOC and the new config wants the associated mask enabled, | 368 | * an RXON_ASSOC and the new config wants the associated mask enabled, |
367 | * we must clear the associated from the active configuration | 369 | * we must clear the associated from the active configuration |
368 | * before we apply the new config */ | 370 | * before we apply the new config */ |
369 | if (iwl_is_associated(priv) && | 371 | if (iwl_is_associated(priv) && new_assoc) { |
370 | (staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK)) { | ||
371 | IWL_DEBUG_INFO(priv, "Toggling associated bit on current RXON\n"); | 372 | IWL_DEBUG_INFO(priv, "Toggling associated bit on current RXON\n"); |
372 | active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 373 | active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
373 | 374 | ||
@@ -395,8 +396,7 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv) | |||
395 | "* with%s RXON_FILTER_ASSOC_MSK\n" | 396 | "* with%s RXON_FILTER_ASSOC_MSK\n" |
396 | "* channel = %d\n" | 397 | "* channel = %d\n" |
397 | "* bssid = %pM\n", | 398 | "* bssid = %pM\n", |
398 | ((priv->staging_rxon.filter_flags & | 399 | (new_assoc ? "" : "out"), |
399 | RXON_FILTER_ASSOC_MSK) ? "" : "out"), | ||
400 | le16_to_cpu(staging_rxon->channel), | 400 | le16_to_cpu(staging_rxon->channel), |
401 | staging_rxon->bssid_addr); | 401 | staging_rxon->bssid_addr); |
402 | 402 | ||