summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/init.c
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2015-01-28 15:42:03 +0530
committerKalle Valo <kvalo@codeaurora.org>2015-01-29 10:20:15 +0200
commitcf0523350c6f12bdffb06c7000326edb296ec450 (patch)
tree49ca6819ec53fa2a68b3dc21faf4cb5e146c2dd7 /drivers/net/wireless/mwifiex/init.c
parent1247cc1f43905441821faa56d9a815e852afe235 (diff)
mwifiex: manage virtual interface limits efficiently
Currently interface limits are checked by seeing if bss_mode for particular priv is set. If bss_mode is not set, interface creation is allowed. This patch adds framework to initializes maximum virtual interfaces supported during load time and check current number of interfaces created agains allowed interface limit during new virtual interface creation. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex/init.c')
-rw-r--r--drivers/net/wireless/mwifiex/init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index 2975b5154c39..1d1c3c8e516e 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -298,6 +298,9 @@ static void mwifiex_init_adapter(struct mwifiex_adapter *adapter)
adapter->key_api_major_ver = 0;
adapter->key_api_minor_ver = 0;
memset(adapter->perm_addr, 0xff, ETH_ALEN);
+ adapter->iface_limit.sta_intf = MWIFIEX_MAX_STA_NUM;
+ adapter->iface_limit.uap_intf = MWIFIEX_MAX_UAP_NUM;
+ adapter->iface_limit.p2p_intf = MWIFIEX_MAX_P2P_NUM;
setup_timer(&adapter->wakeup_timer, wakeup_timer_fn,
(unsigned long)adapter);