aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2100.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 23:35:20 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 23:35:20 -0400
commit9abbf7d028b1598b40ebdc81c48f30da7f3d5bf5 (patch)
tree61a56ec39f4b7d438d7e08fc3f32d636828d9f7a /drivers/net/wireless/ipw2100.c
parentb3d9d6be035a7d1cc6740cee695301bf37caedcd (diff)
parentfe2520094d88018423dfc42b3cd0015f74e8adea (diff)
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (21 commits) Fix build break in tsi108.c qeth: remove header_ops bug ir-functions.c:(.text+0xbce18): undefined reference to `input_event' NAPI: kconfig prompt and deleted doc file phy/bitbang: missing MODULE_LICENSE DM9000 initialization fix [PATCH] rt2x00: Add new rt73usb USB ID [PATCH] rt2x00: Fix residual check in PLCP calculations. [PATCH] iwlwifi: Fix rate setting in probe request for HW sacn [PATCH] b43: Make b43_stop() static [PATCH] drivers/net/wireless/b43/main.c: fix an uninitialized variable [PATCH] iwlwifi: set correct base rate for A band in rs_dbgfs_set_mcs [PATCH] zd1211rw, fix oops when ejecting install media [PATCH] b43legacy: Fix potential return of uninitialized variable [PATCH] iwl4965-base.c: fix off-by-one errors [PATCH] p54: Make filter configuration atomic [PATCH] rtl8187: remove NICMAC setting in configure_filters callback [PATCH] janitorial: fix all double includes in drivers/net/wireless [PATCH] rtl8187: Fix more frag bit checking, rts duration calc [PATCH] ipw2100: send WEXT scan events ...
Diffstat (limited to 'drivers/net/wireless/ipw2100.c')
-rw-r--r--drivers/net/wireless/ipw2100.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index c144e3cdb890..7a7797560a23 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -2089,12 +2089,46 @@ static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status)
2089 queue_delayed_work(priv->workqueue, &priv->rf_kill, round_jiffies(HZ)); 2089 queue_delayed_work(priv->workqueue, &priv->rf_kill, round_jiffies(HZ));
2090} 2090}
2091 2091
2092static void send_scan_event(void *data)
2093{
2094 struct ipw2100_priv *priv = data;
2095 union iwreq_data wrqu;
2096
2097 wrqu.data.length = 0;
2098 wrqu.data.flags = 0;
2099 wireless_send_event(priv->net_dev, SIOCGIWSCAN, &wrqu, NULL);
2100}
2101
2102static void ipw2100_scan_event_later(struct work_struct *work)
2103{
2104 send_scan_event(container_of(work, struct ipw2100_priv,
2105 scan_event_later.work));
2106}
2107
2108static void ipw2100_scan_event_now(struct work_struct *work)
2109{
2110 send_scan_event(container_of(work, struct ipw2100_priv,
2111 scan_event_now));
2112}
2113
2092static void isr_scan_complete(struct ipw2100_priv *priv, u32 status) 2114static void isr_scan_complete(struct ipw2100_priv *priv, u32 status)
2093{ 2115{
2094 IPW_DEBUG_SCAN("scan complete\n"); 2116 IPW_DEBUG_SCAN("scan complete\n");
2095 /* Age the scan results... */ 2117 /* Age the scan results... */
2096 priv->ieee->scans++; 2118 priv->ieee->scans++;
2097 priv->status &= ~STATUS_SCANNING; 2119 priv->status &= ~STATUS_SCANNING;
2120
2121 /* Only userspace-requested scan completion events go out immediately */
2122 if (!priv->user_requested_scan) {
2123 if (!delayed_work_pending(&priv->scan_event_later))
2124 queue_delayed_work(priv->workqueue,
2125 &priv->scan_event_later,
2126 round_jiffies(msecs_to_jiffies(4000)));
2127 } else {
2128 priv->user_requested_scan = 0;
2129 cancel_delayed_work(&priv->scan_event_later);
2130 queue_work(priv->workqueue, &priv->scan_event_now);
2131 }
2098} 2132}
2099 2133
2100#ifdef CONFIG_IPW2100_DEBUG 2134#ifdef CONFIG_IPW2100_DEBUG
@@ -4349,6 +4383,7 @@ static void ipw2100_kill_workqueue(struct ipw2100_priv *priv)
4349 cancel_delayed_work(&priv->wx_event_work); 4383 cancel_delayed_work(&priv->wx_event_work);
4350 cancel_delayed_work(&priv->hang_check); 4384 cancel_delayed_work(&priv->hang_check);
4351 cancel_delayed_work(&priv->rf_kill); 4385 cancel_delayed_work(&priv->rf_kill);
4386 cancel_delayed_work(&priv->scan_event_later);
4352 destroy_workqueue(priv->workqueue); 4387 destroy_workqueue(priv->workqueue);
4353 priv->workqueue = NULL; 4388 priv->workqueue = NULL;
4354 } 4389 }
@@ -6092,6 +6127,8 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev,
6092 INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work); 6127 INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work);
6093 INIT_DELAYED_WORK(&priv->hang_check, ipw2100_hang_check); 6128 INIT_DELAYED_WORK(&priv->hang_check, ipw2100_hang_check);
6094 INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill); 6129 INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill);
6130 INIT_WORK(&priv->scan_event_now, ipw2100_scan_event_now);
6131 INIT_DELAYED_WORK(&priv->scan_event_later, ipw2100_scan_event_later);
6095 6132
6096 tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) 6133 tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long))
6097 ipw2100_irq_tasklet, (unsigned long)priv); 6134 ipw2100_irq_tasklet, (unsigned long)priv);
@@ -7396,6 +7433,8 @@ static int ipw2100_wx_set_scan(struct net_device *dev,
7396 } 7433 }
7397 7434
7398 IPW_DEBUG_WX("Initiating scan...\n"); 7435 IPW_DEBUG_WX("Initiating scan...\n");
7436
7437 priv->user_requested_scan = 1;
7399 if (ipw2100_set_scan_options(priv) || ipw2100_start_scan(priv)) { 7438 if (ipw2100_set_scan_options(priv) || ipw2100_start_scan(priv)) {
7400 IPW_DEBUG_WX("Start scan failed.\n"); 7439 IPW_DEBUG_WX("Start scan failed.\n");
7401 7440