Messages in this thread Patch in this message | | | Date | Wed, 28 Jul 2004 16:54:50 +1000 | From | David Gibson <> | Subject | [4/15] 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: 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. "
-- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |