mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
linux: wifi: rtw88: drop patches included in 6.12.14
This commit is contained in:
parent
f69b778ba5
commit
247dd63350
@ -1,209 +0,0 @@
|
||||
From 0daa521a1c8c29ffbefe6530f0d276e74e2749d0 Mon Sep 17 00:00:00 2001
|
||||
From: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Date: Thu, 12 Dec 2024 13:42:03 +0800
|
||||
Subject: [PATCH 29/35] wifi: rtw88: add __packed attribute to efuse layout
|
||||
struct
|
||||
|
||||
The layout struct of efuse should not do address alignment by compiler.
|
||||
Otherwise it leads unexpected layout and size for certain arch suc as arm.
|
||||
In x86-64, the results are identical before and after this patch.
|
||||
|
||||
Also adjust bit-field to prevent over adjacent byte to avoid warning:
|
||||
rtw88/rtw8822b.h:66:1: note: offset of packed bit-field `res2` has changed in GCC 4.4
|
||||
66 | } __packed;
|
||||
| ^
|
||||
|
||||
Reported-by: kernel test robot <lkp@intel.com>
|
||||
Closes: https://lore.kernel.org/oe-kbuild-all/202412120131.qk0x6OhE-lkp@intel.com/
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/20241212054203.135046-1-pkshih@realtek.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/main.h | 4 ++--
|
||||
drivers/net/wireless/realtek/rtw88/rtw8723x.h | 8 ++++----
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.h | 9 +++++----
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822b.h | 9 +++++----
|
||||
drivers/net/wireless/realtek/rtw88/rtw8822c.h | 9 +++++----
|
||||
5 files changed, 21 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
index cd09fb6f7b8b..65c7acea41af 100644
|
||||
--- a/drivers/net/wireless/realtek/rtw88/main.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/main.h
|
||||
@@ -510,12 +510,12 @@ struct rtw_5g_txpwr_idx {
|
||||
struct rtw_5g_vht_ns_pwr_idx_diff vht_2s_diff;
|
||||
struct rtw_5g_vht_ns_pwr_idx_diff vht_3s_diff;
|
||||
struct rtw_5g_vht_ns_pwr_idx_diff vht_4s_diff;
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
struct rtw_txpwr_idx {
|
||||
struct rtw_2g_txpwr_idx pwr_idx_2g;
|
||||
struct rtw_5g_txpwr_idx pwr_idx_5g;
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
struct rtw_channel_params {
|
||||
u8 center_chan;
|
||||
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8723x.h b/drivers/net/wireless/realtek/rtw88/rtw8723x.h
|
||||
index e93bfce994bf..a99af527c92c 100644
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8723x.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8723x.h
|
||||
@@ -47,7 +47,7 @@ struct rtw8723xe_efuse {
|
||||
u8 device_id[2];
|
||||
u8 sub_vendor_id[2];
|
||||
u8 sub_device_id[2];
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
struct rtw8723xu_efuse {
|
||||
u8 res4[48]; /* 0xd0 */
|
||||
@@ -56,12 +56,12 @@ struct rtw8723xu_efuse {
|
||||
u8 usb_option; /* 0x104 */
|
||||
u8 res5[2]; /* 0x105 */
|
||||
u8 mac_addr[ETH_ALEN]; /* 0x107 */
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
struct rtw8723xs_efuse {
|
||||
u8 res4[0x4a]; /* 0xd0 */
|
||||
u8 mac_addr[ETH_ALEN]; /* 0x11a */
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
struct rtw8723x_efuse {
|
||||
__le16 rtl_id;
|
||||
@@ -96,7 +96,7 @@ struct rtw8723x_efuse {
|
||||
struct rtw8723xu_efuse u;
|
||||
struct rtw8723xs_efuse s;
|
||||
};
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
#define RTW8723X_IQK_ADDA_REG_NUM 16
|
||||
#define RTW8723X_IQK_MAC8_REG_NUM 3
|
||||
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.h b/drivers/net/wireless/realtek/rtw88/rtw8821c.h
|
||||
index 7a33ebd612ed..954e93c8020d 100644
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.h
|
||||
@@ -27,7 +27,7 @@ struct rtw8821cu_efuse {
|
||||
u8 res11[0xcf];
|
||||
u8 package_type; /* 0x1fb */
|
||||
u8 res12[0x4];
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
struct rtw8821ce_efuse {
|
||||
u8 mac_addr[ETH_ALEN]; /* 0xd0 */
|
||||
@@ -47,7 +47,8 @@ struct rtw8821ce_efuse {
|
||||
u8 ltr_en:1;
|
||||
u8 res1:2;
|
||||
u8 obff:2;
|
||||
- u8 res2:3;
|
||||
+ u8 res2_1:1;
|
||||
+ u8 res2_2:2;
|
||||
u8 obff_cap:2;
|
||||
u8 res3:4;
|
||||
u8 res4[3];
|
||||
@@ -63,7 +64,7 @@ struct rtw8821ce_efuse {
|
||||
u8 res6:1;
|
||||
u8 port_t_power_on_value:5;
|
||||
u8 res7;
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
struct rtw8821cs_efuse {
|
||||
u8 res4[0x4a]; /* 0xd0 */
|
||||
@@ -101,7 +102,7 @@ struct rtw8821c_efuse {
|
||||
struct rtw8821cu_efuse u;
|
||||
struct rtw8821cs_efuse s;
|
||||
};
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
static inline void
|
||||
_rtw_write32s_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask, u32 data)
|
||||
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.h b/drivers/net/wireless/realtek/rtw88/rtw8822b.h
|
||||
index 0514958fb57c..9fca9ba67c90 100644
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.h
|
||||
@@ -27,7 +27,7 @@ struct rtw8822bu_efuse {
|
||||
u8 res11[0xcf];
|
||||
u8 package_type; /* 0x1fb */
|
||||
u8 res12[0x4];
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
struct rtw8822be_efuse {
|
||||
u8 mac_addr[ETH_ALEN]; /* 0xd0 */
|
||||
@@ -47,7 +47,8 @@ struct rtw8822be_efuse {
|
||||
u8 ltr_en:1;
|
||||
u8 res1:2;
|
||||
u8 obff:2;
|
||||
- u8 res2:3;
|
||||
+ u8 res2_1:1;
|
||||
+ u8 res2_2:2;
|
||||
u8 obff_cap:2;
|
||||
u8 res3:4;
|
||||
u8 res4[3];
|
||||
@@ -63,7 +64,7 @@ struct rtw8822be_efuse {
|
||||
u8 res6:1;
|
||||
u8 port_t_power_on_value:5;
|
||||
u8 res7;
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
struct rtw8822bs_efuse {
|
||||
u8 res4[0x4a]; /* 0xd0 */
|
||||
@@ -103,7 +104,7 @@ struct rtw8822b_efuse {
|
||||
struct rtw8822bu_efuse u;
|
||||
struct rtw8822bs_efuse s;
|
||||
};
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
static inline void
|
||||
_rtw_write32s_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask, u32 data)
|
||||
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.h b/drivers/net/wireless/realtek/rtw88/rtw8822c.h
|
||||
index e2b383d633cd..fc62b67a15f2 100644
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.h
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.h
|
||||
@@ -14,7 +14,7 @@ struct rtw8822cu_efuse {
|
||||
u8 res1[3];
|
||||
u8 mac_addr[ETH_ALEN]; /* 0x157 */
|
||||
u8 res2[0x3d];
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
struct rtw8822cs_efuse {
|
||||
u8 res0[0x4a]; /* 0x120 */
|
||||
@@ -39,7 +39,8 @@ struct rtw8822ce_efuse {
|
||||
u8 ltr_en:1;
|
||||
u8 res1:2;
|
||||
u8 obff:2;
|
||||
- u8 res2:3;
|
||||
+ u8 res2_1:1;
|
||||
+ u8 res2_2:2;
|
||||
u8 obff_cap:2;
|
||||
u8 res3:4;
|
||||
u8 class_code[3];
|
||||
@@ -55,7 +56,7 @@ struct rtw8822ce_efuse {
|
||||
u8 res6:1;
|
||||
u8 port_t_power_on_value:5;
|
||||
u8 res7;
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
struct rtw8822c_efuse {
|
||||
__le16 rtl_id;
|
||||
@@ -102,7 +103,7 @@ struct rtw8822c_efuse {
|
||||
struct rtw8822cu_efuse u;
|
||||
struct rtw8822cs_efuse s;
|
||||
};
|
||||
-};
|
||||
+} __packed;
|
||||
|
||||
enum rtw8822c_dpk_agc_phase {
|
||||
RTW_DPK_GAIN_CHECK,
|
||||
--
|
||||
2.43.0
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 66ef0289ac99e155d206ddaa0fdfad09ae3cd007 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 18 Dec 2024 00:53:11 +0200
|
||||
Subject: [PATCH 30/35] wifi: rtlwifi: rtl8821ae: Fix media status report
|
||||
|
||||
RTL8821AE is stuck transmitting at the lowest rate allowed by the rate
|
||||
mask. This is because the firmware doesn't know the device is connected
|
||||
to a network.
|
||||
|
||||
Fix the macros SET_H2CCMD_MSRRPT_PARM_OPMODE and
|
||||
SET_H2CCMD_MSRRPT_PARM_MACID_IND to work on the first byte of __cmd,
|
||||
not the second. Now the firmware is correctly notified when the device
|
||||
is connected to a network and it activates the rate control.
|
||||
|
||||
Before (MCS3):
|
||||
|
||||
[ 5] 0.00-1.00 sec 12.5 MBytes 105 Mbits/sec 0 339 KBytes
|
||||
[ 5] 1.00-2.00 sec 10.6 MBytes 89.1 Mbits/sec 0 339 KBytes
|
||||
[ 5] 2.00-3.00 sec 10.6 MBytes 89.1 Mbits/sec 0 386 KBytes
|
||||
[ 5] 3.00-4.00 sec 10.6 MBytes 89.1 Mbits/sec 0 386 KBytes
|
||||
[ 5] 4.00-5.00 sec 10.2 MBytes 86.0 Mbits/sec 0 427 KBytes
|
||||
|
||||
After (MCS9):
|
||||
|
||||
[ 5] 0.00-1.00 sec 33.9 MBytes 284 Mbits/sec 0 771 KBytes
|
||||
[ 5] 1.00-2.00 sec 31.6 MBytes 265 Mbits/sec 0 865 KBytes
|
||||
[ 5] 2.00-3.00 sec 29.9 MBytes 251 Mbits/sec 0 963 KBytes
|
||||
[ 5] 3.00-4.00 sec 28.2 MBytes 237 Mbits/sec 0 963 KBytes
|
||||
[ 5] 4.00-5.00 sec 26.8 MBytes 224 Mbits/sec 0 963 KBytes
|
||||
|
||||
Fixes: 39f40710d0b5 ("rtlwifi: rtl88821ae: Remove usage of private bit manipulation macros")
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/754785b3-8a78-4554-b80d-de5f603b410b@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.h b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.h
|
||||
index c269942b3f4a..af8d17b9e012 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.h
|
||||
@@ -197,9 +197,9 @@ enum rtl8821a_h2c_cmd {
|
||||
|
||||
/* _MEDIA_STATUS_RPT_PARM_CMD1 */
|
||||
#define SET_H2CCMD_MSRRPT_PARM_OPMODE(__cmd, __value) \
|
||||
- u8p_replace_bits(__cmd + 1, __value, BIT(0))
|
||||
+ u8p_replace_bits(__cmd, __value, BIT(0))
|
||||
#define SET_H2CCMD_MSRRPT_PARM_MACID_IND(__cmd, __value) \
|
||||
- u8p_replace_bits(__cmd + 1, __value, BIT(1))
|
||||
+ u8p_replace_bits(__cmd, __value, BIT(1))
|
||||
|
||||
/* AP_OFFLOAD */
|
||||
#define SET_H2CCMD_AP_OFFLOAD_ON(__cmd, __value) \
|
||||
--
|
||||
2.43.0
|
||||
|
@ -1,64 +0,0 @@
|
||||
From 62acd2ac82a8d5d13be9da982aad01bfd8260214 Mon Sep 17 00:00:00 2001
|
||||
From: Vasily Khoruzhick <anarsoul@gmail.com>
|
||||
Date: Thu, 2 Jan 2025 23:50:53 -0800
|
||||
Subject: [PATCH 39/41] wifi: rtw88: 8703b: Fix RX/TX issues
|
||||
|
||||
Fix 3 typos in 8703b driver. 2 typos in calibration routines are not
|
||||
fatal and do not seem to have any impact, just fix them to match vendor
|
||||
driver.
|
||||
|
||||
However the last one in rtw8703b_set_channel_bb() clears too many bits
|
||||
in REG_OFDM0_TX_PSD_NOISE, causing TX and RX issues (neither rate goes
|
||||
above MCS0-MCS1). Vendor driver clears only 2 most significant bits.
|
||||
|
||||
With the last typo fixed, the driver is able to reach MCS7 on Pinebook
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Fixes: 9bb762b3a957 ("wifi: rtw88: Add definitions for 8703b chip")
|
||||
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Tested-by: Fiona Klute <fiona.klute@gmx.de>
|
||||
Tested-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/20250103075107.1337533-1-anarsoul@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/rtw8703b.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8703b.c b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
index a19b94d022ee..1d232adbdd7e 100644
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c
|
||||
@@ -903,7 +903,7 @@ static void rtw8703b_set_channel_bb(struct rtw_dev *rtwdev, u8 channel, u8 bw,
|
||||
rtw_write32_mask(rtwdev, REG_FPGA0_RFMOD, BIT_MASK_RFMOD, 0x0);
|
||||
rtw_write32_mask(rtwdev, REG_FPGA1_RFMOD, BIT_MASK_RFMOD, 0x0);
|
||||
rtw_write32_mask(rtwdev, REG_OFDM0_TX_PSD_NOISE,
|
||||
- GENMASK(31, 20), 0x0);
|
||||
+ GENMASK(31, 30), 0x0);
|
||||
rtw_write32(rtwdev, REG_BBRX_DFIR, 0x4A880000);
|
||||
rtw_write32(rtwdev, REG_OFDM0_A_TX_AFE, 0x19F60000);
|
||||
break;
|
||||
@@ -1198,9 +1198,9 @@ static u8 rtw8703b_iqk_rx_path(struct rtw_dev *rtwdev,
|
||||
rtw_write32(rtwdev, REG_RXIQK_TONE_A_11N, 0x38008c1c);
|
||||
rtw_write32(rtwdev, REG_TX_IQK_TONE_B, 0x38008c1c);
|
||||
rtw_write32(rtwdev, REG_RX_IQK_TONE_B, 0x38008c1c);
|
||||
- rtw_write32(rtwdev, REG_TXIQK_PI_A_11N, 0x8216000f);
|
||||
+ rtw_write32(rtwdev, REG_TXIQK_PI_A_11N, 0x8214030f);
|
||||
rtw_write32(rtwdev, REG_RXIQK_PI_A_11N, 0x28110000);
|
||||
- rtw_write32(rtwdev, REG_TXIQK_PI_B, 0x28110000);
|
||||
+ rtw_write32(rtwdev, REG_TXIQK_PI_B, 0x82110000);
|
||||
rtw_write32(rtwdev, REG_RXIQK_PI_B, 0x28110000);
|
||||
|
||||
/* LOK setting */
|
||||
@@ -1372,7 +1372,7 @@ void rtw8703b_iqk_fill_a_matrix(struct rtw_dev *rtwdev, const s32 result[])
|
||||
return;
|
||||
|
||||
tmp_rx_iqi |= FIELD_PREP(BIT_MASK_RXIQ_S1_X, result[IQK_S1_RX_X]);
|
||||
- tmp_rx_iqi |= FIELD_PREP(BIT_MASK_RXIQ_S1_Y1, result[IQK_S1_RX_X]);
|
||||
+ tmp_rx_iqi |= FIELD_PREP(BIT_MASK_RXIQ_S1_Y1, result[IQK_S1_RX_Y]);
|
||||
rtw_write32(rtwdev, REG_A_RXIQI, tmp_rx_iqi);
|
||||
rtw_write32_mask(rtwdev, REG_RXIQK_MATRIX_LSB_11N, BIT_MASK_RXIQ_S1_Y2,
|
||||
BIT_SET_RXIQ_S1_Y2(result[IQK_S1_RX_Y]));
|
||||
--
|
||||
2.43.0
|
||||
|
@ -1,36 +0,0 @@
|
||||
From f8d47d06677264fbb7d603f1524b9fe4937be0f8 Mon Sep 17 00:00:00 2001
|
||||
From: Fiona Klute <fiona.klute@gmx.de>
|
||||
Date: Mon, 6 Jan 2025 15:54:34 +0200
|
||||
Subject: [PATCH 40/41] wifi: rtw88: sdio: Fix disconnection after beacon loss
|
||||
|
||||
This is the equivalent of commit 28818b4d871b ("wifi: rtw88: usb: Fix
|
||||
disconnection after beacon loss") for SDIO chips.
|
||||
Tested on Pinephone (RTL8723CS), random disconnections became rare,
|
||||
instead of a frequent nuisance.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
|
||||
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> # Tested on Pinebook
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://patch.msgid.link/20250106135434.35936-1-fiona.klute@gmx.de
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/sdio.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
index 799230eb5f16..e024061bdbf7 100644
|
||||
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
|
||||
@@ -1192,6 +1192,8 @@ static void rtw_sdio_indicate_tx_status(struct rtw_dev *rtwdev,
|
||||
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||
struct ieee80211_hw *hw = rtwdev->hw;
|
||||
|
||||
+ skb_pull(skb, rtwdev->chip->tx_pkt_desc_sz);
|
||||
+
|
||||
/* enqueue to wait for tx report */
|
||||
if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) {
|
||||
rtw_tx_report_enqueue(rtwdev, skb, tx_data->sn);
|
||||
--
|
||||
2.43.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user