mwifiex: copy MSDU subframes correctly
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sat Sep 29 10:59:16 EDT 2012
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=d92a680359ff3230bd1e68ac8f3ac827639f494e
Commit: d92a680359ff3230bd1e68ac8f3ac827639f494e
Parent: 2a0b50c7703930a1f5d1d32ae116d988e9612cb6
Author: Yogesh Ashok Powar <yogeshp at marvell.com>
AuthorDate: Fri Aug 3 18:05:59 2012 -0700
Committer: John W. Linville <linville at tuxdriver.com>
CommitDate: Mon Aug 6 15:12:45 2012 -0400
mwifiex: copy MSDU subframes correctly
All MSDU subframes, except the first one in AMSDU, were being written
wrongly at the location of first MSDU frame. Fixing that by copying
the MSDU at skb->tail of AMSDU.
Signed-off-by: Yogesh Ashok Powar <yogeshp at marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar at marvell.com>
Signed-off-by: Kiran Divekar <dkiran at marvell.com>
Signed-off-by: Bing Zhao <bzhao at marvell.com>
Signed-off-by: John W. Linville <linville at tuxdriver.com>
---
drivers/net/wireless/mwifiex/11n_aggr.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/11n_aggr.c b/drivers/net/wireless/mwifiex/11n_aggr.c
index ab84eb9..c631c7c 100644
--- a/drivers/net/wireless/mwifiex/11n_aggr.c
+++ b/drivers/net/wireless/mwifiex/11n_aggr.c
@@ -62,9 +62,7 @@ mwifiex_11n_form_amsdu_pkt(struct sk_buff *skb_aggr,
};
struct tx_packet_hdr *tx_header;
- skb_put(skb_aggr, sizeof(*tx_header));
-
- tx_header = (struct tx_packet_hdr *) skb_aggr->data;
+ tx_header = (void *)skb_put(skb_aggr, sizeof(*tx_header));
/* Copy DA and SA */
dt_offset = 2 * ETH_ALEN;
@@ -82,9 +80,8 @@ mwifiex_11n_form_amsdu_pkt(struct sk_buff *skb_aggr,
tx_header->eth803_hdr.h_proto = htons(skb_src->len + LLC_SNAP_LEN);
/* Add payload */
- skb_put(skb_aggr, skb_src->len);
- memcpy(skb_aggr->data + sizeof(*tx_header), skb_src->data,
- skb_src->len);
+ memcpy(skb_put(skb_aggr, skb_src->len), skb_src->data, skb_src->len);
+
*pad = (((skb_src->len + LLC_SNAP_LEN) & 3)) ? (4 - (((skb_src->len +
LLC_SNAP_LEN)) & 3)) : 0;
skb_put(skb_aggr, *pad);
More information about the linux-mtd-cvs
mailing list