hard_start_xmit() functions must either return NETDEV_TX_OK or
NETDEV_TX_BUSY (they might also return negative errno values as well,
like -ENETDOWN)
Correct a small missing static reported by sparse
This revert part of r3075
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3123
0192ed92-7a03-0410-a25b-
9323aeb14dbd
* assumed to reclaim the resources.
*
* Context: process context with BHs disabled
+ * It mut return either NETDEV_TX_OK or NETDEV_TX_BUSY
*/
static int
ath_hardstart(struct sk_buff *skb, struct net_device *dev)
* created, otherwise the same SKB is used.
*
* NB: MAY ALLOCATE */
-struct sk_buff *
+static struct sk_buff *
ath_skb_removepad(struct sk_buff *skb, unsigned int copy_skb)
{
struct sk_buff *tskb = skb;
}
M_PWR_SAV_SET(skb); /* ensure MORE_DATA bit is set correctly */
- (void)ieee80211_parent_queue_xmit(skb); /* Submit to parent device, including updating stats */
+ ieee80211_parent_queue_xmit(skb); /* Submit to parent device, including updating stats */
}
#ifdef ATH_SUPERG_FF
/*
* Context: process context (BHs disabled)
+ * It must return either NETDEV_TX_OK or NETDEV_TX_BUSY
*/
int
ieee80211_hardstart(struct sk_buff *skb, struct net_device *dev)
if (vap->iv_opmode == IEEE80211_M_MONITOR) {
ieee80211_monitor_encap(vap, skb);
- return ieee80211_parent_queue_xmit(skb);
+ ieee80211_parent_queue_xmit(skb);
+ return NETDEV_TX_OK;
}
/* Cancel any running BG scan */
SKB_CB(skb1)->ni = ieee80211_find_txnode(vap->iv_xrvap,
eh->ether_dhost);
/* Ignore this return code. */
- (void)ieee80211_parent_queue_xmit(skb1);
+ ieee80211_parent_queue_xmit(skb1);
}
}
#endif
ieee80211_unref_node(&ni);
- return ieee80211_parent_queue_xmit(skb);
+ ieee80211_parent_queue_xmit(skb);
+ return NETDEV_TX_OK;
bad:
if (skb != NULL)
ieee80211_dev_kfree_skb(&skb);
if (ni != NULL)
ieee80211_unref_node(&ni);
- return 0;
+ return NETDEV_TX_OK;
}
-int ieee80211_parent_queue_xmit(struct sk_buff *skb) {
+/*
+ * skb is consumed in all cases
+ */
+
+void ieee80211_parent_queue_xmit(struct sk_buff *skb) {
struct ieee80211vap *vap = skb->dev->priv;
- int ret;
vap->iv_devstats.tx_packets++;
vap->iv_devstats.tx_bytes += skb->len;
/* Dispatch the packet to the parent device */
skb->dev = vap->iv_ic->ic_dev;
- if ((ret = dev_queue_xmit(skb)) == NET_XMIT_DROP)
+ if (dev_queue_xmit(skb) == NET_XMIT_DROP)
vap->iv_devstats.tx_dropped++;
- return ret;
}
/*
* Save an outbound packet for a node in power-save sleep state.
* The new packet is placed on the node's saved queue, and the TIM
* is changed, if necessary.
+ * It must return either NETDEV_TX_OK or NETDEV_TX_BUSY
*/
int
ieee80211_pwrsave(struct sk_buff *skb)
ieee80211_dump_pkt(ni->ni_ic, skb->data, skb->len, -1, -1);
#endif
ieee80211_unref_node(&SKB_CB(skb)->ni);
- ieee80211_dev_kfree_skb(&skb);
return NETDEV_TX_BUSY;
}
skb->dev = vap->iv_dev; /* XXX? unnecessary */
#endif
- (void)ieee80211_parent_queue_xmit(skb);
+ ieee80211_parent_queue_xmit(skb);
}
vap->iv_set_tim(ni, 0);
}
IEEE80211_NODE_SAVEQ_UNLOCK_IRQ(ni);
if (skb == NULL)
break;
- (void)ieee80211_parent_queue_xmit(skb);
+ ieee80211_parent_queue_xmit(skb);
}
}
} else {
void ieee80211_recv_mgmt(struct ieee80211_node *, struct sk_buff *,
int, int, u_int64_t);
int ieee80211_hardstart(struct sk_buff *, struct net_device *);
-int ieee80211_parent_queue_xmit(struct sk_buff *);
+void ieee80211_parent_queue_xmit(struct sk_buff *);
int ieee80211_send_nulldata(struct ieee80211_node *);
int ieee80211_send_qosnulldata(struct ieee80211_node *, int);
int ieee80211_send_mgmt(struct ieee80211_node *, int, int);