mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 17:48:58 +00:00
23de93a521
The current one only looks for mt76x2e and mt7603e, and does not work for 2 or more same Wi-Fi chips. Refactor the script to cover those cases. Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
20 lines
345 B
Bash
Executable File
20 lines
345 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
|
|
START=99
|
|
|
|
start() {
|
|
if grep -q 'processor.*: 2' /proc/cpuinfo; then
|
|
mask=4
|
|
elif grep -q 'processor.*: 1' /proc/cpuinfo; then
|
|
mask=2
|
|
else
|
|
return
|
|
fi
|
|
|
|
for irq in $(grep "mt76..e" /proc/interrupts | cut -d: -f1 | sed 's, *,,')
|
|
do
|
|
echo "$mask" > "/proc/irq/$irq/smp_affinity"
|
|
[ $mask = 4 ] && mask=8
|
|
done
|
|
}
|