From owner-p4-projects@FreeBSD.ORG Wed Sep 10 18:32:24 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 684651065677; Wed, 10 Sep 2008 18:32:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B082106564A for ; Wed, 10 Sep 2008 18:32:24 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 162DC8FC14 for ; Wed, 10 Sep 2008 18:32:24 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m8AIWOHX056330 for ; Wed, 10 Sep 2008 18:32:24 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m8AIWNeu056324 for perforce@freebsd.org; Wed, 10 Sep 2008 18:32:23 GMT (envelope-from sam@freebsd.org) Date: Wed, 10 Sep 2008 18:32:23 GMT Message-Id: <200809101832.m8AIWNeu056324@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 149557 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2008 18:32:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=149557 Change 149557 by sam@sam_ebb on 2008/09/10 18:31:45 Always update ic_lastnonht so we track overlapping legacy bss properly; was doing this only on a change in the protection mode so the advertised protection mode in the beacon would oscillate. Submitted by: Chris Zimmermann Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_ht.c#50 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_ht.c#50 (text+ko) ==== @@ -1103,22 +1103,21 @@ ieee80211_htprot_update(struct ieee80211com *ic, int protmode) { #define OPMODE(x) SM(x, IEEE80211_HTINFO_OPMODE) - if (protmode == ic->ic_curhtprotmode) - return; - if (OPMODE(ic->ic_curhtprotmode) == IEEE80211_HTINFO_OPMODE_MIXED && - OPMODE(protmode) == IEEE80211_HTINFO_OPMODE_PROTOPT) - return; + IEEE80211_LOCK(ic); - IEEE80211_LOCK(ic); /* track non-HT station presence */ KASSERT(protmode & IEEE80211_HTINFO_NONHT_PRESENT, - ("missing NONHT_PRESENT")); + ("protmode 0x%x", protmode)); ic->ic_flags_ext |= IEEE80211_FEXT_NONHT_PR; ic->ic_lastnonht = ticks; - /* push beacon update */ - ic->ic_curhtprotmode = protmode; - htinfo_notify(ic); + if (protmode != ic->ic_curhtprotmode && + (OPMODE(ic->ic_curhtprotmode) != IEEE80211_HTINFO_OPMODE_MIXED || + OPMODE(protmode) == IEEE80211_HTINFO_OPMODE_PROTOPT)) { + /* push beacon update */ + ic->ic_curhtprotmode = protmode; + htinfo_notify(ic); + } IEEE80211_UNLOCK(ic); #undef OPMODE }