[4/15] orinoco merge preliminaries - use ALIGN()

David Gibson
2004-07-28T07:13:45Z

Use the kernel's ALIGN macro instead of our own dodgy version for
rounding things up to an even number.

Signed-off-by: David Gibson <hermes@gibson.dropbear.id.au>

Index: working-2.6/drivers/net/wireless/orinoco.c
===================================================================
--- working-2.6.orig/drivers/net/wireless/orinoco.c 2004-07-28 15:05:31.213900600 +1000
+++ working-2.6/drivers/net/wireless/orinoco.c 2004-07-28 15:05:34.768360240 +1000
@@ -490,8 +490,6 @@

#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 @@
}

/* 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 @@
}

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. "