diff options
author | Siva Rebbagondla <siva.rebbagondla@redpinesignals.com> | 2018-07-05 18:08:22 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-07-31 10:14:47 +0300 |
commit | 1d2194562112dc4e5b1077c1946dffd168a6c358 (patch) | |
tree | fc5f727aeb4086b0198805dec39dc90f1854ef3e /drivers/net/wireless/rsi | |
parent | 4c837d8c9b0c7718dd9ff14ee77e4704c9be258d (diff) |
rsi: optimize virtual interfaces
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/rsi')
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_mac80211.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index 2ca7464b7fa3..4e510cbe0a89 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; } |