netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: netdev@vger.kernel.org
Cc: linville@tuxdriver.com
Subject: Re: [PATCH 11/24] RT2x00: Move scan_work to scanning structure
Date: Wed, 26 Jul 2006 20:27:30 +0200	[thread overview]
Message-ID: <200607262027.30929.IvDoorn@gmail.com> (raw)
In-Reply-To: <200607261905.12030.IvDoorn@gmail.com>

>From Ivo van Doorn <IvDoorn@gmail.com>

Remove scan_work from rt2x00_dev and place it in the scanning structure.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>

diff -rU3 wireless-dev-sequence/drivers/net/wireless/d80211/rt2x00/rt2400pci.c wireless-dev-scan/drivers/net/wireless/d80211/rt2x00/rt2400pci.c
--- wireless-dev-sequence/drivers/net/wireless/d80211/rt2x00/rt2400pci.c	2006-07-23 19:52:17.000000000 +0200
+++ wireless-dev-scan/drivers/net/wireless/d80211/rt2x00/rt2400pci.c	2006-07-23 22:41:51.000000000 +0200
@@ -2139,7 +2139,8 @@
 	/*
 	 * Queue work.
 	 */
-	if (!queue_work(rt2x00dev->workqueue, &rt2x00dev->scan_work))
+	INIT_WORK(&rt2x00dev->scan->work, rt2400pci_scan, rt2x00dev);
+	if (!queue_work(rt2x00dev->workqueue, &rt2x00dev->scan->work))
 		goto exit;
 
 	return 0;
@@ -2599,7 +2600,6 @@
 	/*
 	 * Intialize scanning attributes.
 	 */
-	INIT_WORK(&rt2x00dev->scan_work, rt2400pci_scan, rt2x00dev);
 	rt2x00dev->scan = NULL;
 
 	if (rt2400pci_init_eeprom(rt2x00dev) ||
diff -rU3 wireless-dev-sequence/drivers/net/wireless/d80211/rt2x00/rt2500pci.c wireless-dev-scan/drivers/net/wireless/d80211/rt2x00/rt2500pci.c
--- wireless-dev-sequence/drivers/net/wireless/d80211/rt2x00/rt2500pci.c	2006-07-23 19:52:28.000000000 +0200
+++ wireless-dev-scan/drivers/net/wireless/d80211/rt2x00/rt2500pci.c	2006-07-23 22:41:58.000000000 +0200
@@ -2271,7 +2271,8 @@
 	/*
 	 * Queue work.
 	 */
-	if (!queue_work(rt2x00dev->workqueue, &rt2x00dev->scan_work))
+	INIT_WORK(&rt2x00dev->scan->work, rt2500pci_scan, rt2x00dev);
+	if (!queue_work(rt2x00dev->workqueue, &rt2x00dev->scan->work))
 		goto exit;
 
 	return 0;
@@ -2865,7 +2866,6 @@
 	/*
 	 * Intialize scanning attributes.
 	 */
-	INIT_WORK(&rt2x00dev->scan_work, rt2500pci_scan, rt2x00dev);
 	rt2x00dev->scan = NULL;
 
 	if (rt2500pci_init_eeprom(rt2x00dev) ||
diff -rU3 wireless-dev-sequence/drivers/net/wireless/d80211/rt2x00/rt2500usb.c wireless-dev-scan/drivers/net/wireless/d80211/rt2x00/rt2500usb.c
--- wireless-dev-sequence/drivers/net/wireless/d80211/rt2x00/rt2500usb.c	2006-07-23 19:54:54.000000000 +0200
+++ wireless-dev-scan/drivers/net/wireless/d80211/rt2x00/rt2500usb.c	2006-07-23 22:42:03.000000000 +0200
@@ -1942,7 +1942,8 @@
 	/*
 	 * Queue work.
 	 */
-	if (!queue_work(rt2x00dev->workqueue, &rt2x00dev->scan_work))
+	INIT_WORK(&rt2x00dev->scan->work, rt2500usb_scan, rt2x00dev);
+	if (!queue_work(rt2x00dev->workqueue, &rt2x00dev->scan->work))
 		goto exit;
 
 	return 0;
@@ -2481,7 +2482,6 @@
 	/*
 	 * Intialize scanning attributes.
 	 */
-	INIT_WORK(&rt2x00dev->scan_work, rt2500usb_scan, rt2x00dev);
 	rt2x00dev->scan = NULL;
 
 	if (rt2500usb_init_eeprom(rt2x00dev) ||
diff -rU3 wireless-dev-sequence/drivers/net/wireless/d80211/rt2x00/rt2x00.h wireless-dev-scan/drivers/net/wireless/d80211/rt2x00/rt2x00.h
--- wireless-dev-sequence/drivers/net/wireless/d80211/rt2x00/rt2x00.h	2006-07-23 19:49:00.000000000 +0200
+++ wireless-dev-scan/drivers/net/wireless/d80211/rt2x00/rt2x00.h	2006-07-23 22:32:51.000000000 +0200
@@ -676,6 +676,11 @@
 	short status;
 #define SCANNING_READY		0x0001
 #define SCANNING_CANCELLED	0x0002
+
+	/*
+	 * Work structure for scheduling the scanning work.
+	 */
+	struct work_struct work;
 };
 
 /*
diff -rU3 wireless-dev-sequence/drivers/net/wireless/d80211/rt2x00/rt61pci.c wireless-dev-scan/drivers/net/wireless/d80211/rt2x00/rt61pci.c
--- wireless-dev-sequence/drivers/net/wireless/d80211/rt2x00/rt61pci.c	2006-07-23 19:53:45.000000000 +0200
+++ wireless-dev-scan/drivers/net/wireless/d80211/rt2x00/rt61pci.c	2006-07-23 22:42:09.000000000 +0200
@@ -2764,7 +2764,8 @@
 	/*
 	 * Queue work.
 	 */
-	if (!queue_work(rt2x00dev->workqueue, &rt2x00dev->scan_work))
+	INIT_WORK(&rt2x00dev->scan->work, rt61pci_scan, rt2x00dev);
+	if (!queue_work(rt2x00dev->workqueue, &rt2x00dev->scan->work))
 		goto exit;
 
 	return 0;
@@ -3438,7 +3439,6 @@
 	/*
 	 * Initialize scanning attributes.
 	 */
-	INIT_WORK(&rt2x00dev->scan_work, rt61pci_scan, rt2x00dev);
 	rt2x00dev->scan = NULL;
 
 	if (rt61pci_init_eeprom(rt2x00dev) ||
diff -rU3 wireless-dev-sequence/drivers/net/wireless/d80211/rt2x00/rt73usb.c wireless-dev-scan/drivers/net/wireless/d80211/rt2x00/rt73usb.c
--- wireless-dev-sequence/drivers/net/wireless/d80211/rt2x00/rt73usb.c	2006-07-23 19:54:16.000000000 +0200
+++ wireless-dev-scan/drivers/net/wireless/d80211/rt2x00/rt73usb.c	2006-07-23 22:35:17.000000000 +0200
@@ -2266,7 +2266,8 @@
 	/*
 	 * Queue work.
 	 */
-	if (!queue_work(rt2x00dev->workqueue, &rt2x00dev->scan_work))
+	INIT_WORK(&rt2x00dev->scan->work, rt73usb_scan, rt2x00dev);
+	if (!queue_work(rt2x00dev->workqueue, &rt2x00dev->scan->work))
 		goto exit;
 
 	return 0;
@@ -2910,7 +2911,6 @@
 	/*
 	 * Intialize scanning attributes.
 	 */
-	INIT_WORK(&rt2x00dev->scan_work, rt73usb_scan, rt2x00dev);
 	rt2x00dev->scan = NULL;
 
 	if (rt73usb_init_eeprom(rt2x00dev) ||

      reply	other threads:[~2006-07-26 18:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-26 17:05 [PATCH 11/24] RT2x00: Move scan_work to scanning structure Ivo van Doorn
2006-07-26 18:27 ` Ivo van Doorn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200607262027.30929.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).