diff options
author | Avinash Patil <patila@marvell.com> | 2013-03-04 19:27:56 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-03-06 16:29:11 -0500 |
commit | f553e1aad797540afddd1a99753a348e1c426ffe (patch) | |
tree | 8d84d1298269c759ec7cd2686c5faccd903b6ce1 | |
parent | 9931078e36bd2caa3d5364cab31a893d50a8b5de (diff) |
mwifiex: modify skb->truesize for PCIE Rx
We allocate SKB buffers of 4K size to make sure that we process
RX AMSDU of 4K. So when skb->len is lesser than 4K; we should
modify skb->truesize. This resolves an issue where kernel has
allocated packets with 2K assumption and starts dropping packets
for large size data transfer.
This fix is already present for USB; extend it to PCIE.
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>
-rw-r--r-- | drivers/net/wireless/mwifiex/util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c index 21553976b550..54667e65ca47 100644 --- a/drivers/net/wireless/mwifiex/util.c +++ b/drivers/net/wireless/mwifiex/util.c | |||
@@ -195,7 +195,7 @@ int mwifiex_recv_packet(struct mwifiex_private *priv, struct sk_buff *skb) | |||
195 | skb->protocol = eth_type_trans(skb, priv->netdev); | 195 | skb->protocol = eth_type_trans(skb, priv->netdev); |
196 | skb->ip_summed = CHECKSUM_NONE; | 196 | skb->ip_summed = CHECKSUM_NONE; |
197 | 197 | ||
198 | /* This is required only in case of 11n and USB as we alloc | 198 | /* This is required only in case of 11n and USB/PCIE as we alloc |
199 | * a buffer of 4K only if its 11N (to be able to receive 4K | 199 | * a buffer of 4K only if its 11N (to be able to receive 4K |
200 | * AMSDU packets). In case of SD we allocate buffers based | 200 | * AMSDU packets). In case of SD we allocate buffers based |
201 | * on the size of packet and hence this is not needed. | 201 | * on the size of packet and hence this is not needed. |
@@ -212,7 +212,8 @@ int mwifiex_recv_packet(struct mwifiex_private *priv, struct sk_buff *skb) | |||
212 | * fragments. Currently we fail the Filesndl-ht.scr script | 212 | * fragments. Currently we fail the Filesndl-ht.scr script |
213 | * for UDP, hence this fix | 213 | * for UDP, hence this fix |
214 | */ | 214 | */ |
215 | if ((priv->adapter->iface_type == MWIFIEX_USB) && | 215 | if ((priv->adapter->iface_type == MWIFIEX_USB || |
216 | priv->adapter->iface_type == MWIFIEX_PCIE) && | ||
216 | (skb->truesize > MWIFIEX_RX_DATA_BUF_SIZE)) | 217 | (skb->truesize > MWIFIEX_RX_DATA_BUF_SIZE)) |
217 | skb->truesize += (skb->len - MWIFIEX_RX_DATA_BUF_SIZE); | 218 | skb->truesize += (skb->len - MWIFIEX_RX_DATA_BUF_SIZE); |
218 | 219 | ||