Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27267
b: refs/heads/master
c: 470e2aa
h: refs/heads/master
i:
  27265: 2b03f3e
  27263: 336ee73
v: v3
  • Loading branch information
Pavel Roskin authored and John W. Linville committed Apr 24, 2006
1 parent 834e8ff commit 37ba381
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d5be088263b0d3dbb7e7959b7c403b3d026a5d3
refs/heads/master: 470e2aa6dbdd2c7eb6562ae365a17a627f7070e8
29 changes: 13 additions & 16 deletions trunk/drivers/net/wireless/orinoco.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,16 +449,13 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
/* Oops, the firmware hasn't established a connection,
silently drop the packet (this seems to be the
safest approach). */
stats->tx_errors++;
orinoco_unlock(priv, &flags);
dev_kfree_skb(skb);
return NETDEV_TX_OK;
goto drop;
}

/* Check packet length */
data_len = skb->len;
if (data_len < ETH_HLEN)
goto fail;
goto drop;

eh = (struct ethhdr *)skb->data;

Expand All @@ -469,8 +466,7 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
if (net_ratelimit())
printk(KERN_ERR "%s: Error %d writing Tx descriptor "
"to BAP\n", dev->name, err);
stats->tx_errors++;
goto fail;
goto busy;
}

/* Clear the 802.11 header and data length fields - some
Expand Down Expand Up @@ -501,8 +497,7 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
if (net_ratelimit())
printk(KERN_ERR "%s: Error %d writing packet "
"header to BAP\n", dev->name, err);
stats->tx_errors++;
goto fail;
goto busy;
}
} else { /* IEEE 802.3 frame */
data_len = skb->len;
Expand All @@ -515,8 +510,7 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
if (err) {
printk(KERN_ERR "%s: Error %d writing packet to BAP\n",
dev->name, err);
stats->tx_errors++;
goto fail;
goto busy;
}

/* Finally, we actually initiate the send */
Expand All @@ -529,20 +523,23 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
if (net_ratelimit())
printk(KERN_ERR "%s: Error %d transmitting packet\n",
dev->name, err);
stats->tx_errors++;
goto fail;
goto busy;
}

dev->trans_start = jiffies;
stats->tx_bytes += data_off + data_len;
goto ok;

orinoco_unlock(priv, &flags);
drop:
stats->tx_errors++;
stats->tx_dropped++;

ok:
orinoco_unlock(priv, &flags);
dev_kfree_skb(skb);

return NETDEV_TX_OK;
fail:

busy:
orinoco_unlock(priv, &flags);
return NETDEV_TX_BUSY;
}
Expand Down

0 comments on commit 37ba381

Please sign in to comment.