Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d219456 authored by Siva Rebbagondla's avatar Siva Rebbagondla Committed by Kalle Valo
Browse files

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: default avatarSiva Rebbagondla <siva.rebbagondla@redpinesignals.com>
Signed-off-by: default avatarSushant Kumar Mishra <sushant.mishra@redpinesignals.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 4c837d8c
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -416,7 +416,8 @@ static int rsi_mac80211_add_interface(struct ieee80211_hw *hw,


	/* Get free vap index */
	/* Get free vap index */
	for (i = 0; i < RSI_MAX_VIFS; i++) {
	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;
			vap_idx = i;
			break;
			break;
		}
		}