aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2005-10-28 18:14:51 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-28 19:06:44 -0400
commit63f57fb69b017230c77c40f1713e40885ae6d159 (patch)
treed30d9f0c237b000b171e9e5918d0337268cf0f8b /drivers/net/wireless/orinoco.c
parenta7ec15da65ab64c5f97beedc4ff21cf3e0ae71c0 (diff)
[PATCH] revert "orinoco: Information leakage due to incorrect padding"
Cc: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/wireless/orinoco.c')
-rw-r--r--drivers/net/wireless/orinoco.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index d3d4ec9e242e..70a3477a2061 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -490,7 +490,8 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
490 return 0; 490 return 0;
491 } 491 }
492 492
493 /* Check packet length, pad short packets, round up odd length */ 493 /* Length of the packet body */
494 /* FIXME: what if the skb is smaller than this? */
494 len = max_t(int, ALIGN(skb->len, 2), ETH_ZLEN); 495 len = max_t(int, ALIGN(skb->len, 2), ETH_ZLEN);
495 skb = skb_padto(skb, len); 496 skb = skb_padto(skb, len);
496 if (skb == NULL) 497 if (skb == NULL)
@@ -547,7 +548,8 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
547 p = skb->data; 548 p = skb->data;
548 } 549 }
549 550
550 err = hermes_bap_pwrite(hw, USER_BAP, p, data_len, 551 /* Round up for odd length packets */
552 err = hermes_bap_pwrite(hw, USER_BAP, p, ALIGN(data_len, 2),
551 txfid, data_off); 553 txfid, data_off);
552 if (err) { 554 if (err) {
553 printk(KERN_ERR "%s: Error %d writing packet to BAP\n", 555 printk(KERN_ERR "%s: Error %d writing packet to BAP\n",