summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinming Hu <huxm@marvell.com>2015-09-18 06:32:05 -0700
committerKalle Valo <kvalo@codeaurora.org>2015-09-29 10:47:30 +0300
commite3ad3d5b6ab2a9876773fe99d9d1866d3c1744ae (patch)
tree2411c887c9f7a85e46dcbff20d53d5ef909e23fc
parent0a252abb6ad75260353a28c08b904c2c9d258d2c (diff)
mwifiex: minor corrections in multiport aggregation code
This patch includes below changes 1) Check if multiport aggregation feature flag while doing rx length validation check. 2) Reset buffer size variables when buffers are freed. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r--drivers/net/wireless/mwifiex/sdio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
index 5d05c6fe6429..d35210caa94b 100644
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -1606,8 +1606,9 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
(rx_len + MWIFIEX_SDIO_BLOCK_SIZE -
1) / MWIFIEX_SDIO_BLOCK_SIZE;
if (rx_len <= INTF_HEADER_LEN ||
- (rx_blocks * MWIFIEX_SDIO_BLOCK_SIZE) >
- card->mpa_rx.buf_size) {
+ (card->mpa_rx.enabled &&
+ ((rx_blocks * MWIFIEX_SDIO_BLOCK_SIZE) >
+ card->mpa_rx.buf_size))) {
mwifiex_dbg(adapter, ERROR,
"invalid rx_len=%d\n",
rx_len);
@@ -1925,6 +1926,8 @@ error:
if (ret) {
kfree(card->mpa_tx.buf);
kfree(card->mpa_rx.buf);
+ card->mpa_tx.buf_size = 0;
+ card->mpa_rx.buf_size = 0;
}
return ret;