Lines Matching refs:rate

181 			const struct ieee80211_tx_rate *rate, u8 *nss_val)  in mt76x02_mac_tx_rate_val()  argument
186 if (rate->flags & IEEE80211_TX_RC_VHT_MCS) { in mt76x02_mac_tx_rate_val()
187 rate_idx = rate->idx; in mt76x02_mac_tx_rate_val()
188 nss = 1 + (rate->idx >> 4); in mt76x02_mac_tx_rate_val()
190 if (rate->flags & IEEE80211_TX_RC_80_MHZ_WIDTH) in mt76x02_mac_tx_rate_val()
192 else if (rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH) in mt76x02_mac_tx_rate_val()
194 } else if (rate->flags & IEEE80211_TX_RC_MCS) { in mt76x02_mac_tx_rate_val()
195 rate_idx = rate->idx; in mt76x02_mac_tx_rate_val()
196 nss = 1 + (rate->idx >> 3); in mt76x02_mac_tx_rate_val()
198 if (rate->flags & IEEE80211_TX_RC_GREEN_FIELD) in mt76x02_mac_tx_rate_val()
200 if (rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH) in mt76x02_mac_tx_rate_val()
207 r = &dev->mt76.hw->wiphy->bands[band]->bitrates[rate->idx]; in mt76x02_mac_tx_rate_val()
208 if (rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) in mt76x02_mac_tx_rate_val()
221 if (rate->flags & IEEE80211_TX_RC_SHORT_GI) in mt76x02_mac_tx_rate_val()
229 const struct ieee80211_tx_rate *rate) in mt76x02_mac_wcid_set_rate() argument
231 s8 max_txpwr_adj = mt76x02_tx_get_max_txpwr_adj(dev, rate); in mt76x02_mac_wcid_set_rate()
236 rateval = mt76x02_mac_tx_rate_val(dev, rate, &nss); in mt76x02_mac_wcid_set_rate()
268 stat->rate = FIELD_GET(MT_TX_STAT_FIFO_RATE, stat1); in mt76x02_mac_load_tx_status()
279 mt76x02_mac_process_tx_rate(struct ieee80211_tx_rate *txrate, u16 rate, in mt76x02_mac_process_tx_rate() argument
282 u8 idx = FIELD_GET(MT_RXWI_RATE_INDEX, rate); in mt76x02_mac_process_tx_rate()
288 switch (FIELD_GET(MT_RXWI_RATE_PHY, rate)) { in mt76x02_mac_process_tx_rate()
316 switch (FIELD_GET(MT_RXWI_RATE_BW, rate)) { in mt76x02_mac_process_tx_rate()
329 if (rate & MT_RXWI_RATE_SGI) in mt76x02_mac_process_tx_rate()
341 struct ieee80211_tx_rate *rate = &info->control.rates[0]; in mt76x02_mac_write_txwi() local
381 if (wcid && (rate->idx < 0 || !rate->count)) { in mt76x02_mac_write_txwi()
388 rateval = mt76x02_mac_tx_rate_val(dev, rate, &nss); in mt76x02_mac_write_txwi()
389 max_txpwr_adj = mt76x02_tx_get_max_txpwr_adj(dev, rate); in mt76x02_mac_write_txwi()
391 txwi->rate = cpu_to_le16(rateval); in mt76x02_mac_write_txwi()
400 !(txwi->rate & cpu_to_le16(rate_ht_mask))) in mt76x02_mac_write_txwi()
404 txwi->rate |= cpu_to_le16(MT_RXWI_RATE_LDPC); in mt76x02_mac_write_txwi()
406 txwi->rate |= cpu_to_le16(MT_RXWI_RATE_STBC); in mt76x02_mac_write_txwi()
480 struct ieee80211_tx_rate *rate = info->status.rates; in mt76x02_mac_fill_tx_status() local
490 phy = FIELD_GET(MT_RXWI_RATE_PHY, st->rate); in mt76x02_mac_fill_tx_status()
493 first_rate = st->rate & ~MT_PKTID_RATE; in mt76x02_mac_fill_tx_status()
496 mt76x02_mac_process_tx_rate(&rate[0], first_rate, in mt76x02_mac_fill_tx_status()
498 } else if (rate[0].idx < 0) { in mt76x02_mac_fill_tx_status()
502 mt76x02_mac_process_tx_rate(&rate[0], msta->wcid.tx_info, in mt76x02_mac_fill_tx_status()
506 mt76x02_mac_process_tx_rate(&last_rate, st->rate, in mt76x02_mac_fill_tx_status()
597 stat_val = stat->rate; in mt76x02_send_tx_status()
599 stat_cache = msta->status.rate; in mt76x02_send_tx_status()
659 u16 rate) in mt76x02_mac_process_rate() argument
661 u8 idx = FIELD_GET(MT_RXWI_RATE_INDEX, rate); in mt76x02_mac_process_rate()
663 switch (FIELD_GET(MT_RXWI_RATE_PHY, rate)) { in mt76x02_mac_process_rate()
704 if (rate & MT_RXWI_RATE_LDPC) in mt76x02_mac_process_rate()
707 if (rate & MT_RXWI_RATE_SGI) in mt76x02_mac_process_rate()
710 if (rate & MT_RXWI_RATE_STBC) in mt76x02_mac_process_rate()
713 switch (FIELD_GET(MT_RXWI_RATE_BW, rate)) { in mt76x02_mac_process_rate()
782 u16 rate = le16_to_cpu(rxwi->rate); in mt76x02_mac_process_rx() local
875 return mt76x02_mac_process_rate(dev, status, rate); in mt76x02_mac_process_rx()