1: 62e80530aeed = 1: dec221b99955 wifi: rtw88: use the rate, bandwidth and GI of injected frames 2: 1860fc031989 ! 2: 9c284fd96678 wifi: rtw88: honour the retry count and NO_ACK of injected frames @@ Commit message the default limit, so frames to an absent station stall injection. The TX report path also reports NO_ACK frames as not acked.  - Set max_rate_tries to IEEE80211_MAX_TX_RETRY, the most mac80211 can - pass, and program the TX descriptor retry limit for injected frames: no - retries for NO_ACK frames, otherwise the radiotap retry count. Report - NO_ACK frames as IEEE80211_TX_STAT_NOACK_TRANSMITTED, like rtw89 does - since commit 92608bb5f14f ("wifi: rtw89: honor ASSIGN_SEQ, retries, and - NO_ACK for injected frames"). The retry limit fields are at the same - place as TXDESC40_RETRY_LIMIT_* in the RTL8192EU/RTL8723BU TX descriptor - of rtl8xxxu. + Limit max_rate_tries by both the TX descriptor retry limit and + IEEE80211_MAX_TX_RETRY, and program the descriptor retry limit for + injected frames: no retries for NO_ACK frames, otherwise the radiotap + retry count if the frame has a usable radiotap rate. In the TX report, + report NO_ACK frames that were sent as IEEE80211_TX_STAT_NOACK_TRANSMITTED + rather than acked; this includes group addressed frames. + + rtw89 got similar changes in commit 92608bb5f14f ("wifi: rtw89: honor + ASSIGN_SEQ, retries, and NO_ACK for injected frames"). The retry limit + fields are at the same place as TXDESC40_RETRY_LIMIT_* in the + RTL8192EU/RTL8723BU TX descriptor of rtl8xxxu.  Signed-off-by: Ahmet Zeren   @@ drivers/net/wireless/realtek/rtw88/main.c: int rtw_register_hw(struct rtw_dev *r max_tx_headroom += RTW_SDIO_DATA_PTR_ALIGN;  hw->extra_tx_headroom = max_tx_headroom; -+ hw->max_rate_tries = IEEE80211_MAX_TX_RETRY; ++ hw->max_rate_tries = min(RTW_TX_DATA_RTY_LMT_MAX + 1, IEEE80211_MAX_TX_RETRY); hw->queues = IEEE80211_NUM_ACS; hw->txq_data_size = sizeof(struct rtw_txq); hw->sta_data_size = sizeof(struct rtw_sta_info); @@ drivers/net/wireless/realtek/rtw88/main.h: struct rtw_tx_pkt_info { bool dis_rate_fallback;  + bool rty_lmt_en;  + u8 data_rty_lmt; ++#define RTW_TX_DATA_RTY_LMT_MAX 0x3f bool bmc; bool use_rate; bool ls; @@ drivers/net/wireless/realtek/rtw88/tx.c: static void rtw_tx_report_tx_status(str  info = IEEE80211_SKB_CB(skb); ieee80211_tx_info_clear_status(info); -+ if (info->flags & IEEE80211_TX_CTL_NO_ACK) +- if (acked) ++ if (acked && info->flags & IEEE80211_TX_CTL_NO_ACK)  + info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED; - if (acked) ++ else if (acked) info->flags |= IEEE80211_TX_STAT_ACK; else + info->flags &= ~IEEE80211_TX_STAT_ACK;  @@ drivers/net/wireless/realtek/rtw88/tx.c: static void rtw_tx_injected_pkt_info_update(struct rtw_dev *rtwdev, struct ieee80211_tx_rate *rate = &info->control.rates[0]; u8 nss, mcs; @@ drivers/net/wireless/realtek/rtw88/tx.c: static void rtw_tx_injected_pkt_info_up  + if (info->flags & IEEE80211_TX_CTL_NO_ACK) {  + pkt_info->rty_lmt_en = true;  + pkt_info->data_rty_lmt = 0; -+ } else if (rate->count) { ++ } else if (info->control.flags & IEEE80211_TX_CTRL_RATE_INJECT) {  + pkt_info->rty_lmt_en = true;  + pkt_info->data_rty_lmt = rate->count - 1;  + }