Commit d0cf9c0d authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller
Browse files

wireless: convert drivers to netdev_tx_t



Mostly just simple conversions:
  * ray_cs had bogus return of NET_TX_LOCKED but driver
    was not using NETIF_F_LLTX
  * hostap and ipw2x00 had some code that returned value
    from a called function that also had to change to return netdev_tx_t

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0fc48098
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -334,12 +334,12 @@ int i2400m_net_tx(struct i2400m *i2400m, struct net_device *net_dev,
 * that will sleep. See i2400m_net_wake_tx() for details.
 */
static
int i2400m_hard_start_xmit(struct sk_buff *skb,
netdev_tx_t i2400m_hard_start_xmit(struct sk_buff *skb,
					 struct net_device *net_dev)
{
	int result;
	struct i2400m *i2400m = net_dev_to_i2400m(net_dev);
	struct device *dev = i2400m_dev(i2400m);
	int result;

	d_fnstart(3, dev, "(skb %p net_dev %p)\n", skb, net_dev);
	if (i2400m->state == I2400M_SS_IDLE)
@@ -353,9 +353,9 @@ int i2400m_hard_start_xmit(struct sk_buff *skb,
		net_dev->stats.tx_bytes += skb->len;
	}
	kfree_skb(skb);
	result = NETDEV_TX_OK;
	d_fnend(3, dev, "(skb %p net_dev %p) = %d\n", skb, net_dev, result);
	return result;

	d_fnend(3, dev, "(skb %p net_dev %p)\n", skb, net_dev);
	return NETDEV_TX_OK;
}


+9 −3
Original line number Diff line number Diff line
@@ -1920,7 +1920,9 @@ static int airo_open(struct net_device *dev) {
	return 0;
}

static int mpi_start_xmit(struct sk_buff *skb, struct net_device *dev) {
static netdev_tx_t mpi_start_xmit(struct sk_buff *skb,
					struct net_device *dev)
{
	int npacks, pending;
	unsigned long flags;
	struct airo_info *ai = dev->ml_priv;
@@ -2119,7 +2121,9 @@ static void airo_end_xmit(struct net_device *dev) {
	dev_kfree_skb(skb);
}

static int airo_start_xmit(struct sk_buff *skb, struct net_device *dev) {
static netdev_tx_t airo_start_xmit(struct sk_buff *skb,
					 struct net_device *dev)
{
	s16 len;
	int i, j;
	struct airo_info *priv = dev->ml_priv;
@@ -2184,7 +2188,9 @@ static void airo_end_xmit11(struct net_device *dev) {
	dev_kfree_skb(skb);
}

static int airo_start_xmit11(struct sk_buff *skb, struct net_device *dev) {
static netdev_tx_t airo_start_xmit11(struct sk_buff *skb,
					   struct net_device *dev)
{
	s16 len;
	int i, j;
	struct airo_info *priv = dev->ml_priv;
+2 −2
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ struct arlan_conf_stru arlan_conf[MAX_ARLANS];
static int arlans_found;

static  int 	arlan_open(struct net_device *dev);
static  int 	arlan_tx(struct sk_buff *skb, struct net_device *dev);
static  netdev_tx_t arlan_tx(struct sk_buff *skb, struct net_device *dev);
static  irqreturn_t arlan_interrupt(int irq, void *dev_id);
static  int 	arlan_close(struct net_device *dev);
static  struct net_device_stats *
@@ -1169,7 +1169,7 @@ static void arlan_tx_timeout (struct net_device *dev)
}


static int arlan_tx(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t arlan_tx(struct sk_buff *skb, struct net_device *dev)
{
	short length;
	unsigned char *buf;
+1 −1
Original line number Diff line number Diff line
@@ -781,7 +781,7 @@ static void tx_update_descriptor(struct atmel_private *priv, int is_bcast,
	priv->tx_free_mem -= len;
}

static int start_tx(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev)
{
	static const u8 SNAP_RFC1024[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
	struct atmel_private *priv = netdev_priv(dev);
+7 −3
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@

#include <linux/types.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>

struct hostap_ieee80211_mgmt {
	__le16 frame_control;
@@ -85,8 +86,11 @@ void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
			  struct hostap_80211_rx_status *rx_stats);

void hostap_dump_tx_80211(const char *name, struct sk_buff *skb);
int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev);
int hostap_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev);
int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev);
netdev_tx_t hostap_data_start_xmit(struct sk_buff *skb,
				   struct net_device *dev);
netdev_tx_t hostap_mgmt_start_xmit(struct sk_buff *skb,
				   struct net_device *dev);
netdev_tx_t hostap_master_start_xmit(struct sk_buff *skb,
				     struct net_device *dev);

#endif /* HOSTAP_80211_H */
Loading