rtw89: use hardware SSN to TX management frame

Since firmware transmits beacon by hardware SSN, driver does it with the
same setting, then packets in the air have continual sequence number.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220107034239.22002-3-pkshih@realtek.com
This commit is contained in:
Ping-Ke Shih 2022-01-07 11:42:22 +08:00 committed by Kalle Valo
parent 6629dc5697
commit 91644020db
3 changed files with 11 additions and 1 deletions

View File

@ -385,6 +385,8 @@ rtw89_core_tx_update_mgmt_info(struct rtw89_dev *rtwdev,
desc_info->qsel = RTW89_TX_QSEL_B0_MGMT;
desc_info->ch_dma = ch_dma;
desc_info->hw_ssn_sel = RTW89_MGMT_HW_SSN_SEL;
desc_info->hw_seq_mode = RTW89_MGMT_HW_SEQ_MODE;
/* fixed data rate for mgmt frames */
desc_info->en_wd_info = true;
@ -710,7 +712,9 @@ static __le32 rtw89_build_txwd_body0(struct rtw89_tx_desc_info *desc_info)
FIELD_PREP(RTW89_TXWD_BODY0_CHANNEL_DMA, desc_info->ch_dma) |
FIELD_PREP(RTW89_TXWD_BODY0_HDR_LLC_LEN, desc_info->hdr_llc_len) |
FIELD_PREP(RTW89_TXWD_BODY0_WD_PAGE, desc_info->wd_page) |
FIELD_PREP(RTW89_TXWD_BODY0_FW_DL, desc_info->fw_dl);
FIELD_PREP(RTW89_TXWD_BODY0_FW_DL, desc_info->fw_dl) |
FIELD_PREP(RTW89_TXWD_BODY0_HW_SSN_SEL, desc_info->hw_ssn_sel) |
FIELD_PREP(RTW89_TXWD_BODY0_HW_SSN_MODE, desc_info->hw_seq_mode);
return cpu_to_le32(dword);
}

View File

@ -686,6 +686,10 @@ struct rtw89_tx_desc_info {
bool fw_dl;
u16 seq;
bool a_ctrl_bsr;
u8 hw_ssn_sel;
#define RTW89_MGMT_HW_SSN_SEL 1
u8 hw_seq_mode;
#define RTW89_MGMT_HW_SEQ_MODE 1
};
struct rtw89_core_tx_request {

View File

@ -31,6 +31,8 @@
#define RTW89_TXWD_BODY0_HDR_LLC_LEN GENMASK(15, 11)
#define RTW89_TXWD_BODY0_WD_PAGE BIT(7)
#define RTW89_TXWD_BODY0_HW_AMSDU BIT(5)
#define RTW89_TXWD_BODY0_HW_SSN_SEL GENMASK(3, 2)
#define RTW89_TXWD_BODY0_HW_SSN_MODE GENMASK(1, 0)
/* TX WD BODY DWORD 1 */
#define RTW89_TXWD_BODY1_PAYLOAD_ID GENMASK(31, 16)