amrr.c (186804) | amrr.c (218160) |
---|---|
1/*- 2 * Copyright (c) 2004 INRIA 3 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 23 unchanged lines hidden (view full) --- 32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 33 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 35 * THE POSSIBILITY OF SUCH DAMAGES. 36 * 37 */ 38 39#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004 INRIA 3 * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 23 unchanged lines hidden (view full) --- 32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 33 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 35 * THE POSSIBILITY OF SUCH DAMAGES. 36 * 37 */ 38 39#include <sys/cdefs.h> |
40__FBSDID("$FreeBSD: head/sys/dev/ath/ath_rate/amrr/amrr.c 186804 2009-01-06 01:36:36Z sam $"); | 40__FBSDID("$FreeBSD: head/sys/dev/ath/ath_rate/amrr/amrr.c 218160 2011-02-01 08:10:18Z adrian $"); |
41 42/* 43 * AMRR rate control. See: 44 * http://www-sop.inria.fr/rapports/sophia/RR-5208.html 45 * "IEEE 802.11 Rate Adaptation: A Practical Approach" by 46 * Mathieu Lacage, Hossein Manshaei, Thierry Turletti 47 */ 48#include "opt_inet.h" --- 60 unchanged lines hidden (view full) --- 109 *rix = amn->amn_tx_rix0; 110 *try0 = amn->amn_tx_try0; 111 if (shortPreamble) 112 *txrate = amn->amn_tx_rate0sp; 113 else 114 *txrate = amn->amn_tx_rate0; 115} 116 | 41 42/* 43 * AMRR rate control. See: 44 * http://www-sop.inria.fr/rapports/sophia/RR-5208.html 45 * "IEEE 802.11 Rate Adaptation: A Practical Approach" by 46 * Mathieu Lacage, Hossein Manshaei, Thierry Turletti 47 */ 48#include "opt_inet.h" --- 60 unchanged lines hidden (view full) --- 109 *rix = amn->amn_tx_rix0; 110 *try0 = amn->amn_tx_try0; 111 if (shortPreamble) 112 *txrate = amn->amn_tx_rate0sp; 113 else 114 *txrate = amn->amn_tx_rate0; 115} 116 |
117/* 118 * Get the TX rates. 119 * 120 * The short preamble bits aren't set here; the caller should augment 121 * the returned rate with the relevant preamble rate flag. 122 */ |
|
117void | 123void |
124ath_rate_getxtxrates(struct ath_softc *sc, struct ath_node *an, 125 uint8_t rix0, uint8_t *rix, uint8_t *try) 126{ 127 struct amrr_node *amn = ATH_NODE_AMRR(an); 128 129/* rix[0] = amn->amn_tx_rate0; */ 130 rix[1] = amn->amn_tx_rate1; 131 rix[2] = amn->amn_tx_rate2; 132 rix[3] = amn->amn_tx_rate3; 133 134 try[0] = amn->amn_tx_try0; 135 try[1] = amn->amn_tx_try1; 136 try[2] = amn->amn_tx_try2; 137 try[3] = amn->amn_tx_try3; 138} 139 140 141void |
|
118ath_rate_setupxtxdesc(struct ath_softc *sc, struct ath_node *an, 119 struct ath_desc *ds, int shortPreamble, u_int8_t rix) 120{ 121 struct amrr_node *amn = ATH_NODE_AMRR(an); 122 123 ath_hal_setupxtxdesc(sc->sc_ah, ds 124 , amn->amn_tx_rate1sp, amn->amn_tx_try1 /* series 1 */ 125 , amn->amn_tx_rate2sp, amn->amn_tx_try2 /* series 2 */ --- 310 unchanged lines hidden --- | 142ath_rate_setupxtxdesc(struct ath_softc *sc, struct ath_node *an, 143 struct ath_desc *ds, int shortPreamble, u_int8_t rix) 144{ 145 struct amrr_node *amn = ATH_NODE_AMRR(an); 146 147 ath_hal_setupxtxdesc(sc->sc_ah, ds 148 , amn->amn_tx_rate1sp, amn->amn_tx_try1 /* series 1 */ 149 , amn->amn_tx_rate2sp, amn->amn_tx_try2 /* series 2 */ --- 310 unchanged lines hidden --- |