diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-12-06 13:50:30 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:06:08 -0800 |
commit | 09d4fad6e8972061fbb0e2e5ae9e686d84f57af6 (patch) | |
tree | 48c5151452013f7b551cf38743bebf26cf535a08 /drivers/net/wireless/libertas/cmdresp.c | |
parent | abe3ed14d39adcea9ae186cf741b15d11544458f (diff) |
libertas: fix data packet size errors
I wondered about junk bytes at the end when using "lbsdebug +hex +host"
until I noticed that firmware for the CF card sends my extranous bytes.
It says "I have 20 bytes", I take 20 bytes, but the last 8 bytes of this
are just data junk.
Also, in the new lbs_cmd() where was a size miscalulation
that made itself clear after fixing this bug.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmdresp.c')
-rw-r--r-- | drivers/net/wireless/libertas/cmdresp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index 6a43de772aa..22a69736338 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c @@ -882,7 +882,7 @@ int lbs_process_rx_command(struct lbs_private *priv) if (adapter->cur_cmd->pdata_size) { struct cmd_ds_gen *r = (struct cmd_ds_gen *)resp; - u16 sz = cpu_to_le16(resp->size); + u16 sz = cpu_to_le16(resp->size) - S_DS_GEN; if (sz > *adapter->cur_cmd->pdata_size) { lbs_pr_err("response 0x%04x doesn't fit into " "buffer (%d > %d)\n", respcmd, |