Use the new net80211 method to fetch the node TX power, rather than
directly referencing ni->ni_txpower. This provides the hardware with a slightly more accurate idea of the maximum TX power to be using. This is part of a series to get per-packet TPC to work (better). Tested: * AR5416, hostap mode
This commit is contained in:
parent
ebe15a7b25
commit
12087a0769
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249569
@ -322,7 +322,7 @@ ath_beacon_setup(struct ath_softc *sc, struct ath_buf *bf)
|
||||
, m->m_len + IEEE80211_CRC_LEN /* frame length */
|
||||
, sizeof(struct ieee80211_frame)/* header length */
|
||||
, HAL_PKT_TYPE_BEACON /* Atheros packet type */
|
||||
, ni->ni_txpower /* txpower XXX */
|
||||
, ieee80211_get_node_txpower(ni) /* txpower XXX */
|
||||
, rate, 1 /* series 0 rate/tries */
|
||||
, HAL_TXKEYIX_INVALID /* no encryption */
|
||||
, antenna /* antenna mode */
|
||||
|
@ -1722,7 +1722,7 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee80211_node *ni,
|
||||
if (isfrag)
|
||||
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_FRAG;
|
||||
sc->sc_tx_th.wt_rate = sc->sc_hwmap[rix].ieeerate;
|
||||
sc->sc_tx_th.wt_txpower = ni->ni_txpower;
|
||||
sc->sc_tx_th.wt_txpower = ieee80211_get_node_txpower(ni);
|
||||
sc->sc_tx_th.wt_antenna = sc->sc_txantenna;
|
||||
|
||||
ieee80211_radiotap_tx(vap, m0);
|
||||
@ -1743,7 +1743,7 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee80211_node *ni,
|
||||
bf->bf_state.bfs_pktlen = pktlen;
|
||||
bf->bf_state.bfs_hdrlen = hdrlen;
|
||||
bf->bf_state.bfs_atype = atype;
|
||||
bf->bf_state.bfs_txpower = ni->ni_txpower;
|
||||
bf->bf_state.bfs_txpower = ieee80211_get_node_txpower(ni);
|
||||
bf->bf_state.bfs_txrate0 = txrate;
|
||||
bf->bf_state.bfs_try0 = try0;
|
||||
bf->bf_state.bfs_keyix = keyix;
|
||||
@ -2088,7 +2088,8 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee80211_node *ni,
|
||||
if (m0->m_flags & M_FRAG)
|
||||
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_FRAG;
|
||||
sc->sc_tx_th.wt_rate = sc->sc_hwmap[rix].ieeerate;
|
||||
sc->sc_tx_th.wt_txpower = ni->ni_txpower;
|
||||
sc->sc_tx_th.wt_txpower = MIN(params->ibp_power,
|
||||
ieee80211_get_node_txpower(ni));
|
||||
sc->sc_tx_th.wt_antenna = sc->sc_txantenna;
|
||||
|
||||
ieee80211_radiotap_tx(vap, m0);
|
||||
@ -2104,7 +2105,8 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee80211_node *ni,
|
||||
bf->bf_state.bfs_pktlen = pktlen;
|
||||
bf->bf_state.bfs_hdrlen = hdrlen;
|
||||
bf->bf_state.bfs_atype = atype;
|
||||
bf->bf_state.bfs_txpower = params->ibp_power;
|
||||
bf->bf_state.bfs_txpower = MIN(params->ibp_power,
|
||||
ieee80211_get_node_txpower(ni));
|
||||
bf->bf_state.bfs_txrate0 = txrate;
|
||||
bf->bf_state.bfs_try0 = try0;
|
||||
bf->bf_state.bfs_keyix = keyix;
|
||||
|
Loading…
Reference in New Issue
Block a user