From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Subject: [PATCH v2 5/9] wifi: rtw88: Extend rtw_fw_send_ra_info() for RTL8814AU
Date: Tue, 4 Feb 2025 20:39:29 +0200 [thread overview]
Message-ID: <08e2f328-1aab-4e50-93ac-c1e5dd9541ac@gmail.com> (raw)
In-Reply-To: <9fc518ae-7708-42c6-99ca-56ee307555b6@gmail.com>
The existing code is suitable for chips with up to 2 spatial streams.
Inform the firmware about the rates it's allowed to use when
transmitting 3 spatial streams.
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
v2:
- Add RTW_CHIP_TYPE_8814A enum.
- Check the chip type instead of the presence of RF path C.
- Reduce indentation.
---
drivers/net/wireless/realtek/rtw88/fw.c | 15 +++++++++++++++
drivers/net/wireless/realtek/rtw88/fw.h | 1 +
drivers/net/wireless/realtek/rtw88/main.h | 1 +
3 files changed, 17 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c
index 02389b7c6876..6b563ac489a7 100644
--- a/drivers/net/wireless/realtek/rtw88/fw.c
+++ b/drivers/net/wireless/realtek/rtw88/fw.c
@@ -735,6 +735,7 @@ void rtw_fw_send_ra_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
{
u8 h2c_pkt[H2C_PKT_SIZE] = {0};
bool disable_pt = true;
+ u32 mask_hi;
SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_RA_INFO);
@@ -755,6 +756,20 @@ void rtw_fw_send_ra_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
si->init_ra_lv = 0;
rtw_fw_send_h2c_command(rtwdev, h2c_pkt);
+
+ if (rtwdev->chip->id != RTW_CHIP_TYPE_8814A)
+ return;
+
+ SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_RA_INFO_HI);
+
+ mask_hi = si->ra_mask >> 32;
+
+ SET_RA_INFO_RA_MASK0(h2c_pkt, (mask_hi & 0xff));
+ SET_RA_INFO_RA_MASK1(h2c_pkt, (mask_hi & 0xff00) >> 8);
+ SET_RA_INFO_RA_MASK2(h2c_pkt, (mask_hi & 0xff0000) >> 16);
+ SET_RA_INFO_RA_MASK3(h2c_pkt, (mask_hi & 0xff000000) >> 24);
+
+ rtw_fw_send_h2c_command(rtwdev, h2c_pkt);
}
void rtw_fw_media_status_report(struct rtw_dev *rtwdev, u8 mac_id, bool connect)
diff --git a/drivers/net/wireless/realtek/rtw88/fw.h b/drivers/net/wireless/realtek/rtw88/fw.h
index 404de1b0c407..48ad9ceab6ea 100644
--- a/drivers/net/wireless/realtek/rtw88/fw.h
+++ b/drivers/net/wireless/realtek/rtw88/fw.h
@@ -557,6 +557,7 @@ static inline void rtw_h2c_pkt_set_header(u8 *h2c_pkt, u8 sub_id)
#define H2C_CMD_DEFAULT_PORT 0x2c
#define H2C_CMD_RA_INFO 0x40
#define H2C_CMD_RSSI_MONITOR 0x42
+#define H2C_CMD_RA_INFO_HI 0x46
#define H2C_CMD_BCN_FILTER_OFFLOAD_P0 0x56
#define H2C_CMD_BCN_FILTER_OFFLOAD_P1 0x57
#define H2C_CMD_WL_PHY_INFO 0x58
diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h
index ba64d269521a..993c381e734b 100644
--- a/drivers/net/wireless/realtek/rtw88/main.h
+++ b/drivers/net/wireless/realtek/rtw88/main.h
@@ -191,6 +191,7 @@ enum rtw_chip_type {
RTW_CHIP_TYPE_8703B,
RTW_CHIP_TYPE_8821A,
RTW_CHIP_TYPE_8812A,
+ RTW_CHIP_TYPE_8814A,
};
enum rtw_tx_queue_type {
--
2.48.1
next prev parent reply other threads:[~2025-02-04 18:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 18:35 [PATCH v2 0/9] wifi: rtw88: Prepare to support RTL8814AU (part 1/2) Bitterblue Smith
2025-02-04 18:36 ` [PATCH v2 1/9] wifi: rtw88: Fix __rtw_download_firmware() for RTL8814AU Bitterblue Smith
2025-02-10 1:23 ` Ping-Ke Shih
2025-02-10 13:30 ` Bitterblue Smith
2025-02-10 3:44 ` Ping-Ke Shih
2025-02-04 18:37 ` [PATCH v2 2/9] wifi: rtw88: Fix download_firmware_validate() " Bitterblue Smith
2025-02-10 1:24 ` Ping-Ke Shih
2025-02-04 18:38 ` [PATCH v2 3/9] wifi: rtw88: Extend struct rtw_pwr_track_tbl " Bitterblue Smith
2025-02-10 1:25 ` Ping-Ke Shih
2025-02-04 18:38 ` [PATCH v2 4/9] wifi: rtw88: Extend rf_base_addr and rf_sipi_addr " Bitterblue Smith
2025-02-10 1:28 ` Ping-Ke Shih
2025-02-04 18:39 ` Bitterblue Smith [this message]
2025-02-10 1:33 ` [PATCH v2 5/9] wifi: rtw88: Extend rtw_fw_send_ra_info() " Ping-Ke Shih
2025-02-04 18:40 ` [PATCH v2 6/9] wifi: rtw88: Constify some more structs and arrays Bitterblue Smith
2025-02-10 1:35 ` Ping-Ke Shih
2025-02-04 18:40 ` [PATCH v2 7/9] wifi: rtw88: Rename RTW_RATE_SECTION_MAX to RTW_RATE_SECTION_NUM Bitterblue Smith
2025-02-10 1:37 ` Ping-Ke Shih
2025-02-04 18:41 ` [PATCH v2 8/9] wifi: rtw88: Extend TX power stuff for 3-4 spatial streams Bitterblue Smith
2025-02-10 1:50 ` Ping-Ke Shih
2025-02-04 18:42 ` [PATCH v2 9/9] wifi: rtw88: Fix rtw_update_sta_info() for RTL8814AU Bitterblue Smith
2025-02-10 1:50 ` Ping-Ke Shih
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=08e2f328-1aab-4e50-93ac-c1e5dd9541ac@gmail.com \
--to=rtl8821cerfe2@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.