aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-08-31 15:50:57 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-01 04:14:04 -0400
commitd0cf9c0dadcdc89a755bcb301cfc9c796eb28ccf (patch)
treec201ed345e104100288d57c8b3ae46d486b56118 /drivers/net
parent0fc480987e69f22b9212f087545b4d1ca6950807 (diff)
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: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wimax/i2400m/netdev.c12
-rw-r--r--drivers/net/wireless/airo.c12
-rw-r--r--drivers/net/wireless/arlan-main.c4
-rw-r--r--drivers/net/wireless/atmel.c2
-rw-r--r--drivers/net/wireless/hostap/hostap_80211.h10
-rw-r--r--drivers/net/wireless/hostap/hostap_80211_tx.c11
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2100.c10
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2200.c9
-rw-r--r--drivers/net/wireless/ipw2x00/libipw.h7
-rw-r--r--drivers/net/wireless/ipw2x00/libipw_tx.c6
-rw-r--r--drivers/net/wireless/libertas/decl.h5
-rw-r--r--drivers/net/wireless/libertas/main.c3
-rw-r--r--drivers/net/wireless/libertas/tx.c6
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c3
-rw-r--r--drivers/net/wireless/netwave_cs.c6
-rw-r--r--drivers/net/wireless/orinoco/main.c2
-rw-r--r--drivers/net/wireless/prism54/islpci_eth.c2
-rw-r--r--drivers/net/wireless/prism54/islpci_eth.h2
-rw-r--r--drivers/net/wireless/ray_cs.c14
-rw-r--r--drivers/net/wireless/strip.c2
-rw-r--r--drivers/net/wireless/wavelan.c3
-rw-r--r--drivers/net/wireless/wavelan.p.h2
-rw-r--r--drivers/net/wireless/wavelan_cs.c2
-rw-r--r--drivers/net/wireless/wavelan_cs.p.h2
-rw-r--r--drivers/net/wireless/wl3501_cs.c3
-rw-r--r--drivers/net/wireless/zd1201.c3
26 files changed, 84 insertions, 59 deletions
diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c
index 9653f478b382..796396cb4c82 100644
--- a/drivers/net/wimax/i2400m/netdev.c
+++ b/drivers/net/wimax/i2400m/netdev.c
@@ -334,12 +334,12 @@ int i2400m_net_tx(struct i2400m *i2400m, struct net_device *net_dev,
334 * that will sleep. See i2400m_net_wake_tx() for details. 334 * that will sleep. See i2400m_net_wake_tx() for details.
335 */ 335 */
336static 336static
337int i2400m_hard_start_xmit(struct sk_buff *skb, 337netdev_tx_t i2400m_hard_start_xmit(struct sk_buff *skb,
338 struct net_device *net_dev) 338 struct net_device *net_dev)
339{ 339{
340 int result;
341 struct i2400m *i2400m = net_dev_to_i2400m(net_dev); 340 struct i2400m *i2400m = net_dev_to_i2400m(net_dev);
342 struct device *dev = i2400m_dev(i2400m); 341 struct device *dev = i2400m_dev(i2400m);
342 int result;
343 343
344 d_fnstart(3, dev, "(skb %p net_dev %p)\n", skb, net_dev); 344 d_fnstart(3, dev, "(skb %p net_dev %p)\n", skb, net_dev);
345 if (i2400m->state == I2400M_SS_IDLE) 345 if (i2400m->state == I2400M_SS_IDLE)
@@ -353,9 +353,9 @@ int i2400m_hard_start_xmit(struct sk_buff *skb,
353 net_dev->stats.tx_bytes += skb->len; 353 net_dev->stats.tx_bytes += skb->len;
354 } 354 }
355 kfree_skb(skb); 355 kfree_skb(skb);
356 result = NETDEV_TX_OK; 356
357 d_fnend(3, dev, "(skb %p net_dev %p) = %d\n", skb, net_dev, result); 357 d_fnend(3, dev, "(skb %p net_dev %p)\n", skb, net_dev);
358 return result; 358 return NETDEV_TX_OK;
359} 359}
360 360
361 361
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index c150c4858576..7116a1aa20ce 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -1920,7 +1920,9 @@ static int airo_open(struct net_device *dev) {
1920 return 0; 1920 return 0;
1921} 1921}
1922 1922
1923static int mpi_start_xmit(struct sk_buff *skb, struct net_device *dev) { 1923static netdev_tx_t mpi_start_xmit(struct sk_buff *skb,
1924 struct net_device *dev)
1925{
1924 int npacks, pending; 1926 int npacks, pending;
1925 unsigned long flags; 1927 unsigned long flags;
1926 struct airo_info *ai = dev->ml_priv; 1928 struct airo_info *ai = dev->ml_priv;
@@ -2119,7 +2121,9 @@ static void airo_end_xmit(struct net_device *dev) {
2119 dev_kfree_skb(skb); 2121 dev_kfree_skb(skb);
2120} 2122}
2121 2123
2122static int airo_start_xmit(struct sk_buff *skb, struct net_device *dev) { 2124static netdev_tx_t airo_start_xmit(struct sk_buff *skb,
2125 struct net_device *dev)
2126{
2123 s16 len; 2127 s16 len;
2124 int i, j; 2128 int i, j;
2125 struct airo_info *priv = dev->ml_priv; 2129 struct airo_info *priv = dev->ml_priv;
@@ -2184,7 +2188,9 @@ static void airo_end_xmit11(struct net_device *dev) {
2184 dev_kfree_skb(skb); 2188 dev_kfree_skb(skb);
2185} 2189}
2186 2190
2187static int airo_start_xmit11(struct sk_buff *skb, struct net_device *dev) { 2191static netdev_tx_t airo_start_xmit11(struct sk_buff *skb,
2192 struct net_device *dev)
2193{
2188 s16 len; 2194 s16 len;
2189 int i, j; 2195 int i, j;
2190 struct airo_info *priv = dev->ml_priv; 2196 struct airo_info *priv = dev->ml_priv;
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c
index f96c634e2d35..921a082487a1 100644
--- a/drivers/net/wireless/arlan-main.c
+++ b/drivers/net/wireless/arlan-main.c
@@ -77,7 +77,7 @@ struct arlan_conf_stru arlan_conf[MAX_ARLANS];
77static int arlans_found; 77static int arlans_found;
78 78
79static int arlan_open(struct net_device *dev); 79static int arlan_open(struct net_device *dev);
80static int arlan_tx(struct sk_buff *skb, struct net_device *dev); 80static netdev_tx_t arlan_tx(struct sk_buff *skb, struct net_device *dev);
81static irqreturn_t arlan_interrupt(int irq, void *dev_id); 81static irqreturn_t arlan_interrupt(int irq, void *dev_id);
82static int arlan_close(struct net_device *dev); 82static int arlan_close(struct net_device *dev);
83static struct net_device_stats * 83static struct net_device_stats *
@@ -1169,7 +1169,7 @@ static void arlan_tx_timeout (struct net_device *dev)
1169} 1169}
1170 1170
1171 1171
1172static int arlan_tx(struct sk_buff *skb, struct net_device *dev) 1172static netdev_tx_t arlan_tx(struct sk_buff *skb, struct net_device *dev)
1173{ 1173{
1174 short length; 1174 short length;
1175 unsigned char *buf; 1175 unsigned char *buf;
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index 05813bc3e308..a3b36b3a9d67 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -781,7 +781,7 @@ static void tx_update_descriptor(struct atmel_private *priv, int is_bcast,
781 priv->tx_free_mem -= len; 781 priv->tx_free_mem -= len;
782} 782}
783 783
784static int start_tx(struct sk_buff *skb, struct net_device *dev) 784static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev)
785{ 785{
786 static const u8 SNAP_RFC1024[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; 786 static const u8 SNAP_RFC1024[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
787 struct atmel_private *priv = netdev_priv(dev); 787 struct atmel_private *priv = netdev_priv(dev);
diff --git a/drivers/net/wireless/hostap/hostap_80211.h b/drivers/net/wireless/hostap/hostap_80211.h
index 2e9fb0f383fc..7f9d8d976aa8 100644
--- a/drivers/net/wireless/hostap/hostap_80211.h
+++ b/drivers/net/wireless/hostap/hostap_80211.h
@@ -3,6 +3,7 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/skbuff.h> 5#include <linux/skbuff.h>
6#include <linux/netdevice.h>
6 7
7struct hostap_ieee80211_mgmt { 8struct hostap_ieee80211_mgmt {
8 __le16 frame_control; 9 __le16 frame_control;
@@ -85,8 +86,11 @@ void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
85 struct hostap_80211_rx_status *rx_stats); 86 struct hostap_80211_rx_status *rx_stats);
86 87
87void hostap_dump_tx_80211(const char *name, struct sk_buff *skb); 88void hostap_dump_tx_80211(const char *name, struct sk_buff *skb);
88int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev); 89netdev_tx_t hostap_data_start_xmit(struct sk_buff *skb,
89int hostap_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev); 90 struct net_device *dev);
90int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev); 91netdev_tx_t hostap_mgmt_start_xmit(struct sk_buff *skb,
92 struct net_device *dev);
93netdev_tx_t hostap_master_start_xmit(struct sk_buff *skb,
94 struct net_device *dev);
91 95
92#endif /* HOSTAP_80211_H */ 96#endif /* HOSTAP_80211_H */
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c
index 1fe1bbabb907..90108b698f11 100644
--- a/drivers/net/wireless/hostap/hostap_80211_tx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_tx.c
@@ -53,7 +53,8 @@ void hostap_dump_tx_80211(const char *name, struct sk_buff *skb)
53/* hard_start_xmit function for data interfaces (wlan#, wlan#wds#, wlan#sta) 53/* hard_start_xmit function for data interfaces (wlan#, wlan#wds#, wlan#sta)
54 * Convert Ethernet header into a suitable IEEE 802.11 header depending on 54 * Convert Ethernet header into a suitable IEEE 802.11 header depending on
55 * device configuration. */ 55 * device configuration. */
56int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev) 56netdev_tx_t hostap_data_start_xmit(struct sk_buff *skb,
57 struct net_device *dev)
57{ 58{
58 struct hostap_interface *iface; 59 struct hostap_interface *iface;
59 local_info_t *local; 60 local_info_t *local;
@@ -261,7 +262,8 @@ int hostap_data_start_xmit(struct sk_buff *skb, struct net_device *dev)
261 262
262 263
263/* hard_start_xmit function for hostapd wlan#ap interfaces */ 264/* hard_start_xmit function for hostapd wlan#ap interfaces */
264int hostap_mgmt_start_xmit(struct sk_buff *skb, struct net_device *dev) 265netdev_tx_t hostap_mgmt_start_xmit(struct sk_buff *skb,
266 struct net_device *dev)
265{ 267{
266 struct hostap_interface *iface; 268 struct hostap_interface *iface;
267 local_info_t *local; 269 local_info_t *local;
@@ -373,11 +375,12 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
373/* hard_start_xmit function for master radio interface wifi#. 375/* hard_start_xmit function for master radio interface wifi#.
374 * AP processing (TX rate control, power save buffering, etc.). 376 * AP processing (TX rate control, power save buffering, etc.).
375 * Use hardware TX function to send the frame. */ 377 * Use hardware TX function to send the frame. */
376int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev) 378netdev_tx_t hostap_master_start_xmit(struct sk_buff *skb,
379 struct net_device *dev)
377{ 380{
378 struct hostap_interface *iface; 381 struct hostap_interface *iface;
379 local_info_t *local; 382 local_info_t *local;
380 int ret = NETDEV_TX_BUSY; 383 netdev_tx_t ret = NETDEV_TX_BUSY;
381 u16 fc; 384 u16 fc;
382 struct hostap_tx_data tx; 385 struct hostap_tx_data tx;
383 ap_tx_ret tx_ret; 386 ap_tx_ret tx_ret;
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index 77457386e0aa..240cff1e6979 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -3330,8 +3330,8 @@ static irqreturn_t ipw2100_interrupt(int irq, void *data)
3330 return IRQ_NONE; 3330 return IRQ_NONE;
3331} 3331}
3332 3332
3333static int ipw2100_tx(struct libipw_txb *txb, struct net_device *dev, 3333static netdev_tx_t ipw2100_tx(struct libipw_txb *txb,
3334 int pri) 3334 struct net_device *dev, int pri)
3335{ 3335{
3336 struct ipw2100_priv *priv = libipw_priv(dev); 3336 struct ipw2100_priv *priv = libipw_priv(dev);
3337 struct list_head *element; 3337 struct list_head *element;
@@ -3369,12 +3369,12 @@ static int ipw2100_tx(struct libipw_txb *txb, struct net_device *dev,
3369 ipw2100_tx_send_data(priv); 3369 ipw2100_tx_send_data(priv);
3370 3370
3371 spin_unlock_irqrestore(&priv->low_lock, flags); 3371 spin_unlock_irqrestore(&priv->low_lock, flags);
3372 return 0; 3372 return NETDEV_TX_OK;
3373 3373
3374 fail_unlock: 3374fail_unlock:
3375 netif_stop_queue(dev); 3375 netif_stop_queue(dev);
3376 spin_unlock_irqrestore(&priv->low_lock, flags); 3376 spin_unlock_irqrestore(&priv->low_lock, flags);
3377 return 1; 3377 return NETDEV_TX_BUSY;
3378} 3378}
3379 3379
3380static int ipw2100_msg_allocate(struct ipw2100_priv *priv) 3380static int ipw2100_msg_allocate(struct ipw2100_priv *priv)
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index 3f8372daf46a..3838f9f9a47a 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -10459,12 +10459,12 @@ static void ipw_handle_promiscuous_tx(struct ipw_priv *priv,
10459} 10459}
10460#endif 10460#endif
10461 10461
10462static int ipw_net_hard_start_xmit(struct libipw_txb *txb, 10462static netdev_tx_t ipw_net_hard_start_xmit(struct libipw_txb *txb,
10463 struct net_device *dev, int pri) 10463 struct net_device *dev, int pri)
10464{ 10464{
10465 struct ipw_priv *priv = libipw_priv(dev); 10465 struct ipw_priv *priv = libipw_priv(dev);
10466 unsigned long flags; 10466 unsigned long flags;
10467 int ret; 10467 netdev_tx_t ret;
10468 10468
10469 IPW_DEBUG_TX("dev->xmit(%d bytes)\n", txb->payload_size); 10469 IPW_DEBUG_TX("dev->xmit(%d bytes)\n", txb->payload_size);
10470 spin_lock_irqsave(&priv->lock, flags); 10470 spin_lock_irqsave(&priv->lock, flags);
@@ -11602,7 +11602,8 @@ static int ipw_prom_stop(struct net_device *dev)
11602 return 0; 11602 return 0;
11603} 11603}
11604 11604
11605static int ipw_prom_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) 11605static netdev_tx_t ipw_prom_hard_start_xmit(struct sk_buff *skb,
11606 struct net_device *dev)
11606{ 11607{
11607 IPW_DEBUG_INFO("prom dev->xmit\n"); 11608 IPW_DEBUG_INFO("prom dev->xmit\n");
11608 dev_kfree_skb(skb); 11609 dev_kfree_skb(skb);
diff --git a/drivers/net/wireless/ipw2x00/libipw.h b/drivers/net/wireless/ipw2x00/libipw.h
index 8f91d3427ce5..bf45391172f3 100644
--- a/drivers/net/wireless/ipw2x00/libipw.h
+++ b/drivers/net/wireless/ipw2x00/libipw.h
@@ -867,8 +867,8 @@ struct libipw_device {
867 /* Callback functions */ 867 /* Callback functions */
868 void (*set_security) (struct net_device * dev, 868 void (*set_security) (struct net_device * dev,
869 struct libipw_security * sec); 869 struct libipw_security * sec);
870 int (*hard_start_xmit) (struct libipw_txb * txb, 870 netdev_tx_t (*hard_start_xmit) (struct libipw_txb * txb,
871 struct net_device * dev, int pri); 871 struct net_device * dev, int pri);
872 int (*reset_port) (struct net_device * dev); 872 int (*reset_port) (struct net_device * dev);
873 int (*is_queue_full) (struct net_device * dev, int pri); 873 int (*is_queue_full) (struct net_device * dev, int pri);
874 874
@@ -1028,7 +1028,8 @@ extern void libipw_networks_age(struct libipw_device *ieee,
1028extern int libipw_set_encryption(struct libipw_device *ieee); 1028extern int libipw_set_encryption(struct libipw_device *ieee);
1029 1029
1030/* libipw_tx.c */ 1030/* libipw_tx.c */
1031extern int libipw_xmit(struct sk_buff *skb, struct net_device *dev); 1031extern netdev_tx_t libipw_xmit(struct sk_buff *skb,
1032 struct net_device *dev);
1032extern void libipw_txb_free(struct libipw_txb *); 1033extern void libipw_txb_free(struct libipw_txb *);
1033 1034
1034/* libipw_rx.c */ 1035/* libipw_rx.c */
diff --git a/drivers/net/wireless/ipw2x00/libipw_tx.c b/drivers/net/wireless/ipw2x00/libipw_tx.c
index 46530ce56ea6..da8beac7fcf3 100644
--- a/drivers/net/wireless/ipw2x00/libipw_tx.c
+++ b/drivers/net/wireless/ipw2x00/libipw_tx.c
@@ -252,7 +252,7 @@ static int libipw_classify(struct sk_buff *skb)
252 252
253/* Incoming skb is converted to a txb which consists of 253/* Incoming skb is converted to a txb which consists of
254 * a block of 802.11 fragment packets (stored as skbs) */ 254 * a block of 802.11 fragment packets (stored as skbs) */
255int libipw_xmit(struct sk_buff *skb, struct net_device *dev) 255netdev_tx_t libipw_xmit(struct sk_buff *skb, struct net_device *dev)
256{ 256{
257 struct libipw_device *ieee = netdev_priv(dev); 257 struct libipw_device *ieee = netdev_priv(dev);
258 struct libipw_txb *txb = NULL; 258 struct libipw_txb *txb = NULL;
@@ -523,8 +523,8 @@ int libipw_xmit(struct sk_buff *skb, struct net_device *dev)
523 dev_kfree_skb_any(skb); 523 dev_kfree_skb_any(skb);
524 524
525 if (txb) { 525 if (txb) {
526 int ret = (*ieee->hard_start_xmit) (txb, dev, priority); 526 netdev_tx_t ret = (*ieee->hard_start_xmit)(txb, dev, priority);
527 if (ret == 0) { 527 if (ret == NETDEV_TX_OK) {
528 dev->stats.tx_packets++; 528 dev->stats.tx_packets++;
529 dev->stats.tx_bytes += txb->payload_size; 529 dev->stats.tx_bytes += txb->payload_size;
530 return NETDEV_TX_OK; 530 return NETDEV_TX_OK;
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h
index 0b84bdca0726..8b15380ae6e1 100644
--- a/drivers/net/wireless/libertas/decl.h
+++ b/drivers/net/wireless/libertas/decl.h
@@ -6,7 +6,7 @@
6#ifndef _LBS_DECL_H_ 6#ifndef _LBS_DECL_H_
7#define _LBS_DECL_H_ 7#define _LBS_DECL_H_
8 8
9#include <linux/device.h> 9#include <linux/netdevice.h>
10 10
11#include "defs.h" 11#include "defs.h"
12 12
@@ -41,7 +41,8 @@ u8 lbs_data_rate_to_fw_index(u32 rate);
41int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len); 41int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len);
42void lbs_complete_command(struct lbs_private *priv, struct cmd_ctrl_node *cmd, 42void lbs_complete_command(struct lbs_private *priv, struct cmd_ctrl_node *cmd,
43 int result); 43 int result);
44int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev); 44netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb,
45 struct net_device *dev);
45int lbs_set_regiontable(struct lbs_private *priv, u8 region, u8 band); 46int lbs_set_regiontable(struct lbs_private *priv, u8 region, u8 band);
46 47
47int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *); 48int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *);
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 8df1cfd5f93a..87b4e497faa2 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -1647,7 +1647,8 @@ static int lbs_rtap_stop(struct net_device *dev)
1647 return 0; 1647 return 0;
1648} 1648}
1649 1649
1650static int lbs_rtap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) 1650static netdev_tx_t lbs_rtap_hard_start_xmit(struct sk_buff *skb,
1651 struct net_device *dev)
1651{ 1652{
1652 netif_stop_queue(dev); 1653 netif_stop_queue(dev);
1653 return NETDEV_TX_BUSY; 1654 return NETDEV_TX_BUSY;
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c
index 160cfd8311c0..4c018f7a0a8d 100644
--- a/drivers/net/wireless/libertas/tx.c
+++ b/drivers/net/wireless/libertas/tx.c
@@ -57,19 +57,17 @@ static u32 convert_radiotap_rate_to_mv(u8 rate)
57 * @param skb A pointer to skb which includes TX packet 57 * @param skb A pointer to skb which includes TX packet
58 * @return 0 or -1 58 * @return 0 or -1
59 */ 59 */
60int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) 60netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
61{ 61{
62 unsigned long flags; 62 unsigned long flags;
63 struct lbs_private *priv = dev->ml_priv; 63 struct lbs_private *priv = dev->ml_priv;
64 struct txpd *txpd; 64 struct txpd *txpd;
65 char *p802x_hdr; 65 char *p802x_hdr;
66 uint16_t pkt_len; 66 uint16_t pkt_len;
67 int ret; 67 netdev_tx_t ret = NETDEV_TX_OK;
68 68
69 lbs_deb_enter(LBS_DEB_TX); 69 lbs_deb_enter(LBS_DEB_TX);
70 70
71 ret = NETDEV_TX_OK;
72
73 /* We need to protect against the queues being restarted before 71 /* We need to protect against the queues being restarted before
74 we get round to stopping them */ 72 we get round to stopping them */
75 spin_lock_irqsave(&priv->driver_lock, flags); 73 spin_lock_irqsave(&priv->driver_lock, flags);
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 6f6cd43592c8..896f532182f0 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -312,7 +312,8 @@ struct hwsim_radiotap_hdr {
312} __attribute__ ((packed)); 312} __attribute__ ((packed));
313 313
314 314
315static int hwsim_mon_xmit(struct sk_buff *skb, struct net_device *dev) 315static netdev_tx_t hwsim_mon_xmit(struct sk_buff *skb,
316 struct net_device *dev)
316{ 317{
317 /* TODO: allow packet injection */ 318 /* TODO: allow packet injection */
318 dev_kfree_skb(skb); 319 dev_kfree_skb(skb);
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index 712f26eef35d..9498b46c99a4 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -203,7 +203,8 @@ static int netwave_open(struct net_device *dev); /* Open the device */
203static int netwave_close(struct net_device *dev); /* Close the device */ 203static int netwave_close(struct net_device *dev); /* Close the device */
204 204
205/* Packet transmission and Packet reception */ 205/* Packet transmission and Packet reception */
206static int netwave_start_xmit( struct sk_buff *skb, struct net_device *dev); 206static netdev_tx_t netwave_start_xmit( struct sk_buff *skb,
207 struct net_device *dev);
207static int netwave_rx( struct net_device *dev); 208static int netwave_rx( struct net_device *dev);
208 209
209/* Interrupt routines */ 210/* Interrupt routines */
@@ -1026,7 +1027,8 @@ static int netwave_hw_xmit(unsigned char* data, int len,
1026 return 0; 1027 return 0;
1027} 1028}
1028 1029
1029static int netwave_start_xmit(struct sk_buff *skb, struct net_device *dev) { 1030static netdev_tx_t netwave_start_xmit(struct sk_buff *skb,
1031 struct net_device *dev) {
1030 /* This flag indicate that the hardware can't perform a transmission. 1032 /* This flag indicate that the hardware can't perform a transmission.
1031 * Theoritically, NET3 check it before sending a packet to the driver, 1033 * Theoritically, NET3 check it before sending a packet to the driver,
1032 * but in fact it never do that and pool continuously. 1034 * but in fact it never do that and pool continuously.
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c
index 2c7dc65cd2be..7a32bcb0c037 100644
--- a/drivers/net/wireless/orinoco/main.c
+++ b/drivers/net/wireless/orinoco/main.c
@@ -337,7 +337,7 @@ static int orinoco_change_mtu(struct net_device *dev, int new_mtu)
337/* Tx path */ 337/* Tx path */
338/********************************************************************/ 338/********************************************************************/
339 339
340static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev) 340static netdev_tx_t orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
341{ 341{
342 struct orinoco_private *priv = ndev_priv(dev); 342 struct orinoco_private *priv = ndev_priv(dev);
343 struct net_device_stats *stats = &priv->stats; 343 struct net_device_stats *stats = &priv->stats;
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c
index 9b5ee3419287..872b64783e78 100644
--- a/drivers/net/wireless/prism54/islpci_eth.c
+++ b/drivers/net/wireless/prism54/islpci_eth.c
@@ -72,7 +72,7 @@ islpci_eth_cleanup_transmit(islpci_private *priv,
72 } 72 }
73} 73}
74 74
75int 75netdev_tx_t
76islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) 76islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
77{ 77{
78 islpci_private *priv = netdev_priv(ndev); 78 islpci_private *priv = netdev_priv(ndev);
diff --git a/drivers/net/wireless/prism54/islpci_eth.h b/drivers/net/wireless/prism54/islpci_eth.h
index 61454d32d74d..54f9a4b7bf9b 100644
--- a/drivers/net/wireless/prism54/islpci_eth.h
+++ b/drivers/net/wireless/prism54/islpci_eth.h
@@ -64,7 +64,7 @@ struct avs_80211_1_header {
64}; 64};
65 65
66void islpci_eth_cleanup_transmit(islpci_private *, isl38xx_control_block *); 66void islpci_eth_cleanup_transmit(islpci_private *, isl38xx_control_block *);
67int islpci_eth_transmit(struct sk_buff *, struct net_device *); 67netdev_tx_t islpci_eth_transmit(struct sk_buff *, struct net_device *);
68int islpci_eth_receive(islpci_private *); 68int islpci_eth_receive(islpci_private *);
69void islpci_eth_tx_timeout(struct net_device *); 69void islpci_eth_tx_timeout(struct net_device *);
70void islpci_do_reset_and_wake(struct work_struct *); 70void islpci_do_reset_and_wake(struct work_struct *);
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 325206969c97..88cd58eb3b9f 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -104,7 +104,8 @@ static int ray_dev_init(struct net_device *dev);
104static const struct ethtool_ops netdev_ethtool_ops; 104static const struct ethtool_ops netdev_ethtool_ops;
105 105
106static int ray_open(struct net_device *dev); 106static int ray_open(struct net_device *dev);
107static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev); 107static netdev_tx_t ray_dev_start_xmit(struct sk_buff *skb,
108 struct net_device *dev);
108static void set_multicast_list(struct net_device *dev); 109static void set_multicast_list(struct net_device *dev);
109static void ray_update_multi_list(struct net_device *dev, int all); 110static void ray_update_multi_list(struct net_device *dev, int all);
110static int translate_frame(ray_dev_t *local, struct tx_msg __iomem *ptx, 111static int translate_frame(ray_dev_t *local, struct tx_msg __iomem *ptx,
@@ -915,16 +916,19 @@ static int ray_dev_config(struct net_device *dev, struct ifmap *map)
915} 916}
916 917
917/*===========================================================================*/ 918/*===========================================================================*/
918static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev) 919static netdev_tx_t ray_dev_start_xmit(struct sk_buff *skb,
920 struct net_device *dev)
919{ 921{
920 ray_dev_t *local = netdev_priv(dev); 922 ray_dev_t *local = netdev_priv(dev);
921 struct pcmcia_device *link = local->finder; 923 struct pcmcia_device *link = local->finder;
922 short length = skb->len; 924 short length = skb->len;
923 925
924 if (!(pcmcia_dev_present(link))) { 926 if (!pcmcia_dev_present(link)) {
925 DEBUG(2, "ray_dev_start_xmit - device not present\n"); 927 DEBUG(2, "ray_dev_start_xmit - device not present\n");
926 return NETDEV_TX_LOCKED; 928 dev_kfree_skb(skb);
929 return NETDEV_TX_OK;
927 } 930 }
931
928 DEBUG(3, "ray_dev_start_xmit(skb=%p, dev=%p)\n", skb, dev); 932 DEBUG(3, "ray_dev_start_xmit(skb=%p, dev=%p)\n", skb, dev);
929 if (local->authentication_state == NEED_TO_AUTH) { 933 if (local->authentication_state == NEED_TO_AUTH) {
930 DEBUG(0, "ray_cs Sending authentication request.\n"); 934 DEBUG(0, "ray_cs Sending authentication request.\n");
@@ -951,8 +955,8 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev)
951 default: 955 default:
952 dev->trans_start = jiffies; 956 dev->trans_start = jiffies;
953 dev_kfree_skb(skb); 957 dev_kfree_skb(skb);
954 return NETDEV_TX_OK;
955 } 958 }
959
956 return NETDEV_TX_OK; 960 return NETDEV_TX_OK;
957} /* ray_dev_start_xmit */ 961} /* ray_dev_start_xmit */
958 962
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index ef2cb20e96ad..ea6a87c19319 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -1533,7 +1533,7 @@ static void strip_send(struct strip *strip_info, struct sk_buff *skb)
1533} 1533}
1534 1534
1535/* Encapsulate a datagram and kick it into a TTY queue. */ 1535/* Encapsulate a datagram and kick it into a TTY queue. */
1536static int strip_xmit(struct sk_buff *skb, struct net_device *dev) 1536static netdev_tx_t strip_xmit(struct sk_buff *skb, struct net_device *dev)
1537{ 1537{
1538 struct strip *strip_info = netdev_priv(dev); 1538 struct strip *strip_info = netdev_priv(dev);
1539 1539
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c
index 5cb5329a20d1..d634b2da3b84 100644
--- a/drivers/net/wireless/wavelan.c
+++ b/drivers/net/wireless/wavelan.c
@@ -2841,7 +2841,8 @@ static int wv_packet_write(struct net_device * dev, void *buf, short length)
2841 * the packet. We also prevent reentrance. Then we call the function 2841 * the packet. We also prevent reentrance. Then we call the function
2842 * to send the packet. 2842 * to send the packet.
2843 */ 2843 */
2844static int wavelan_packet_xmit(struct sk_buff *skb, struct net_device * dev) 2844static netdev_tx_t wavelan_packet_xmit(struct sk_buff *skb,
2845 struct net_device * dev)
2845{ 2846{
2846 net_local *lp = netdev_priv(dev); 2847 net_local *lp = netdev_priv(dev);
2847 unsigned long flags; 2848 unsigned long flags;
diff --git a/drivers/net/wireless/wavelan.p.h b/drivers/net/wireless/wavelan.p.h
index 2daa0210d789..dbe8de6e5f52 100644
--- a/drivers/net/wireless/wavelan.p.h
+++ b/drivers/net/wireless/wavelan.p.h
@@ -611,7 +611,7 @@ static inline int
611 wv_packet_write(struct net_device *, /* Write a packet to the Tx buffer. */ 611 wv_packet_write(struct net_device *, /* Write a packet to the Tx buffer. */
612 void *, 612 void *,
613 short); 613 short);
614static int 614static netdev_tx_t
615 wavelan_packet_xmit(struct sk_buff *, /* Send a packet. */ 615 wavelan_packet_xmit(struct sk_buff *, /* Send a packet. */
616 struct net_device *); 616 struct net_device *);
617/* -------------------- HARDWARE CONFIGURATION -------------------- */ 617/* -------------------- HARDWARE CONFIGURATION -------------------- */
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index b9748d432019..431a20ec6db6 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -3078,7 +3078,7 @@ wv_packet_write(struct net_device * dev,
3078 * the packet. We also prevent reentrance. Then, we call the function 3078 * the packet. We also prevent reentrance. Then, we call the function
3079 * to send the packet... 3079 * to send the packet...
3080 */ 3080 */
3081static int 3081static netdev_tx_t
3082wavelan_packet_xmit(struct sk_buff * skb, 3082wavelan_packet_xmit(struct sk_buff * skb,
3083 struct net_device * dev) 3083 struct net_device * dev)
3084{ 3084{
diff --git a/drivers/net/wireless/wavelan_cs.p.h b/drivers/net/wireless/wavelan_cs.p.h
index 706fd3007d21..81d91531c4f9 100644
--- a/drivers/net/wireless/wavelan_cs.p.h
+++ b/drivers/net/wireless/wavelan_cs.p.h
@@ -707,7 +707,7 @@ static void
707 wv_packet_write(struct net_device *, /* Write a packet to the Tx buffer */ 707 wv_packet_write(struct net_device *, /* Write a packet to the Tx buffer */
708 void *, 708 void *,
709 short); 709 short);
710static int 710static netdev_tx_t
711 wavelan_packet_xmit(struct sk_buff *, /* Send a packet */ 711 wavelan_packet_xmit(struct sk_buff *, /* Send a packet */
712 struct net_device *); 712 struct net_device *);
713/* -------------------- HARDWARE CONFIGURATION -------------------- */ 713/* -------------------- HARDWARE CONFIGURATION -------------------- */
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index a83a5621ec44..4f1e0cfe609b 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1333,7 +1333,8 @@ static void wl3501_tx_timeout(struct net_device *dev)
1333 * 1 - Could not transmit (dev_queue_xmit will queue it) 1333 * 1 - Could not transmit (dev_queue_xmit will queue it)
1334 * and try to sent it later 1334 * and try to sent it later
1335 */ 1335 */
1336static int wl3501_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) 1336static netdev_tx_t wl3501_hard_start_xmit(struct sk_buff *skb,
1337 struct net_device *dev)
1337{ 1338{
1338 int enabled, rc; 1339 int enabled, rc;
1339 struct wl3501_card *this = netdev_priv(dev); 1340 struct wl3501_card *this = netdev_priv(dev);
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c
index dae1bfb7655e..bc81974a2bc7 100644
--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -779,7 +779,8 @@ static int zd1201_net_stop(struct net_device *dev)
779 (llc+snap+type+payload) 779 (llc+snap+type+payload)
780 zd 1 null byte, zd1201 packet type 780 zd 1 null byte, zd1201 packet type
781 */ 781 */
782static int zd1201_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) 782static netdev_tx_t zd1201_hard_start_xmit(struct sk_buff *skb,
783 struct net_device *dev)
783{ 784{
784 struct zd1201 *zd = netdev_priv(dev); 785 struct zd1201 *zd = netdev_priv(dev);
785 unsigned char *txbuf = zd->txdata; 786 unsigned char *txbuf = zd->txdata;