aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/orinoco.c')
-rw-r--r--drivers/net/wireless/orinoco.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index 70a3477a2061..488ab06fb79f 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -542,14 +542,21 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
542 stats->tx_errors++; 542 stats->tx_errors++;
543 goto fail; 543 goto fail;
544 } 544 }
545 /* Actual xfer length - allow for padding */
546 len = ALIGN(data_len, 2);
547 if (len < ETH_ZLEN - ETH_HLEN)
548 len = ETH_ZLEN - ETH_HLEN;
545 } else { /* IEEE 802.3 frame */ 549 } else { /* IEEE 802.3 frame */
546 data_len = len + ETH_HLEN; 550 data_len = len + ETH_HLEN;
547 data_off = HERMES_802_3_OFFSET; 551 data_off = HERMES_802_3_OFFSET;
548 p = skb->data; 552 p = skb->data;
553 /* Actual xfer length - round up for odd length packets */
554 len = ALIGN(data_len, 2);
555 if (len < ETH_ZLEN)
556 len = ETH_ZLEN;
549 } 557 }
550 558
551 /* Round up for odd length packets */ 559 err = hermes_bap_pwrite_pad(hw, USER_BAP, p, data_len, len,
552 err = hermes_bap_pwrite(hw, USER_BAP, p, ALIGN(data_len, 2),
553 txfid, data_off); 560 txfid, data_off);
554 if (err) { 561 if (err) {
555 printk(KERN_ERR "%s: Error %d writing packet to BAP\n", 562 printk(KERN_ERR "%s: Error %d writing packet to BAP\n",