Skip to contentSkip to conversation

wifi: rtw88: 8723b: always report a single spatial stream

PATCH In review Luka Gejak 2 participants 4 messages Oct 20 – Nov 3 Realtek wireless driver (rtw88)

lore
Share & tools
lore

Luka Gejak

author
#0 lore raw

PATCH 1/1 wifi: rtw88: 8723b: always report a single spatial stream

RTL8723B only ever has one spatial stream. Set nss and ant_num to 1 directly instead of deriving them from rf_path_num, which just happens to be 1 on this chip.

---
 drivers/net/wireless/realtek/rtw88/rtw8723b.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/net/wireless/realtek/rtw88/rtw8723b.c +3 -6
index 8bb9c03d769c..89190dd4f5c7 100644
@@ -2365,12 +2365,9 @@ static int rtw8723b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)
 	if (efuse->power_track_type != 0)
 		rtw_warn(rtwdev, "unsupported power track type\n");
 
-	/*
-	 * No firmware hardware feature report exists, so fill the hardware
-	 * capability here; a zero stream count kills the HT MCS set.
-	 */
-	efuse->hw_cap.nss = max_t(u8, rtwdev->hal.rf_path_num, 1);
-	efuse->hw_cap.ant_num = efuse->hw_cap.nss;
+	/* No firmware hardware feature report exists, so fill it in here. */
+	efuse->hw_cap.nss = 1;
+	efuse->hw_cap.ant_num = 1;
 	efuse->hw_cap.bw = BIT(RTW_CHANNEL_WIDTH_20) |
 			   BIT(RTW_CHANNEL_WIDTH_40);
 
Signature · 1 line
2.53.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Luka Gejak

RTL8723B only ever has one spatial stream. Set nss and ant_num to 1 directly instead of deriving them from rf_path_num, which just happens to be 1 on this chip.

Quoted 10 lines
---
 drivers/net/wireless/realtek/rtw88/rtw8723b.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
drivers/net/wireless/realtek/rtw88/rtw8723b.c +0 -0
index 8bb9c03d769c..89190dd4f5c7 100644

drivers/net/wireless/realtek/rtw88/rtw8723b.c static int rtw8723b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map) · line 2373

Quoted 9 lines
drivers/net/wireless/realtek/rtw88/rtw8723b.c +0 -6
@@ -2365,12 +2365,9 @@ static int rtw8723b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)
        if (efuse->power_track_type != 0)
                rtw_warn(rtwdev, "unsupported power track type\n");
 
-       /*
-        * No firmware hardware feature report exists, so fill the hardware
-        * capability here; a zero stream count kills the HT MCS set.
-        */
-       efuse->hw_cap.nss = max_t(u8, rtwdev->hal.rf_path_num, 1);
-       efuse->hw_cap.ant_num = efuse->hw_cap.nss;

Curiously, is there real hardware encountered the problem?

Quoted 8 lines
drivers/net/wireless/realtek/rtw88/rtw8723b.c +3 -1
+       /* No firmware hardware feature report exists, so fill it in here. */
+       efuse->hw_cap.nss = 1;
+       efuse->hw_cap.ant_num = 1;
        efuse->hw_cap.bw = BIT(RTW_CHANNEL_WIDTH_20) |
                           BIT(RTW_CHANNEL_WIDTH_40);
 
--

2.53.0

author
#2 lore raw
Quoted 26 lines · Ping-Ke Shih
Quoted 7 lines · Luka Gejak

RTL8723B only ever has one spatial stream. Set nss and ant_num to 1
directly instead of deriving them from rf_path_num, which just happens to be 1 on this chip.

Quoted 14 lines
---
 drivers/net/wireless/realtek/rtw88/rtw8723b.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723b.c b/drivers/net/wireless/realtek/rtw88/rtw8723b.c
index 8bb9c03d769c..89190dd4f5c7 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8723b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723b.c
@@ -2365,12 +2365,9 @@ static int rtw8723b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map) if (efuse->power_track_type != 0)
rtw_warn(rtwdev, "unsupported power track type\n");

Quoted 9 lines
Quoted 7 lines

- /*
- * No firmware hardware feature report exists, so fill the hardware
- * capability here; a zero stream count kills the HT MCS set.
- */
- efuse->hw_cap.nss = max_t(u8, rtwdev->hal.rf_path_num, 1);
- efuse->hw_cap.ant_num = efuse->hw_cap.nss;

Curiously, is there real hardware encountered the problem?

No, but Bitterblue pointed out it's unnecessary code.

Quoted 11 lines
Quoted 10 lines

+ /* No firmware hardware feature report exists, so fill it in here. */
+ efuse->hw_cap.nss = 1;
+ efuse->hw_cap.ant_num = 1;
efuse->hw_cap.bw = BIT(RTW_CHANNEL_WIDTH_20) | BIT(RTW_CHANNEL_WIDTH_40);

--
2.53.0

maintainer
#3 lore raw
In reply to Luka Gejak
Quoted 6 lines · Luka Gejak

RTL8723B only ever has one spatial stream. Set nss and ant_num to 1 directly instead of deriving them from rf_path_num, which just happens to be 1 on this chip.

1 patch(es) applied to rtw-next branch of rtw.git, thanks.

b490cf696ff7 wifi: rtw88: 8723b: always report a single spatial stream

---
https://github.com/pkshih/rtw.git