All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] wl12xx: use standard ALIGN() macro
@ 2011-02-22 22:27 Eliad Peller
  2011-02-22 22:27 ` [PATCH v2 2/2] wl12xx: always set mac_address when configuring ht caps Eliad Peller
  2011-02-23 13:55 ` [PATCH v2 1/2] wl12xx: use standard ALIGN() macro Luciano Coelho
  0 siblings, 2 replies; 3+ messages in thread
From: Eliad Peller @ 2011-02-22 22:27 UTC (permalink / raw)
  To: Luciano Coelho; +Cc: linux-wireless

Use the standard ALIGN() macro instead of redefining similar macros.

Signed-off-by: Eliad Peller <eliad@wizery.com>
---
v1 -> v2:
	add commit message

 drivers/net/wireless/wl12xx/rx.h |    4 ----
 drivers/net/wireless/wl12xx/tx.c |    4 ++--
 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 4cef8fa..75fabf8 100644
--- a/drivers/net/wireless/wl12xx/rx.h
+++ b/drivers/net/wireless/wl12xx/rx.h
@@ -30,10 +30,6 @@
 #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)
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c
index 67a0094..94ff3fa 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,
 	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);
 
diff --git a/drivers/net/wireless/wl12xx/tx.h b/drivers/net/wireless/wl12xx/tx.h
index 05722a5..db88f58 100644
--- a/drivers/net/wireless/wl12xx/tx.h
+++ b/drivers/net/wireless/wl12xx/tx.h
@@ -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 {
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2 2/2] wl12xx: always set mac_address when configuring ht caps
  2011-02-22 22:27 [PATCH v2 1/2] wl12xx: use standard ALIGN() macro Eliad Peller
@ 2011-02-22 22:27 ` Eliad Peller
  2011-02-23 13:55 ` [PATCH v2 1/2] wl12xx: use standard ALIGN() macro Luciano Coelho
  1 sibling, 0 replies; 3+ messages in thread
From: Eliad Peller @ 2011-02-22 22:27 UTC (permalink / raw)
  To: Luciano Coelho; +Cc: linux-wireless

The mac_address should be set also when ht caps are disabled.

Signed-off-by: Eliad Peller <eliad@wizery.com>
---
 drivers/net/wireless/wl12xx/acx.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c
index 33840d9..6d53129 100644
--- a/drivers/net/wireless/wl12xx/acx.c
+++ b/drivers/net/wireless/wl12xx/acx.c
@@ -1328,10 +1328,9 @@ int wl1271_acx_set_ht_capabilities(struct wl1271 *wl,
 		/* get data from A-MPDU parameters field */
 		acx->ampdu_max_length = ht_cap->ampdu_factor;
 		acx->ampdu_min_spacing = ht_cap->ampdu_density;
-
-		memcpy(acx->mac_address, mac_address, ETH_ALEN);
 	}
 
+	memcpy(acx->mac_address, mac_address, ETH_ALEN);
 	acx->ht_capabilites = cpu_to_le32(ht_capabilites);
 
 	ret = wl1271_cmd_configure(wl, ACX_PEER_HT_CAP, acx, sizeof(*acx));
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/2] wl12xx: use standard ALIGN() macro
  2011-02-22 22:27 [PATCH v2 1/2] wl12xx: use standard ALIGN() macro Eliad Peller
  2011-02-22 22:27 ` [PATCH v2 2/2] wl12xx: always set mac_address when configuring ht caps Eliad Peller
@ 2011-02-23 13:55 ` Luciano Coelho
  1 sibling, 0 replies; 3+ messages in thread
From: Luciano Coelho @ 2011-02-23 13:55 UTC (permalink / raw)
  To: Eliad Peller; +Cc: linux-wireless

On Wed, 2011-02-23 at 00:27 +0200, Eliad Peller wrote:
> Use the standard ALIGN() macro instead of redefining similar macros.
> 
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> --- 

Applied both patches, thanks!

-- 
Cheers,
Luca.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-23 13:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-22 22:27 [PATCH v2 1/2] wl12xx: use standard ALIGN() macro Eliad Peller
2011-02-22 22:27 ` [PATCH v2 2/2] wl12xx: always set mac_address when configuring ht caps Eliad Peller
2011-02-23 13:55 ` [PATCH v2 1/2] wl12xx: use standard ALIGN() macro Luciano Coelho

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.