From f6ede6300f67fb436b557e489f1076d8b052b112 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Wed, 7 Feb 2018 09:37:22 +0000 Subject: [PATCH] [ath] Use the BSSID address logic for STA VAPs too. For DWDS VAPs on ath(4) we need to ensure that the STA vap and hostap VAP have different MAC addresses. If the STA code path doesn't utilise the address assign / reclaim path then it doesn't update the bitmap with which address was allocated. This should fix a bunch of corner issues I've been seeing with DWDS STA + AP VAPs that I was working around with manual MAC address assignment. --- sys/dev/ath/if_ath.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 81046b5b31dd..5d59bf548ca8 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -1624,7 +1624,7 @@ ath_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, } /* STA, AHDEMO? */ - if (opmode == IEEE80211_M_HOSTAP || opmode == IEEE80211_M_MBSS) { + if (opmode == IEEE80211_M_HOSTAP || opmode == IEEE80211_M_MBSS || opmode == IEEE80211_M_STA) { assign_address(sc, mac, flags & IEEE80211_CLONE_BSSID); ath_hal_setbssidmask(sc->sc_ah, sc->sc_hwbssidmask); } @@ -1858,6 +1858,7 @@ ath_vap_delete(struct ieee80211vap *vap) if (sc->sc_nstavaps == 0 && sc->sc_swbmiss) sc->sc_swbmiss = 0; } else if (vap->iv_opmode == IEEE80211_M_HOSTAP || + vap->iv_opmode == IEEE80211_M_STA || vap->iv_opmode == IEEE80211_M_MBSS) { reclaim_address(sc, vap->iv_myaddr); ath_hal_setbssidmask(ah, sc->sc_hwbssidmask);