Commit 3b29a56d authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

intel: convert drivers to netdev_tx_t

Get rid of some bogus return wrapping as well.
Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 27a1de95
...@@ -1690,7 +1690,8 @@ static void e100_xmit_prepare(struct nic *nic, struct cb *cb, ...@@ -1690,7 +1690,8 @@ static void e100_xmit_prepare(struct nic *nic, struct cb *cb,
cb->u.tcb.tbd.size = cpu_to_le16(skb->len); cb->u.tcb.tbd.size = cpu_to_le16(skb->len);
} }
static int e100_xmit_frame(struct sk_buff *skb, struct net_device *netdev) static netdev_tx_t e100_xmit_frame(struct sk_buff *skb,
struct net_device *netdev)
{ {
struct nic *nic = netdev_priv(netdev); struct nic *nic = netdev_priv(netdev);
int err; int err;
......
...@@ -125,7 +125,8 @@ static void e1000_set_rx_mode(struct net_device *netdev); ...@@ -125,7 +125,8 @@ static void e1000_set_rx_mode(struct net_device *netdev);
static void e1000_update_phy_info(unsigned long data); static void e1000_update_phy_info(unsigned long data);
static void e1000_watchdog(unsigned long data); static void e1000_watchdog(unsigned long data);
static void e1000_82547_tx_fifo_stall(unsigned long data); static void e1000_82547_tx_fifo_stall(unsigned long data);
static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev); static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
struct net_device *netdev);
static struct net_device_stats * e1000_get_stats(struct net_device *netdev); static struct net_device_stats * e1000_get_stats(struct net_device *netdev);
static int e1000_change_mtu(struct net_device *netdev, int new_mtu); static int e1000_change_mtu(struct net_device *netdev, int new_mtu);
static int e1000_set_mac(struct net_device *netdev, void *p); static int e1000_set_mac(struct net_device *netdev, void *p);
...@@ -3249,7 +3250,8 @@ static int e1000_maybe_stop_tx(struct net_device *netdev, ...@@ -3249,7 +3250,8 @@ static int e1000_maybe_stop_tx(struct net_device *netdev,
} }
#define TXD_USE_COUNT(S, X) (((S) >> (X)) + 1 ) #define TXD_USE_COUNT(S, X) (((S) >> (X)) + 1 )
static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
struct net_device *netdev)
{ {
struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
......
...@@ -4097,7 +4097,8 @@ static int e1000_maybe_stop_tx(struct net_device *netdev, int size) ...@@ -4097,7 +4097,8 @@ static int e1000_maybe_stop_tx(struct net_device *netdev, int size)
} }
#define TXD_USE_COUNT(S, X) (((S) >> (X)) + 1 ) #define TXD_USE_COUNT(S, X) (((S) >> (X)) + 1 )
static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
struct net_device *netdev)
{ {
struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_adapter *adapter = netdev_priv(netdev);
struct e1000_ring *tx_ring = adapter->tx_ring; struct e1000_ring *tx_ring = adapter->tx_ring;
......
...@@ -98,9 +98,11 @@ static void igb_set_multi(struct net_device *); ...@@ -98,9 +98,11 @@ static void igb_set_multi(struct net_device *);
static void igb_update_phy_info(unsigned long); static void igb_update_phy_info(unsigned long);
static void igb_watchdog(unsigned long); static void igb_watchdog(unsigned long);
static void igb_watchdog_task(struct work_struct *); static void igb_watchdog_task(struct work_struct *);
static int igb_xmit_frame_ring_adv(struct sk_buff *, struct net_device *, static netdev_tx_t igb_xmit_frame_ring_adv(struct sk_buff *,
struct igb_ring *); struct net_device *,
static int igb_xmit_frame_adv(struct sk_buff *skb, struct net_device *); struct igb_ring *);
static netdev_tx_t igb_xmit_frame_adv(struct sk_buff *skb,
struct net_device *);
static struct net_device_stats *igb_get_stats(struct net_device *); static struct net_device_stats *igb_get_stats(struct net_device *);
static int igb_change_mtu(struct net_device *, int); static int igb_change_mtu(struct net_device *, int);
static int igb_set_mac(struct net_device *, void *); static int igb_set_mac(struct net_device *, void *);
...@@ -3295,9 +3297,9 @@ static int igb_maybe_stop_tx(struct net_device *netdev, ...@@ -3295,9 +3297,9 @@ static int igb_maybe_stop_tx(struct net_device *netdev,
return __igb_maybe_stop_tx(netdev, tx_ring, size); return __igb_maybe_stop_tx(netdev, tx_ring, size);
} }
static int igb_xmit_frame_ring_adv(struct sk_buff *skb, static netdev_tx_t igb_xmit_frame_ring_adv(struct sk_buff *skb,
struct net_device *netdev, struct net_device *netdev,
struct igb_ring *tx_ring) struct igb_ring *tx_ring)
{ {
struct igb_adapter *adapter = netdev_priv(netdev); struct igb_adapter *adapter = netdev_priv(netdev);
unsigned int first; unsigned int first;
...@@ -3385,7 +3387,8 @@ static int igb_xmit_frame_ring_adv(struct sk_buff *skb, ...@@ -3385,7 +3387,8 @@ static int igb_xmit_frame_ring_adv(struct sk_buff *skb,
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
static int igb_xmit_frame_adv(struct sk_buff *skb, struct net_device *netdev) static netdev_tx_t igb_xmit_frame_adv(struct sk_buff *skb,
struct net_device *netdev)
{ {
struct igb_adapter *adapter = netdev_priv(netdev); struct igb_adapter *adapter = netdev_priv(netdev);
struct igb_ring *tx_ring; struct igb_ring *tx_ring;
...@@ -3398,7 +3401,7 @@ static int igb_xmit_frame_adv(struct sk_buff *skb, struct net_device *netdev) ...@@ -3398,7 +3401,7 @@ static int igb_xmit_frame_adv(struct sk_buff *skb, struct net_device *netdev)
* to a flow. Right now, performance is impacted slightly negatively * to a flow. Right now, performance is impacted slightly negatively
* if using multiple tx queues. If the stack breaks away from a * if using multiple tx queues. If the stack breaks away from a
* single qdisc implementation, we can look at this again. */ * single qdisc implementation, we can look at this again. */
return (igb_xmit_frame_ring_adv(skb, netdev, tx_ring)); return igb_xmit_frame_ring_adv(skb, netdev, tx_ring);
} }
/** /**
......
...@@ -2204,9 +2204,9 @@ static inline void igbvf_tx_queue_adv(struct igbvf_adapter *adapter, ...@@ -2204,9 +2204,9 @@ static inline void igbvf_tx_queue_adv(struct igbvf_adapter *adapter,
mmiowb(); mmiowb();
} }
static int igbvf_xmit_frame_ring_adv(struct sk_buff *skb, static netdev_tx_t igbvf_xmit_frame_ring_adv(struct sk_buff *skb,
struct net_device *netdev, struct net_device *netdev,
struct igbvf_ring *tx_ring) struct igbvf_ring *tx_ring)
{ {
struct igbvf_adapter *adapter = netdev_priv(netdev); struct igbvf_adapter *adapter = netdev_priv(netdev);
unsigned int first, tx_flags = 0; unsigned int first, tx_flags = 0;
...@@ -2279,11 +2279,11 @@ static int igbvf_xmit_frame_ring_adv(struct sk_buff *skb, ...@@ -2279,11 +2279,11 @@ static int igbvf_xmit_frame_ring_adv(struct sk_buff *skb,
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
static int igbvf_xmit_frame(struct sk_buff *skb, struct net_device *netdev) static netdev_tx_t igbvf_xmit_frame(struct sk_buff *skb,
struct net_device *netdev)
{ {
struct igbvf_adapter *adapter = netdev_priv(netdev); struct igbvf_adapter *adapter = netdev_priv(netdev);
struct igbvf_ring *tx_ring; struct igbvf_ring *tx_ring;
int retval;
if (test_bit(__IGBVF_DOWN, &adapter->state)) { if (test_bit(__IGBVF_DOWN, &adapter->state)) {
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
...@@ -2292,9 +2292,7 @@ static int igbvf_xmit_frame(struct sk_buff *skb, struct net_device *netdev) ...@@ -2292,9 +2292,7 @@ static int igbvf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
tx_ring = &adapter->tx_ring[0]; tx_ring = &adapter->tx_ring[0];
retval = igbvf_xmit_frame_ring_adv(skb, netdev, tx_ring); return igbvf_xmit_frame_ring_adv(skb, netdev, tx_ring);
return retval;
} }
/** /**
......
...@@ -81,7 +81,8 @@ static void ixgb_clean_tx_ring(struct ixgb_adapter *adapter); ...@@ -81,7 +81,8 @@ static void ixgb_clean_tx_ring(struct ixgb_adapter *adapter);
static void ixgb_clean_rx_ring(struct ixgb_adapter *adapter); static void ixgb_clean_rx_ring(struct ixgb_adapter *adapter);
static void ixgb_set_multi(struct net_device *netdev); static void ixgb_set_multi(struct net_device *netdev);
static void ixgb_watchdog(unsigned long data); static void ixgb_watchdog(unsigned long data);
static int ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev); static netdev_tx_t ixgb_xmit_frame(struct sk_buff *skb,
struct net_device *netdev);
static struct net_device_stats *ixgb_get_stats(struct net_device *netdev); static struct net_device_stats *ixgb_get_stats(struct net_device *netdev);
static int ixgb_change_mtu(struct net_device *netdev, int new_mtu); static int ixgb_change_mtu(struct net_device *netdev, int new_mtu);
static int ixgb_set_mac(struct net_device *netdev, void *p); static int ixgb_set_mac(struct net_device *netdev, void *p);
...@@ -1442,7 +1443,7 @@ static int ixgb_maybe_stop_tx(struct net_device *netdev, ...@@ -1442,7 +1443,7 @@ static int ixgb_maybe_stop_tx(struct net_device *netdev,
MAX_SKB_FRAGS * TXD_USE_COUNT(PAGE_SIZE) + 1 /* for context */ \ MAX_SKB_FRAGS * TXD_USE_COUNT(PAGE_SIZE) + 1 /* for context */ \
+ 1 /* one more needed for sentinel TSO workaround */ + 1 /* one more needed for sentinel TSO workaround */
static int static netdev_tx_t
ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev) ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
{ {
struct ixgb_adapter *adapter = netdev_priv(netdev); struct ixgb_adapter *adapter = netdev_priv(netdev);
......
...@@ -5107,7 +5107,8 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb) ...@@ -5107,7 +5107,8 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
return skb_tx_hash(dev, skb); return skb_tx_hash(dev, skb);
} }
static int ixgbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev) static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb,
struct net_device *netdev)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
struct ixgbe_ring *tx_ring; struct ixgbe_ring *tx_ring;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment