wl12xx: use standard ALIGN() macro
authorEliad Peller <eliad@wizery.com>
Tue, 22 Feb 2011 22:27:06 +0000 (00:27 +0200)
committerLuciano Coelho <coelho@ti.com>
Wed, 23 Feb 2011 09:11:19 +0000 (11:11 +0200)
Use the standard ALIGN() macro instead of redefining similar macros.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/rx.h
drivers/net/wireless/wl12xx/tx.c
drivers/net/wireless/wl12xx/tx.h

index 4cef8fa3dee1efe9e6f9f004197748dba19d7d76..75fabf83649137f959201aa0117be827c5fa54bd 100644 (file)
 #define WL1271_RX_MAX_RSSI -30
 #define WL1271_RX_MIN_RSSI -95
 
-#define WL1271_RX_ALIGN_TO 4
-#define WL1271_RX_ALIGN(len) (((len) + WL1271_RX_ALIGN_TO - 1) & \
-                            ~(WL1271_RX_ALIGN_TO - 1))
-
 #define SHORT_PREAMBLE_BIT   BIT(0)
 #define OFDM_RATE_BIT        BIT(6)
 #define PBCC_RATE_BIT        BIT(7)
index 67a00946e3ddeb3b8220e35e7ba59553c07d2200..94ff3faf7ddeeb9fe15a6ff751a91dbe8235e8e2 100644 (file)
@@ -185,7 +185,7 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct sk_buff *skb,
        desc->reserved = 0;
 
        /* align the length (and store in terms of words) */
-       pad = WL1271_TX_ALIGN(skb->len);
+       pad = ALIGN(skb->len, WL1271_TX_ALIGN_TO);
        desc->length = cpu_to_le16(pad >> 2);
 
        /* calculate number of padding bytes */
@@ -245,7 +245,7 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct sk_buff *skb,
         * pad the skb data to make sure its length is aligned.
         * The number of padding bytes is computed and set in wl1271_tx_fill_hdr
         */
-       total_len = WL1271_TX_ALIGN(skb->len);
+       total_len = ALIGN(skb->len, WL1271_TX_ALIGN_TO);
        memcpy(wl->aggr_buf + buf_offset, skb->data, skb->len);
        memset(wl->aggr_buf + buf_offset + skb->len, 0, total_len - skb->len);
 
index 05722a560d91d12c3d57af28821eed920a3ac380..db88f58707a39f6f505a3ee4a813f0cf5cfe914f 100644 (file)
@@ -53,8 +53,6 @@
 #define TX_HW_RESULT_QUEUE_LEN_MASK      0xf
 
 #define WL1271_TX_ALIGN_TO 4
-#define WL1271_TX_ALIGN(len) (((len) + WL1271_TX_ALIGN_TO - 1) & \
-                            ~(WL1271_TX_ALIGN_TO - 1))
 #define WL1271_TKIP_IV_SPACE 4
 
 struct wl1271_tx_hw_descr {