From owner-svn-src-all@freebsd.org Wed Feb 7 09:37:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1561EEDA79; Wed, 7 Feb 2018 09:37:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 73D2A7F9CF; Wed, 7 Feb 2018 09:37:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EB61250B0; Wed, 7 Feb 2018 09:37:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w179bMlP077981; Wed, 7 Feb 2018 09:37:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w179bMpI077980; Wed, 7 Feb 2018 09:37:22 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201802070937.w179bMpI077980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 7 Feb 2018 09:37:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328970 - head/sys/dev/ath X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/dev/ath X-SVN-Commit-Revision: 328970 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2018 09:37:22 -0000 Author: adrian Date: Wed Feb 7 09:37:22 2018 New Revision: 328970 URL: https://svnweb.freebsd.org/changeset/base/328970 Log: [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. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Wed Feb 7 09:35:47 2018 (r328969) +++ head/sys/dev/ath/if_ath.c Wed Feb 7 09:37:22 2018 (r328970) @@ -1624,7 +1624,7 @@ ath_vap_create(struct ieee80211com *ic, const char nam } /* 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);