* [PATCH] ath5k: fix EEPROM dumping via debugfs
@ 2016-08-02 11:19 Sergey Ryazanov
2016-09-03 10:02 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Sergey Ryazanov @ 2016-08-02 11:19 UTC (permalink / raw)
To: Kalle Valo
Cc: Linux Wireless, Jiri Slaby, Nick Kossifidis, Luis R . Rodriguez
EEPROM size calculated in 16-bit words, so we should take into account
this fact during buffer allocation.
CC: Jiri Slaby <jirislaby@gmail.com>
CC: Nick Kossifidis <mickflemm@gmail.com>
CC: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
---
drivers/net/wireless/ath/ath5k/debug.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
index 929d7cc..4f8d9ed 100644
--- a/drivers/net/wireless/ath/ath5k/debug.c
+++ b/drivers/net/wireless/ath/ath5k/debug.c
@@ -909,7 +909,7 @@ static int open_file_eeprom(struct inode *inode, struct file *file)
struct ath5k_hw *ah = inode->i_private;
bool res;
int i, ret;
- u32 eesize;
+ u32 eesize; /* NB: in 16-bit words */
u16 val, *buf;
/* Get eeprom size */
@@ -932,7 +932,7 @@ static int open_file_eeprom(struct inode *inode, struct file *file)
/* Create buffer and read in eeprom */
- buf = vmalloc(eesize);
+ buf = vmalloc(eesize * 2);
if (!buf) {
ret = -ENOMEM;
goto err;
@@ -952,7 +952,7 @@ static int open_file_eeprom(struct inode *inode, struct file *file)
}
ep->buf = buf;
- ep->len = i;
+ ep->len = eesize * 2;
file->private_data = (void *)ep;
--
2.7.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: ath5k: fix EEPROM dumping via debugfs
2016-08-02 11:19 [PATCH] ath5k: fix EEPROM dumping via debugfs Sergey Ryazanov
@ 2016-09-03 10:02 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2016-09-03 10:02 UTC (permalink / raw)
To: Sergey Ryazanov
Cc: Linux Wireless, Jiri Slaby, Nick Kossifidis, Luis R . Rodriguez
Sergey Ryazanov <ryazanov.s.a@gmail.com> wrote:
> EEPROM size calculated in 16-bit words, so we should take into account
> this fact during buffer allocation.
>
> CC: Jiri Slaby <jirislaby@gmail.com>
> CC: Nick Kossifidis <mickflemm@gmail.com>
> CC: Luis R. Rodriguez <mcgrof@do-not-panic.com>
> Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Thanks, 1 patch applied to wireless-drivers-next.git:
af8a9a67c346 ath5k: fix EEPROM dumping via debugfs
--
Sent by pwcli
https://patchwork.kernel.org/patch/9255675/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-03 10:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-02 11:19 [PATCH] ath5k: fix EEPROM dumping via debugfs Sergey Ryazanov
2016-09-03 10:02 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).