mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Forest Bond <forest@alittletooquiet.net>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: "Greg KH" <greg@kroah.com>,
	"Larry Finger" <Larry.Finger@lwfinger.net>,
	"Alexander Beregalov" <a.beregalov@gmail.com>,
	"Woody Suwalski" <woodys@xandros.com>,
	"Gábor Stefanik" <netrolller.3d@gmail.com>,
	"Harald Welte" <HaraldWelte@viatech.com>,
	"Luis R. Rodriguez" <mcgrof@gmail.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: [PATCH 6/8] vt6656: use net_device_ops for management functions
Date: Sun, 28 Jun 2009 13:03:17 -0400	[thread overview]
Message-ID: <20090628170317.GI9143@alittletooquiet.net> (raw)
In-Reply-To: <200906281759.46152.bzolnier@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2520 bytes --]

[Greg: This patch series does not differ from that which you already have.]

vt6656: use net_device_ops for management functions

Signed-off-by: Forest Bond <forest@alittletooquiet.net>
---
 drivers/staging/vt6656/hostap.c   |    7 ++++++-
 drivers/staging/vt6656/main_usb.c |   19 +++++++++++++------
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c
index b6ca36a..223604d 100644
--- a/drivers/staging/vt6656/hostap.c
+++ b/drivers/staging/vt6656/hostap.c
@@ -117,7 +117,12 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked)
     apdev_priv = netdev_priv(pDevice->apdev);
     *apdev_priv = *pDevice;
 	memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN);
-	pDevice->apdev->hard_start_xmit = pDevice->tx_80211;
+
+	const struct net_device_ops apdev_netdev_ops = {
+		.ndo_start_xmit         = pDevice->tx_80211,
+	};
+	pDevice->apdev->netdev_ops = &apdev_netdev_ops;
+
 	pDevice->apdev->type = ARPHRD_IEEE80211;
 
 	pDevice->apdev->base_addr = dev->base_addr;
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 12a9ae0..228b3ec 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -837,6 +837,17 @@ static int vntwusb_resume(struct usb_interface *intf)
 }
 #endif
 
+
+static const struct net_device_ops device_netdev_ops = {
+    .ndo_open               = device_open,
+    .ndo_stop               = device_close,
+    .ndo_do_ioctl           = device_ioctl,
+    .ndo_get_stats          = device_get_stats,
+    .ndo_start_xmit         = device_xmit,
+    .ndo_set_multicast_list = device_set_multi,
+};
+
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 
 static int
@@ -896,12 +907,8 @@ vntwusb_found1(struct usb_device *udev, UINT interface, const struct usb_device_
     pDevice->tx_80211 = device_dma0_tx_80211;
     pDevice->sMgmtObj.pAdapter = (PVOID)pDevice;
 
-    netdev->open               = device_open;
-    netdev->hard_start_xmit    = device_xmit;
-    netdev->stop               = device_close;
-    netdev->get_stats          = device_get_stats;
-    netdev->set_multicast_list = device_set_multi;
-    netdev->do_ioctl           = device_ioctl;
+    netdev->netdev_ops         = &device_netdev_ops;
+
 #ifdef WIRELESS_EXT
 
 //2007-0508-01<Add>by MikeLiu
-- 
1.5.6.3


-- 
Forest Bond
http://www.alittletooquiet.net
http://www.pytagsfs.org

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2009-06-28 17:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09 10:31 Staging: vt6656 ? Alexander Beregalov
2009-06-09 10:51 ` Greg KH
2009-06-09 11:33   ` Forest Bond
2009-06-28 13:43     ` Bartlomiej Zolnierkiewicz
2009-06-28 13:57       ` Forest Bond
2009-06-28 15:59         ` Bartlomiej Zolnierkiewicz
2009-06-28 16:47           ` Forest Bond
2009-07-02 17:45             ` Bartlomiej Zolnierkiewicz
2009-07-02 18:22               ` Forest Bond
2009-07-06 15:33                 ` Bartlomiej Zolnierkiewicz
2009-06-28 17:02           ` [PATCH 1/8] Add pristine upstream vt6656 driver sources to drivers/staging/vt6656 Forest Bond
2009-06-28 17:02           ` [PATCH 2/8] Add includes " Forest Bond
2009-06-28 17:03           ` [PATCH 3/8] Build vt6656.ko, not vntwusb.ko Forest Bond
2009-06-28 17:03           ` [PATCH 4/8] drivers/staging/vt6656/main_usb.c: Drop obsolete fsuid/fsgid accesses Forest Bond
2009-06-28 17:03           ` [PATCH 5/8] vt6656: Replace net_device->priv accesses with netdev_priv calls Forest Bond
2009-06-28 17:03           ` Forest Bond [this message]
2009-06-28 17:03           ` [PATCH 7/8] vt6656: replace call to info with printk call Forest Bond
2009-06-28 17:03           ` [PATCH 8/8] Integrate drivers/staging/vt6656 into build system Forest Bond
2009-06-28 16:29         ` Staging: vt6656 ? Greg KH
2009-06-28 16:40           ` Forest Bond

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=20090628170317.GI9143@alittletooquiet.net \
    --to=forest@alittletooquiet.net \
    --cc=HaraldWelte@viatech.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=a.beregalov@gmail.com \
    --cc=bzolnier@gmail.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@gmail.com \
    --cc=netrolller.3d@gmail.com \
    --cc=woodys@xandros.com \
    /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

all inboxes | Powered by JetHome®