---

 ipw2200-1.0.4-chuyee/ipw2200.c |    9 ++++++---
 ipw2200-1.0.4-chuyee/ipw2200.h |    1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff -puN ipw2200.h~monitor_channel2 ipw2200.h
--- ipw2200-1.0.4/ipw2200.h~monitor_channel2	2005-05-26 17:20:18.000000000 +0800
+++ ipw2200-1.0.4-chuyee/ipw2200.h	2005-05-26 17:20:32.000000000 +0800
@@ -1110,6 +1110,7 @@ struct ipw_cmd {
 #define STATUS_SCAN_PENDING     (1<<20)
 #define STATUS_SCANNING         (1<<21)
 #define STATUS_SCAN_ABORTING    (1<<22)
+#define STATUS_SCAN_FORCED      (1<<23)
 
 #define STATUS_LED_LINK_ON      (1<<24)
 #define STATUS_LED_ACT_ON       (1<<25)
diff -puN ipw2200.c~monitor_channel2 ipw2200.c
--- ipw2200-1.0.4/ipw2200.c~monitor_channel2	2005-05-26 17:20:18.000000000 +0800
+++ ipw2200-1.0.4-chuyee/ipw2200.c	2005-05-26 17:22:03.000000000 +0800
@@ -4204,9 +4204,11 @@ static inline void ipw_rx_notification(s
 
 #ifdef CONFIG_IPW_MONITOR
 		if (priv->ieee->iw_mode == IW_MODE_MONITOR) {
+			priv->status |= STATUS_SCAN_FORCED;
 			queue_work(priv->workqueue, &priv->request_scan);
 			break;
 		}
+		priv->status &= ~STATUS_SCAN_FORCED;
 #endif /* CONFIG_IPW_MONITOR */
 
 		if (!(priv->status & (STATUS_ASSOCIATED |
@@ -5597,7 +5599,8 @@ static int ipw_request_scan(struct ipw_p
 		goto done;
 	}
 
-	if (priv->status & STATUS_SCAN_ABORTING) {
+	if (!(priv->status & STATUS_SCAN_FORCED) &&
+	    (priv->status & STATUS_SCAN_ABORTING)) {
 		IPW_DEBUG_HC("Scan request while abort pending.  Queuing.\n");
 		priv->status |= STATUS_SCAN_PENDING;
 		goto done;
@@ -7468,13 +7471,13 @@ static int ipw_set_channel(struct ipw_pr
 		if (priv->status & STATUS_SCANNING) {
 			IPW_DEBUG_SCAN("scan abort triggered due to "
 					"channel change.\n");
-			queue_work(priv->workqueue, &priv->abort_scan);
+			ipw_abort_scan(priv);
 		}
 
 		for (i = 1000; i && (priv->status & STATUS_SCANNING); i--)
 			udelay(10);
 
-		if (priv->status &  STATUS_SCANNING)
+		if (priv->status & STATUS_SCANNING)
 			IPW_DEBUG_SCAN("Still scanning...\n");
 		else
 			IPW_DEBUG_SCAN("Took %dms to abort current scan\n", 1000 - i);
_
