From owner-p4-projects@FreeBSD.ORG Mon Jan 14 23:45:27 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 11EA616A418; Mon, 14 Jan 2008 23:45:27 +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 AA90316A420 for ; Mon, 14 Jan 2008 23:45:26 +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 92DD913C45B for ; Mon, 14 Jan 2008 23:45:26 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0ENjQiE075494 for ; Mon, 14 Jan 2008 23:45:26 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0ENjQhG075491 for perforce@freebsd.org; Mon, 14 Jan 2008 23:45:26 GMT (envelope-from sam@freebsd.org) Date: Mon, 14 Jan 2008 23:45:26 GMT Message-Id: <200801142345.m0ENjQhG075491@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 133287 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: Mon, 14 Jan 2008 23:45:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=133287 Change 133287 by sam@sam_ebb on 2008/01/14 23:44:51 use per-vap tx seq# space for beacon+probe respones frames; will need this also for buffered mcast frames but those aren't visible to net80211 just now Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_output.c#21 edit .. //depot/projects/vap/sys/net80211/ieee80211_var.h#23 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#21 (text+ko) ==== @@ -392,11 +392,10 @@ const uint8_t bssid[IEEE80211_ADDR_LEN]) { #define WH4(wh) ((struct ieee80211_frame_addr4 *)wh) + struct ieee80211vap *vap = ni->ni_vap; wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | type; if ((type & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_DATA) { - struct ieee80211vap *vap = ni->ni_vap; - switch (vap->iv_opmode) { case IEEE80211_M_STA: wh->i_fc[1] = IEEE80211_FC1_DIR_TODS; @@ -434,11 +433,18 @@ IEEE80211_ADDR_COPY(wh->i_addr3, bssid); } *(uint16_t *)&wh->i_dur[0] = 0; - /* XXX probe response use per-vap seq#? */ - /* NB: use non-QoS tid */ - *(uint16_t *)&wh->i_seq[0] = - htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT); - ni->ni_txseqs[IEEE80211_NONQOS_TID]++; + if ((type & IEEE80211_FC0_SUBTYPE_MASK) == IEEE80211_FC0_SUBTYPE_PROBE_RESP) { + /* NB: use per-vap seq# space */ + *(uint16_t *)&wh->i_seq[0] = + htole16(vap->iv_txseq << IEEE80211_SEQ_SEQ_SHIFT); + vap->iv_txseq++; + } else { + /* NB: use non-QoS tid */ + *(uint16_t *)&wh->i_seq[0] = + htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << + IEEE80211_SEQ_SEQ_SHIFT); + ni->ni_txseqs[IEEE80211_NONQOS_TID]++; + } #undef WH4 } @@ -2413,6 +2419,9 @@ uint16_t capinfo; IEEE80211_LOCK(ic); + *(uint16_t *)&mtod(m, struct ieee80211_frame *)->i_seq[0] = + htole16(vap->iv_txseq << IEEE80211_SEQ_SEQ_SHIFT); + vap->iv_txseq++; /* * Handle 11h channel change when we've reached the count. * We must recalculate the beacon frame contents to account ==== //depot/projects/vap/sys/net80211/ieee80211_var.h#23 (text+ko) ==== @@ -331,8 +331,9 @@ uint16_t iv_sta_assoc; /* stations associated */ uint16_t iv_ps_sta; /* stations in power save */ uint16_t iv_ps_pending; /* ps sta's w/ pending frames */ + uint16_t iv_txseq; /* mcast xmit seq# space */ + uint16_t iv_tim_len; /* ic_tim_bitmap size (bytes) */ uint8_t *iv_tim_bitmap; /* power-save stations w/ data*/ - uint16_t iv_tim_len; /* ic_tim_bitmap size (bytes) */ uint8_t iv_dtim_period; /* DTIM period */ uint8_t iv_dtim_count; /* DTIM count from last bcn */ /* set/unset aid pwrsav state */