aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/sdio.c
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2013-11-05 18:01:44 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-11-11 14:42:45 -0500
commitd03b4aa77e1187b77dfe37d14a923547f00baa66 (patch)
treed7484b966fc32eb1bbf1c01c8fdff9e289d7cc6b /drivers/net/wireless/mwifiex/sdio.c
parent3545f3d5f4af715c914394123ce7725a9cf0a1c4 (diff)
mwifiex: correct packet length for packets from SDIO interface
While receiving a packet on SDIO interface, we allocate skb with size multiple of SDIO block size. We need to resize this skb after RX using packet length from RX header. Cc: <stable@vger.kernel.org> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/sdio.c')
-rw-r--r--drivers/net/wireless/mwifiex/sdio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
index 1576104e3d95..9bf8898743ab 100644
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -1029,7 +1029,10 @@ static int mwifiex_decode_rx_packet(struct mwifiex_adapter *adapter,
1029 struct sk_buff *skb, u32 upld_typ) 1029 struct sk_buff *skb, u32 upld_typ)
1030{ 1030{
1031 u8 *cmd_buf; 1031 u8 *cmd_buf;
1032 __le16 *curr_ptr = (__le16 *)skb->data;
1033 u16 pkt_len = le16_to_cpu(*curr_ptr);
1032 1034
1035 skb_trim(skb, pkt_len);
1033 skb_pull(skb, INTF_HEADER_LEN); 1036 skb_pull(skb, INTF_HEADER_LEN);
1034 1037
1035 switch (upld_typ) { 1038 switch (upld_typ) {