summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/main.h
diff options
context:
space:
mode:
authorXinming Hu2015-09-18 15:32:06 +0200
committerKalle Valo2015-09-29 09:47:31 +0200
commit9a9053c3420fcc5779319e4ea267c6dcbf8d7c04 (patch)
tree32f94e7d3395684ad31b93cd816ecb2e34cd3051 /drivers/net/wireless/mwifiex/main.h
parentmwifiex: minor corrections in multiport aggregation code (diff)
downloadkernel-qcow2-linux-9a9053c3420fcc5779319e4ea267c6dcbf8d7c04.tar.gz
kernel-qcow2-linux-9a9053c3420fcc5779319e4ea267c6dcbf8d7c04.tar.xz
kernel-qcow2-linux-9a9053c3420fcc5779319e4ea267c6dcbf8d7c04.zip
mwifiex: fix driver init failure under memory pressure
64k Tx and Rx buffers are allocated during driver initialization for SDIO level data aggregations. When host is under memory pressure situation, kzalloc() request for 64k may fail. We will try allocating 32k buffers and disable our rx single port aggreagation feature in this situation. If the allocation still fails, we will disable our sdio multport aggregation feature as well. In this way, we will transmit and receive packets one by one, thus reduce the demand for big memory. 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/main.h')
-rw-r--r--drivers/net/wireless/mwifiex/main.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index 966632147079..2c2004e991e0 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -860,6 +860,8 @@ struct mwifiex_adapter {
u8 more_task_flag;
u16 tx_buf_size;
u16 curr_tx_buf_size;
+ /* sdio single port rx aggregation capability */
+ bool host_disable_sdio_rx_aggr;
bool sdio_rx_aggr_enable;
u16 sdio_rx_block_size;
u32 ioport;