From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>, Krzysztof Halasa <khc@pm.waw.pl>
Cc: netdev@vger.kernel.org
Subject: [PATCH 09/19] hdlc: convert to netdev_tx_t
Date: Mon, 31 Aug 2009 22:50:48 -0700 [thread overview]
Message-ID: <20090901055129.321442636@vyatta.com> (raw)
In-Reply-To: 20090901055039.824876937@vyatta.com
[-- Attachment #1: hdlc-tx.patch --]
[-- Type: text/plain, Size: 4965 bytes --]
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
drivers/char/pcmcia/synclink_cs.c | 7 +++----
drivers/char/synclink.c | 7 +++----
drivers/char/synclink_gt.c | 7 +++----
drivers/char/synclinkmp.c | 7 +++----
include/linux/hdlc.h | 8 ++++----
5 files changed, 16 insertions(+), 20 deletions(-)
--- a/include/linux/hdlc.h 2009-08-31 16:17:52.981107416 -0700
+++ b/include/linux/hdlc.h 2009-08-31 16:27:04.181091272 -0700
@@ -38,7 +38,7 @@ struct hdlc_proto {
int (*ioctl)(struct net_device *dev, struct ifreq *ifr);
__be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev);
int (*netif_rx)(struct sk_buff *skb);
- int (*xmit)(struct sk_buff *skb, struct net_device *dev);
+ netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev);
struct module *module;
struct hdlc_proto *next; /* next protocol in the list */
};
@@ -51,7 +51,7 @@ typedef struct hdlc_device {
unsigned short encoding, unsigned short parity);
/* hardware driver must handle this instead of dev->hard_start_xmit */
- int (*xmit)(struct sk_buff *skb, struct net_device *dev);
+ netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev);
/* Things below are for HDLC layer internal use only */
const struct hdlc_proto *proto;
@@ -60,7 +60,7 @@ typedef struct hdlc_device {
spinlock_t state_lock;
void *state;
void *priv;
-}hdlc_device;
+} hdlc_device;
@@ -106,7 +106,7 @@ void hdlc_close(struct net_device *dev);
/* May be used by hardware driver */
int hdlc_change_mtu(struct net_device *dev, int new_mtu);
/* Must be pointed to by hw driver's dev->netdev_ops->ndo_start_xmit */
-int hdlc_start_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t hdlc_start_xmit(struct sk_buff *skb, struct net_device *dev);
int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto,
size_t size);
--- a/drivers/char/pcmcia/synclink_cs.c 2009-08-31 16:17:52.961081267 -0700
+++ b/drivers/char/pcmcia/synclink_cs.c 2009-08-31 16:27:04.181091272 -0700
@@ -4005,10 +4005,9 @@ static int hdlcdev_attach(struct net_dev
*
* skb socket buffer containing HDLC frame
* dev pointer to network device structure
- *
- * returns 0 if success, otherwise error code
*/
-static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
MGSLPC_INFO *info = dev_to_port(dev);
unsigned long flags;
@@ -4043,7 +4042,7 @@ static int hdlcdev_xmit(struct sk_buff *
}
spin_unlock_irqrestore(&info->lock,flags);
- return 0;
+ return NETDEV_TX_OK;
}
/**
--- a/drivers/char/synclink.c 2009-08-31 16:17:52.971081211 -0700
+++ b/drivers/char/synclink.c 2009-08-31 16:27:04.181091272 -0700
@@ -7697,10 +7697,9 @@ static int hdlcdev_attach(struct net_dev
*
* skb socket buffer containing HDLC frame
* dev pointer to network device structure
- *
- * returns 0 if success, otherwise error code
*/
-static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct mgsl_struct *info = dev_to_port(dev);
unsigned long flags;
@@ -7731,7 +7730,7 @@ static int hdlcdev_xmit(struct sk_buff *
usc_start_transmitter(info);
spin_unlock_irqrestore(&info->irq_spinlock,flags);
- return 0;
+ return NETDEV_TX_OK;
}
/**
--- a/drivers/char/synclink_gt.c 2009-08-31 16:17:52.971081211 -0700
+++ b/drivers/char/synclink_gt.c 2009-08-31 16:27:04.191109445 -0700
@@ -1497,10 +1497,9 @@ static int hdlcdev_attach(struct net_dev
*
* skb socket buffer containing HDLC frame
* dev pointer to network device structure
- *
- * returns 0 if success, otherwise error code
*/
-static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
struct slgt_info *info = dev_to_port(dev);
unsigned long flags;
@@ -1529,7 +1528,7 @@ static int hdlcdev_xmit(struct sk_buff *
update_tx_timer(info);
spin_unlock_irqrestore(&info->lock,flags);
- return 0;
+ return NETDEV_TX_OK;
}
/**
--- a/drivers/char/synclinkmp.c 2009-08-31 16:17:52.961081267 -0700
+++ b/drivers/char/synclinkmp.c 2009-08-31 16:27:04.191109445 -0700
@@ -1608,10 +1608,9 @@ static int hdlcdev_attach(struct net_dev
*
* skb socket buffer containing HDLC frame
* dev pointer to network device structure
- *
- * returns 0 if success, otherwise error code
*/
-static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
+ struct net_device *dev)
{
SLMP_INFO *info = dev_to_port(dev);
unsigned long flags;
@@ -1642,7 +1641,7 @@ static int hdlcdev_xmit(struct sk_buff *
tx_start(info);
spin_unlock_irqrestore(&info->lock,flags);
- return 0;
+ return NETDEV_TX_OK;
}
/**
--
next prev parent reply other threads:[~2009-09-01 5:58 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-01 5:50 [PATCH 00/19] net_tx_t: network device transmit return value change Stephen Hemminger
2009-09-01 5:50 ` [PATCH 01/19] netdev: change transmit to limited range type Stephen Hemminger
2009-09-01 7:39 ` Eric Dumazet
2009-09-01 8:18 ` David Miller
2009-09-01 5:50 ` [PATCH 02/19] netdev: convert pseudo-devices to netdev_tx_t Stephen Hemminger
2009-09-01 5:50 ` [PATCH 03/19] convert ATM drivers " Stephen Hemminger
2009-09-01 5:50 ` [PATCH 04/19] convert hamradio drivers to netdev_txreturnt_t Stephen Hemminger
2009-09-01 15:30 ` Thomas Sailer
2009-09-01 5:50 ` [PATCH 05/19] isdn: convert to netdev_tx_t Stephen Hemminger
2009-09-01 5:50 ` [PATCH 06/19] usbnet: " Stephen Hemminger
2009-09-01 5:50 ` [PATCH 07/19] tokenring: " Stephen Hemminger
2009-09-01 5:50 ` [PATCH 08/19] wan: convert drivers " Stephen Hemminger
2009-09-01 5:50 ` Stephen Hemminger [this message]
2009-09-01 5:50 ` [PATCH 10/19] netdev: convert pcmcia " Stephen Hemminger
2009-09-01 5:50 ` [PATCH 11/19] irda: convert " Stephen Hemminger
2009-09-01 5:50 ` [PATCH 12/19] netdev: convert pseudo drivers " Stephen Hemminger
2009-09-01 5:50 ` [PATCH 13/19] uwb: convert " Stephen Hemminger
[not found] ` <20090901055129.729527950-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2009-09-14 10:47 ` David Vrabel
2009-09-01 5:50 ` [PATCH 14/19] tulip: convert drivers " Stephen Hemminger
2009-09-02 5:48 ` Grant Grundler
2009-09-02 6:04 ` Stephen Hemminger
2009-09-02 6:08 ` Grant Grundler
2009-09-01 5:50 ` [PATCH 15/19] 3com: " Stephen Hemminger
2009-09-01 5:50 ` [PATCH 16/19] intel: " Stephen Hemminger
2009-09-02 1:03 ` Jeff Kirsher
2009-09-01 5:50 ` [PATCH 17/19] appletalk: " Stephen Hemminger
2009-09-01 5:50 ` [PATCH 18/19] wireless: " Stephen Hemminger
[not found] ` <20090901055130.266010870-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2009-09-01 13:18 ` John W. Linville
2009-09-01 5:50 ` [PATCH 19/19] netdev: convert bulk of " Stephen Hemminger
2009-09-01 16:21 ` David Dillow
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=20090901055129.321442636@vyatta.com \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=khc@pm.waw.pl \
--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).