From owner-p4-projects@FreeBSD.ORG Sat Aug 23 01:03:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 00EA8106567D; Sat, 23 Aug 2008 01:03:38 +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 B82861065673 for ; Sat, 23 Aug 2008 01:03:37 +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 A68358FC18 for ; Sat, 23 Aug 2008 01:03:37 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7N13bCs092013 for ; Sat, 23 Aug 2008 01:03:37 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7N13bF4092011 for perforce@freebsd.org; Sat, 23 Aug 2008 01:03:37 GMT (envelope-from sam@freebsd.org) Date: Sat, 23 Aug 2008 01:03:37 GMT Message-Id: <200808230103.m7N13bF4092011@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 148144 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: Sat, 23 Aug 2008 01:03:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=148144 Change 148144 by sam@sam_ebb on 2008/08/23 01:02:48 o mark potential ampdu aggregates on the tx path o don't assign seq#'s to potential aggregates; right now these must be assigned by the driver as it's the one that decides when to release frames from it's aggregation q(s); this will change when tx aggregation is moved up to net80211 Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_output.c#53 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#53 (text+ko) ==== @@ -1052,6 +1052,7 @@ * Operational, mark frame for aggregation. */ qos[0] |= IEEE80211_QOS_ACKPOLICY_BA; + m->m_flags |= M_AMPDU_MPDU; } else if (!IEEE80211_AMPDU_REQUESTED(tap) && ic->ic_ampdu_enable(ni, tap)) { /* @@ -1066,9 +1067,23 @@ qos[1] = 0; wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_QOS; - *(uint16_t *)wh->i_seq = - htole16(ni->ni_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT); - ni->ni_txseqs[tid]++; + if ((m->m_flags & M_AMPDU_MPDU) == 0) { + /* + * NB: don't assign a sequence # to potential + * aggregates; we expect this happens at the + * point the frame comes off any aggregation q + * as otherwise we may introduce holes in the + * BA sequence space and/or make window accouting + * more difficult. + * + * XXX may want to control this with a driver + * capability; this may also change when we pull + * aggregation up into net80211 + */ + *(uint16_t *)wh->i_seq = + htole16(ni->ni_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT); + ni->ni_txseqs[tid]++; + } } else { *(uint16_t *)wh->i_seq = htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT);