Commit e99a6f94 authored by David Gibson's avatar David Gibson Committed by Jeff Garzik

[PATCH] orinoco merge preliminaries - use ALIGN()

Use the kernel's ALIGN macro instead of our own dodgy version for
rounding things up to an even number.
Signed-off-by: default avatarDavid Gibson <hermes@gibson.dropbear.id.au>

Index: working-2.6/drivers/net/wireless/orinoco.c
===================================================================
parent ade66a60
......@@ -490,8 +490,6 @@ MODULE_PARM(suppress_linkstatus, "i");
#define DUMMY_FID 0xFFFF
#define RUP_EVEN(a) (((a) + 1) & (~1))
/*#define MAX_MULTICAST(priv) (priv->firmware_type == FIRMWARE_TYPE_AGERE ? \
HERMES_MAX_MULTICAST : 0)*/
#define MAX_MULTICAST(priv) (HERMES_MAX_MULTICAST)
......@@ -847,7 +845,7 @@ orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
}
/* Round up for odd length packets */
err = hermes_bap_pwrite(hw, USER_BAP, p, RUP_EVEN(data_len), txfid, data_off);
err = hermes_bap_pwrite(hw, USER_BAP, p, ALIGN(data_len, 2), txfid, data_off);
if (err) {
printk(KERN_ERR "%s: Error %d writing packet to BAP\n",
dev->name, err);
......@@ -1132,7 +1130,7 @@ static void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw)
}
p = skb_put(skb, data_len);
err = hermes_bap_pread(hw, IRQ_BAP, p, RUP_EVEN(data_len),
err = hermes_bap_pread(hw, IRQ_BAP, p, ALIGN(data_len, 2),
rxfid, data_off);
if (err) {
printk(KERN_ERR "%s: error %d reading frame. "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment