diff options
author | Eliad Peller <eliad@wizery.com> | 2011-02-22 17:27:06 -0500 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-02-23 04:11:19 -0500 |
commit | 02ad2d9080266e6d999c00b78610ef6a45be45ea (patch) | |
tree | 6917f6174c2ea701477d757ebbae890d944f36ba | |
parent | 62c0740c4ff2a4a8850619e0f5ac56a3b6e83cec (diff) |
wl12xx: use standard ALIGN() macro
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>
-rw-r--r-- | drivers/net/wireless/wl12xx/rx.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/tx.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/tx.h | 2 |
3 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/wireless/wl12xx/rx.h b/drivers/net/wireless/wl12xx/rx.h index 4cef8fa3dee1..75fabf836491 100644 --- a/drivers/net/wireless/wl12xx/rx.h +++ b/drivers/net/wireless/wl12xx/rx.h | |||
@@ -30,10 +30,6 @@ | |||
30 | #define WL1271_RX_MAX_RSSI -30 | 30 | #define WL1271_RX_MAX_RSSI -30 |
31 | #define WL1271_RX_MIN_RSSI -95 | 31 | #define WL1271_RX_MIN_RSSI -95 |
32 | 32 | ||
33 | #define WL1271_RX_ALIGN_TO 4 | ||
34 | #define WL1271_RX_ALIGN(len) (((len) + WL1271_RX_ALIGN_TO - 1) & \ | ||
35 | ~(WL1271_RX_ALIGN_TO - 1)) | ||
36 | |||
37 | #define SHORT_PREAMBLE_BIT BIT(0) | 33 | #define SHORT_PREAMBLE_BIT BIT(0) |
38 | #define OFDM_RATE_BIT BIT(6) | 34 | #define OFDM_RATE_BIT BIT(6) |
39 | #define PBCC_RATE_BIT BIT(7) | 35 | #define PBCC_RATE_BIT BIT(7) |
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c index 67a00946e3dd..94ff3faf7dde 100644 --- a/drivers/net/wireless/wl12xx/tx.c +++ b/drivers/net/wireless/wl12xx/tx.c | |||
@@ -185,7 +185,7 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct sk_buff *skb, | |||
185 | desc->reserved = 0; | 185 | desc->reserved = 0; |
186 | 186 | ||
187 | /* align the length (and store in terms of words) */ | 187 | /* align the length (and store in terms of words) */ |
188 | pad = WL1271_TX_ALIGN(skb->len); | 188 | pad = ALIGN(skb->len, WL1271_TX_ALIGN_TO); |
189 | desc->length = cpu_to_le16(pad >> 2); | 189 | desc->length = cpu_to_le16(pad >> 2); |
190 | 190 | ||
191 | /* calculate number of padding bytes */ | 191 | /* calculate number of padding bytes */ |
@@ -245,7 +245,7 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct sk_buff *skb, | |||
245 | * pad the skb data to make sure its length is aligned. | 245 | * pad the skb data to make sure its length is aligned. |
246 | * The number of padding bytes is computed and set in wl1271_tx_fill_hdr | 246 | * The number of padding bytes is computed and set in wl1271_tx_fill_hdr |
247 | */ | 247 | */ |
248 | total_len = WL1271_TX_ALIGN(skb->len); | 248 | total_len = ALIGN(skb->len, WL1271_TX_ALIGN_TO); |
249 | memcpy(wl->aggr_buf + buf_offset, skb->data, skb->len); | 249 | memcpy(wl->aggr_buf + buf_offset, skb->data, skb->len); |
250 | memset(wl->aggr_buf + buf_offset + skb->len, 0, total_len - skb->len); | 250 | memset(wl->aggr_buf + buf_offset + skb->len, 0, total_len - skb->len); |
251 | 251 | ||
diff --git a/drivers/net/wireless/wl12xx/tx.h b/drivers/net/wireless/wl12xx/tx.h index 05722a560d91..db88f58707a3 100644 --- a/drivers/net/wireless/wl12xx/tx.h +++ b/drivers/net/wireless/wl12xx/tx.h | |||
@@ -53,8 +53,6 @@ | |||
53 | #define TX_HW_RESULT_QUEUE_LEN_MASK 0xf | 53 | #define TX_HW_RESULT_QUEUE_LEN_MASK 0xf |
54 | 54 | ||
55 | #define WL1271_TX_ALIGN_TO 4 | 55 | #define WL1271_TX_ALIGN_TO 4 |
56 | #define WL1271_TX_ALIGN(len) (((len) + WL1271_TX_ALIGN_TO - 1) & \ | ||
57 | ~(WL1271_TX_ALIGN_TO - 1)) | ||
58 | #define WL1271_TKIP_IV_SPACE 4 | 56 | #define WL1271_TKIP_IV_SPACE 4 |
59 | 57 | ||
60 | struct wl1271_tx_hw_descr { | 58 | struct wl1271_tx_hw_descr { |