a73b9ec582ec8e000850ba5e395649dada68a8a4
[openwrt.git] / package / madwifi / patches / 372-queue_vif.patch
1 --- a/net80211/ieee80211_input.c
2 +++ b/net80211/ieee80211_input.c
3 @@ -1183,6 +1183,7 @@
4 }
5 if (skb1 != NULL) {
6 struct ieee80211_node *ni_tmp;
7 + int ret;
8 skb1->dev = dev;
9 skb_reset_mac_header(skb1);
10 skb_set_network_header(skb1, sizeof(struct ether_header));
11 @@ -1190,7 +1191,12 @@
12 skb1->protocol = __constant_htons(ETH_P_802_2);
13 /* XXX insert vlan tag before queue it? */
14 ni_tmp = SKB_CB(skb1)->ni; /* remember node so we can free it */
15 - if (dev_queue_xmit(skb1) == NET_XMIT_DROP) {
16 + ret = dev->hard_start_xmit(skb1, dev);
17 +
18 + if (ret == NETDEV_TX_BUSY)
19 + ieee80211_dev_kfree_skb(&skb1);
20 +
21 + if (ret != NETDEV_TX_OK) {
22 /* If queue dropped the packet because device was
23 * too busy */
24 vap->iv_devstats.tx_dropped++;
25 --- a/net80211/ieee80211_output.c
26 +++ b/net80211/ieee80211_output.c
27 @@ -329,9 +329,10 @@
28 /* Dispatch the packet to the parent device */
29 skb->dev = vap->iv_ic->ic_dev;
30
31 - if (dev_queue_xmit(skb) == NET_XMIT_DROP)
32 + if (netif_queue_stopped(skb->dev))
33 + ieee80211_dev_kfree_skb(&skb);
34 + else if (dev_queue_xmit(skb) == NET_XMIT_DROP)
35 vap->iv_devstats.tx_dropped++;
36 -
37 }
38
39 /*
This page took 0.040198 seconds and 3 git commands to generate.