forked from coolsnowwolf/lede
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bot] AutoMerging: merge all upstream's changes:
* https://github.com/coolsnowwolf/lede: (28 commits) rockchip: add Radxa ROCK3 Model A board support uboot-rockchip: add RK3568 Radxa ROCK 3A board support linux-firmware: add RTL8811/8821CU firmware rockchip: fix stmmc mdio with JLSEMI JL2XX1_PHY r8125: add led configuration from OF support x86: add XiaoMa M12 12th J6412/J6413 CPU with I226 support mac80211: add rtl8821cu chipset support in rtw88 r8101: remove duplicate code iproute2: Fix KERNEL_INCLUDE in SDK kernel: 5.19: refresh patches (coolsnowwolf#9966) mt76: mt7921e: fix crash in chip reset fail on rockchip 5.19 kernel mt76: add 5.19 kernel support kernel: bump 5.19 to 5.19.2 package: add realtek r8101 driver (coolsnowwolf#9964) rockchip: add NanoPi R5S dummy dts for build (coolsnowwolf#9961) rtl8821cu: drop broken package kernel: modules: cleanup 5.18 (coolsnowwolf#9946) mac80211: add rt2x00 5.19 kernel support kernel: refresh 5.19 patch (coolsnowwolf#9943) kernel: refresh 5.15 patch (coolsnowwolf#9944) ...
- Loading branch information
Showing
83 changed files
with
3,221 additions
and
1,390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
LINUX_VERSION-5.19 = .1 | ||
LINUX_KERNEL_HASH-5.19.1 = f4e27b926ea2c66b808db1f5706254cf92a8899e2108eedb0c3a7d12499aea55 | ||
LINUX_VERSION-5.19 = .2 | ||
LINUX_KERNEL_HASH-5.19.2 = 48e40a1f5501ec6c40e3c86d3d5319200b688f2d9360f72833084d74801fe63d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
package/kernel/mac80211/patches/rt2x00/999-backport-to-linux-5.18.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | ||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | ||
@@ -586,10 +586,18 @@ static void rt2x00usb_assign_endpoint(struct data_queue *queue, | ||
|
||
if (queue->qid == QID_RX) { | ||
pipe = usb_rcvbulkpipe(usb_dev, queue->usb_endpoint); | ||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0) | ||
queue->usb_maxpacket = usb_maxpacket(usb_dev, pipe, 0); | ||
+#else | ||
+ queue->usb_maxpacket = usb_maxpacket(usb_dev, pipe); | ||
+#endif | ||
} else { | ||
pipe = usb_sndbulkpipe(usb_dev, queue->usb_endpoint); | ||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0) | ||
queue->usb_maxpacket = usb_maxpacket(usb_dev, pipe, 1); | ||
+#else | ||
+ queue->usb_maxpacket = usb_maxpacket(usb_dev, pipe); | ||
+#endif | ||
} | ||
|
||
if (!queue->usb_maxpacket) |
14 changes: 14 additions & 0 deletions
14
...0211/patches/rtl/001-rtw88-Call-rtw_fw_beacon_filter_config-with-rtwdev--mutex-held.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c | ||
index 5cdc54c9a9aae..3c07485d6ba47 100644 | ||
--- a/drivers/net/wireless/realtek/rtw88/mac80211.c | ||
+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c | ||
@@ -466,8 +466,8 @@ static int rtw_ops_sta_remove(struct ieee80211_hw *hw, | ||
{ | ||
struct rtw_dev *rtwdev = hw->priv; | ||
|
||
- rtw_fw_beacon_filter_config(rtwdev, false, vif); | ||
mutex_lock(&rtwdev->mutex); | ||
+ rtw_fw_beacon_filter_config(rtwdev, false, vif); | ||
rtw_sta_remove(rtwdev, sta, true); | ||
mutex_unlock(&rtwdev->mutex); | ||
|
117 changes: 117 additions & 0 deletions
117
package/kernel/mac80211/patches/rtl/002-rtw88-Drop-rf_lock.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c | ||
index 1a52ff585fbc7..ba5ba852efb8c 100644 | ||
--- a/drivers/net/wireless/realtek/rtw88/debug.c | ||
+++ b/drivers/net/wireless/realtek/rtw88/debug.c | ||
@@ -144,7 +144,9 @@ static int rtw_debugfs_get_rf_read(struct seq_file *m, void *v) | ||
addr = debugfs_priv->rf_addr; | ||
mask = debugfs_priv->rf_mask; | ||
|
||
+ mutex_lock(&rtwdev->mutex); | ||
val = rtw_read_rf(rtwdev, path, addr, mask); | ||
+ mutex_unlock(&rtwdev->mutex); | ||
|
||
seq_printf(m, "rf_read path:%d addr:0x%08x mask:0x%08x val=0x%08x\n", | ||
path, addr, mask, val); | ||
@@ -418,7 +420,9 @@ static ssize_t rtw_debugfs_set_rf_write(struct file *filp, | ||
return count; | ||
} | ||
|
||
+ mutex_lock(&rtwdev->mutex); | ||
rtw_write_rf(rtwdev, path, addr, mask, val); | ||
+ mutex_unlock(&rtwdev->mutex); | ||
rtw_dbg(rtwdev, RTW_DBG_DEBUGFS, | ||
"write_rf path:%d addr:0x%08x mask:0x%08x, val:0x%08x\n", | ||
path, addr, mask, val); | ||
@@ -523,6 +527,8 @@ static int rtw_debug_get_rf_dump(struct seq_file *m, void *v) | ||
u32 addr, offset, data; | ||
u8 path; | ||
|
||
+ mutex_lock(&rtwdev->mutex); | ||
+ | ||
for (path = 0; path < rtwdev->hal.rf_path_num; path++) { | ||
seq_printf(m, "RF path:%d\n", path); | ||
for (addr = 0; addr < 0x100; addr += 4) { | ||
@@ -537,6 +543,8 @@ static int rtw_debug_get_rf_dump(struct seq_file *m, void *v) | ||
seq_puts(m, "\n"); | ||
} | ||
|
||
+ mutex_unlock(&rtwdev->mutex); | ||
+ | ||
return 0; | ||
} | ||
|
||
@@ -1027,6 +1035,8 @@ static void dump_gapk_status(struct rtw_dev *rtwdev, struct seq_file *m) | ||
dm_info->dm_flags & BIT(RTW_DM_CAP_TXGAPK) ? '-' : '+', | ||
rtw_dm_cap_strs[RTW_DM_CAP_TXGAPK]); | ||
|
||
+ mutex_lock(&rtwdev->mutex); | ||
+ | ||
for (path = 0; path < rtwdev->hal.rf_path_num; path++) { | ||
val = rtw_read_rf(rtwdev, path, RF_GAINTX, RFREG_MASK); | ||
seq_printf(m, "path %d:\n0x%x = 0x%x\n", path, RF_GAINTX, val); | ||
@@ -1036,6 +1046,7 @@ static void dump_gapk_status(struct rtw_dev *rtwdev, struct seq_file *m) | ||
txgapk->rf3f_fs[path][i], i); | ||
seq_puts(m, "\n"); | ||
} | ||
+ mutex_unlock(&rtwdev->mutex); | ||
} | ||
|
||
static int rtw_debugfs_get_dm_cap(struct seq_file *m, void *v) | ||
diff --git a/drivers/net/wireless/realtek/rtw88/hci.h b/drivers/net/wireless/realtek/rtw88/hci.h | ||
index 4c6fc6fb3f83b..830d7532f2a35 100644 | ||
--- a/drivers/net/wireless/realtek/rtw88/hci.h | ||
+++ b/drivers/net/wireless/realtek/rtw88/hci.h | ||
@@ -166,12 +166,11 @@ static inline u32 | ||
rtw_read_rf(struct rtw_dev *rtwdev, enum rtw_rf_path rf_path, | ||
u32 addr, u32 mask) | ||
{ | ||
- unsigned long flags; | ||
u32 val; | ||
|
||
- spin_lock_irqsave(&rtwdev->rf_lock, flags); | ||
+ lockdep_assert_held(&rtwdev->mutex); | ||
+ | ||
val = rtwdev->chip->ops->read_rf(rtwdev, rf_path, addr, mask); | ||
- spin_unlock_irqrestore(&rtwdev->rf_lock, flags); | ||
|
||
return val; | ||
} | ||
@@ -180,11 +179,9 @@ static inline void | ||
rtw_write_rf(struct rtw_dev *rtwdev, enum rtw_rf_path rf_path, | ||
u32 addr, u32 mask, u32 data) | ||
{ | ||
- unsigned long flags; | ||
+ lockdep_assert_held(&rtwdev->mutex); | ||
|
||
- spin_lock_irqsave(&rtwdev->rf_lock, flags); | ||
rtwdev->chip->ops->write_rf(rtwdev, rf_path, addr, mask, data); | ||
- spin_unlock_irqrestore(&rtwdev->rf_lock, flags); | ||
} | ||
|
||
static inline u32 | ||
diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c | ||
index 8b9899e41b0bb..f9864840ffd9c 100644 | ||
--- a/drivers/net/wireless/realtek/rtw88/main.c | ||
+++ b/drivers/net/wireless/realtek/rtw88/main.c | ||
@@ -1994,7 +1994,6 @@ int rtw_core_init(struct rtw_dev *rtwdev) | ||
skb_queue_head_init(&rtwdev->coex.queue); | ||
skb_queue_head_init(&rtwdev->tx_report.queue); | ||
|
||
- spin_lock_init(&rtwdev->rf_lock); | ||
spin_lock_init(&rtwdev->h2c.lock); | ||
spin_lock_init(&rtwdev->txq_lock); | ||
spin_lock_init(&rtwdev->tx_report.q_lock); | ||
diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h | ||
index 17815af9dd4ea..df6c6032bbd3b 100644 | ||
--- a/drivers/net/wireless/realtek/rtw88/main.h | ||
+++ b/drivers/net/wireless/realtek/rtw88/main.h | ||
@@ -1994,9 +1994,6 @@ struct rtw_dev { | ||
/* ensures exclusive access from mac80211 callbacks */ | ||
struct mutex mutex; | ||
|
||
- /* read/write rf register */ | ||
- spinlock_t rf_lock; | ||
- | ||
/* watch dog every 2 sec */ | ||
struct delayed_work watch_dog_work; | ||
u32 watch_dog_cnt; |
97 changes: 97 additions & 0 deletions
97
package/kernel/mac80211/patches/rtl/003-rtw88-Drop-h2c.lock.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c | ||
index ba5ba852efb8c..79939aa6b752c 100644 | ||
--- a/drivers/net/wireless/realtek/rtw88/debug.c | ||
+++ b/drivers/net/wireless/realtek/rtw88/debug.c | ||
@@ -396,7 +396,9 @@ static ssize_t rtw_debugfs_set_h2c(struct file *filp, | ||
return -EINVAL; | ||
} | ||
|
||
+ mutex_lock(&rtwdev->mutex); | ||
rtw_fw_h2c_cmd_dbg(rtwdev, param); | ||
+ mutex_unlock(&rtwdev->mutex); | ||
|
||
return count; | ||
} | ||
diff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c | ||
index aa2aeb5fb2ccd..c3ad2a1b47212 100644 | ||
--- a/drivers/net/wireless/realtek/rtw88/fw.c | ||
+++ b/drivers/net/wireless/realtek/rtw88/fw.c | ||
@@ -320,7 +320,7 @@ static void rtw_fw_send_h2c_command(struct rtw_dev *rtwdev, | ||
h2c[3], h2c[2], h2c[1], h2c[0], | ||
h2c[7], h2c[6], h2c[5], h2c[4]); | ||
|
||
- spin_lock(&rtwdev->h2c.lock); | ||
+ lockdep_assert_held(&rtwdev->mutex); | ||
|
||
box = rtwdev->h2c.last_box_num; | ||
switch (box) { | ||
@@ -342,7 +342,7 @@ static void rtw_fw_send_h2c_command(struct rtw_dev *rtwdev, | ||
break; | ||
default: | ||
WARN(1, "invalid h2c mail box number\n"); | ||
- goto out; | ||
+ return; | ||
} | ||
|
||
ret = read_poll_timeout_atomic(rtw_read8, box_state, | ||
@@ -351,7 +351,7 @@ static void rtw_fw_send_h2c_command(struct rtw_dev *rtwdev, | ||
|
||
if (ret) { | ||
rtw_err(rtwdev, "failed to send h2c command\n"); | ||
- goto out; | ||
+ return; | ||
} | ||
|
||
for (idx = 0; idx < 4; idx++) | ||
@@ -361,9 +361,6 @@ static void rtw_fw_send_h2c_command(struct rtw_dev *rtwdev, | ||
|
||
if (++rtwdev->h2c.last_box_num >= 4) | ||
rtwdev->h2c.last_box_num = 0; | ||
- | ||
-out: | ||
- spin_unlock(&rtwdev->h2c.lock); | ||
} | ||
|
||
void rtw_fw_h2c_cmd_dbg(struct rtw_dev *rtwdev, u8 *h2c) | ||
@@ -375,15 +372,13 @@ static void rtw_fw_send_h2c_packet(struct rtw_dev *rtwdev, u8 *h2c_pkt) | ||
{ | ||
int ret; | ||
|
||
- spin_lock(&rtwdev->h2c.lock); | ||
+ lockdep_assert_held(&rtwdev->mutex); | ||
|
||
FW_OFFLOAD_H2C_SET_SEQ_NUM(h2c_pkt, rtwdev->h2c.seq); | ||
ret = rtw_hci_write_data_h2c(rtwdev, h2c_pkt, H2C_PKT_SIZE); | ||
if (ret) | ||
rtw_err(rtwdev, "failed to send h2c packet\n"); | ||
rtwdev->h2c.seq++; | ||
- | ||
- spin_unlock(&rtwdev->h2c.lock); | ||
} | ||
|
||
void | ||
diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c | ||
index f9864840ffd9c..baf4d29fde678 100644 | ||
--- a/drivers/net/wireless/realtek/rtw88/main.c | ||
+++ b/drivers/net/wireless/realtek/rtw88/main.c | ||
@@ -1994,7 +1994,6 @@ int rtw_core_init(struct rtw_dev *rtwdev) | ||
skb_queue_head_init(&rtwdev->coex.queue); | ||
skb_queue_head_init(&rtwdev->tx_report.queue); | ||
|
||
- spin_lock_init(&rtwdev->h2c.lock); | ||
spin_lock_init(&rtwdev->txq_lock); | ||
spin_lock_init(&rtwdev->tx_report.q_lock); | ||
|
||
diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h | ||
index df6c6032bbd3b..619ee6e8d2807 100644 | ||
--- a/drivers/net/wireless/realtek/rtw88/main.h | ||
+++ b/drivers/net/wireless/realtek/rtw88/main.h | ||
@@ -2018,8 +2018,6 @@ struct rtw_dev { | ||
struct { | ||
/* incicate the mail box to use with fw */ | ||
u8 last_box_num; | ||
- /* protect to send h2c to fw */ | ||
- spinlock_t lock; | ||
u32 seq; | ||
} h2c; | ||
|
Oops, something went wrong.