From owner-svn-soc-all@FreeBSD.ORG Tue Jul 16 18:02:44 2013 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BECFB85E for ; Tue, 16 Jul 2013 18:02:44 +0000 (UTC) (envelope-from ccqin@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) by mx1.freebsd.org (Postfix) with ESMTP id B11838FA for ; Tue, 16 Jul 2013 18:02:44 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6GI2ifL090428 for ; Tue, 16 Jul 2013 18:02:44 GMT (envelope-from ccqin@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.7/8.14.6/Submit) id r6GI2iXk090425 for svn-soc-all@FreeBSD.org; Tue, 16 Jul 2013 18:02:44 GMT (envelope-from ccqin@FreeBSD.org) Date: Tue, 16 Jul 2013 18:02:44 GMT Message-Id: <201307161802.r6GI2iXk090425@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to ccqin@FreeBSD.org using -f From: ccqin@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r254849 - soc2013/ccqin/head/sys/net80211 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2013 18:02:44 -0000 Author: ccqin Date: Tue Jul 16 18:02:44 2013 New Revision: 254849 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=254849 Log: If enable rts/cts and is pre-802.11n, blank tries 1, 2, 3. Modified: soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.h Modified: soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.h ============================================================================== --- soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.h Tue Jul 16 16:37:08 2013 (r254848) +++ soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.h Tue Jul 16 18:02:44 2013 (r254849) @@ -65,7 +65,7 @@ void (*ir_node_init)(struct ieee80211_node *); void (*ir_node_deinit)(struct ieee80211_node *); int (*ir_rate)(struct ieee80211_node *, void *, uint32_t); - void (*ir_rates)(struct ieee80211_node *, struct ieee80211_rc_series *); + void (*ir_rates)(struct ieee80211_node *, struct ieee80211_rc_series *, int, size_t); void (*ir_tx_complete)(const struct ieee80211vap *, const struct ieee80211_node *, int, void *, void *); @@ -113,11 +113,17 @@ } static void __inline -ieee80211_ratectl_rates(struct ieee80211_node *ni, struct ieee80211_rc_series *rc) +ieee80211_ratectl_rates(struct ieee80211_node *ni, struct ieee80211_rc_series *rc, + int shortPreamble, size_t frameLen) { const struct ieee80211vap *vap = ni->ni_vap; + struct ieee80211com *ic = vap->iv_ic; - vap->iv_rate->ir_rates(ni, rc); + vap->iv_rate->ir_rates(ni, rc, shortPreamble, frameLen); + + /* if enable rts/cts and is pre-802.11n, blank tries 1, 2, 3 */ + if ((rc[0].flags & IEEE80211_RATECTL_RTSCTS_FLAG) && !(ic->ic_htcaps & IEEE80211_HTC_HT)) + rc[1].tries = rc[2].tries = rc[3].tries = 0; } static void __inline