mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
hdlc: convert to netdev_tx_t
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d71a674922
commit
4c5d502d8b
5 changed files with 16 additions and 20 deletions
|
@ -4005,10 +4005,9 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
|
||||||
*
|
*
|
||||||
* skb socket buffer containing HDLC frame
|
* skb socket buffer containing HDLC frame
|
||||||
* dev pointer to network device structure
|
* 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);
|
MGSLPC_INFO *info = dev_to_port(dev);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -4043,7 +4042,7 @@ static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&info->lock,flags);
|
spin_unlock_irqrestore(&info->lock,flags);
|
||||||
|
|
||||||
return 0;
|
return NETDEV_TX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7697,10 +7697,9 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
|
||||||
*
|
*
|
||||||
* skb socket buffer containing HDLC frame
|
* skb socket buffer containing HDLC frame
|
||||||
* dev pointer to network device structure
|
* 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);
|
struct mgsl_struct *info = dev_to_port(dev);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -7731,7 +7730,7 @@ static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
usc_start_transmitter(info);
|
usc_start_transmitter(info);
|
||||||
spin_unlock_irqrestore(&info->irq_spinlock,flags);
|
spin_unlock_irqrestore(&info->irq_spinlock,flags);
|
||||||
|
|
||||||
return 0;
|
return NETDEV_TX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1497,10 +1497,9 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
|
||||||
*
|
*
|
||||||
* skb socket buffer containing HDLC frame
|
* skb socket buffer containing HDLC frame
|
||||||
* dev pointer to network device structure
|
* 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);
|
struct slgt_info *info = dev_to_port(dev);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -1529,7 +1528,7 @@ static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
update_tx_timer(info);
|
update_tx_timer(info);
|
||||||
spin_unlock_irqrestore(&info->lock,flags);
|
spin_unlock_irqrestore(&info->lock,flags);
|
||||||
|
|
||||||
return 0;
|
return NETDEV_TX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1608,10 +1608,9 @@ static int hdlcdev_attach(struct net_device *dev, unsigned short encoding,
|
||||||
*
|
*
|
||||||
* skb socket buffer containing HDLC frame
|
* skb socket buffer containing HDLC frame
|
||||||
* dev pointer to network device structure
|
* 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);
|
SLMP_INFO *info = dev_to_port(dev);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -1642,7 +1641,7 @@ static int hdlcdev_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
tx_start(info);
|
tx_start(info);
|
||||||
spin_unlock_irqrestore(&info->lock,flags);
|
spin_unlock_irqrestore(&info->lock,flags);
|
||||||
|
|
||||||
return 0;
|
return NETDEV_TX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -38,7 +38,7 @@ struct hdlc_proto {
|
||||||
int (*ioctl)(struct net_device *dev, struct ifreq *ifr);
|
int (*ioctl)(struct net_device *dev, struct ifreq *ifr);
|
||||||
__be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev);
|
__be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev);
|
||||||
int (*netif_rx)(struct sk_buff *skb);
|
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 module *module;
|
||||||
struct hdlc_proto *next; /* next protocol in the list */
|
struct hdlc_proto *next; /* next protocol in the list */
|
||||||
};
|
};
|
||||||
|
@ -51,7 +51,7 @@ typedef struct hdlc_device {
|
||||||
unsigned short encoding, unsigned short parity);
|
unsigned short encoding, unsigned short parity);
|
||||||
|
|
||||||
/* hardware driver must handle this instead of dev->hard_start_xmit */
|
/* 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 */
|
/* Things below are for HDLC layer internal use only */
|
||||||
const struct hdlc_proto *proto;
|
const struct hdlc_proto *proto;
|
||||||
|
@ -60,7 +60,7 @@ typedef struct hdlc_device {
|
||||||
spinlock_t state_lock;
|
spinlock_t state_lock;
|
||||||
void *state;
|
void *state;
|
||||||
void *priv;
|
void *priv;
|
||||||
}hdlc_device;
|
} hdlc_device;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ void hdlc_close(struct net_device *dev);
|
||||||
/* May be used by hardware driver */
|
/* May be used by hardware driver */
|
||||||
int hdlc_change_mtu(struct net_device *dev, int new_mtu);
|
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 */
|
/* 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,
|
int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto,
|
||||||
size_t size);
|
size_t size);
|
||||||
|
|
Loading…
Reference in a new issue