Skip to content

Commit 0f8dcda

Browse files
committed
Merge remote-tracking branch 'other/main'
2 parents dccce6d + 8e78bc3 commit 0f8dcda

File tree

57 files changed

+7197
-327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+7197
-327
lines changed

include/image-commands.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,14 @@ endef
438438

439439
define Build/jffs2
440440
rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 && \
441-
mkdir -p $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$$(dirname $(1)) && \
442-
cp $@ $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$(1) && \
441+
mkdir -p $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$$(dirname $(word 1,$(1))) && \
442+
cp $@ $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$(word 1,$(1)) && \
443443
$(STAGING_DIR_HOST)/bin/mkfs.jffs2 --pad \
444444
$(if $(CONFIG_BIG_ENDIAN),--big-endian,--little-endian) \
445445
--squash-uids -v -e $(patsubst %k,%KiB,$(BLOCKSIZE)) \
446446
-o $@.new \
447447
-d $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 \
448+
$(wordlist 2,$(words $(1)),$(1)) \
448449
2>&1 1>/dev/null | awk '/^.+$$$$/' && \
449450
$(STAGING_DIR_HOST)/bin/padjffs2 $@.new -J $(patsubst %k,,$(BLOCKSIZE))
450451
-rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/

include/kernel-6.6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-6.6 = .72
2-
LINUX_KERNEL_HASH-6.6.72 = feb9e514930d5968daa0b8b5486d3295d1fb2b34accf876207641884d4baef39
1+
LINUX_VERSION-6.6 = .73
2+
LINUX_KERNEL_HASH-6.6.73 = d2028db190c201650898be8db1c705e9fe73ab44fc04290b4f7af63514122490

package/kernel/lantiq/vrx518_tc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
1010

1111
PKG_NAME:=vrx518_tc
1212
PKG_VERSION:=1.5.12.4
13-
PKG_RELEASE:=3
13+
PKG_RELEASE:=4
1414
PKG_BASE_NAME:=vrx518_tc_drv
1515

1616
UGW_VERSION=8.5.2.10

package/kernel/lantiq/vrx518_tc/patches/100-compat.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166

167167
- return (skb->DW0 >> 3) & 0xF;
168168
+// return (skb->DW0 >> 3) & 0xF;
169-
+ return 1;
169+
+ return 0; /* We use only one connection for now, so return the first connection id */
170170
}
171171

172172
static int atm_get_qid_by_vcc(struct net_device *dev, struct sk_buff *skb,
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
Extra ATM traffic classes requires atm_qos struct extension and a set of
2+
new defines. What itself requires atm.h updates both in the kernel and
3+
in the toolchain. On another hand we do not have any real users of these
4+
traffic classes.
5+
6+
In absence of real user there are no benefits to support this
7+
functionality. There is only the burden of maintenance of extra patches
8+
all around the building framework. So just drop these extra QoS traffic
9+
classes in order to facilitate maintenance and avoid side effects like
10+
breaking compatibility with existing userspace tools like linux-atm.
11+
12+
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
13+
--
14+
--- a/dcdp/atm_tc.c
15+
+++ b/dcdp/atm_tc.c
16+
@@ -463,34 +463,9 @@ static void set_qsb(struct atm_priv *pri
17+
/* Weighted Fair Queueing Factor (WFQF) */
18+
switch (qos->txtp.traffic_class) {
19+
case ATM_CBR:
20+
- case ATM_VBR_RT:
21+
/* real time queue gets weighted fair queueing bypass */
22+
q_parm_tbl.bit.wfqf = 0;
23+
break;
24+
- case ATM_VBR_NRT:
25+
- case ATM_UBR_PLUS:
26+
- /* WFQF calculation here is based on virtual cell rates,
27+
- to reduce granularity for high rates
28+
- */
29+
- /* WFQF is maximum cell rate / garenteed cell rate */
30+
- /* wfqf = qsb_minimum_cell_rate * QSB_WFQ_NONUBR_MAX /
31+
- requested_minimum_peak_cell_rate
32+
- */
33+
- if (qos->txtp.min_pcr == 0)
34+
- q_parm_tbl.bit.wfqf = QSB_WFQ_NONUBR_MAX;
35+
- else {
36+
- tmp = QSB_GCR_MIN * QSB_WFQ_NONUBR_MAX /
37+
- qos->txtp.min_pcr;
38+
- if (tmp == 0)
39+
- q_parm_tbl.bit.wfqf = 1;
40+
- else if (tmp > QSB_WFQ_NONUBR_MAX)
41+
- q_parm_tbl.bit.wfqf
42+
- = QSB_WFQ_NONUBR_MAX;
43+
- else
44+
- q_parm_tbl.bit.wfqf = tmp;
45+
- }
46+
- break;
47+
-
48+
case ATM_UBR:
49+
default:
50+
q_parm_tbl.bit.wfqf = QSB_WFQ_UBR_BYPASS;
51+
@@ -498,42 +473,9 @@ static void set_qsb(struct atm_priv *pri
52+
}
53+
54+
/* Sustained Cell Rate (SCR) Leaky Bucket Shaper VBR.0/VBR.1 */
55+
- if (qos->txtp.traffic_class == ATM_VBR_RT ||
56+
- qos->txtp.traffic_class == ATM_VBR_NRT) {
57+
- if (qos->txtp.scr == 0) {
58+
- /* disable shaper */
59+
- q_vbr_parm_tbl.bit.taus = 0;
60+
- q_vbr_parm_tbl.bit.ts = 0;
61+
- } else {
62+
- /* Cell Loss Priority (CLP) */
63+
- if ((vcc->atm_options & ATM_ATMOPT_CLP))
64+
- /* CLP1 */
65+
- q_parm_tbl.bit.vbr = 1;
66+
- else
67+
- /* CLP0 */
68+
- q_parm_tbl.bit.vbr = 0;
69+
- /* Rate Shaper Parameter (TS) and
70+
- Burst Tolerance Parameter for SCR (tauS)
71+
- */
72+
- tmp = ((qsb_clk * param->qsb_tstep) >> 5) /
73+
- qos->txtp.scr + 1;
74+
- q_vbr_parm_tbl.bit.ts
75+
- = tmp > QSB_TP_TS_MAX ? QSB_TP_TS_MAX : tmp;
76+
- tmp = (qos->txtp.mbs - 1) *
77+
- (q_vbr_parm_tbl.bit.ts -
78+
- q_parm_tbl.bit.tp) / 64;
79+
- if (tmp == 0)
80+
- q_vbr_parm_tbl.bit.taus = 1;
81+
- else if (tmp > QSB_TAUS_MAX)
82+
- q_vbr_parm_tbl.bit.taus
83+
- = QSB_TAUS_MAX;
84+
- else
85+
- q_vbr_parm_tbl.bit.taus = tmp;
86+
- }
87+
- } else {
88+
- q_vbr_parm_tbl.bit.taus = 0;
89+
- q_vbr_parm_tbl.bit.ts = 0;
90+
- }
91+
+ /* NB: shaper disabled since there no user interface to activate it */
92+
+ q_vbr_parm_tbl.bit.taus = 0;
93+
+ q_vbr_parm_tbl.bit.ts = 0;
94+
95+
/* Queue Parameter Table (QPT) */
96+
tc_w32(QSB_QPT_SET_MASK, QSB_RTM);
97+
@@ -1064,15 +1006,6 @@ static int ppe_open(struct atm_vcc *vcc)
98+
/* check bandwidth */
99+
if ((vcc->qos.txtp.traffic_class == ATM_CBR &&
100+
vcc->qos.txtp.max_pcr >
101+
- (port->tx_max_cell_rate - port->tx_used_cell_rate))
102+
- || (vcc->qos.txtp.traffic_class == ATM_VBR_RT &&
103+
- vcc->qos.txtp.max_pcr >
104+
- (port->tx_max_cell_rate - port->tx_used_cell_rate))
105+
- || (vcc->qos.txtp.traffic_class == ATM_VBR_NRT &&
106+
- vcc->qos.txtp.scr >
107+
- (port->tx_max_cell_rate - port->tx_used_cell_rate))
108+
- || (vcc->qos.txtp.traffic_class == ATM_UBR_PLUS &&
109+
- vcc->qos.txtp.min_pcr >
110+
(port->tx_max_cell_rate - port->tx_used_cell_rate))) {
111+
tc_dbg(priv->tc_priv, MSG_INIT, "exceed TX line rate\n");
112+
return -EINVAL;
113+
@@ -1128,15 +1061,8 @@ static int ppe_open(struct atm_vcc *vcc)
114+
/* reserve bandwidth */
115+
switch (vcc->qos.txtp.traffic_class) {
116+
case ATM_CBR:
117+
- case ATM_VBR_RT:
118+
port->tx_used_cell_rate += vcc->qos.txtp.max_pcr;
119+
break;
120+
- case ATM_VBR_NRT:
121+
- port->tx_used_cell_rate += vcc->qos.txtp.scr;
122+
- break;
123+
- case ATM_UBR_PLUS:
124+
- port->tx_used_cell_rate += vcc->qos.txtp.min_pcr;
125+
- break;
126+
}
127+
128+
/* update atm_vcc structure */
129+
@@ -1222,15 +1148,8 @@ static void ppe_close(struct atm_vcc *vc
130+
/* release bandwidth */
131+
switch (vcc->qos.txtp.traffic_class) {
132+
case ATM_CBR:
133+
- case ATM_VBR_RT:
134+
port->tx_used_cell_rate -= vcc->qos.txtp.max_pcr;
135+
break;
136+
- case ATM_VBR_NRT:
137+
- port->tx_used_cell_rate -= vcc->qos.txtp.scr;
138+
- break;
139+
- case ATM_UBR_PLUS:
140+
- port->tx_used_cell_rate -= vcc->qos.txtp.min_pcr;
141+
- break;
142+
}
143+
144+
/* idle for a while to let parallel operation finish */

package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This replaces it by a basic working implementation.
33

44
--- a/dcdp/atm_tc.c
55
+++ b/dcdp/atm_tc.c
6-
@@ -603,7 +603,11 @@ static void atm_aca_init(struct atm_priv
6+
@@ -545,7 +545,11 @@ static void atm_aca_init(struct atm_priv
77
cfg = &priv->tc_priv->cfg;
88

99
txin = &param.aca_txin;
@@ -15,7 +15,7 @@ This replaces it by a basic working implementation.
1515
txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz;
1616
txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE);
1717
txin->pd_desc_num = __ACA_TX_IN_PD_LIST_NUM;
18-
@@ -625,7 +629,11 @@ static void atm_aca_init(struct atm_priv
18+
@@ -567,7 +571,11 @@ static void atm_aca_init(struct atm_priv
1919
txin->soc_cmlt_cnt_addr);
2020

2121
txout = &param.aca_txout;
@@ -27,7 +27,7 @@ This replaces it by a basic working implementation.
2727
txout->hd_size_in_dw = cfg->txout.soc_desc_dwsz;
2828
txout->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_OUT_PD_LIST_BASE);
2929
txout->pd_desc_num = __ACA_TX_OUT_PD_LIST_NUM;
30-
@@ -647,7 +655,11 @@ static void atm_aca_init(struct atm_priv
30+
@@ -589,7 +597,11 @@ static void atm_aca_init(struct atm_priv
3131
txout->soc_cmlt_cnt_addr);
3232

3333
rxout = &param.aca_rxout;
@@ -39,7 +39,7 @@ This replaces it by a basic working implementation.
3939
rxout->hd_size_in_dw = cfg->rxout.soc_desc_dwsz;
4040
rxout->pd_desc_base = SB_XBAR_ADDR(__ACA_RX_OUT_PD_LIST_BASE);
4141
rxout->pd_desc_num = __ACA_RX_OUT_PD_LIST_NUM;
42-
@@ -669,7 +681,11 @@ static void atm_aca_init(struct atm_priv
42+
@@ -611,7 +623,11 @@ static void atm_aca_init(struct atm_priv
4343
rxout->soc_cmlt_cnt_addr);
4444

4545
rxin = &param.aca_rxin;
@@ -51,7 +51,7 @@ This replaces it by a basic working implementation.
5151
rxin->hd_size_in_dw = cfg->rxin.soc_desc_dwsz;
5252
rxin->pd_desc_base = SB_XBAR_ADDR(__RX_IN_PD_DES_LIST_BASE);
5353
rxin->pd_desc_num = __ACA_RX_IN_PD_LIST_NUM;
54-
@@ -1261,7 +1277,7 @@ static int ppe_ioctl(struct atm_dev *dev
54+
@@ -1180,7 +1196,7 @@ static int ppe_ioctl(struct atm_dev *dev
5555
static int ppe_send(struct atm_vcc *vcc, struct sk_buff *skb)
5656
{
5757
int ret, qid, mpoa_pt, mpoa_type, vid;
@@ -60,7 +60,7 @@ This replaces it by a basic working implementation.
6060
struct atm_priv *priv;
6161

6262
if (!vcc) {
63-
@@ -1327,12 +1343,14 @@ static int ppe_send(struct atm_vcc *vcc,
63+
@@ -1246,12 +1262,14 @@ static int ppe_send(struct atm_vcc *vcc,
6464
tc_dbg(priv->tc_priv, MSG_TX, "vid: 0x%x, qid: 0x%x\n",
6565
vid, qid);
6666

@@ -855,12 +855,12 @@ This replaces it by a basic working implementation.
855855
- continue;
856856
+
857857
+ // this seems to be a pointer to a DS PKT buffer
858-
+ phyaddr = desc->data_ptr + desc->byte_off;
858+
+ phyaddr = desc->data_ptr;
859859
+ ptr = plat_mem_virt(phyaddr);
860-
+
861860
+ len = desc->data_len;
862861
+
863-
+ dma_sync_single_range_for_cpu(pdev, phyaddr, 0, len, DMA_FROM_DEVICE);
862+
+ dma_sync_single_for_cpu(pdev, phyaddr, desc->byte_off + len,
863+
+ DMA_FROM_DEVICE);
864864
+
865865
+ skb = netdev_alloc_skb(g_plat_priv->netdev, len);
866866
+ if (unlikely(!skb)) {
@@ -871,7 +871,7 @@ This replaces it by a basic working implementation.
871871
- ring_idx_inc(rxout, idx);
872872
+
873873
+ dst = skb_put(skb, len);
874-
+ memcpy(dst, ptr, len);
874+
+ memcpy(dst, ptr + desc->byte_off, len);
875875
+
876876
+ priv->tc_ops.recv(g_plat_priv->netdev, skb);
877877
+

package/kernel/lantiq/vrx518_tc/patches/202-napi.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@
296296
priv->tc_ops.umt_start = plat_umt_start;
297297
--- a/dcdp/atm_tc.c
298298
+++ b/dcdp/atm_tc.c
299-
@@ -3650,7 +3650,7 @@ static void atm_aca_ring_config_init(str
299+
@@ -3569,7 +3569,7 @@ static void atm_aca_ring_config_init(str
300300
static int atm_ring_init(struct atm_priv *priv)
301301
{
302302
atm_aca_ring_config_init(priv);
@@ -305,7 +305,7 @@
305305
}
306306

307307
static int atm_init(struct tc_priv *tcpriv, u32 ep_id)
308-
@@ -4020,7 +4020,7 @@ void atm_tc_unload(void)
308+
@@ -3939,7 +3939,7 @@ void atm_tc_unload(void)
309309
/* unregister device */
310310
if (priv->tc_priv->tc_ops.dev_unreg != NULL)
311311
priv->tc_priv->tc_ops.dev_unreg(NULL,

package/kernel/lantiq/vrx518_tc/patches/204-dcdp-atm_tc-fix-compilation-warning.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/dcdp/atm_tc.c
22
+++ b/dcdp/atm_tc.c
3-
@@ -746,7 +746,8 @@ static void atm_aca_init(struct atm_priv
3+
@@ -688,7 +688,8 @@ static void atm_aca_init(struct atm_priv
44
ACA_TXOUT_EN | ACA_RXIN_EN | ACA_RXOUT_EN, 1);
55
}
66

@@ -10,7 +10,7 @@
1010
{
1111
struct tm nowtm;
1212
char tmbuf[64];
13-
@@ -765,7 +766,8 @@ static int print_datetime(char *buffer,
13+
@@ -707,7 +708,8 @@ static int print_datetime(char *buffer,
1414
nowtm.tm_hour,
1515
nowtm.tm_min,
1616
nowtm.tm_sec);
@@ -20,7 +20,7 @@
2020

2121
return 0;
2222
}
23-
@@ -967,7 +969,7 @@ void show_atm_pvc(struct seq_file *seq,
23+
@@ -909,7 +911,7 @@ void show_atm_pvc(struct seq_file *seq,
2424
char buf[64];
2525

2626
seq_printf(seq, "\tNet device: %s\n", pvc->dev->name);
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
From: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2+
Date: Fri, 10 Jan 2025 00:57:27 +0000
3+
Subject: [PATCH] vrx518_tc: atm_tc: fix crash on subif_reg absence
4+
5+
VRX518 (sw_plat) platform does not provid the subif_reg/subif_unreg ops
6+
in the same time ATM TC layer unconditionally calls them, what leads to
7+
the kernel crash on the atm_hook_mpoa_setup hook invocation from the ATM
8+
stack:
9+
10+
vrx518_tc:mpoa_setup_sync : sync: conn: 0, vpi: 0, vci: 35, mpoa_type: 0, mpoa_mode: 0
11+
Unable to handle kernel NULL pointer dereference at virtual address 00000000
12+
13+
Subif registration is optional and PTM TC do this only when the
14+
corresponding ops are defined. Do the same for ATM TC and call
15+
subif_reg/subif_unreg only if they are not NULL.
16+
17+
While at it, move subif related data preparation under the 'if' block
18+
in order to group and isolate that aux code.
19+
20+
Run tested with FRITZ!Box 7530.
21+
22+
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
23+
---
24+
--- a/dcdp/atm_tc.c
25+
+++ b/dcdp/atm_tc.c
26+
@@ -1158,8 +1158,9 @@ static void ppe_close(struct atm_vcc *vc
27+
validate_oam_htu_entry(priv, 0);
28+
spin_unlock_bh(&priv->atm_lock);
29+
30+
- priv->tc_priv->tc_ops.subif_unreg(dev, (!dev) ? dev_name : dev->name,
31+
- priv->conn[cid].subif_id, 0);
32+
+ if (priv->tc_priv->tc_ops.subif_unreg)
33+
+ priv->tc_priv->tc_ops.subif_unreg(dev, (!dev) ? dev_name : dev->name,
34+
+ priv->conn[cid].subif_id, 0);
35+
36+
memset(conn, 0, sizeof(*conn));
37+
38+
@@ -2710,24 +2711,26 @@ static void mpoa_setup_sync(struct atm_p
39+
struct wtx_queue_config_t tx_qcfg;
40+
struct uni_cell_header *cell_header;
41+
struct atm_vcc *vcc;
42+
- struct net_device *dev;
43+
- char dev_name[32];
44+
45+
tc_dbg(priv->tc_priv, MSG_INIT,
46+
"sync: conn: %d, vpi: %d, vci: %d, mpoa_type: %d, mpoa_mode: %d\n",
47+
conn, priv->conn[conn].vcc->vpi, priv->conn[conn].vcc->vci,
48+
priv->conn[conn].mpoa_type, priv->conn[conn].mpoa_mode);
49+
50+
- dev = priv->conn[conn].dev;
51+
+ if (priv->tc_priv->tc_ops.subif_reg) {
52+
+ struct net_device *dev;
53+
+ char dev_name[32];
54+
+
55+
+ dev = priv->conn[conn].dev;
56+
+ if (!dev)
57+
+ sprintf(dev_name, "atm_%d%d",
58+
+ priv->conn[conn].vcc->vpi, priv->conn[conn].vcc->vci);
59+
60+
- if (!dev)
61+
- sprintf(dev_name, "atm_%d%d",
62+
- priv->conn[conn].vcc->vpi, priv->conn[conn].vcc->vci);
63+
-
64+
- priv->tc_priv->tc_ops.subif_reg(dev, (!dev) ? dev_name : dev->name,
65+
- &priv->conn[conn].subif_id, 0);
66+
- tc_dbg(priv->tc_priv, MSG_INIT,
67+
- "conn[%d]subif_id[%x]", conn, priv->conn[conn].subif_id);
68+
+ priv->tc_priv->tc_ops.subif_reg(dev, !dev ? dev_name : dev->name,
69+
+ &priv->conn[conn].subif_id, 0);
70+
+ tc_dbg(priv->tc_priv, MSG_INIT,
71+
+ "conn[%d]subif_id[%x]", conn, priv->conn[conn].subif_id);
72+
+ }
73+
vcc = priv->conn[conn].vcc;
74+
75+
/* set htu entry */

package/kernel/mt76/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
88

99
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
1010
PKG_SOURCE_PROTO:=git
11-
PKG_SOURCE_DATE:=2025-01-14
12-
PKG_SOURCE_VERSION:=8e4f72b682e9070108536507c5e2720b18c3816d
13-
PKG_MIRROR_HASH:=fa8c5a2ece9e7287605910d9f906b601711c7863613addaadd666f9e3858a9e7
11+
PKG_SOURCE_DATE:=2025-01-22
12+
PKG_SOURCE_VERSION:=a22d59e4ad50c89326342a0736cd2c1ba32e8a0b
13+
PKG_MIRROR_HASH:=e8bbbada2171ea31a6788e3e46e81c409a9fe038eefe4b41f541da848a1b1bcd
1414

1515
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
1616
PKG_USE_NINJA:=0

0 commit comments

Comments
 (0)