From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 16:22:04 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DF2E1065678; Thu, 30 Oct 2008 16:22:04 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C55E8FC1A; Thu, 30 Oct 2008 16:22:04 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UGM4LR056114; Thu, 30 Oct 2008 16:22:04 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UGM4Bg056108; Thu, 30 Oct 2008 16:22:04 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810301622.m9UGM4Bg056108@svn.freebsd.org> From: Sam Leffler Date: Thu, 30 Oct 2008 16:22:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184480 - in head/sys: dev/ath net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 30 Oct 2008 16:22:04 -0000 Author: sam Date: Thu Oct 30 16:22:04 2008 New Revision: 184480 URL: http://svn.freebsd.org/changeset/base/184480 Log: Fix checks for fast frames negotiation. ni_ath_flags holds the capabilities reported by the ap. These need to be cross-checked against the local configuration in the vap. Previously we were only checking the ap capabilities which meant that if an ap reported it was ff-capable but we were not setup to use them we'd try to do ff aggregation and drop the frame. There are a number of problems to be fixed here but applying this fix immediately as the problem causes all traffic to stop (and has not workaround). Reported by: Ashish Shukla Modified: head/sys/dev/ath/if_ath.c head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_wds.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Thu Oct 30 16:20:42 2008 (r184479) +++ head/sys/dev/ath/if_ath.c Thu Oct 30 16:22:04 2008 (r184480) @@ -1999,7 +1999,7 @@ ath_start(struct ifnet *ifp) ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; pri = M_WME_GETAC(m); txq = sc->sc_ac2q[pri]; - if (ni->ni_ath_flags & IEEE80211_NODE_FF) { + if (IEEE80211_ATH_CAP(ni->ni_vap, ni, IEEE80211_NODE_FF)) { /* * Check queue length; if too deep drop this * frame (tail drop considered good). Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Thu Oct 30 16:20:42 2008 (r184479) +++ head/sys/net80211/ieee80211_adhoc.c Thu Oct 30 16:22:04 2008 (r184480) @@ -553,7 +553,7 @@ adhoc_input(struct ieee80211_node *ni, s m = ieee80211_decap_amsdu(ni, m); if (m == NULL) return IEEE80211_FC0_TYPE_DATA; - } else if ((ni->ni_ath_flags & IEEE80211_NODE_FF) && + } else if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF) && #define FF_LLC_SIZE (sizeof(struct ether_header) + sizeof(struct llc)) m->m_pkthdr.len >= 3*FF_LLC_SIZE) { struct llc *llc; Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Thu Oct 30 16:20:42 2008 (r184479) +++ head/sys/net80211/ieee80211_hostap.c Thu Oct 30 16:22:04 2008 (r184480) @@ -752,7 +752,7 @@ hostap_input(struct ieee80211_node *ni, m = ieee80211_decap_amsdu(ni, m); if (m == NULL) return IEEE80211_FC0_TYPE_DATA; - } else if ((ni->ni_ath_flags & IEEE80211_NODE_FF) && + } else if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF) && #define FF_LLC_SIZE (sizeof(struct ether_header) + sizeof(struct llc)) m->m_pkthdr.len >= 3*FF_LLC_SIZE) { struct llc *llc; Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Thu Oct 30 16:20:42 2008 (r184479) +++ head/sys/net80211/ieee80211_sta.c Thu Oct 30 16:22:04 2008 (r184480) @@ -795,7 +795,7 @@ sta_input(struct ieee80211_node *ni, str m = ieee80211_decap_amsdu(ni, m); if (m == NULL) return IEEE80211_FC0_TYPE_DATA; - } else if ((ni->ni_ath_flags & IEEE80211_NODE_FF) && + } else if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF) && #define FF_LLC_SIZE (sizeof(struct ether_header) + sizeof(struct llc)) m->m_pkthdr.len >= 3*FF_LLC_SIZE) { struct llc *llc; Modified: head/sys/net80211/ieee80211_wds.c ============================================================================== --- head/sys/net80211/ieee80211_wds.c Thu Oct 30 16:20:42 2008 (r184479) +++ head/sys/net80211/ieee80211_wds.c Thu Oct 30 16:22:04 2008 (r184480) @@ -728,7 +728,7 @@ wds_input(struct ieee80211_node *ni, str m = ieee80211_decap_amsdu(ni, m); if (m == NULL) return IEEE80211_FC0_TYPE_DATA; - } else if ((ni->ni_ath_flags & IEEE80211_NODE_FF) && + } else if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF) && #define FF_LLC_SIZE (sizeof(struct ether_header) + sizeof(struct llc)) m->m_pkthdr.len >= 3*FF_LLC_SIZE) { struct llc *llc;