From: Sushant Kumar Mishra <sushant2k1513@gmail.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org,
Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>,
Sanjay Kumar Konduri <sajay.konduri@redpinesignals.com>,
Sushant Kumar Mishra <sushant.mishra@redpinesignals.com>
Subject: [PATCH 4/4] rsi: optimize virtual interfaces
Date: Thu, 5 Jul 2018 18:08:22 +0530 [thread overview]
Message-ID: <1530794302-8833-5-git-send-email-sushant2k1513@gmail.com> (raw)
In-Reply-To: <1530794302-8833-1-git-send-email-sushant2k1513@gmail.com>
From: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Due to multiple calls of add interface routine, vif is getting duplicated
and at certain instance, we are out of vifs, causing the driver to behave
abnormal.
Fix: Every vif has a unique mac-id, when we got a vif with same mac-id as
the previous id's, we will override the respective vif.
Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com>
---
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index 2ca7464..4e510cb 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -416,7 +416,8 @@ static int rsi_mac80211_add_interface(struct ieee80211_hw *hw,
/* Get free vap index */
for (i = 0; i < RSI_MAX_VIFS; i++) {
- if (!adapter->vifs[i]) {
+ if (!adapter->vifs[i] ||
+ !memcmp(vif->addr, adapter->vifs[i]->addr, ETH_ALEN)) {
vap_idx = i;
break;
}
--
2.5.5
prev parent reply other threads:[~2018-07-05 12:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 12:38 [PATCH 0/4] rsi driver common fixes Sushant Kumar Mishra
2018-07-05 12:38 ` [PATCH 1/4] rsi: fix for low throughput issue Sushant Kumar Mishra
2018-07-31 7:15 ` Kalle Valo
2018-07-05 12:38 ` [PATCH 2/4] rsi: fix for 40MHZ connection issue Sushant Kumar Mishra
2018-07-05 12:38 ` [PATCH 3/4] rsi: fix for WoWLAN wakeup in security mode Sushant Kumar Mishra
2018-07-05 12:38 ` Sushant Kumar Mishra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1530794302-8833-5-git-send-email-sushant2k1513@gmail.com \
--to=sushant2k1513@gmail.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=sajay.konduri@redpinesignals.com \
--cc=siva.rebbagondla@redpinesignals.com \
--cc=sushant.mishra@redpinesignals.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).