aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2014-04-14 18:32:52 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-04-22 15:06:29 -0400
commitb5413e6b2228a29b7d3acc85606ed7c211a2bef9 (patch)
tree66b5b806f7d5a95452ee3ac5ed6f4abb62fc3b4c /drivers/net/wireless
parentb2a13a25e87db9db56bc07095a2d20435c27df7a (diff)
mwifiex: increase the number of nodes in command pool
Command nodes are increased from 20 to 50. Now we can always scan 1 channel per scan command to avoid traffic delay/loss in connected state. We will get rid of *CHANNEL_PER_SCAN_CMD macros used due to command node constraints. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> 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')
-rw-r--r--drivers/net/wireless/mwifiex/ioctl.h2
-rw-r--r--drivers/net/wireless/mwifiex/scan.c17
2 files changed, 3 insertions, 16 deletions
diff --git a/drivers/net/wireless/mwifiex/ioctl.h b/drivers/net/wireless/mwifiex/ioctl.h
index ee494db54060..1b576722671d 100644
--- a/drivers/net/wireless/mwifiex/ioctl.h
+++ b/drivers/net/wireless/mwifiex/ioctl.h
@@ -303,7 +303,7 @@ struct mwifiex_ds_ant_cfg {
303 u32 rx_ant; 303 u32 rx_ant;
304}; 304};
305 305
306#define MWIFIEX_NUM_OF_CMD_BUFFER 20 306#define MWIFIEX_NUM_OF_CMD_BUFFER 50
307#define MWIFIEX_SIZE_OF_CMD_BUFFER 2048 307#define MWIFIEX_SIZE_OF_CMD_BUFFER 2048
308 308
309enum { 309enum {
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 7b3af3d29ded..5c68173c1d24 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -29,9 +29,6 @@
29#define MWIFIEX_MAX_CHANNELS_PER_SPECIFIC_SCAN 14 29#define MWIFIEX_MAX_CHANNELS_PER_SPECIFIC_SCAN 14
30 30
31#define MWIFIEX_DEF_CHANNELS_PER_SCAN_CMD 4 31#define MWIFIEX_DEF_CHANNELS_PER_SCAN_CMD 4
32#define MWIFIEX_LIMIT_1_CHANNEL_PER_SCAN_CMD 15
33#define MWIFIEX_LIMIT_2_CHANNELS_PER_SCAN_CMD 27
34#define MWIFIEX_LIMIT_3_CHANNELS_PER_SCAN_CMD 35
35 32
36/* Memory needed to store a max sized Channel List TLV for a firmware scan */ 33/* Memory needed to store a max sized Channel List TLV for a firmware scan */
37#define CHAN_TLV_MAX_SIZE (sizeof(struct mwifiex_ie_types_header) \ 34#define CHAN_TLV_MAX_SIZE (sizeof(struct mwifiex_ie_types_header) \
@@ -1055,20 +1052,10 @@ mwifiex_config_scan(struct mwifiex_private *priv,
1055 1052
1056 /* 1053 /*
1057 * In associated state we will reduce the number of channels scanned per 1054 * In associated state we will reduce the number of channels scanned per
1058 * scan command to avoid any traffic delay/loss. This number is decided 1055 * scan command to 1 to avoid any traffic delay/loss.
1059 * based on total number of channels to be scanned due to constraints
1060 * of command buffers.
1061 */ 1056 */
1062 if (priv->media_connected) { 1057 if (priv->media_connected)
1063 if (chan_num < MWIFIEX_LIMIT_1_CHANNEL_PER_SCAN_CMD)
1064 *max_chan_per_scan = 1; 1058 *max_chan_per_scan = 1;
1065 else if (chan_num < MWIFIEX_LIMIT_2_CHANNELS_PER_SCAN_CMD)
1066 *max_chan_per_scan = 2;
1067 else if (chan_num < MWIFIEX_LIMIT_3_CHANNELS_PER_SCAN_CMD)
1068 *max_chan_per_scan = 3;
1069 else
1070 *max_chan_per_scan = 4;
1071 }
1072} 1059}
1073 1060
1074/* 1061/*