diff options
author | Etay Luz <eluz@qca.qualcomm.com> | 2012-02-28 20:17:15 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-03-01 01:47:21 -0500 |
commit | 7504a3e1f552cf7447835e7a893bea4bb2d6541d (patch) | |
tree | 57db75b021ad7215c6d990416ce3cdd27a65beec /drivers/net/wireless/ath/ath6kl | |
parent | 67cd22e48d4acd3ac8c0032b628537bb27e92a24 (diff) |
ath6kl: add padding to firmware log records
firmware debug utility expects firmware log record size
to be 1500 bytes. This patch ensures that the
firmware record will be exactly 1500 bytes.
kvalo: remove trailing space
Signed-off-by: Etay Luz <eluz@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl')
-rwxr-xr-x[-rw-r--r--] | drivers/net/wireless/ath/ath6kl/debug.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c index 3d0713dfe3b9..28b516ff3d59 100644..100755 --- 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) | |||
277 | if (WARN_ON(len > ATH6KL_FWLOG_PAYLOAD_SIZE)) | 277 | if (WARN_ON(len > ATH6KL_FWLOG_PAYLOAD_SIZE)) |
278 | return; | 278 | return; |
279 | 279 | ||
280 | slot_len = sizeof(*slot) + len; | 280 | slot_len = sizeof(*slot) + ATH6KL_FWLOG_PAYLOAD_SIZE; |
281 | 281 | ||
282 | skb = alloc_skb(slot_len, GFP_KERNEL); | 282 | skb = alloc_skb(slot_len, GFP_KERNEL); |
283 | if (!skb) | 283 | if (!skb) |
@@ -288,6 +288,9 @@ void ath6kl_debug_fwlog_event(struct ath6kl *ar, const void *buf, size_t len) | |||
288 | slot->length = cpu_to_le32(len); | 288 | slot->length = cpu_to_le32(len); |
289 | memcpy(slot->payload, buf, len); | 289 | memcpy(slot->payload, buf, len); |
290 | 290 | ||
291 | /* Need to pad each record to fixed length ATH6KL_FWLOG_PAYLOAD_SIZE */ | ||
292 | memset(slot->payload + len, 0, ATH6KL_FWLOG_PAYLOAD_SIZE - len); | ||
293 | |||
291 | spin_lock(&ar->debug.fwlog_queue.lock); | 294 | spin_lock(&ar->debug.fwlog_queue.lock); |
292 | 295 | ||
293 | __skb_queue_tail(&ar->debug.fwlog_queue, skb); | 296 | __skb_queue_tail(&ar->debug.fwlog_queue, skb); |