Lines Matching +full:106 +full:- +full:db
1 /*-
67 /* Write per-MCS Tx power. */ in r12a_write_txpower_ht()
78 if (sc->ntxchains >= 2) { in r12a_write_txpower_ht()
91 /* TODO: HT MCS 16 -> 31 */ in r12a_write_txpower_ht()
114 if (sc->ntxchains == 1) { in r12a_write_txpower_vht()
129 if (sc->ntxchains > 1) { in r12a_write_txpower_vht()
138 if (sc->ntxchains > 1) { in r12a_write_txpower_vht()
156 /* Write per-CCK rate Tx power. */ in r12a_write_txpower_cck()
170 /* Write per-OFDM rate Tx power. */ in r12a_write_txpower_ofdm()
196 power_level -= 10; in r12a_tx_power_training()
198 power_level -= 8; in r12a_tx_power_training()
200 power_level -= 6; in r12a_tx_power_training()
241 return (-1); in r12a_get_power_group()
245 return (-1); in r12a_get_power_group()
251 else if (chan <= 106) group = 4; in r12a_get_power_group()
263 return (-1); in r12a_get_power_group()
266 KASSERT(0, ("wrong channel band (flags %08X)\n", c->ic_flags)); in r12a_get_power_group()
267 return (-1); in r12a_get_power_group()
277 struct r12a_softc *rs = sc->sc_priv; in r12a_get_txpower()
282 if (group == -1) { /* shouldn't happen */ in r12a_get_txpower()
283 device_printf(sc->sc_dev, "%s: incorrect channel\n", __func__); in r12a_get_txpower()
287 max_mcs = RTWN_RIDX_HT_MCS(sc->ntxchains * 8 - 1); in r12a_get_txpower()
288 max_vht_mcs = RTWN_RIDX_VHT_MCS(sc->ntxchains, 9) - 1; in r12a_get_txpower()
295 power[ridx] = rs->cck_tx_pwr[chain][group]; in r12a_get_txpower()
297 power[ridx] = rs->ht40_tx_pwr_2g[chain][group]; in r12a_get_txpower()
300 power[ridx] += rs->ofdm_tx_pwr_diff_2g[chain][0]; in r12a_get_txpower()
302 for (i = 0; i < sc->ntxchains; i++) { in r12a_get_txpower()
308 pwr_diff = rs->bw40_tx_pwr_diff_2g[chain][i]; in r12a_get_txpower()
311 pwr_diff = rs->bw40_tx_pwr_diff_2g[chain][i]; in r12a_get_txpower()
313 pwr_diff = rs->bw20_tx_pwr_diff_2g[chain][i]; in r12a_get_txpower()
322 power[ridx] = rs->ht40_tx_pwr_5g[chain][group]; in r12a_get_txpower()
325 power[ridx] = rs->ht40_tx_pwr_5g[chain][group]; in r12a_get_txpower()
329 power[ridx] += rs->ofdm_tx_pwr_diff_5g[chain][0]; in r12a_get_txpower()
331 for (i = 0; i < sc->ntxchains; i++) { in r12a_get_txpower()
337 pwr_diff = rs->bw80_tx_pwr_diff_5g[chain][i]; in r12a_get_txpower()
340 pwr_diff = rs->bw40_tx_pwr_diff_5g[chain][i]; in r12a_get_txpower()
342 pwr_diff = rs->bw20_tx_pwr_diff_5g[chain][i]; in r12a_get_txpower()
371 if (sc->sc_debug & RTWN_DEBUG_TXPWR) { in r12a_get_txpower()
372 /* Dump per-rate Tx power values. */ in r12a_get_txpower()
387 for (i = 0; i < sc->ntxchains; i++) { in r12a_set_txpower()
389 /* Compute per-rate Tx power values. */ in r12a_set_txpower()
391 /* Write per-rate Tx power values to hardware. */ in r12a_set_txpower()
399 struct r12a_softc *rs = sc->sc_priv; in r12a_fix_spur()
402 if (rs->chip & R12A_CHIP_C_CUT) { in r12a_fix_spur()
443 struct ieee80211com *ic = &sc->sc_ic; in r12a_set_band()
444 struct r12a_softc *rs = sc->sc_priv; in r12a_set_band()
450 if ((sc->sc_flags & (RTWN_STARTED | RTWN_RUNNING)) != in r12a_set_band()
460 swing = rs->tx_bbswing_2g; in r12a_set_band()
463 swing = rs->tx_bbswing_5g; in r12a_set_band()
465 KASSERT(0, ("wrong channel flags %08X\n", c->ic_flags)); in r12a_set_band()
475 val = 0x200; /* 0 dB */ in r12a_set_band()
478 val = 0x16a; /* -3 dB */ in r12a_set_band()
481 val = 0x101; /* -6 dB */ in r12a_set_band()
484 val = 0xb6; /* -9 dB */ in r12a_set_band()
516 for (i = 0; i < sc->nrxchains; i++) { in r12a_set_chan()
528 /* RTL8812AU-specific */ in r12a_set_chan()
539 if (c->ic_ieee > c->ic_vht_ch_freq1) { in r12a_set_chan()
540 if (c->ic_ieee - c->ic_vht_ch_freq1 == 2) { in r12a_set_chan()
548 if (c->ic_vht_ch_freq1 - c->ic_ieee == 2) { in r12a_set_chan()
568 /* ADC160 - Set bit 30 */ in r12a_set_chan()
585 else if (sc->nrxchains == 2 && sc->ntxchains == 2) in r12a_set_chan()
620 else if (sc->nrxchains == 2 && sc->ntxchains == 2) in r12a_set_chan()
640 if (sc->nrxchains == 2 && sc->ntxchains == 2) in r12a_set_chan()
650 /* RTL8812AU-specific */ in r12a_set_chan()
653 for (i = 0; i < sc->nrxchains; i++) in r12a_set_chan()
663 struct r12a_softc *rs = sc->sc_priv; in r12a_set_band_2ghz()
675 switch (rs->rfe_type) { in r12a_set_band_2ghz()
719 struct r12a_softc *rs = sc->sc_priv; in r12a_set_band_5ghz()
731 device_printf(sc->sc_dev, in r12a_set_band_5ghz()
746 switch (rs->rfe_type) { in r12a_set_band_5ghz()