All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath6kl: add padding to firmware log records
@ 2012-02-29  1:17 Etay Luz
  2012-03-01  6:44 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Etay Luz @ 2012-02-29  1:17 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath6kl-devel

firmware debug utility expects firmware log record size
to be 1500 bytes. This patch ensures that the
firmware record will be exactly 1500 bytes.

Signed-off-by: Etay Luz <eluz@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/debug.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
 mode change 100644 => 100755 drivers/net/wireless/ath/ath6kl/debug.c

diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
old mode 100644
new mode 100755
index 3d0713d..8400284
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -277,7 +277,7 @@ void ath6kl_debug_fwlog_event(struct ath6kl *ar, const void *buf, size_t len)
 	if (WARN_ON(len > ATH6KL_FWLOG_PAYLOAD_SIZE))
 		return;
 
-	slot_len = sizeof(*slot) + len;
+	slot_len = sizeof(*slot) + ATH6KL_FWLOG_PAYLOAD_SIZE;
 
 	skb = alloc_skb(slot_len, GFP_KERNEL);
 	if (!skb)
@@ -287,6 +287,9 @@ void ath6kl_debug_fwlog_event(struct ath6kl *ar, const void *buf, size_t len)
 	slot->timestamp = cpu_to_le32(jiffies);
 	slot->length = cpu_to_le32(len);
 	memcpy(slot->payload, buf, len);
+	
+	/* Need to pad each record to fixed length ATH6KL_FWLOG_PAYLOAD_SIZE */
+	memset(slot->payload + len, 0, ATH6KL_FWLOG_PAYLOAD_SIZE - len);
 
 	spin_lock(&ar->debug.fwlog_queue.lock);
 
-- 
1.7.0.4


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

* Re: [PATCH] ath6kl: add padding to firmware log records
  2012-02-29  1:17 [PATCH] ath6kl: add padding to firmware log records Etay Luz
@ 2012-03-01  6:44 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2012-03-01  6:44 UTC (permalink / raw)
  To: Etay Luz; +Cc: linux-wireless, ath6kl-devel

On 02/29/2012 03:17 AM, Etay Luz wrote:
> firmware debug utility expects firmware log record size
> to be 1500 bytes. This patch ensures that the
> firmware record will be exactly 1500 bytes.
> 
> Signed-off-by: Etay Luz <eluz@qca.qualcomm.com>

Thanks, applied.

Kalle

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

end of thread, other threads:[~2012-03-01  6:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-29  1:17 [PATCH] ath6kl: add padding to firmware log records Etay Luz
2012-03-01  6:44 ` Kalle Valo

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.