mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
save changes for handling 5416/5418 parts
This commit is contained in:
parent
724c193aed
commit
517eabc6fa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166014
@ -533,24 +533,6 @@ ath_rate_tx_complete(struct ath_softc *sc, struct ath_node *an,
|
||||
short_tries, long_tries);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ts->ts_status) { /* this packet failed */
|
||||
DPRINTF(sc, ATH_DEBUG_RATE,
|
||||
"%s: %s size %d rate/try [%d/%d %d/%d %d/%d %d/%d] FAIL tries [%d/%d]\n",
|
||||
__func__,
|
||||
ether_sprintf(an->an_node.ni_macaddr),
|
||||
bin_to_size(size_to_bin(frame_size)),
|
||||
sc->sc_hwmap[MS(ds0->ds_ctl3, AR_XmitRate0)].ieeerate,
|
||||
MS(ds0->ds_ctl2, AR_XmitDataTries0),
|
||||
sc->sc_hwmap[MS(ds0->ds_ctl3, AR_XmitRate1)].ieeerate,
|
||||
MS(ds0->ds_ctl2, AR_XmitDataTries1),
|
||||
sc->sc_hwmap[MS(ds0->ds_ctl3, AR_XmitRate2)].ieeerate,
|
||||
MS(ds0->ds_ctl2, AR_XmitDataTries2),
|
||||
sc->sc_hwmap[MS(ds0->ds_ctl3, AR_XmitRate3)].ieeerate,
|
||||
MS(ds0->ds_ctl2, AR_XmitDataTries3),
|
||||
short_tries, long_tries);
|
||||
}
|
||||
|
||||
mrr = sc->sc_mrretry && !(ic->ic_flags & IEEE80211_F_USEPROT);
|
||||
if (!mrr || !(ts->ts_rate & HAL_TXSTAT_ALTRATE)) {
|
||||
int ndx = rate_to_ndx(sn, final_rate);
|
||||
@ -571,32 +553,43 @@ ath_rate_tx_complete(struct ath_softc *sc, struct ath_node *an,
|
||||
0, 0,
|
||||
short_tries, long_tries, ts->ts_status);
|
||||
} else {
|
||||
int rate0, tries0, ndx0;
|
||||
int rate1, tries1, ndx1;
|
||||
int rate2, tries2, ndx2;
|
||||
int rate3, tries3, ndx3;
|
||||
int hwrate0, rate0, tries0, ndx0;
|
||||
int hwrate1, rate1, tries1, ndx1;
|
||||
int hwrate2, rate2, tries2, ndx2;
|
||||
int hwrate3, rate3, tries3, ndx3;
|
||||
int finalTSIdx = ts->ts_finaltsi;
|
||||
|
||||
/*
|
||||
* Process intermediate rates that failed.
|
||||
*/
|
||||
rate0 = sc->sc_hwmap[MS(ds0->ds_ctl3, AR_XmitRate0)].ieeerate;
|
||||
if (sc->sc_ah->ah_magic != 0x20065416) {
|
||||
hwrate0 = MS(ds0->ds_ctl3, AR_XmitRate0);
|
||||
hwrate1 = MS(ds0->ds_ctl3, AR_XmitRate1);
|
||||
hwrate2 = MS(ds0->ds_ctl3, AR_XmitRate2);
|
||||
hwrate3 = MS(ds0->ds_ctl3, AR_XmitRate3);
|
||||
} else {
|
||||
hwrate0 = MS(ds0->ds_ctl3, AR5416_XmitRate0);
|
||||
hwrate1 = MS(ds0->ds_ctl3, AR5416_XmitRate1);
|
||||
hwrate2 = MS(ds0->ds_ctl3, AR5416_XmitRate2);
|
||||
hwrate3 = MS(ds0->ds_ctl3, AR5416_XmitRate3);
|
||||
}
|
||||
|
||||
rate0 = sc->sc_hwmap[hwrate0].ieeerate;
|
||||
tries0 = MS(ds0->ds_ctl2, AR_XmitDataTries0);
|
||||
ndx0 = rate_to_ndx(sn, rate0);
|
||||
|
||||
rate1 = sc->sc_hwmap[MS(ds0->ds_ctl3, AR_XmitRate1)].ieeerate;
|
||||
rate1 = sc->sc_hwmap[hwrate1].ieeerate;
|
||||
tries1 = MS(ds0->ds_ctl2, AR_XmitDataTries1);
|
||||
ndx1 = rate_to_ndx(sn, rate1);
|
||||
|
||||
rate2 = sc->sc_hwmap[MS(ds0->ds_ctl3, AR_XmitRate2)].ieeerate;
|
||||
rate2 = sc->sc_hwmap[hwrate2].ieeerate;
|
||||
tries2 = MS(ds0->ds_ctl2, AR_XmitDataTries2);
|
||||
ndx2 = rate_to_ndx(sn, rate2);
|
||||
|
||||
rate3 = sc->sc_hwmap[MS(ds0->ds_ctl3, AR_XmitRate3)].ieeerate;
|
||||
rate3 = sc->sc_hwmap[hwrate3].ieeerate;
|
||||
tries3 = MS(ds0->ds_ctl2, AR_XmitDataTries3);
|
||||
ndx3 = rate_to_ndx(sn, rate3);
|
||||
|
||||
#if 1
|
||||
DPRINTF(sc, ATH_DEBUG_RATE,
|
||||
"%s: %s size %d finaltsidx %d tries %d %s rate/try [%d/%d %d/%d %d/%d %d/%d]\n",
|
||||
__func__, ether_sprintf(an->an_node.ni_macaddr),
|
||||
@ -608,7 +601,6 @@ ath_rate_tx_complete(struct ath_softc *sc, struct ath_node *an,
|
||||
rate1, tries1,
|
||||
rate2, tries2,
|
||||
rate3, tries3);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NB: series > 0 are not penalized for failure
|
||||
|
@ -136,6 +136,16 @@ struct sample_node {
|
||||
#define AR_XmitRate3 0x000f8000 /* series 3 tx rate */
|
||||
#define AR_XmitRate3_S 15
|
||||
|
||||
/* TX ds_ctl3 for 5416 */
|
||||
#define AR5416_XmitRate0 0x000000ff /* series 0 tx rate */
|
||||
#define AR5416_XmitRate0_S 0
|
||||
#define AR5416_XmitRate1 0x0000ff00 /* series 1 tx rate */
|
||||
#define AR5416_XmitRate1_S 8
|
||||
#define AR5416_XmitRate2 0x00ff0000 /* series 2 tx rate */
|
||||
#define AR5416_XmitRate2_S 16
|
||||
#define AR5416_XmitRate3 0xff000000 /* series 3 tx rate */
|
||||
#define AR5416_XmitRate3_S 24
|
||||
|
||||
#define MS(_v, _f) (((_v) & (_f)) >> _f##_S)
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user