Skip to content

Commit

Permalink
iwl3945: queue the right work if the scan needs to be aborted
Browse files Browse the repository at this point in the history
iwl3945's scan_completed calls into the mac80211 stack which triggers a
warn on if there is no scan outstanding.

This can be avoided by not calling scan_completed but abort_scan in
iwl3945_request_scan  in the done: branch of the function which is used
as an error out.

The done: branch seems to be an error-out branch, as, for example, if
iwl_is_ready(priv) returns false  the done: branch is executed.

NOTE:
I'm not familiar with the driver at all.
I just quickly scanned as a reaction to

https://bugzilla.kernel.org/show_bug.cgi?id=17722

the users of scan_completed in the  iwl3945 driver and noted the odd
discrepancy between the comment above this instance and the comment in
mac80211 scan_completed function.

Signed-off-by: Florian Mickler <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
FlorianMickler authored and linvjw committed Sep 28, 2010
1 parent cd87a2d commit e7ee762
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/iwl-agn-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,7 @@ void iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
clear_bit(STATUS_SCAN_HW, &priv->status);
clear_bit(STATUS_SCANNING, &priv->status);
/* inform mac80211 scan aborted */
queue_work(priv->workqueue, &priv->scan_completed);
queue_work(priv->workqueue, &priv->abort_scan);
}

int iwlagn_manage_ibss_station(struct iwl_priv *priv,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -3018,7 +3018,7 @@ void iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
clear_bit(STATUS_SCANNING, &priv->status);

/* inform mac80211 scan aborted */
queue_work(priv->workqueue, &priv->scan_completed);
queue_work(priv->workqueue, &priv->abort_scan);
}

static void iwl3945_bg_restart(struct work_struct *data)
Expand Down

0 comments on commit e7ee762

Please sign in to comment.