提交 02ad2d90 编写于 作者: E Eliad Peller 提交者: Luciano Coelho

wl12xx: use standard ALIGN() macro

Use the standard ALIGN() macro instead of redefining similar macros.
Signed-off-by: NEliad Peller <eliad@wizery.com>
Signed-off-by: NLuciano Coelho <coelho@ti.com>
上级 62c0740c
...@@ -30,10 +30,6 @@ ...@@ -30,10 +30,6 @@
#define WL1271_RX_MAX_RSSI -30 #define WL1271_RX_MAX_RSSI -30
#define WL1271_RX_MIN_RSSI -95 #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 SHORT_PREAMBLE_BIT BIT(0)
#define OFDM_RATE_BIT BIT(6) #define OFDM_RATE_BIT BIT(6)
#define PBCC_RATE_BIT BIT(7) #define PBCC_RATE_BIT BIT(7)
......
...@@ -185,7 +185,7 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct sk_buff *skb, ...@@ -185,7 +185,7 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct sk_buff *skb,
desc->reserved = 0; desc->reserved = 0;
/* align the length (and store in terms of words) */ /* 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); desc->length = cpu_to_le16(pad >> 2);
/* calculate number of padding bytes */ /* calculate number of padding bytes */
...@@ -245,7 +245,7 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct sk_buff *skb, ...@@ -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. * 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 * 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); memcpy(wl->aggr_buf + buf_offset, skb->data, skb->len);
memset(wl->aggr_buf + buf_offset + skb->len, 0, total_len - skb->len); memset(wl->aggr_buf + buf_offset + skb->len, 0, total_len - skb->len);
......
...@@ -53,8 +53,6 @@ ...@@ -53,8 +53,6 @@
#define TX_HW_RESULT_QUEUE_LEN_MASK 0xf #define TX_HW_RESULT_QUEUE_LEN_MASK 0xf
#define WL1271_TX_ALIGN_TO 4 #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 #define WL1271_TKIP_IV_SPACE 4
struct wl1271_tx_hw_descr { struct wl1271_tx_hw_descr {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册