[rdkb][common][bsp][Refactor and sync kernel from openwrt]
[Description]
b3f7f9ba [Kernel][mt7988][hnat][Fix WAN->1G_LAN HNAT entry bind wrong in MAPE]
4c41dab9 [openwrt][mt7988][tops][fix tops-tool code defects]
38be77f9 [openwrt][common][crypto][revert SDK patch for upgrading openssl]
f50c9553 [kernel][common][app][Fix compile issue for the regs utility]
a857db18 [kernel][mt7986][eth][Fix high CPU utilization issue for the ADMAv1 RSS]
801a635d [kernel][mt7986][eth][Change QDMA queue and scheduler mapping]
225d539c [kernel][common][app][Fix Coverity issue for the regs utility]
e74e1017 [kernel][common][eth][Fix Coverity scan warning]
58668349 [kernel][mt7988][i2.5gphy][net: phy: Fix RTL8156B 100Mbps EEE link down issue by setting lpi_SigEnLoThresh100 to 0]
3b2d84b7 [MAC80211][app][Update smp-mp76.sh 4-RSS scenario for the mt7986]
a02c3e6d [openwrt][mt7988][tops][Fix L2TP/IPSec deadlock and check if TOPS HW exists]
f7b55488 [openwrt][common][eth][Add a Airoha EN8811H 2.5G PHY driver package]
8528fc00 [MAC80211][misc][Refactor wed/flowblock/mtk_ppe patches]
6cf5e8ef [MAC80211][hnat][Fix patch fail issue]
93fbba83 [openwrt][mt7988][pce][fix uninitialized variable]
750cc50b [kernel][mt7986/mt7981][eth][Add Ethernet RSS support for Panther and Cheetah]
55eeab91 [MAC80211][wed][change wed hw tx token to 8K]
9c12f44d [kernel][mt7988][eth][Add SFP support based on the DSA-10G DTS]
[Release-log]
Change-Id: Ie1ec2d751f84596c68eff9ca1d983bfb61129823
diff --git a/recipes-devtools/regs/files/src/regs.c b/recipes-devtools/regs/files/src/regs.c
index 2e54c1d..8e85074 100644
--- a/recipes-devtools/regs/files/src/regs.c
+++ b/recipes-devtools/regs/files/src/regs.c
@@ -68,7 +68,7 @@
(start_bit + data_len > 32)) {
fprintf(stderr,
"Startbit range[0~31], and DataLen range[1~32], and Startbit + DataLen <= 32\n");
- return;
+ exit(1);
}
for (i = 0; i < data_len; i++) {
@@ -107,7 +107,7 @@
(start_bit + data_len > 32)) {
fprintf(stderr,
"Startbit range[0~31], and DataLen range[1~32], and Startbit + DataLen <= 32\n");
- return;
+ exit(1);
}
for (i = 0; i < data_len; i++) {
@@ -150,6 +150,7 @@
"\tRead : regs r 0x1b100000 29 3 //read 0x1b100000[29:31]\n"
"\tWrite : regs w 0x1b100000 0x1234 //write 0x1b100000=0x1234\n"
"\tModify : regs m 0x1b100000 0x0 29 3 //modify 0x1b100000[29:31]=0\n");
+ exit(1);
}
int main(int argc, char **argv)
@@ -182,7 +183,11 @@
/* Map one page */
offset = strtoul(argv[2], NULL, 16);
- map_base = mmap(0, 2*MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, offset & ~MAP_MASK);
+ if (offset > 0xFFFFFFFFFFFFUL)
+ PRINT_ERROR;
+
+ map_base = mmap(0, 2 * MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED,
+ fd, offset & ~MAP_MASK);
if(map_base == (void *) -1)
PRINT_ERROR;
@@ -194,12 +199,20 @@
switch(access_type) {
case 'm':
writeval = strtoul(argv[3], 0, 16);
+ if (writeval > 0xFFFFFFFFUL)
+ PRINT_ERROR;
startbit = strtoul(argv[4], 0, 10);
+ if (startbit > 32)
+ PRINT_ERROR;
datalen = strtoul(argv[5], 0, 10);
+ if (datalen > 32)
+ PRINT_ERROR;
reg_mod_bits((uint32_t *)virt_addr, writeval, startbit, datalen);
break;
case 'w':
writeval = strtoul(argv[3], 0, 16);
+ if (writeval > 0xFFFFFFFFUL)
+ PRINT_ERROR;
*((uint32_t *) virt_addr) = writeval;
printf("Written 0x%X; ", writeval);
break;
@@ -215,7 +228,11 @@
0, 32);
else {
startbit = strtoul(argv[3], 0, 10);
- datalen = strtoul(argv[4], 0, 10);
+ if (startbit > 32)
+ PRINT_ERROR;
+ datalen = strtoul(argv[4], 0, 10);
+ if (datalen > 32)
+ PRINT_ERROR;
reg_read_bits((uint32_t *)virt_addr,
(uint32_t *)map_base,
(uint32_t *)(offset & ~MAP_MASK),
@@ -223,7 +240,7 @@
}
goto out;
default:
- fprintf(stderr, "Illegal data type '%c'.\n", access_type);
+ printf("Illegal data type '%c'.\n", access_type);
goto out;
}
diff --git a/recipes-devtools/smp/files/smp-mt76.sh b/recipes-devtools/smp/files/smp-mt76.sh
index 709e228..f383cf6 100644
--- a/recipes-devtools/smp/files/smp-mt76.sh
+++ b/recipes-devtools/smp/files/smp-mt76.sh
@@ -168,7 +168,11 @@
DEFAULT_RPS=0
#Physical IRQ# setting
- eth_irq_rx=221
+ #Ethernet RSS feature enables 4 Rx rings
+ eth_irq_rx0=221
+ eth_irq_rx1=222
+ eth_irq_rx2=223
+ eth_irq_rx3=224
eth_irq_tx=229
wifi1_irq=
wifi2_irq=
@@ -217,36 +221,35 @@
for vif in $NET_IF_LIST;
do
- if [[ "$vif" == "lan"* ]] || \
- [[ "$vif" == "wlan"* ]] || [[ "$vif" == "phy"* ]]; then
- LAN_IF_LIST="$LAN_IF_LIST $vif"
+ if [[ "$vif" == "wlan"* ]] || [[ "$vif" == "phy"* ]]; then
+ WIFI_IF_LIST="$WIFI_IF_LIST $vif"
fi
done;
- dbg2 "$LAN_IF_LIST = $LAN_IF_LIST"
+ dbg2 "$WIFI_IF_LIST = $WIFI_IF_LIST"
# Please update the CPU binding in each cases.
# CPU#_AFFINITY="add binding irq number here"
# CPU#_RPS="add binding interface name here"
if [ "$num_of_wifi" = "0" ]; then
- CPU0_AFFINITY="$eth_irq_rx"
- CPU1_AFFINITY="$eth_irq_tx"
- CPU2_AFFINITY=""
- CPU3_AFFINITY=""
+ CPU0_AFFINITY="$eth_irq_rx0"
+ CPU1_AFFINITY="$eth_irq_rx1 $eth_irq_tx"
+ CPU2_AFFINITY="$eth_irq_rx2"
+ CPU3_AFFINITY="$eth_irq_rx3"
- CPU0_RPS="$RPS_IF_LIST"
- CPU1_RPS="$RPS_IF_LIST"
- CPU2_RPS="$RPS_IF_LIST"
- CPU3_RPS="$RPS_IF_LIST"
+ CPU0_RPS=""
+ CPU1_RPS=""
+ CPU2_RPS=""
+ CPU3_RPS=""
else
#we bound all wifi card to cpu1 and bound eth to cpu0
- CPU0_AFFINITY="$eth_irq_rx"
- CPU1_AFFINITY="$eth_irq_tx"
- CPU2_AFFINITY="$wifi2_irq $wifi3_irq"
- CPU3_AFFINITY="$wifi1_irq"
+ CPU0_AFFINITY="$eth_irq_rx0"
+ CPU1_AFFINITY="$eth_irq_rx1 $eth_irq_tx"
+ CPU2_AFFINITY="$eth_irq_rx2 $wifi2_irq $wifi3_irq"
+ CPU3_AFFINITY="$eth_irq_rx3 $wifi1_irq"
- CPU0_RPS="$LAN_IF_LIST"
- CPU1_RPS="$LAN_IF_LIST"
- CPU2_RPS="$RPS_IF_LIST"
- CPU3_RPS="$RPS_IF_LIST"
+ CPU0_RPS="$WIFI_IF_LIST"
+ CPU1_RPS="$WIFI_IF_LIST"
+ CPU2_RPS="$WIFI_IF_LIST"
+ CPU3_RPS="$WIFI_IF_LIST"
fi
dbg2 "CPU0_AFFINITY = $CPU0_AFFINITY"
dbg2 "CPU1_AFFINITY = $CPU1_AFFINITY"