diff options
author | Xinming Hu <huxm@marvell.com> | 2015-09-18 15:32:05 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-09-29 09:47:30 +0200 |
commit | e3ad3d5b6ab2a9876773fe99d9d1866d3c1744ae (patch) | |
tree | 2411c887c9f7a85e46dcbff20d53d5ef909e23fc /drivers/net/wireless/mwifiex/sdio.c | |
parent | mwifiex: update amsdu tx packet time stamp (diff) | |
download | linux-e3ad3d5b6ab2a9876773fe99d9d1866d3c1744ae.tar.xz linux-e3ad3d5b6ab2a9876773fe99d9d1866d3c1744ae.zip |
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>
Diffstat (limited to 'drivers/net/wireless/mwifiex/sdio.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/sdio.c | 7 |
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; |