mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 09:32:34 +00:00
Compare commits
110 Commits
v2.10.0-rc
...
v2.11.0-rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb6e95f760 | ||
|
|
f04eb1d604 | ||
|
|
cc1512e42a | ||
|
|
88d6633c85 | ||
|
|
1773435a2c | ||
|
|
cf12abc92e | ||
|
|
d8c4b1f0e2 | ||
|
|
45cbd5d93a | ||
|
|
2646db0826 | ||
|
|
0289ea7293 | ||
|
|
c02c293651 | ||
|
|
e6786115cc | ||
|
|
89b9596e27 | ||
|
|
23cd3b3e99 | ||
|
|
5a8cf73137 | ||
|
|
79dfb1e861 | ||
|
|
4eb30ba080 | ||
|
|
1829c9c96f | ||
|
|
fa2424750b | ||
|
|
441cb82d32 | ||
|
|
c34d346b57 | ||
|
|
f7a766be20 | ||
|
|
54e8411980 | ||
|
|
09ebd5f406 | ||
|
|
44aef94d82 | ||
|
|
aeac214236 | ||
|
|
81f8a368d1 | ||
|
|
cde9d148b8 | ||
|
|
b1bf054d74 | ||
|
|
18100e0b4e | ||
|
|
42f0c520da | ||
|
|
fbee159481 | ||
|
|
ca4a4365d6 | ||
|
|
54ffbadc2d | ||
|
|
a4cd9cb03b | ||
|
|
f3406891b2 | ||
|
|
6f7c5995ad | ||
|
|
8046c336c3 | ||
|
|
c39f92eea7 | ||
|
|
37d1da8b01 | ||
|
|
6f65229d66 | ||
|
|
7bf62b76bd | ||
|
|
693e147cd9 | ||
|
|
eab2445d14 | ||
|
|
5c53054de9 | ||
|
|
1866ffcccc | ||
|
|
5c7fe1a0fa | ||
|
|
672578af01 | ||
|
|
9c27a4b878 | ||
|
|
4cf4a5152e | ||
|
|
7daf37be9e | ||
|
|
7975de1101 | ||
|
|
2d1bbeedd9 | ||
|
|
e0fc96b950 | ||
|
|
835909f3cc | ||
|
|
e02d9261df | ||
|
|
2f7a1e5952 | ||
|
|
0ad0aa8255 | ||
|
|
4db35c127b | ||
|
|
f6ae95da15 | ||
|
|
daec2bef52 | ||
|
|
4e5e483743 | ||
|
|
ea1cb7a4a6 | ||
|
|
ce33b86c6f | ||
|
|
8e0e4d81d8 | ||
|
|
74616bda9a | ||
|
|
47afa20ff1 | ||
|
|
b4c68157c8 | ||
|
|
5dd721b206 | ||
|
|
9ef59ba079 | ||
|
|
fafb5cbffd | ||
|
|
dca6ea517f | ||
|
|
43436e4726 | ||
|
|
18c6087d56 | ||
|
|
a5eaccb29a | ||
|
|
ee090f6230 | ||
|
|
5b397d54ce | ||
|
|
323dc65770 | ||
|
|
bccdb175b0 | ||
|
|
92f59a3f22 | ||
|
|
ccdca73cd6 | ||
|
|
3fde7d88fb | ||
|
|
79dcd8a900 | ||
|
|
3d851f6343 | ||
|
|
ed3142aa10 | ||
|
|
5d0a5e377e | ||
|
|
439c386506 | ||
|
|
1371a9d3d8 | ||
|
|
52f6189c10 | ||
|
|
cf63cb94aa | ||
|
|
94a442abcf | ||
|
|
6cf990f142 | ||
|
|
8422d572e7 | ||
|
|
659e7c52ba | ||
|
|
2536cfdc9e | ||
|
|
e9b64b0dfd | ||
|
|
b4ed6a8367 | ||
|
|
5362455444 | ||
|
|
eff55cc055 | ||
|
|
295a81450b | ||
|
|
ad48758229 | ||
|
|
0f5302044d | ||
|
|
398e17a583 | ||
|
|
b303909c83 | ||
|
|
d7c88de1a7 | ||
|
|
c144aeed12 | ||
|
|
b3d791b34e | ||
|
|
9b77f6ed22 | ||
|
|
7eb5d45bb8 | ||
|
|
8b64db3c7a |
2
.github/workflows/build-dev.yml
vendored
2
.github/workflows/build-dev.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target: ['actiontec_web7200', 'cig_wf186w', 'cig_wf188n', 'cig_wf194c4', 'cig_wf196-us', 'cig_wf196-ca', 'cig_wf196-ca-ath12', 'cig_wf610d', 'cig_wf660a', 'cig_wf660a', 'cig_wf808', 'cybertan_eww622-a1', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'edgecore_eap101', 'edgecore_eap101-ath12', 'edgecore_eap102', 'edgecore_eap104', 'edgecore_eap104-ath12', 'liteon_wpx8324', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_oap101_6e', 'edgecore_oap101e', 'edgecore_ssw2ac2600', 'edgecore_spw2ac1200', 'edgecore_spw2ac1200-lan-poe', 'hfcl_ion4','hfcl_ion4xi_wp', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'indio_um-305ac', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'indio_um-310ax-v1', 'indio_um-510axp-v1', 'indio_um-510axm-v1', 'linksys_ea6350-v4', 'linksys_e8450-ubi', 'linksys_ea8300', 'meshpp_s618_cp03', 'meshpp_s618_cp01', 'udaya_a5-id2', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018_v4', 'x64_vm', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ]
|
||||
target: [ 'cig_wf186w', 'cig_wf188n-ca', 'cig_wf188n-ca-ath12', 'cig_wf188n-us', 'cig_wf196-us', 'cig_wf196-ca', 'cig_wf196-ca-ath12', 'cig_wf610d', 'cig_wf660a', 'cig_wf808', 'cybertan_eww622-a1', 'cybertan_eww631-a1', 'cybertan_eww631-b1', 'edgecore_eap101', 'edgecore_eap101-ath12', 'edgecore_eap102', 'edgecore_eap102-ath12', 'edgecore_eap104', 'edgecore_eap104-ath12', 'liteon_wpx8324', 'edgecore_ecs4100-12ph', 'edgecore_ecw5211', 'edgecore_ecw5410', 'edgecore_oap100', 'edgecore_oap101-6e', 'edgecore_oap101e', 'hfcl_ion4','hfcl_ion4xi_wp', 'hfcl_ion4xe', 'hfcl_ion4xi', 'hfcl_ion4x', 'hfcl_ion4x_2', 'hfcl_ion4xi_w', 'hfcl_ion4xi_HMR', 'hfcl_ion4x_w', 'indio_um-305ac', 'indio_um-305ax', 'indio_um-325ac', 'indio_um-510ac-v3', 'indio_um-550ac', 'indio_um-310ax-v1', 'indio_um-510axp-v1', 'indio_um-510axm-v1', 'udaya_a5-id2', 'wallys_dr40x9', 'wallys_dr6018', 'wallys_dr6018_v4', 'x64_vm', 'yuncore_ax840', 'yuncore_fap640', 'yuncore_fap650', 'yuncore_fap655' ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
2
.github/workflows/x64_vm-build-test.yml
vendored
2
.github/workflows/x64_vm-build-test.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
run: |
|
||||
git config --global user.email "you@example.com"
|
||||
git config --global user.name "Your Name"
|
||||
make -j TARGET=${{ matrix.target }}
|
||||
make -j TARGET=${{ matrix.target }} make -j TARGET=${{ matrix.target }}
|
||||
|
||||
- name: Package and upload image for ${{ matrix.target }}
|
||||
id: package_and_upload_image
|
||||
|
||||
@@ -43,6 +43,9 @@ hfcl,ion4xi|\
|
||||
hfcl,ion4xi_wp|\
|
||||
hfcl,ion4x|\
|
||||
hfcl,ion4x_2|\
|
||||
hfcl,ion4xi_w|\
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_HMR|\
|
||||
hfcl,ion4xe)
|
||||
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wifi5" "phy0tpt"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wifi2" "phy1tpt"
|
||||
|
||||
@@ -36,6 +36,7 @@ qcom_setup_interfaces()
|
||||
indio,um-310ax-v1|\
|
||||
indio,um-510axp-v1|\
|
||||
indio,um-510axm-v1|\
|
||||
qcom,ipq5018-mp03.1|\
|
||||
qcom,ipq5018-mp03.3|\
|
||||
yuncore,ax840|\
|
||||
motorola,q14|\
|
||||
@@ -73,6 +74,14 @@ qcom_setup_interfaces()
|
||||
ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
|
||||
ucidef_set_interface_wan "eth4"
|
||||
;;
|
||||
hfcl,ion4xi_w|\
|
||||
hfcl,ion4x_w)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
;;
|
||||
hfcl,ion4xi_HMR)
|
||||
ucidef_set_interface_lan "eth1"
|
||||
ucidef_set_interface_wan "eth0"
|
||||
;;
|
||||
qcom,ipq807x-hk14)
|
||||
ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
|
||||
ucidef_set_interface_wan "eth4"
|
||||
@@ -84,7 +93,15 @@ qcom_setup_interfaces()
|
||||
ucidef_set_interface_lan "eth1 eth2 eth3 eth4"
|
||||
ucidef_set_interface_wan "eth0"
|
||||
;;
|
||||
cybertan,eww622-a1|\
|
||||
cybertan,eww622-a1)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
ucidef_add_switch "switch1" \
|
||||
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
;;
|
||||
xunison,d50-5g)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
ucidef_set_interface_lan "eth1"
|
||||
;;
|
||||
qcom,ipq5018-mp03.1)
|
||||
ucidef_set_interface_lan "eth1"
|
||||
ucidef_set_interface_wan "eth0"
|
||||
@@ -92,11 +109,17 @@ qcom_setup_interfaces()
|
||||
ucidef_add_switch_attr "switch1" "enable" "false"
|
||||
ucidef_add_switch_attr "switch1" "reset" "true"
|
||||
;;
|
||||
qcom,ipq5018-mp03.3)
|
||||
ucidef_set_interface_lan "eth1"
|
||||
ucidef_set_interface_wan "eth0"
|
||||
ucidef_add_switch "switch1"
|
||||
ucidef_add_switch_attr "switch1" "enable" "false"
|
||||
ucidef_add_switch_attr "switch1" "reset" "true"
|
||||
;;
|
||||
edgecore,eap104)
|
||||
ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
|
||||
ucidef_set_interface_wan "eth0"
|
||||
ucidef_add_switch "switch1" \
|
||||
"6@eth1" "1:lan1" "2:lan2" "3:lan3" "4:lan4"
|
||||
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
;;
|
||||
cybertan,eww631-a1)
|
||||
ucidef_set_interface_wan "eth0"
|
||||
@@ -112,6 +135,12 @@ qcom_setup_interfaces()
|
||||
ucidef_add_switch_attr "switch1" "enable" "false"
|
||||
ucidef_add_switch_attr "switch1" "reset" "true"
|
||||
;;
|
||||
wallys,dr5018)
|
||||
ucidef_set_interface_lan "eth0 eth1"
|
||||
ucidef_add_switch "switch1"
|
||||
ucidef_add_switch_attr "switch1" "enable" "false"
|
||||
ucidef_add_switch_attr "switch1" "reset" "true"
|
||||
;;
|
||||
yuncore,fap655)
|
||||
ucidef_add_switch "switch1" \
|
||||
"6@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
||||
@@ -124,7 +153,6 @@ qcom_setup_macs()
|
||||
local board="$1"
|
||||
|
||||
case $board in
|
||||
cig,wf188n|\
|
||||
cig,wf194c|\
|
||||
cig,wf194c4)
|
||||
mtd=$(find_mtd_chardev "0:APPSBLENV")
|
||||
@@ -160,6 +188,7 @@ qcom_setup_macs()
|
||||
ucidef_set_network_device_mac eth0 $wan_mac
|
||||
ucidef_set_label_macaddr $wan_mac
|
||||
;;
|
||||
cig,wf188n|\
|
||||
cig,wf196)
|
||||
mtd=$(find_mtd_chardev "0:APPSBLENV")
|
||||
[ -z "$mtd" ] && return;
|
||||
@@ -218,6 +247,13 @@ qcom_setup_macs()
|
||||
wan_mac=$(cat /sys/class/net/eth0/address)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
;;
|
||||
wallys,dr5018)
|
||||
mac=$(grep -i -m 1 BaseMacAddress= /dev/`cat /proc/mtd | grep APPSBLENV | cut -d: -f1` | cut -d= -f2)
|
||||
[ -z "$mac"] && mac="00:11:22:33:44:00"
|
||||
wan_mac=$(macaddr_canonicalize $mac)
|
||||
ucidef_set_network_device_mac eth0 $wan_mac
|
||||
ucidef_set_label_macaddr $wan_mac
|
||||
;;
|
||||
esac
|
||||
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
||||
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
|
||||
|
||||
@@ -40,9 +40,10 @@ ath11k_generate_macs_wf194() {
|
||||
}
|
||||
|
||||
ath11k_generate_macs_ion4x() {
|
||||
local dev=$(find_mtd_chardev "0:ART")
|
||||
touch /lib/firmware/ath11k-macs
|
||||
wifimac0=$(grep WLAN0_BASEMAC= /dev/mtd15 |cut -d '=' -f2)
|
||||
wifimac1=$(grep WLAN1_BASEMAC= /dev/mtd15 |cut -d '=' -f2)
|
||||
wifimac0=$(grep WLAN0_BASEMAC= $dev |cut -d '=' -f2)
|
||||
wifimac1=$(grep WLAN1_BASEMAC= $dev |cut -d '=' -f2)
|
||||
wifimac2=00:00:00:00:00:00
|
||||
echo -ne \\x${wifimac0//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
echo -ne \\x${wifimac1//:/\\x} >> /lib/firmware/ath11k-macs
|
||||
@@ -161,11 +162,16 @@ ath11k/IPQ5018/hw1.0/caldata.bin)
|
||||
cybertan,eww622-a1|\
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1|\
|
||||
wallys,dr5018|\
|
||||
edgecore,eap104|\
|
||||
yuncore,fap655|\
|
||||
hfcl,ion4xi_w|\
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_HMR|\
|
||||
liteon,wpx8324|\
|
||||
motorola,q14|\
|
||||
muxi,ap3220l|\
|
||||
xunison,d50-5g|\
|
||||
qcom,ipq5018-mp03.1)
|
||||
caldata_extract "0:ART" 0x1000 0x20000
|
||||
;;
|
||||
@@ -174,6 +180,10 @@ ath11k/IPQ5018/hw1.0/caldata.bin)
|
||||
ath11k/qcn6122/hw1.0/caldata_1.bin)
|
||||
case "$board" in
|
||||
cig,wf186w|\
|
||||
wallys,dr5018|\
|
||||
hfcl,ion4xi_w|\
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_HMR|\
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1|\
|
||||
yuncore,fap655|\
|
||||
@@ -185,6 +195,7 @@ ath11k/qcn6122/hw1.0/caldata_1.bin)
|
||||
ath11k/qcn6122/hw1.0/caldata_2.bin)
|
||||
case "$board" in
|
||||
motorola,q14|\
|
||||
wallys,dr5018|\
|
||||
cybertan,eww631-a1|\
|
||||
cybertan,eww631-b1|\
|
||||
edgecore,eap104|\
|
||||
@@ -201,6 +212,7 @@ ath11k/QCN9074/hw1.0/caldata_1.bin)
|
||||
cig,wf196|\
|
||||
wallys,dr6018-v4|\
|
||||
cybertan,eww622-a1|\
|
||||
xunison,d50-5g|\
|
||||
qcom,ipq5018-mp03.1|\
|
||||
qcom,ipq807x-hk14)
|
||||
caldata_extract "0:ART" 0x26800 0x20000
|
||||
@@ -218,6 +230,9 @@ ath11k/QCN9074/hw1.0/caldata_2.bin)
|
||||
ath11k-macs)
|
||||
case "$board" in
|
||||
hfcl,ion4xi|\
|
||||
hfcl,ion4xi_w|\
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_HMR|\
|
||||
hfcl,ion4xi_wp|\
|
||||
hfcl,ion4x|\
|
||||
hfcl,ion4x_2|\
|
||||
@@ -235,6 +250,7 @@ ath11k-macs)
|
||||
indio,um-310ax-v1|\
|
||||
indio,um-510axp-v1|\
|
||||
indio,um-510axm-v1|\
|
||||
xunison,d50-5g|\
|
||||
cig,wf188n)
|
||||
ath11k_generate_macs
|
||||
;;
|
||||
|
||||
@@ -7,6 +7,9 @@ boot() {
|
||||
hfcl,ion4xe|\
|
||||
hfcl,ion4x|\
|
||||
hfcl,ion4x_2|\
|
||||
hfcl,ion4xi_w|\
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_HMR|\
|
||||
hfcl,ion4xi_wp|\
|
||||
hfcl,ion4xi)
|
||||
fw_setenv boot_count 0
|
||||
|
||||
@@ -125,6 +125,7 @@ platform_check_image() {
|
||||
indio,um-310ax-v1|\
|
||||
indio,um-510axp-v1|\
|
||||
indio,um-510axm-v1|\
|
||||
wallys,dr5018|\
|
||||
wallys,dr6018|\
|
||||
wallys,dr6018-v4|\
|
||||
edgecore,eap101|\
|
||||
@@ -133,6 +134,9 @@ platform_check_image() {
|
||||
liteon,wpx8324|\
|
||||
edgecore,eap106|\
|
||||
hfcl,ion4xi|\
|
||||
hfcl,ion4xi_w|\
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_HMR|\
|
||||
hfcl,ion4xi_wp|\
|
||||
hfcl,ion4x|\
|
||||
hfcl,ion4x_2|\
|
||||
@@ -150,6 +154,8 @@ platform_check_image() {
|
||||
qcom,ipq6018-cp01|\
|
||||
qcom,ipq807x-hk01|\
|
||||
qcom,ipq807x-hk14|\
|
||||
xunison,d50|\
|
||||
xunison,d50-5g|\
|
||||
qcom,ipq5018-mp03.3)
|
||||
[ "$magic_long" = "73797375" ] && return 0
|
||||
;;
|
||||
@@ -173,7 +179,6 @@ platform_do_upgrade() {
|
||||
motorola,q14)
|
||||
emmc_do_upgrade $1
|
||||
;;
|
||||
cig,wf186w|\
|
||||
cig,wf188n|\
|
||||
cig,wf194c|\
|
||||
cig,wf194c4|\
|
||||
@@ -189,7 +194,10 @@ platform_do_upgrade() {
|
||||
qcom,ipq6018-cp01|\
|
||||
qcom,ipq807x-hk01|\
|
||||
qcom,ipq807x-hk14|\
|
||||
xunison,d50|\
|
||||
xunison,d50-5g|\
|
||||
qcom,ipq5018-mp03.3|\
|
||||
wallys,dr5018|\
|
||||
wallys,dr6018|\
|
||||
wallys,dr6018-v4|\
|
||||
yuncore,fap650|\
|
||||
@@ -212,17 +220,18 @@ platform_do_upgrade() {
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
hfcl,ion4xi_w|\
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_HMR|\
|
||||
hfcl,ion4xi_wp)
|
||||
wp_part=$(fw_printenv primary | cut -d = -f2)
|
||||
echo "Current Primary is $wp_part"
|
||||
if [[ $wp_part == 1 ]]; then
|
||||
CI_UBIPART="rootfs"
|
||||
echo "Setting Primary 0 and Flashing"
|
||||
fw_setenv primary 0 || exit 1
|
||||
CI_FWSETENV="primary 0"
|
||||
else
|
||||
CI_UBIPART="rootfs_1"
|
||||
echo "Setting Primary 1 and Flashing"
|
||||
fw_setenv primary 1 || exit 1
|
||||
CI_FWSETENV="primary 1"
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
@@ -244,10 +253,10 @@ platform_do_upgrade() {
|
||||
fw_setenv upgrade_available 0 || exit 1
|
||||
elif grep -q rootfs1 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs2"
|
||||
fw_setenv active 2 || exit 1
|
||||
CI_FWSETENV="active 2"
|
||||
else
|
||||
CI_UBIPART="rootfs1"
|
||||
fw_setenv active 1 || exit 1
|
||||
CI_FWSETENV="active 1"
|
||||
fi
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
@@ -257,6 +266,7 @@ platform_do_upgrade() {
|
||||
PART_NAME="inactive"
|
||||
platform_do_upgrade_dualboot_datachk "$1"
|
||||
;;
|
||||
cig,wf186w|\
|
||||
yuncore,ax840|\
|
||||
yuncore,fap655)
|
||||
[ -f /proc/boot_info/rootfs/upgradepartition ] && {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4x_w.dts"
|
||||
|
||||
/ {
|
||||
pmuv8: pmu {
|
||||
compatible = "arm,cortex-a7-pmu";
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4xi_HMR.dts"
|
||||
|
||||
/ {
|
||||
pmuv8: pmu {
|
||||
compatible = "arm,cortex-a7-pmu";
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4xi_w.dts"
|
||||
|
||||
/ {
|
||||
pmuv8: pmu {
|
||||
compatible = "arm,cortex-a7-pmu";
|
||||
};
|
||||
};
|
||||
10
feeds/ipq807x/ipq807x/files/arch/arm/boot/dts/qcom-ipq5018-wallys-dr5018.dts
Executable file
10
feeds/ipq807x/ipq807x/files/arch/arm/boot/dts/qcom-ipq5018-wallys-dr5018.dts
Executable file
@@ -0,0 +1,10 @@
|
||||
#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-wallys-dr5018.dts"
|
||||
|
||||
/ {
|
||||
model = "Wallys DR5018";
|
||||
compatible = "wallys,dr5018", "qcom,ipq5018";
|
||||
|
||||
pmuv8: pmu {
|
||||
compatible = "arm,cortex-a7-pmu";
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-xunison-d50-5g.dts"
|
||||
|
||||
/ {
|
||||
pmuv8: pmu {
|
||||
compatible = "arm,cortex-a7-pmu";
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "../../../arm64/boot/dts/qcom/qcom-ipq5018-xunison-d50.dts"
|
||||
|
||||
/ {
|
||||
pmuv8: pmu {
|
||||
compatible = "arm,cortex-a7-pmu";
|
||||
};
|
||||
};
|
||||
1441
feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-hfcl-ion4xi_HMR.dtsi
Executable file
1441
feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-hfcl-ion4xi_HMR.dtsi
Executable file
File diff suppressed because it is too large
Load Diff
1063
feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4x_w.dts
Executable file
1063
feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4x_w.dts
Executable file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1063
feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4xi_w.dts
Executable file
1063
feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4xi_w.dts
Executable file
File diff suppressed because it is too large
Load Diff
1441
feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4xi_w.dtsi
Executable file
1441
feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-hfcl-ion4xi_w.dtsi
Executable file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,984 @@
|
||||
/dts-v1/;
|
||||
/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "qcom-ipq5018.dtsi"
|
||||
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "Qualcomm Technologies, Inc. IPQ5018/AP-MP03.5-C1";
|
||||
compatible = "qcom,ipq5018-mp03.5-c1", "qcom,ipq5018";
|
||||
interrupt-parent = <&intc>;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
AUTO_MOUNT;
|
||||
#endif
|
||||
|
||||
aliases {
|
||||
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
|
||||
serial0 = &blsp1_uart1;
|
||||
serial1 = &blsp1_uart2;
|
||||
ethernet0 = "/soc/dp1";
|
||||
ethernet1 = "/soc/dp2";
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
bootargs-append = " swiotlb=1";
|
||||
#else
|
||||
bootargs-append = " swiotlb=1 coherent_pool=2M";
|
||||
#endif
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
/* 256 MB Profile
|
||||
* +==========+==============+=========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | NSS | 0x40000000 | 8MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Linux | 0x40800000 | Depends on total memory |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Q6 | | |
|
||||
* | code/ | 0x4B000000 | 20MB |
|
||||
* | data | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | data | 0x4C400000 | 13MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | M3 Dump | 0x4D100000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | QDSS | 0x4D200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | data | 0x4D300000 | 15MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | M3 Dump | 0x4E200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | QDSS | 0x4E300000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | data | 0x4E400000 | 15MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | M3 Dump | 0x4F300000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | QDSS | 0x4F400000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +===================================================+
|
||||
*/
|
||||
q6_mem_regions: q6_mem_regions@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x4500000>;
|
||||
};
|
||||
|
||||
q6_code_data: q6_code_data@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x1400000>;
|
||||
};
|
||||
|
||||
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C400000 0x0 0xD00000>;
|
||||
};
|
||||
|
||||
m3_dump: m3_dump@4D100000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D100000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region: q6_etr_dump@4D200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data1: q6_qcn6122_data1@4D300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D300000 0x0 0xF00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E300000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data2: q6_qcn6122_data2@4E400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E400000 0x0 0xF00000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4F300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4F300000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4F400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4F400000 0x0 0x100000>;
|
||||
};
|
||||
#else
|
||||
/* 512MB/1GB Profiles
|
||||
* +==========+==============+=========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | NSS | 0x40000000 | 16MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Linux | 0x41000000 | Depends on total memory |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | Q6 | | |
|
||||
* | code/ | 0x4B000000 | 20MB |
|
||||
* | data | | |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | data | 0x4C400000 | 14MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | M3 Dump | 0x4D200000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | QDSS | 0x4D300000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | IPQ5018 | | |
|
||||
* | Caldb | 0x4D400000 | 2MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | data | 0x4D600000 | 16MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | M3 Dump | 0x4E600000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | QDSS | 0x4E700000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_1| | |
|
||||
* | Caldb | 0x4E800000 | 5MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | data | 0x4ED00000 | 16MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | M3 Dump | 0x4FD00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | QDSS | 0x4FE00000 | 1MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | QCN6122_2| | |
|
||||
* | Caldb | 0x4FF00000 | 5MB |
|
||||
* +----------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +===================================================+
|
||||
*/
|
||||
q6_mem_regions: q6_mem_regions@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 0x5400000>;
|
||||
};
|
||||
|
||||
q6_code_data: q6_code_data@4B000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4B000000 0x0 01400000>;
|
||||
};
|
||||
|
||||
q6_ipq5018_data: q6_ipq5018_data@4C400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C400000 0x0 0xE00000>;
|
||||
};
|
||||
|
||||
m3_dump: m3_dump@4D200000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D200000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region: q6_etr_dump@4D300000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D300000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region: q6_caldb_region@4D400000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D400000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data1: q6_qcn6122_data1@4D600000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4D600000 0x0 0x1000000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_1: m3_dump_qcn6122_1@4E600000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E600000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_1: q6_qcn6122_etr_1@4E700000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E700000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_caldb_1: q6_qcn6122_caldb_1@4E800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4E800000 0x0 0x500000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_data2: q6_qcn6122_data2@4E900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ED00000 0x0 0x1000000>;
|
||||
};
|
||||
|
||||
m3_dump_qcn6122_2: m3_dump_qcn6122_2@4FD00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4FD00000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_etr_2: q6_qcn6122_etr_2@4FE00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4FE00000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_qcn6122_caldb_2: q6_qcn6122_caldb_2@4FF00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4FF00000 0x0 0x500000>;
|
||||
};
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
soc {
|
||||
serial@78af000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
blsp1_uart2: serial@78b0000 {
|
||||
pinctrl-0 = <&blsp1_uart_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
qpic_bam: dma@7984000{
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
nand: qpic-nand@79b0000 {
|
||||
pinctrl-0 = <&qspi_nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
spi_0: spi@78b5000 { /* BLSP1 QUP0 */
|
||||
pinctrl-0 = <&blsp0_spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-select = <0>;
|
||||
status = "ok";
|
||||
|
||||
m25p80@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0>;
|
||||
compatible = "n25q128a11";
|
||||
linux,modalias = "m25p80", "n25q128a11";
|
||||
spi-max-frequency = <50000000>;
|
||||
use-default-sizes;
|
||||
};
|
||||
};
|
||||
|
||||
mdio0: mdio@88000 {
|
||||
status = "ok";
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <7>;
|
||||
};
|
||||
};
|
||||
|
||||
mdio1: mdio@90000 {
|
||||
status = "ok";
|
||||
pinctrl-0 = <&mdio1_pins>;
|
||||
pinctrl-names = "default";
|
||||
phy-reset-gpio = <&tlmm 39 0>;
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
ess-instance {
|
||||
num_devices = <0x2>;
|
||||
ess-switch@0x39c00000 {
|
||||
compatible = "qcom,ess-switch-ipq50xx";
|
||||
device_id = <0>;
|
||||
switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
|
||||
cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <1>;
|
||||
phy_address = <7>;
|
||||
};
|
||||
|
||||
port@1 {
|
||||
port_id = <2>;
|
||||
forced-speed = <1000>;
|
||||
forced-duplex = <1>;
|
||||
};
|
||||
};
|
||||
led_source@0 {
|
||||
source = <0>;
|
||||
mode = "normal";
|
||||
speed = "all";
|
||||
blink_en = "enable";
|
||||
active = "high";
|
||||
};
|
||||
};
|
||||
|
||||
ess-switch1@1 {
|
||||
compatible = "qcom,ess-switch-qca83xx";
|
||||
device_id = <1>;
|
||||
switch_access_mode = "mdio";
|
||||
mdio-bus = <&mdio1>;
|
||||
reset_gpio = <0x27>;
|
||||
switch_cpu_bmp = <0x40>;
|
||||
switch_lan_bmp = <0x1e>;
|
||||
switch_wan_bmp = <0x0>;
|
||||
qca,ar8327-initvals = <
|
||||
0x00004 0x7600000
|
||||
0x00008 0x1000000
|
||||
0x0000c 0x80
|
||||
0x00010 0x2613a0
|
||||
0x000e4 0xaa545
|
||||
0x000e0 0xc74164de
|
||||
0x0007c 0x4e
|
||||
0x00094 0x4e
|
||||
>;
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <1>;
|
||||
phy_address = <0>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <2>;
|
||||
phy_address = <1>;
|
||||
};
|
||||
port@2 {
|
||||
port_id = <3>;
|
||||
phy_address = <2>;
|
||||
};
|
||||
port@3 {
|
||||
port_id = <4>;
|
||||
phy_address = <3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
wifi0: wifi@c000000 {
|
||||
qcom,bdf-addr = <0x4BA00000 0x4BA00000 0x4BA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4CA00000 0x4CA00000 0x4CA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
ess-uniphy@98000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,sps {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,usbbam@8B04000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,diag@0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
dp1 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
|
||||
clock-names = "nss-snoc-gmac-axi-clk";
|
||||
qcom,id = <1>;
|
||||
reg = <0x39C00000 0x10000>;
|
||||
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,mactype = <2>;
|
||||
qcom,link-poll = <1>;
|
||||
qcom,phy-mdio-addr = <7>;
|
||||
mdio-bus = <&mdio0>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
dp2 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
|
||||
clock-names = "nss-snoc-gmac-axi-clk";
|
||||
qcom,id = <2>;
|
||||
reg = <0x39D00000 0x10000>;
|
||||
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,mactype = <2>;
|
||||
/* qcom,link-poll = <1>;
|
||||
qcom,phy-mdio-addr = <0 1 2 3>;
|
||||
mdio-bus = <&mdio1>; */
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
qcom,test@0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
lpass: lpass@0xA000000{
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pcm: pcm@0xA3C0000{
|
||||
pinctrl-0 = <&audio_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pcm_lb: pcm_lb@0 {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
status = "ok";
|
||||
};
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
blsp0_uart_pins: blsp0_uart_pins {
|
||||
blsp0_uart_rx_tx {
|
||||
pins = "gpio20", "gpio21";
|
||||
function = "blsp0_uart0";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
blsp1_uart_pins: blsp1_uart_pins {
|
||||
blsp1_uart_rx_tx {
|
||||
pins = "gpio23", "gpio25", "gpio24", "gpio26";
|
||||
function = "blsp1_uart2";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
blsp0_spi_pins: blsp0_spi_pins {
|
||||
mux {
|
||||
pins = "gpio10", "gpio11", "gpio12", "gpio13";
|
||||
function = "blsp0_spi";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
qspi_nand_pins: qspi_nand_pins {
|
||||
qspi_clock {
|
||||
pins = "gpio9";
|
||||
function = "qspi_clk";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_cs {
|
||||
pins = "gpio8";
|
||||
function = "qspi_cs";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_data_0 {
|
||||
pins = "gpio7";
|
||||
function = "qspi0";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_data_1 {
|
||||
pins = "gpio6";
|
||||
function = "qspi1";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_data_2 {
|
||||
pins = "gpio5";
|
||||
function = "qspi2";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_data_3 {
|
||||
pins = "gpio4";
|
||||
function = "qspi3";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
mdio1_pins: mdio_pinmux {
|
||||
mux_0 {
|
||||
pins = "gpio36";
|
||||
function = "mdc";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
mux_1 {
|
||||
pins = "gpio37";
|
||||
function = "mdio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
phy_led_pins: phy_led_pins {
|
||||
gephy_led_pin {
|
||||
pins = "gpio46";
|
||||
function = "led0";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
i2c_pins: i2c_pins {
|
||||
i2c_scl {
|
||||
pins = "gpio25";
|
||||
function = "blsp2_i2c1";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
i2c_sda {
|
||||
pins = "gpio26";
|
||||
function = "blsp2_i2c1";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
reset_button {
|
||||
pins = "gpio28";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
audio_pins: audio_pinmux {
|
||||
mux_1 {
|
||||
pins = "gpio24";
|
||||
function = "audio_rxbclk";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_2 {
|
||||
pins = "gpio25";
|
||||
function = "audio_rxfsync";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_3 {
|
||||
pins = "gpio26";
|
||||
function = "audio_rxd";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_4 {
|
||||
pins = "gpio27";
|
||||
function = "audio_txmclk";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_5 {
|
||||
pins = "gpio28";
|
||||
function = "audio_txbclk";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_6 {
|
||||
pins = "gpio29";
|
||||
function = "audio_txfsync";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_7 {
|
||||
pins = "gpio30";
|
||||
function = "audio_txd";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
leds_pins: leds_pinmux {
|
||||
sys_blue {
|
||||
pins = "gpio30";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
sys_red {
|
||||
pins = "gpio36";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
sys_green {
|
||||
pins = "gpio37";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&soc {
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
button@1 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 28 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
gpio_leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led@30 {
|
||||
label = "sys:blue";
|
||||
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>; /* GPIO_30 */
|
||||
default-state="on";
|
||||
/* linux,default-trigger = "timer";
|
||||
active-delay = <700>;
|
||||
inactive-delay = <700>;
|
||||
default-state="on"; */
|
||||
};
|
||||
led@36 {
|
||||
label = "sys:red";
|
||||
gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>; /* GPIO_36 */
|
||||
default-state="off";
|
||||
/* linux,default-trigger = "timer";
|
||||
active-delay = <700>;
|
||||
inactive-delay = <700>;
|
||||
default-state="on"; */
|
||||
};
|
||||
led@37 {
|
||||
label = "sys:green";
|
||||
gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>; /* GPIO_37 */
|
||||
default-state="off";
|
||||
/* linux,default-trigger = "timer";
|
||||
active-delay = <700>;
|
||||
inactive-delay = <700>;
|
||||
default-state="on"; */
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&usb3 {
|
||||
status = "disabled";
|
||||
device-power-gpio = <&tlmm 24 1>;
|
||||
};
|
||||
|
||||
&eud {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1 {
|
||||
status = "disabled";
|
||||
perst-gpio = <&tlmm 18 1>;
|
||||
};
|
||||
|
||||
&pcie_x2 {
|
||||
status = "disabled";
|
||||
perst-gpio = <&tlmm 15 1>;
|
||||
};
|
||||
|
||||
&bt {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&dwc_0 {
|
||||
/delete-property/ #phy-cells;
|
||||
/delete-property/ phys;
|
||||
/delete-property/ phy-names;
|
||||
};
|
||||
|
||||
&hs_m31phy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1phy {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie_x2phy {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie_x1_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_0: qcom,mhi@0 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie_x2_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_1: qcom,mhi@1 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
&qfprom {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tsens {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qcom_q6v5_wcss {
|
||||
qcom,multipd_arch;
|
||||
memory-region = <&q6_mem_regions>;
|
||||
qcom,share_bootargs;
|
||||
qcom,bootargs_smem = <507>;
|
||||
boot-args = <0x1 0x4 0x3 0x0F 0x0 0x0>,
|
||||
<0x2 0x4 0x2 0x12 0x0 0x0>;
|
||||
/* IPQ5018 */
|
||||
q6v5_wcss_userpd1 {
|
||||
m3_firmware = "IPQ5018/m3_fw.mdt";
|
||||
interrupts-extended = <&wcss_smp2p_in 8 0>,
|
||||
<&wcss_smp2p_in 9 0>,
|
||||
<&wcss_smp2p_in 12 0>,
|
||||
<&wcss_smp2p_in 11 0>;
|
||||
interrupt-names ="fatal",
|
||||
"ready",
|
||||
"spawn_ack",
|
||||
"stop-ack";
|
||||
qcom,smem-states = <&wcss_smp2p_out 8>,
|
||||
<&wcss_smp2p_out 9>,
|
||||
<&wcss_smp2p_out 10>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
qca,asid = <1>;
|
||||
qca,auto-restart;
|
||||
qca,int_radio;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
|
||||
<&q6_etr_region>;
|
||||
#else
|
||||
memory-region = <&q6_ipq5018_data>, <&m3_dump>,
|
||||
<&q6_etr_region>, <&q6_caldb_region>;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* QCN6122 6G */
|
||||
q6v5_wcss_userpd2 {
|
||||
m3_firmware = "qcn6122/m3_fw.mdt";
|
||||
interrupts-extended = <&wcss_smp2p_in 16 0>,
|
||||
<&wcss_smp2p_in 17 0>,
|
||||
<&wcss_smp2p_in 20 0>,
|
||||
<&wcss_smp2p_in 19 0>;
|
||||
interrupt-names ="fatal",
|
||||
"ready",
|
||||
"spawn_ack",
|
||||
"stop-ack";
|
||||
qcom,smem-states = <&wcss_smp2p_out 16>,
|
||||
<&wcss_smp2p_out 17>,
|
||||
<&wcss_smp2p_out 18>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
qca,asid = <2>;
|
||||
qca,auto-restart;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
|
||||
<&q6_qcn6122_etr_1>;
|
||||
#else
|
||||
memory-region = <&q6_qcn6122_data1>, <&m3_dump_qcn6122_1>,
|
||||
<&q6_qcn6122_etr_1>, <&q6_qcn6122_caldb_1>;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* QCN6122 5G */
|
||||
q6v5_wcss_userpd3 {
|
||||
m3_firmware = "qcn6122/m3_fw.mdt";
|
||||
interrupts-extended = <&wcss_smp2p_in 24 0>,
|
||||
<&wcss_smp2p_in 25 0>,
|
||||
<&wcss_smp2p_in 28 0>,
|
||||
<&wcss_smp2p_in 27 0>;
|
||||
interrupt-names ="fatal",
|
||||
"ready",
|
||||
"spawn_ack",
|
||||
"stop-ack";
|
||||
qcom,smem-states = <&wcss_smp2p_out 24>,
|
||||
<&wcss_smp2p_out 25>,
|
||||
<&wcss_smp2p_out 26>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
qca,asid = <3>;
|
||||
qca,auto-restart;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
|
||||
<&q6_qcn6122_etr_2>;
|
||||
#else
|
||||
memory-region = <&q6_qcn6122_data2>, <&m3_dump_qcn6122_2>,
|
||||
<&q6_qcn6122_etr_2>, <&q6_qcn6122_caldb_2>;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
&i2c_0 {
|
||||
pinctrl-0 = <&i2c_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&qgic_msi_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qgic_msi_1 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
/* IPQ5018 */
|
||||
qcom,multipd_arch;
|
||||
qcom,userpd-subsys-name = "q6v5_wcss_userpd1";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
qcom,tgt-mem-mode = <2>;
|
||||
#else
|
||||
qcom,tgt-mem-mode = <1>;
|
||||
#endif
|
||||
qcom,board_id = <0x24>;
|
||||
qcom,bdf-addr = <0x4C400000 0x4C400000 0x4C400000 0x0 0x0>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,caldb-addr = <0x4D400000 0x4D400000 0 0 0>;
|
||||
#else
|
||||
qcom,caldb-addr = <0x4D400000>;
|
||||
m3-dump-addr = <0x4D200000>;
|
||||
#endif
|
||||
qcom,caldb-size = <0x200000>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
/* QCN6122 6G */
|
||||
qcom,multipd_arch;
|
||||
qcom,userpd-subsys-name = "q6v5_wcss_userpd3";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
qcom,tgt-mem-mode = <2>;
|
||||
#else
|
||||
qcom,tgt-mem-mode = <1>;
|
||||
#endif
|
||||
qcom,board_id = <0x60>;
|
||||
qcom,bdf-addr = <0x4ED00000 0x4ED00000 0x4E400000 0x0 0x0>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,caldb-addr = <0x4FF00000 0x4FF00000 0 0 0>;
|
||||
#else
|
||||
qcom,caldb-addr = <0x4FF00000>;
|
||||
m3-dump-addr = <0x4FD00000>;
|
||||
#endif
|
||||
qcom,caldb-size = <0x500000>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi2 {
|
||||
/* QCN6122 6G */
|
||||
qcom,multipd_arch;
|
||||
qcom,userpd-subsys-name = "q6v5_wcss_userpd3";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
qcom,tgt-mem-mode = <2>;
|
||||
#else
|
||||
qcom,tgt-mem-mode = <1>;
|
||||
#endif
|
||||
qcom,board_id = <0xb0>;
|
||||
qcom,bdf-addr = <0x4ED00000 0x4ED00000 0x4E400000 0x0 0x0>;
|
||||
#ifdef __CNSS2__
|
||||
qcom,caldb-addr = <0x4FF00000 0x4FF00000 0 0 0>;
|
||||
#else
|
||||
qcom,caldb-addr = <0x4FF00000>;
|
||||
m3-dump-addr = <0x4FD00000>;
|
||||
#endif
|
||||
qcom,caldb-size = <0x500000>;
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -0,0 +1,995 @@
|
||||
/dts-v1/;
|
||||
/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "qcom-ipq5018.dtsi"
|
||||
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "Xunison D50-5G";
|
||||
compatible = "xunison,d50-5g", "qcom,ipq5018-mp03.1", "qcom,ipq5018";
|
||||
interrupt-parent = <&intc>;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
AUTO_MOUNT;
|
||||
#endif
|
||||
|
||||
aliases {
|
||||
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
|
||||
serial0 = &blsp1_uart1;
|
||||
serial1 = &blsp1_uart2;
|
||||
ethernet0 = "/soc/dp2";
|
||||
ethernet1 = "/soc/dp1";
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
bootargs-append = " swiotlb=1";
|
||||
#else
|
||||
bootargs-append = " swiotlb=1 coherent_pool=2M";
|
||||
#endif
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
/* 256 MB Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | NSS | 0x40000000 | 8MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | Linux | 0x40800000 | Depends on total memory |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* + | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | Q6 | 0x4B000000 | 23MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C700000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4C900000 | 17MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4DA00000 | 16MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01700000>;
|
||||
};
|
||||
|
||||
m3_dump@4c700000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C700000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C900000 0x0 0x01100000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4da00000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4da00000 0x0 0x01000000>;
|
||||
};
|
||||
#elif __IPQ_MEM_PROFILE_512_MB__
|
||||
/* 512 MB Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | NSS | 0x40000000 | 16MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | Linux | 0x41000000 | Depends on total memory |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | Q6 | 0x4B000000 | 24MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C900000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | caldb | 0x4CA00000 | 2MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4CC00000 | 30MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4EA00000 | 16MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01800000>;
|
||||
};
|
||||
|
||||
m3_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c900000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region:q6_caldb_region@4ca00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ca00000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4cc00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4CC00000 0x0 0x01E00000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4ea00000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4ea00000 0x0 0x01000000>;
|
||||
};
|
||||
#else
|
||||
/* 1G Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | NSS | 0x40000000 | 16MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | Linux | 0x41000000 | Depends on total memory |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | Q6 | 0x4B000000 | 24MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C900000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | caldb | 0x4CA00000 | 2MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4CC00000 | 45MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4F900000 | 24MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01800000>;
|
||||
};
|
||||
|
||||
m3_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c900000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region:q6_caldb_region@4ca00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ca00000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4cc00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4CC00000 0x0 0x02D00000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4F900000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4F900000 0x0 0x01800000>;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
soc {
|
||||
serial@78af000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
blsp1_uart2: serial@78b0000 {
|
||||
pinctrl-0 = <&blsp1_uart_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
qpic_bam: dma@7984000{
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
nand: qpic-nand@79b0000 {
|
||||
pinctrl-0 = <&qspi_nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
spi_0: spi@78b5000 { /* BLSP1 QUP0 */
|
||||
pinctrl-0 = <&blsp0_spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-select = <0>;
|
||||
status = "ok";
|
||||
|
||||
m25p80@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0>;
|
||||
compatible = "n25q128a11";
|
||||
linux,modalias = "m25p80", "n25q128a11";
|
||||
spi-max-frequency = <50000000>;
|
||||
use-default-sizes;
|
||||
};
|
||||
};
|
||||
|
||||
mdio0: mdio@88000 {
|
||||
status = "ok";
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <7>;
|
||||
};
|
||||
};
|
||||
|
||||
mdio1: mdio@90000 {
|
||||
status = "ok";
|
||||
pinctrl-0 = <&mdio1_pins>;
|
||||
pinctrl-names = "default";
|
||||
phy-reset-gpio = <&tlmm 39 0>;
|
||||
ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
ess-instance {
|
||||
num_devices = <0x2>;
|
||||
ess-switch@0x39c00000 {
|
||||
compatible = "qcom,ess-switch-ipq50xx";
|
||||
device_id = <0>;
|
||||
switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
|
||||
cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <1>;
|
||||
phy_address = <7>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <2>;
|
||||
forced-speed = <1000>;
|
||||
forced-duplex = <1>;
|
||||
};
|
||||
};
|
||||
led_source@0 {
|
||||
source = <0>;
|
||||
mode = "normal";
|
||||
speed = "all";
|
||||
blink_en = "enable";
|
||||
active = "high";
|
||||
};
|
||||
};
|
||||
ess-switch1@1 {
|
||||
compatible = "qcom,ess-switch-qca83xx";
|
||||
device_id = <1>;
|
||||
switch_access_mode = "mdio";
|
||||
mdio-bus = <&mdio1>;
|
||||
reset_gpio = <0x27>;
|
||||
switch_cpu_bmp = <0x40>; /* cpu port bitmap */
|
||||
switch_lan_bmp = <0x1e>; /* lan port bitmap */
|
||||
switch_wan_bmp = <0x0>; /* wan port bitmap */
|
||||
qca,ar8327-initvals = <
|
||||
0x00004 0x7600000 /* PAD0_MODE */
|
||||
0x00008 0x1000000 /* PAD5_MODE */
|
||||
0x0000c 0x80 /* PAD6_MODE */
|
||||
0x00010 0x2613a0 /* PORT6 FORCE MODE*/
|
||||
0x000e4 0xaa545 /* MAC_POWER_SEL */
|
||||
0x000e0 0xc74164de /* SGMII_CTRL */
|
||||
0x0007c 0x4e /* PORT0_STATUS */
|
||||
0x00094 0x4e /* PORT6_STATUS */
|
||||
>;
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <1>;
|
||||
phy_address = <0>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <2>;
|
||||
phy_address = <1>;
|
||||
};
|
||||
port@2 {
|
||||
port_id = <3>;
|
||||
phy_address = <2>;
|
||||
};
|
||||
port@3 {
|
||||
port_id = <4>;
|
||||
phy_address = <3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wifi0: wifi@c000000 {
|
||||
qcom,bdf-addr = <0x4BA00000 0x4BA00000 0x4BA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4CA00000 0x4CA00000 0x4CA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
ess-uniphy@98000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
qcom,sps {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,usbbam@8B04000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,diag@0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
dp2 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
|
||||
clock-names = "nss-snoc-gmac-axi-clk";
|
||||
qcom,id = <1>;
|
||||
reg = <0x39C00000 0x10000>;
|
||||
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,mactype = <2>;
|
||||
qcom,link-poll = <1>;
|
||||
qcom,phy-mdio-addr = <7>;
|
||||
mdio-bus = <&mdio0>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
dp1 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
|
||||
clock-names = "nss-snoc-gmac-axi-clk";
|
||||
qcom,id = <2>;
|
||||
reg = <0x39D00000 0x10000>;
|
||||
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,mactype = <2>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
rpm_etm0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
lpass: lpass@0xA000000{
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pcm: pcm@0xA3C0000{
|
||||
pinctrl-0 = <&audio_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pcm_lb: pcm_lb@0 {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys-polled";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
poll-interval = <100>;
|
||||
|
||||
button@0 {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
button@1 {
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led@35 {
|
||||
label = "green:4g";
|
||||
gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_5g_wifi";
|
||||
default-state = "off";
|
||||
};
|
||||
led@30 {
|
||||
label = "green:wifi";
|
||||
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_2g_wifi";
|
||||
default-state = "off";
|
||||
};
|
||||
led@1 {
|
||||
label = "green:internet";
|
||||
gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_voice";
|
||||
default-state = "off";
|
||||
};
|
||||
led@33 {
|
||||
label = "green:lte";
|
||||
gpios = <&tlmm 33 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_lte_g";
|
||||
default-state = "off";
|
||||
};
|
||||
led@34 {
|
||||
label = "red:lte";
|
||||
gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_lte_r";
|
||||
default-state = "off";
|
||||
};
|
||||
led@27 {
|
||||
label = "green:mesh";
|
||||
gpios = <&tlmm 27 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_nr_g";
|
||||
default-state = "off";
|
||||
};
|
||||
led@28 {
|
||||
label = "red:mesh";
|
||||
gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "led_nr_r";
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
blsp0_uart_pins: blsp0_uart_pins {
|
||||
blsp0_uart_rx_tx {
|
||||
pins = "gpio20", "gpio21";
|
||||
function = "blsp0_uart0";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
blsp1_uart_pins: blsp1_uart_pins {
|
||||
blsp1_uart_rx_tx {
|
||||
pins = "gpio23", "gpio25", "gpio24", "gpio26";
|
||||
function = "blsp1_uart2";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
blsp0_spi_pins: blsp0_spi_pins {
|
||||
mux {
|
||||
pins = "gpio10", "gpio11", "gpio12", "gpio13";
|
||||
function = "blsp0_spi";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
qspi_nand_pins: qspi_nand_pins {
|
||||
qspi_clock {
|
||||
pins = "gpio9";
|
||||
function = "qspi_clk";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_cs {
|
||||
pins = "gpio8";
|
||||
function = "qspi_cs";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_data_0 {
|
||||
pins = "gpio7";
|
||||
function = "qspi0";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_data_1 {
|
||||
pins = "gpio6";
|
||||
function = "qspi1";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_data_2 {
|
||||
pins = "gpio5";
|
||||
function = "qspi2";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_data_3 {
|
||||
pins = "gpio4";
|
||||
function = "qspi3";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
mdio1_pins: mdio_pinmux {
|
||||
mux_0 {
|
||||
pins = "gpio36";
|
||||
function = "mdc";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
mux_1 {
|
||||
pins = "gpio37";
|
||||
function = "mdio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
phy_led_pins: phy_led_pins {
|
||||
gephy_led_pin {
|
||||
pins = "gpio46";
|
||||
function = "led0";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
i2c_pins: i2c_pins {
|
||||
i2c_scl {
|
||||
pins = "gpio25";
|
||||
function = "blsp2_i2c1";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
i2c_sda {
|
||||
pins = "gpio26";
|
||||
function = "blsp2_i2c1";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
reset_button{
|
||||
pins = "gpio22";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
wps_button {
|
||||
pins = "gpio38";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
leds_pins: leds_pins {
|
||||
led_5g_wifi {
|
||||
pins = "gpio35";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_2g_wifi {
|
||||
pins = "gpio30";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_lte_g {
|
||||
pins = "gpio33";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_lte_r {
|
||||
pins = "gpio34";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_nr_g {
|
||||
pins = "gpio27";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_nr_r {
|
||||
pins = "gpio28";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
led_voice {
|
||||
pins = "gpio1";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
audio_pins: audio_pinmux {
|
||||
mux_1 {
|
||||
pins = "gpio24";
|
||||
function = "audio_rxbclk";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_2 {
|
||||
pins = "gpio25";
|
||||
function = "audio_rxfsync";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_3 {
|
||||
pins = "gpio26";
|
||||
function = "audio_rxd";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_4 {
|
||||
pins = "gpio27";
|
||||
function = "audio_txmclk";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_5 {
|
||||
pins = "gpio28";
|
||||
function = "audio_txbclk";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_6 {
|
||||
pins = "gpio29";
|
||||
function = "audio_txfsync";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_7 {
|
||||
pins = "gpio30";
|
||||
function = "audio_txd";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&usb3 {
|
||||
qcom,multiplexed-phy;
|
||||
qcom,phy-mux-regs = <&tcsr_q6_block 0x2540>;
|
||||
device-power-gpio = <&tlmm 24 1>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&eud {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1 {
|
||||
status = "disabled";
|
||||
perst-gpio = <&tlmm 18 1>;
|
||||
};
|
||||
|
||||
&pcie_x2 {
|
||||
status = "ok";
|
||||
perst-gpio = <&tlmm 15 1>;
|
||||
};
|
||||
|
||||
&bt {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wcss {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&q6v5_wcss {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&q6v5_m3 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&tcsr_mutex_block {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tcsr_mutex {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&smem {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&apcs_glb {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tcsr_q6_block {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qcom_q6v5_wcss {
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_region>, <&q6_etr_region>;
|
||||
#else
|
||||
memory-region = <&q6_region>, <&q6_etr_region>,
|
||||
<&q6_caldb_region>;
|
||||
#endif
|
||||
/* IPQ5018 */
|
||||
q6v5_wcss_userpd1 {
|
||||
m3_firmware = "IPQ5018/m3_fw.mdt";
|
||||
interrupts-extended = <&wcss_smp2p_in 8 0>,
|
||||
<&wcss_smp2p_in 9 0>,
|
||||
<&wcss_smp2p_in 12 0>,
|
||||
<&wcss_smp2p_in 11 0>;
|
||||
interrupt-names ="fatal",
|
||||
"ready",
|
||||
"spawn_ack",
|
||||
"stop-ack";
|
||||
qcom,smem-states = <&wcss_smp2p_out 8>,
|
||||
<&wcss_smp2p_out 9>,
|
||||
<&wcss_smp2p_out 10>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
qca,asid = <1>;
|
||||
qca,auto-restart;
|
||||
qca,int_radio;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c_0 {
|
||||
pinctrl-0 = <&i2c_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&dbm_1p5 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&msm_imem {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&ssuniphy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&hs_m31phy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1phy {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie_x2phy {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_0: qcom,mhi@0 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie_x2_rp {
|
||||
status = "ok";
|
||||
|
||||
mhi_1: qcom,mhi@1 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
qrtr_instance_id = <0x20>;
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
memory-region = <&mhi_region1>;
|
||||
#if !defined(__CNSS2__)
|
||||
base-addr = <0x4CC00000>;
|
||||
m3-dump-addr = <0x4E000000>;
|
||||
etr-addr = <0x4E100000>;
|
||||
qcom,caldb-addr = <0x4E200000>;
|
||||
qcom,tgt-mem-mode = <0x1>;
|
||||
mhi,max-channels = <30>;
|
||||
mhi,timeout = <10000>;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
/* IPQ5018 */
|
||||
qcom,board_id = <0x24>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi3 {
|
||||
/* QCN9000 5G */
|
||||
board_id = <0xa0>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qfprom {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tsens {
|
||||
status = "ok";
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,884 @@
|
||||
/dts-v1/;
|
||||
/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "qcom-ipq5018.dtsi"
|
||||
|
||||
/ {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "Xunison D50";
|
||||
compatible = "xunison,d50", "qcom,ipq5018-mp03.1", "qcom,ipq5018";
|
||||
interrupt-parent = <&intc>;
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
AUTO_MOUNT;
|
||||
#endif
|
||||
|
||||
aliases {
|
||||
sdhc1 = &sdhc_1; /* SDC1 eMMC slot */
|
||||
serial0 = &blsp1_uart1;
|
||||
serial1 = &blsp1_uart2;
|
||||
ethernet0 = "/soc/dp1";
|
||||
ethernet1 = "/soc/dp2";
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyMSM0,115200,n8 rw init=/init";
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
bootargs-append = " swiotlb=1";
|
||||
#else
|
||||
bootargs-append = " swiotlb=1 coherent_pool=2M";
|
||||
#endif
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
/* 256 MB Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | NSS | 0x40000000 | 8MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | Linux | 0x40800000 | Depends on total memory |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* + | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | Q6 | 0x4B000000 | 23MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C700000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4C900000 | 17MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4DA00000 | 16MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01700000>;
|
||||
};
|
||||
|
||||
m3_dump@4c700000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C700000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4C900000 0x0 0x01100000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4da00000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4da00000 0x0 0x01000000>;
|
||||
};
|
||||
#elif __IPQ_MEM_PROFILE_512_MB__
|
||||
/* 512 MB Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | NSS | 0x40000000 | 16MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | Linux | 0x41000000 | Depends on total memory |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | Q6 | 0x4B000000 | 24MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C900000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | caldb | 0x4CA00000 | 2MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4CC00000 | 30MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4EA00000 | 16MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01800000>;
|
||||
};
|
||||
|
||||
m3_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c900000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region:q6_caldb_region@4ca00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ca00000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4cc00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4CC00000 0x0 0x01E00000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4ea00000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4ea00000 0x0 0x01000000>;
|
||||
};
|
||||
#else
|
||||
/* 1G Profile
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
* | Region | Start Offset | Size |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | NSS | 0x40000000 | 16MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | Linux | 0x41000000 | Depends on total memory |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | uboot | 0x4A600000 | 4MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | SBL | 0x4AA00000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | smem | 0x4AB00000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | TZ | 0x4AC00000 | 4MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* | Q6 | 0x4B000000 | 24MB |
|
||||
* | | | |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | M3 Dump| 0x4C800000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | QDSS | 0x4C900000 | 1MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | caldb | 0x4CA00000 | 2MB |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* |QCN9000 | 0x4CC00000 | 45MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | | | |
|
||||
* | MHI1 | 0x4F900000 | 24MB |
|
||||
* | | | |
|
||||
* +--------+--------------+-------------------------+
|
||||
* | |
|
||||
* | Rest of the memory for Linux |
|
||||
* | |
|
||||
* +=================================================+
|
||||
*/
|
||||
q6_region: wcnss@4b000000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4b000000 0x0 0x01800000>;
|
||||
};
|
||||
|
||||
m3_dump@4c800000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c800000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_etr_region:q6_etr_dump@4c900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4c900000 0x0 0x100000>;
|
||||
};
|
||||
|
||||
q6_caldb_region:q6_caldb_region@4ca00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4ca00000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
qcn9000_pcie0@4cc00000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4CC00000 0x0 0x02D00000>;
|
||||
};
|
||||
|
||||
mhi_region1: dma_pool1@4F900000 {
|
||||
compatible = "shared-dma-pool";
|
||||
no-map;
|
||||
reg = <0x0 0x4F900000 0x0 0x01800000>;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
soc {
|
||||
serial@78af000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
blsp1_uart2: serial@78b0000 {
|
||||
pinctrl-0 = <&blsp1_uart_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
qpic_bam: dma@7984000{
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
nand: qpic-nand@79b0000 {
|
||||
pinctrl-0 = <&qspi_nand_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
spi_0: spi@78b5000 { /* BLSP1 QUP0 */
|
||||
pinctrl-0 = <&blsp0_spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-select = <0>;
|
||||
status = "ok";
|
||||
|
||||
m25p80@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0>;
|
||||
compatible = "n25q128a11";
|
||||
linux,modalias = "m25p80", "n25q128a11";
|
||||
spi-max-frequency = <50000000>;
|
||||
use-default-sizes;
|
||||
};
|
||||
};
|
||||
|
||||
mdio0: mdio@88000 {
|
||||
status = "ok";
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <7>;
|
||||
};
|
||||
};
|
||||
|
||||
mdio1: mdio@90000 {
|
||||
status = "ok";
|
||||
pinctrl-0 = <&mdio1_pins>;
|
||||
pinctrl-names = "default";
|
||||
phy-reset-gpio = <&tlmm 39 0>;
|
||||
ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
ess-instance {
|
||||
num_devices = <0x2>;
|
||||
ess-switch@0x39c00000 {
|
||||
compatible = "qcom,ess-switch-ipq50xx";
|
||||
device_id = <0>;
|
||||
switch_mac_mode = <0xf>; /* mac mode for uniphy instance*/
|
||||
cmnblk_clk = "internal_96MHz"; /* cmnblk clk*/
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <1>;
|
||||
phy_address = <7>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <2>;
|
||||
forced-speed = <1000>;
|
||||
forced-duplex = <1>;
|
||||
};
|
||||
};
|
||||
led_source@0 {
|
||||
source = <0>;
|
||||
mode = "normal";
|
||||
speed = "all";
|
||||
blink_en = "enable";
|
||||
active = "high";
|
||||
};
|
||||
};
|
||||
ess-switch1@1 {
|
||||
compatible = "qcom,ess-switch-qca83xx";
|
||||
device_id = <1>;
|
||||
switch_access_mode = "mdio";
|
||||
mdio-bus = <&mdio1>;
|
||||
reset_gpio = <0x27>;
|
||||
switch_cpu_bmp = <0x40>; /* cpu port bitmap */
|
||||
switch_lan_bmp = <0x1e>; /* lan port bitmap */
|
||||
switch_wan_bmp = <0x0>; /* wan port bitmap */
|
||||
qca,ar8327-initvals = <
|
||||
0x00004 0x7600000 /* PAD0_MODE */
|
||||
0x00008 0x1000000 /* PAD5_MODE */
|
||||
0x0000c 0x80 /* PAD6_MODE */
|
||||
0x00010 0x2613a0 /* PORT6 FORCE MODE*/
|
||||
0x000e4 0xaa545 /* MAC_POWER_SEL */
|
||||
0x000e0 0xc74164de /* SGMII_CTRL */
|
||||
0x0007c 0x4e /* PORT0_STATUS */
|
||||
0x00094 0x4e /* PORT6_STATUS */
|
||||
>;
|
||||
qcom,port_phyinfo {
|
||||
port@0 {
|
||||
port_id = <1>;
|
||||
phy_address = <0>;
|
||||
};
|
||||
port@1 {
|
||||
port_id = <2>;
|
||||
phy_address = <1>;
|
||||
};
|
||||
port@2 {
|
||||
port_id = <3>;
|
||||
phy_address = <2>;
|
||||
};
|
||||
port@3 {
|
||||
port_id = <4>;
|
||||
phy_address = <3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wifi0: wifi@c000000 {
|
||||
qcom,bdf-addr = <0x4BA00000 0x4BA00000 0x4BA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-addr = <0x4CA00000 0x4CA00000 0x4CA00000
|
||||
0x0 0x0>;
|
||||
qcom,caldb-size = <0x200000>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
ess-uniphy@98000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
qcom,sps {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,usbbam@8B04000 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
qcom,diag@0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
dp1 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
clocks = <&gcc GCC_SNOC_GMAC0_AXI_CLK>;
|
||||
clock-names = "nss-snoc-gmac-axi-clk";
|
||||
qcom,id = <1>;
|
||||
reg = <0x39C00000 0x10000>;
|
||||
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,mactype = <2>;
|
||||
qcom,link-poll = <1>;
|
||||
qcom,phy-mdio-addr = <7>;
|
||||
mdio-bus = <&mdio0>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
dp2 {
|
||||
device_type = "network";
|
||||
compatible = "qcom,nss-dp";
|
||||
clocks = <&gcc GCC_SNOC_GMAC1_AXI_CLK>;
|
||||
clock-names = "nss-snoc-gmac-axi-clk";
|
||||
qcom,id = <2>;
|
||||
reg = <0x39D00000 0x10000>;
|
||||
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,mactype = <2>;
|
||||
local-mac-address = [000000000000];
|
||||
phy-mode = "sgmii";
|
||||
};
|
||||
|
||||
rpm_etm0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
lpass: lpass@0xA000000{
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pcm: pcm@0xA3C0000{
|
||||
pinctrl-0 = <&audio_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pcm_lb: pcm_lb@0 {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
status = "ok";
|
||||
};
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
pinctrl-0 = <&blsp0_uart_pins &phy_led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
blsp0_uart_pins: blsp0_uart_pins {
|
||||
blsp0_uart_rx_tx {
|
||||
pins = "gpio20", "gpio21";
|
||||
function = "blsp0_uart0";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
blsp1_uart_pins: blsp1_uart_pins {
|
||||
blsp1_uart_rx_tx {
|
||||
pins = "gpio23", "gpio25", "gpio24", "gpio26";
|
||||
function = "blsp1_uart2";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
blsp0_spi_pins: blsp0_spi_pins {
|
||||
mux {
|
||||
pins = "gpio10", "gpio11", "gpio12", "gpio13";
|
||||
function = "blsp0_spi";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
qspi_nand_pins: qspi_nand_pins {
|
||||
qspi_clock {
|
||||
pins = "gpio9";
|
||||
function = "qspi_clk";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_cs {
|
||||
pins = "gpio8";
|
||||
function = "qspi_cs";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_data_0 {
|
||||
pins = "gpio7";
|
||||
function = "qspi0";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_data_1 {
|
||||
pins = "gpio6";
|
||||
function = "qspi1";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_data_2 {
|
||||
pins = "gpio5";
|
||||
function = "qspi2";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
qspi_data_3 {
|
||||
pins = "gpio4";
|
||||
function = "qspi3";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
mdio1_pins: mdio_pinmux {
|
||||
mux_0 {
|
||||
pins = "gpio36";
|
||||
function = "mdc";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
mux_1 {
|
||||
pins = "gpio37";
|
||||
function = "mdio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
phy_led_pins: phy_led_pins {
|
||||
gephy_led_pin {
|
||||
pins = "gpio46";
|
||||
function = "led0";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
i2c_pins: i2c_pins {
|
||||
i2c_scl {
|
||||
pins = "gpio25";
|
||||
function = "blsp2_i2c1";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
i2c_sda {
|
||||
pins = "gpio26";
|
||||
function = "blsp2_i2c1";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
button_pins: button_pins {
|
||||
wps_button {
|
||||
pins = "gpio38";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
audio_pins: audio_pinmux {
|
||||
mux_1 {
|
||||
pins = "gpio24";
|
||||
function = "audio_rxbclk";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_2 {
|
||||
pins = "gpio25";
|
||||
function = "audio_rxfsync";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_3 {
|
||||
pins = "gpio26";
|
||||
function = "audio_rxd";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_4 {
|
||||
pins = "gpio27";
|
||||
function = "audio_txmclk";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_5 {
|
||||
pins = "gpio28";
|
||||
function = "audio_txbclk";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_6 {
|
||||
pins = "gpio29";
|
||||
function = "audio_txfsync";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
|
||||
mux_7 {
|
||||
pins = "gpio30";
|
||||
function = "audio_txd";
|
||||
drive-strength = <8>;
|
||||
bias-pull-down;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&soc {
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
button@1 {
|
||||
label = "wps";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usb3 {
|
||||
qcom,multiplexed-phy;
|
||||
qcom,phy-mux-regs = <&tcsr_q6_block 0x2540>;
|
||||
device-power-gpio = <&tlmm 24 1>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&eud {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1 {
|
||||
status = "disabled";
|
||||
perst-gpio = <&tlmm 18 1>;
|
||||
};
|
||||
|
||||
&pcie_x2 {
|
||||
status = "ok";
|
||||
perst-gpio = <&tlmm 15 1>;
|
||||
};
|
||||
|
||||
&bt {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wcss {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&q6v5_wcss {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&q6v5_m3 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&tcsr_mutex_block {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tcsr_mutex {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&smem {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&apcs_glb {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tcsr_q6_block {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qcom_q6v5_wcss {
|
||||
#ifdef __IPQ_MEM_PROFILE_256_MB__
|
||||
memory-region = <&q6_region>, <&q6_etr_region>;
|
||||
#else
|
||||
memory-region = <&q6_region>, <&q6_etr_region>,
|
||||
<&q6_caldb_region>;
|
||||
#endif
|
||||
/* IPQ5018 */
|
||||
q6v5_wcss_userpd1 {
|
||||
m3_firmware = "IPQ5018/m3_fw.mdt";
|
||||
interrupts-extended = <&wcss_smp2p_in 8 0>,
|
||||
<&wcss_smp2p_in 9 0>,
|
||||
<&wcss_smp2p_in 12 0>,
|
||||
<&wcss_smp2p_in 11 0>;
|
||||
interrupt-names ="fatal",
|
||||
"ready",
|
||||
"spawn_ack",
|
||||
"stop-ack";
|
||||
qcom,smem-states = <&wcss_smp2p_out 8>,
|
||||
<&wcss_smp2p_out 9>,
|
||||
<&wcss_smp2p_out 10>;
|
||||
qcom,smem-state-names = "shutdown",
|
||||
"stop",
|
||||
"spawn";
|
||||
qca,asid = <1>;
|
||||
qca,auto-restart;
|
||||
qca,int_radio;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c_0 {
|
||||
pinctrl-0 = <&i2c_pins>;
|
||||
pinctrl-names = "default";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&dbm_1p5 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&msm_imem {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&ssuniphy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&hs_m31phy_0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1phy {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&pcie_x2phy {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pcie_x1_rp {
|
||||
status = "disabled";
|
||||
|
||||
mhi_0: qcom,mhi@0 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie_x2_rp {
|
||||
status = "ok";
|
||||
|
||||
mhi_1: qcom,mhi@1 {
|
||||
reg = <0 0 0 0 0 >;
|
||||
qrtr_instance_id = <0x20>;
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
memory-region = <&mhi_region1>;
|
||||
#if !defined(__CNSS2__)
|
||||
base-addr = <0x4CC00000>;
|
||||
m3-dump-addr = <0x4E000000>;
|
||||
etr-addr = <0x4E100000>;
|
||||
qcom,caldb-addr = <0x4E200000>;
|
||||
qcom,tgt-mem-mode = <0x1>;
|
||||
mhi,max-channels = <30>;
|
||||
mhi,timeout = <10000>;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
/* IPQ5018 */
|
||||
qcom,board_id = <0x24>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&wifi3 {
|
||||
/* QCN9000 5G */
|
||||
board_id = <0xa0>;
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&qfprom {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&tsens {
|
||||
status = "ok";
|
||||
};
|
||||
1442
feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-xunison-d50.dtsi
Executable file
1442
feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq5018-xunison-d50.dtsi
Executable file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,24 @@
|
||||
KERNEL_LOADADDR := 0x41208000
|
||||
|
||||
define Device/FitImage
|
||||
KERNEL_SUFFIX := -uImage.itb
|
||||
KERNEL = kernel-bin | libdeflate-gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
|
||||
KERNEL_NAME := Image
|
||||
endef
|
||||
|
||||
define Device/FitImageLzma
|
||||
KERNEL_SUFFIX := -uImage.itb
|
||||
KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb
|
||||
KERNEL_NAME := Image
|
||||
endef
|
||||
|
||||
define Device/UbiFit
|
||||
KERNEL_IN_UBI := 1
|
||||
IMAGES := factory.ubi sysupgrade.bin
|
||||
IMAGE/factory.ubi := append-ubi
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
|
||||
define Device/cig_wf186w
|
||||
DEVICE_TITLE := Cigtech WF-186w
|
||||
DEVICE_DTS := qcom-ipq5018-cig-wf186w
|
||||
@@ -27,6 +46,15 @@ define Device/cybertan_eww631_a1
|
||||
endef
|
||||
TARGET_DEVICES += cybertan_eww631_a1
|
||||
|
||||
define Device/wallys_dr5018
|
||||
DEVICE_TITLE := Wallys DR5018
|
||||
DEVICE_DTS := qcom-ipq5018-wallys-dr5018
|
||||
SUPPORTED_DEVICES := wallys,dr5018
|
||||
DEVICE_PACKAGES := ath11k-wifi-wallys-dr5018 ath11k-firmware-ipq50xx-spruce ath11k-firmware-qcn6122
|
||||
DEVICE_DTS_CONFIG := config@mp03.5-c1
|
||||
endef
|
||||
TARGET_DEVICES += wallys_dr5018
|
||||
|
||||
define Device/cybertan_eww631_b1
|
||||
DEVICE_TITLE := CyberTan EWW631-B1
|
||||
DEVICE_DTS := qcom-ipq5018-eww631-b1
|
||||
@@ -92,6 +120,33 @@ define Device/qcom_mp03_3
|
||||
endef
|
||||
TARGET_DEVICES += qcom_mp03_3
|
||||
|
||||
define Device/hfcl_ion4xi_w
|
||||
DEVICE_TITLE := HFCL ION4xi_w
|
||||
DEVICE_DTS := qcom-ipq5018-hfcl-ion4xi_w
|
||||
SUPPORTED_DEVICES := hfcl,ion4xi_w
|
||||
DEVICE_PACKAGES := ath11k-wifi-hfcl-ion4xi_w ath11k-firmware-ipq50xx-map-spruce
|
||||
DEVICE_DTS_CONFIG := config@mp03.3
|
||||
endef
|
||||
TARGET_DEVICES += hfcl_ion4xi_w
|
||||
|
||||
define Device/hfcl_ion4x_w
|
||||
DEVICE_TITLE := HFCL ION4x_w
|
||||
DEVICE_DTS := qcom-ipq5018-hfcl-ion4x_w
|
||||
SUPPORTED_DEVICES := hfcl,ion4x_w
|
||||
DEVICE_PACKAGES := ath11k-wifi-hfcl-ion4x_w ath11k-firmware-ipq50xx-map-spruce
|
||||
DEVICE_DTS_CONFIG := config@mp03.3
|
||||
endef
|
||||
TARGET_DEVICES += hfcl_ion4x_w
|
||||
|
||||
define Device/hfcl_ion4xi_HMR
|
||||
DEVICE_TITLE := HFCL ION4xi_HMR
|
||||
DEVICE_DTS := qcom-ipq5018-hfcl-ion4xi_HMR
|
||||
SUPPORTED_DEVICES := hfcl,ion4xi_HMR
|
||||
DEVICE_PACKAGES := ath11k-wifi-hfcl-ion4xi_HMR ath11k-firmware-ipq50xx-map-spruce
|
||||
DEVICE_DTS_CONFIG := config@mp03.3
|
||||
endef
|
||||
TARGET_DEVICES += hfcl_ion4xi_HMR
|
||||
|
||||
define Device/yuncore_fap655
|
||||
DEVICE_TITLE := Yuncore FAP650
|
||||
DEVICE_DTS := qcom-ipq5018-yuncore-fap655
|
||||
@@ -100,3 +155,30 @@ define Device/yuncore_fap655
|
||||
DEVICE_DTS_CONFIG := config@mp03.3
|
||||
endef
|
||||
TARGET_DEVICES += yuncore_fap655
|
||||
|
||||
define Device/xunison_d50-5g
|
||||
DEVICE_TITLE := Xunison D50-5G
|
||||
DEVICE_DTS := qcom-ipq5018-xunison-d50-5g
|
||||
SUPPORTED_DEVICES := xunison,d50_5g
|
||||
DEVICE_PACKAGES := ath11k-wifi-xunison-d50 ath11k-firmware-ipq50xx ath11k-firmware-qcn9000
|
||||
DEVICE_DTS_CONFIG := config@mp03.1
|
||||
IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
|
||||
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
||||
IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
|
||||
IMAGE/nand-factory.ubi := append-ubi
|
||||
endef
|
||||
TARGET_DEVICES += xunison_d50-5g
|
||||
|
||||
define Device/xunison_d50
|
||||
DEVICE_TITLE := Xunison D50
|
||||
DEVICE_DTS := qcom-ipq5018-xunison-d50
|
||||
SUPPORTED_DEVICES := xunison,d50
|
||||
DEVICE_PACKAGES := ath11k-wifi-xunison-d50 ath11k-firmware-ipq50xx ath11k-firmware-qcn9000 ath11k-firmware-qcn6122
|
||||
DEVICE_DTS_CONFIG := config@mp03.1
|
||||
IMAGES := sysupgrade.tar nand-factory.bin nand-factory.ubi
|
||||
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
||||
IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
|
||||
IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand
|
||||
IMAGE/nand-factory.ubi := append-ubi | qsdk-ipq-factory-nand
|
||||
endef
|
||||
TARGET_DEVICES += xunison_d50
|
||||
|
||||
@@ -13,14 +13,23 @@ define Device/cig_wf660a
|
||||
endef
|
||||
TARGET_DEVICES += cig_wf660a
|
||||
|
||||
define Device/cig_wf188n
|
||||
define Device/cig_wf188n-ca
|
||||
DEVICE_TITLE := Cigtech WF-188n
|
||||
DEVICE_DTS := qcom-ipq6018-cig-wf188n
|
||||
DEVICE_DTS_CONFIG := config@cp03-c1
|
||||
SUPPORTED_DEVICES := cig,wf188n
|
||||
DEVICE_PACKAGES := ath11k-wifi-cig-wf188n uboot-env
|
||||
DEVICE_PACKAGES := ath11k-wifi-cig-wf188n-ca uboot-env
|
||||
endef
|
||||
TARGET_DEVICES += cig_wf188n
|
||||
TARGET_DEVICES += cig_wf188n-ca
|
||||
|
||||
define Device/cig_wf188n-us
|
||||
DEVICE_TITLE := Cigtech WF-188n
|
||||
DEVICE_DTS := qcom-ipq6018-cig-wf188n
|
||||
DEVICE_DTS_CONFIG := config@cp03-c1
|
||||
SUPPORTED_DEVICES := cig,wf188n
|
||||
DEVICE_PACKAGES := ath11k-wifi-cig-wf188n-us uboot-env
|
||||
endef
|
||||
TARGET_DEVICES += cig_wf188n-us
|
||||
|
||||
define Device/hfcl_ion4xe
|
||||
DEVICE_TITLE := HFCL ION4Xe
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
--- a/drivers/net/phy/Kconfig 2023-03-16 09:38:22.742281029 +0800
|
||||
+++ b/drivers/net/phy/Kconfig 2023-03-16 09:41:46.400370236 +0800
|
||||
Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/Kconfig
|
||||
===================================================================
|
||||
--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/Kconfig
|
||||
+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/Kconfig
|
||||
@@ -332,6 +332,10 @@ config RTL8367B_PHY
|
||||
tristate "Driver fot the Realtek RTL8367R-VB switch"
|
||||
select SWCONFIG
|
||||
|
||||
tristate "Driver fot the Realtek RTL8367R-VB switch"
|
||||
select SWCONFIG
|
||||
|
||||
+config RTL8367C_PHY
|
||||
+ tristate "Driver fot the Realtek RTL8367C/S switch"
|
||||
+ select SWCONFIG
|
||||
+
|
||||
endif # RTL8366_SMI
|
||||
|
||||
|
||||
source "drivers/net/phy/b53/Kconfig"
|
||||
|
||||
--- a/drivers/net/phy/Makefile 2023-03-16 09:38:12.210161055 +0800
|
||||
+++ b/drivers/net/phy/Makefile 2023-03-16 09:41:14.548069150 +0800
|
||||
Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/Makefile
|
||||
===================================================================
|
||||
--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/Makefile
|
||||
+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/Makefile
|
||||
@@ -34,6 +34,7 @@ obj-$(CONFIG_RTL8366S_PHY) += rtl8366s.o
|
||||
obj-$(CONFIG_RTL8366RB_PHY) += rtl8366rb.o
|
||||
obj-$(CONFIG_RTL8367_PHY) += rtl8367.o
|
||||
@@ -22,9 +25,10 @@
|
||||
obj-$(CONFIG_LSI_ET1011C_PHY) += et1011c.o
|
||||
obj-$(CONFIG_PSB6970_PHY) += psb6970.o
|
||||
obj-$(CONFIG_B53) += b53/
|
||||
|
||||
--- a/drivers/net/phy/rtl8366_smi.h 2023-03-21 09:29:19.422575683 +0800
|
||||
+++ b/drivers/net/phy/rtl8366_smi.h 2023-03-20 08:55:48.041464368 +0800
|
||||
Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8366_smi.h
|
||||
===================================================================
|
||||
--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/rtl8366_smi.h
|
||||
+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8366_smi.h
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/phy.h>
|
||||
#include <linux/switch.h>
|
||||
@@ -80,8 +84,10 @@
|
||||
|
||||
struct rtl8366_smi* rtl8366_smi_probe(struct platform_device *pdev);
|
||||
|
||||
--- a/drivers/net/phy/rtl8366_smi.c 2023-03-21 09:28:56.426383208 +0800
|
||||
+++ b/drivers/net/phy/rtl8366_smi.c 2023-03-21 09:15:07.869753295 +0800
|
||||
Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8366_smi.c
|
||||
===================================================================
|
||||
--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/rtl8366_smi.c
|
||||
+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8366_smi.c
|
||||
@@ -19,6 +19,8 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/of_gpio.h>
|
||||
@@ -382,6 +388,18 @@
|
||||
int rtl8366_sw_get_vlan_info(struct switch_dev *dev,
|
||||
const struct switch_attr *attr,
|
||||
struct switch_val *val)
|
||||
@@ -1207,9 +1428,9 @@ int rtl8366_sw_set_vlan_enable(struct sw
|
||||
if (attr->ofs > 2)
|
||||
return -EINVAL;
|
||||
|
||||
- if (attr->ofs == 1)
|
||||
+/* if (attr->ofs == 1)
|
||||
err = rtl8366_enable_vlan(smi, val->value.i);
|
||||
- else
|
||||
+ else*/
|
||||
err = rtl8366_enable_vlan4k(smi, val->value.i);
|
||||
|
||||
return err;
|
||||
@@ -1237,25 +1458,27 @@ static int __rtl8366_smi_init(struct rtl
|
||||
{
|
||||
int err;
|
||||
@@ -525,9 +543,11 @@
|
||||
+ return ERR_PTR(err);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rtl8366_smi_probe);
|
||||
|
||||
--- a/drivers/net/phy/rtl8367c.c 2023-05-31 15:05:26.928595310 +0800
|
||||
+++ b/drivers/net/phy/rtl8367c.c 2023-05-31 15:09:38.943976240 +0800
|
||||
|
||||
Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8367c.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/rtl8367c.c
|
||||
@@ -0,0 +1,2462 @@
|
||||
+/*
|
||||
+ * Platform driver for the Realtek RTL8367R-VB/S/C ethernet switches
|
||||
@@ -2432,7 +2452,7 @@
|
||||
+ data[0] |= (vlan4k->untag & RTL8367B_TA_VLAN0_UNTAG_MASK) <<
|
||||
+ RTL8367B_TA_VLAN0_UNTAG_SHIFT;
|
||||
+ data[1] = (vlan4k->fid & RTL8367B_TA_VLAN1_FID_MASK) <<
|
||||
+ RTL8367B_TA_VLAN1_FID_SHIFT;
|
||||
+ RTL8367B_TA_VLAN1_FID_SHIFT | (1 << 14);
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(data); i++)
|
||||
+ REG_WR(smi, RTL8367B_TA_WRDATA_REG(i), data[i]);
|
||||
@@ -2991,8 +3011,10 @@
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
+MODULE_ALIAS("platform:" RTL8367B_DRIVER_NAME);
|
||||
+
|
||||
--- a/include/linux/rtl8367.h 2023-05-31 16:18:04.480612826 +0800
|
||||
+++ b/include/linux/rtl8367.h 2023-05-25 16:18:41.452870197 +0800
|
||||
Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/include/linux/rtl8367.h
|
||||
===================================================================
|
||||
--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/include/linux/rtl8367.h
|
||||
+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/include/linux/rtl8367.h
|
||||
@@ -18,6 +18,8 @@ enum rtl8367_port_speed {
|
||||
RTL8367_PORT_SPEED_10 = 0,
|
||||
RTL8367_PORT_SPEED_100,
|
||||
@@ -3016,8 +3038,10 @@
|
||||
};
|
||||
|
||||
struct rtl8367_extif_config {
|
||||
--- a/drivers/net/phy/mdio-qca.c 2023-05-31 16:18:19.152756159 +0800
|
||||
+++ b/drivers/net/phy/mdio-qca.c 2023-05-31 16:21:18.086437571 +0800
|
||||
Index: linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/mdio-qca.c
|
||||
===================================================================
|
||||
--- linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016.orig/drivers/net/phy/mdio-qca.c
|
||||
+++ linux-4.4.60-qsdk-11f09717303ecd83c3a64e9efe23f25921dc1016/drivers/net/phy/mdio-qca.c
|
||||
@@ -37,8 +37,9 @@
|
||||
#define MDIO_CTRL_4_ACCESS_CODE_C45_ADDR 0
|
||||
#define MDIO_CTRL_4_ACCESS_CODE_C45_WRITE 1
|
||||
|
||||
13
feeds/ipq807x/qca-ssdk/patches/400-max_vlan.patch
Normal file
13
feeds/ipq807x/qca-ssdk/patches/400-max_vlan.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
Index: qca-ssdk/include/init/ssdk_plat.h
|
||||
===================================================================
|
||||
--- qca-ssdk.orig/include/init/ssdk_plat.h
|
||||
+++ qca-ssdk/include/init/ssdk_plat.h
|
||||
@@ -160,7 +160,7 @@
|
||||
#define AR8327_NUM_PHYS 5
|
||||
#define AR8327_PORT_CPU 0
|
||||
#define AR8327_NUM_PORTS 7
|
||||
-#define AR8327_MAX_VLANS 128
|
||||
+#define AR8327_MAX_VLANS 4095
|
||||
|
||||
#define MII_PHYADDR_C45 (1<<30)
|
||||
|
||||
@@ -35,6 +35,8 @@ define Package/qca-thermald-10.4/install
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/install/etc/thermal/ipq-thermald-8064.conf $(1)/etc/thermal
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/install/etc/thermal/ipq-thermald-8066.conf $(1)/etc/thermal
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/install/etc/thermal/ipq-thermald-8069.conf $(1)/etc/thermal
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/install/etc/thermal/ipq-thermald-cybertan-eww631-a1.conf $(1)/etc/thermal
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/install/etc/thermal/ipq-thermald-cybertan-eww631-b1.conf $(1)/etc/thermal
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/thermal.init $(1)/etc/init.d/thermal
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
|
||||
@@ -5,6 +5,8 @@ START=98
|
||||
SERVICE_WRITE_PID=1
|
||||
SERVICE_DAEMONIZE=1
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
start() {
|
||||
. /lib/functions.sh
|
||||
|
||||
@@ -14,10 +16,19 @@ start() {
|
||||
config_get_bool enabled config 'Enabled' '0'
|
||||
|
||||
[ "$enabled" -gt 0 ] || return 1
|
||||
|
||||
service_start /usr/sbin/thermald
|
||||
case "$board" in
|
||||
cybertan,eww631-a1)
|
||||
service_start /usr/sbin/thermald -c /etc/thermal/ipq-thermald-cybertan-eww631-a1.conf
|
||||
;;
|
||||
cybertan,eww631-b1)
|
||||
service_start /usr/sbin/thermald -c /etc/thermal/ipq-thermald-cybertan-eww631-b1.conf
|
||||
;;
|
||||
*)
|
||||
service_start /usr/sbin/thermald
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
stop() {
|
||||
service_stop /usr/sbin/thermald
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,9 @@ endif
|
||||
|
||||
export CC = $(CROSS)gcc
|
||||
export CFLAGS += -O2 -Wall -DIPQ_806x -c
|
||||
ifeq ($(SoC),$(filter $(SoC),ipq50xx ipq50xx_64))
|
||||
export CFLAGS += -DIPQ_5000
|
||||
endif
|
||||
export STRIP = $(CROSS)strip
|
||||
export SOURCES= \
|
||||
thermal.c \
|
||||
@@ -63,6 +66,7 @@ install: local
|
||||
cp -a -f $(ALL) $(INSTALL_ROOT)/usr/sbin/
|
||||
mkdir -p $(INSTALL_ROOT)/etc/thermal
|
||||
cp -a -f ipq-thermald-806?.conf $(INSTALL_ROOT)/etc/thermal/
|
||||
cp -a -f ipq-thermald-cybertan-eww631-*.conf $(INSTALL_ROOT)/etc/thermal/
|
||||
@echo Installed outputs from `pwd`
|
||||
|
||||
# Remove all generated files
|
||||
|
||||
15
feeds/ipq807x/qca-thermald-10.4/src/ipq-thermald-cybertan-eww631-a1.conf
Executable file
15
feeds/ipq807x/qca-thermald-10.4/src/ipq-thermald-cybertan-eww631-a1.conf
Executable file
@@ -0,0 +1,15 @@
|
||||
sampling 5000
|
||||
|
||||
[tsens_tz_sensor1]
|
||||
sampling 5000
|
||||
thresholds 105 110 115 119 120
|
||||
thresholds_clr 0 100 105 110 115
|
||||
actions cooling cooling cooling cooling shutdown
|
||||
action_info 35 35 50 70 800000
|
||||
|
||||
[tsens_tz_sensor4]
|
||||
sampling 5000
|
||||
thresholds 105 107 112 119 120
|
||||
thresholds_clr 0 100 105 110 115
|
||||
actions cooling cooling cooling cooling shutdown
|
||||
action_info 0 20 30 50 800000
|
||||
15
feeds/ipq807x/qca-thermald-10.4/src/ipq-thermald-cybertan-eww631-b1.conf
Executable file
15
feeds/ipq807x/qca-thermald-10.4/src/ipq-thermald-cybertan-eww631-b1.conf
Executable file
@@ -0,0 +1,15 @@
|
||||
sampling 5000
|
||||
|
||||
[tsens_tz_sensor1]
|
||||
sampling 5000
|
||||
thresholds 70 80 90 105 115 120
|
||||
thresholds_clr 0 75 85 100 110 113
|
||||
actions cooling cooling cooling cooling cooling shutdown
|
||||
action_info 0 25 45 65 90 800000
|
||||
|
||||
[tsens_tz_sensor4]
|
||||
sampling 5000
|
||||
thresholds 70 80 90 105 115 120
|
||||
thresholds_clr 0 75 85 100 110 113
|
||||
actions cooling cooling cooling cooling cooling shutdown
|
||||
action_info 0 15 25 45 60 800000
|
||||
@@ -138,7 +138,14 @@ enum therm_msm_id {
|
||||
THERM_IPQ_6018,
|
||||
THERM_IPQ_6028,
|
||||
THERM_IPQ_6000,
|
||||
THERM_IPQ_6010
|
||||
THERM_IPQ_6010,
|
||||
THERM_IPQ_6005,
|
||||
THERM_IPQ_5010,
|
||||
THERM_IPQ_5018,
|
||||
THERM_IPQ_5028,
|
||||
THERM_IPQ_5000,
|
||||
THERM_IPQ_0509,
|
||||
THERM_IPQ_0518
|
||||
};
|
||||
|
||||
enum therm_msm_id therm_get_msm_id(void);
|
||||
@@ -158,6 +165,9 @@ enum {
|
||||
#ifdef IPQ_806x
|
||||
POWERSAVE,
|
||||
NSS_FREQ,
|
||||
#ifdef IPQ_5000
|
||||
COOLING,
|
||||
#endif
|
||||
#else
|
||||
REPORT,
|
||||
LCD,
|
||||
@@ -311,6 +321,9 @@ int cpufreq_request(int cpu, int requester, int temperature, int frequency);
|
||||
int powersave_request( int enable );
|
||||
int nssfreq_request( int frequency );
|
||||
int powerctl_restart(int reset_max);
|
||||
#ifdef IPQ_5000
|
||||
int cooling_request( int requester, int temperature, int percentage );
|
||||
#endif
|
||||
#else
|
||||
int report_action(int requester, int temperature, int level, int is_trigger);
|
||||
int lcd_brightness_request(int requester, int temperature, int value);
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#define NUM_US_IN_MS (1000)
|
||||
#define CPU_BUF_MAX (50)
|
||||
#define HOTPLUG_BUF_MAX (1024)
|
||||
|
||||
#define SHUTDOWN_BUF_MAX (100)
|
||||
enum {
|
||||
MITIGATION_ENABLE = 0,
|
||||
MITIGATION_DISABLE = 1
|
||||
@@ -116,6 +116,8 @@ int shutdown_action(int requester, int temperature, int delay)
|
||||
{
|
||||
static int shutdown_requested = 0;
|
||||
int ret = 0;
|
||||
int fd;
|
||||
char buf[SHUTDOWN_BUF_MAX] = {0};
|
||||
|
||||
if (requester < 0 ||
|
||||
requester >= SENSOR_IDX_MAX) {
|
||||
@@ -134,6 +136,15 @@ int shutdown_action(int requester, int temperature, int delay)
|
||||
"with %d millisecond delay\n",
|
||||
SENSOR(requester), temperature, delay);
|
||||
|
||||
fd = open("/dev/console", O_RDWR, 0);
|
||||
if (fd >= 0)
|
||||
{
|
||||
snprintf(buf, SHUTDOWN_BUF_MAX, "THERMAL SHUTDOWN: "
|
||||
"%s reached temperature %d with %d mSec Delay \n",
|
||||
SENSOR(requester), temperature, delay);
|
||||
write(fd,buf,SHUTDOWN_BUF_MAX);
|
||||
close(fd);
|
||||
}
|
||||
usleep(delay * NUM_US_IN_MS);
|
||||
|
||||
/* commit buffers to disk and shutdown */
|
||||
@@ -403,7 +414,7 @@ int cpufreq_init()
|
||||
return -1;
|
||||
}
|
||||
info("Number of cpus :%d\n", num_cpus);
|
||||
memset(online, 0, MAX_CPUS);
|
||||
memset(online, 0, MAX_CPUS * sizeof(int));
|
||||
|
||||
for (cpu = 0; cpu < num_cpus; cpu++) {
|
||||
snprintf(finfo_buf, MAX_PATH, CPU_SYSFS(FMAX_INFO_NODE), cpu);
|
||||
@@ -1384,6 +1395,99 @@ int nssfreq_request(int frequency)
|
||||
pthread_mutex_unlock(&nssfreq_set_mtx);
|
||||
return ret;
|
||||
}
|
||||
#ifdef IPQ_5000
|
||||
/*===========================================================================
|
||||
FUNCTION cooling_request
|
||||
|
||||
Action function to request wlan throttling action
|
||||
|
||||
ARGUMENTS
|
||||
percentage => duty cycle of tx queues suspending
|
||||
|
||||
RETURN VALUE
|
||||
0 on success, -1 on failure.
|
||||
===========================================================================*/
|
||||
static int cooling_req[2];
|
||||
#define COOLING_24G_MITIGATION_SYSFS "/sys/class/thermal/cooling_device0/cur_state"
|
||||
#define COOLING_5G_MITIGATION_SYSFS "/sys/class/thermal/cooling_device1/cur_state"
|
||||
#define MAX_COOLING_MITIGATION_PERCENTAGE (90)
|
||||
|
||||
static pthread_mutex_t cooling_mtx = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
int cooling_request(int requester, int temperature, int percentage )
|
||||
{
|
||||
int ret = -1;
|
||||
char buf[UINT_BUF_MAX] = {0};
|
||||
static int current_24g_percentage, current_5g_percentage;
|
||||
char * end_ptr;
|
||||
|
||||
if ((NULL == COOLING_24G_MITIGATION_SYSFS) || (NULL == COOLING_5G_MITIGATION_SYSFS)) {
|
||||
msg("%s: Unsupported action on current target", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
temperature = RCONV(temperature);
|
||||
|
||||
if (percentage < 0)
|
||||
percentage = 0;
|
||||
|
||||
if (percentage > MAX_COOLING_MITIGATION_PERCENTAGE)
|
||||
percentage = MAX_COOLING_MITIGATION_PERCENTAGE;
|
||||
|
||||
pthread_mutex_lock(&cooling_mtx);
|
||||
|
||||
if (requester == 1) {
|
||||
/* get current cooling percentage */
|
||||
if (read_line_from_file(COOLING_24G_MITIGATION_SYSFS, buf, UINT_BUF_MAX) > 0) {
|
||||
current_24g_percentage = strtol(buf, &end_ptr, 10);
|
||||
dbgmsg("current 2g cooling percentage(%d)\n", current_24g_percentage);
|
||||
}
|
||||
|
||||
/* Aggregate cooling throttling percentage for 24g */
|
||||
cooling_req[requester] = percentage;
|
||||
|
||||
if (percentage != current_24g_percentage) {
|
||||
snprintf(buf, UINT_BUF_MAX, "%d", percentage);
|
||||
if (write_to_file(COOLING_24G_MITIGATION_SYSFS, buf, strlen(buf)) > 0) {
|
||||
info("ACTION: COOLING - "
|
||||
"Setting 24G COOLING mitigation to %d\n", percentage);
|
||||
ret = 0;
|
||||
} else {
|
||||
msg("Unable to set COOLING mitigation to %d\n", percentage);
|
||||
}
|
||||
} else {
|
||||
dbgmsg("COOLING mitigation already at %d percentage\n", percentage);
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
else if (requester == 4) {
|
||||
/* get current 5g cooling percentage */
|
||||
if (read_line_from_file(COOLING_5G_MITIGATION_SYSFS, buf, UINT_BUF_MAX) > 0) {
|
||||
current_5g_percentage = strtol(buf, &end_ptr, 10);
|
||||
dbgmsg("current 5g cooling percentage(%d)\n", current_5g_percentage);
|
||||
}
|
||||
|
||||
/* Aggregate cooling throttling percentage for 5g */
|
||||
cooling_req[requester] = percentage;
|
||||
|
||||
if (percentage != current_5g_percentage) {
|
||||
snprintf(buf, UINT_BUF_MAX, "%d", percentage);
|
||||
if (write_to_file(COOLING_5G_MITIGATION_SYSFS, buf, strlen(buf)) > 0) {
|
||||
info("ACTION: COOLING - "
|
||||
"Setting 5G COOLING mitigation to %d\n", percentage);
|
||||
ret = 0;
|
||||
} else {
|
||||
msg("Unable to set COOLING mitigation to %d\n", percentage);
|
||||
}
|
||||
} else {
|
||||
dbgmsg("COOLING mitigation already at %d percentage\n", percentage);
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&cooling_mtx);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*===========================================================================
|
||||
FUNCTION set_mitigation_level
|
||||
|
||||
@@ -43,6 +43,9 @@ static char *action_names[] = {
|
||||
#ifdef IPQ_806x
|
||||
"powersave",
|
||||
"nss",
|
||||
#ifdef IPQ_5000
|
||||
"cooling"
|
||||
#endif
|
||||
#else
|
||||
"report",
|
||||
"lcd",
|
||||
@@ -337,6 +340,41 @@ def_sensor_setting_t def_cp_setting = {
|
||||
.sensors = def_sensor_cp
|
||||
};
|
||||
|
||||
/* TODO: Fix desc, id, lvl_trig, lvl_clr */
|
||||
sensor_setting_t def_sensor_mp[] = {
|
||||
{
|
||||
.desc = "tsens_tz_sensor4",
|
||||
.id = 4,
|
||||
.disabled = 0, /* Sensor enabled */
|
||||
.sampling_period_us = 1000,
|
||||
.num_thresholds = 1, /* No. of threshold levels */
|
||||
|
||||
.t = {
|
||||
{
|
||||
.lvl_trig = 120,
|
||||
.num_actions = 1,
|
||||
.actions = {
|
||||
{
|
||||
.action = SHUTDOWN,
|
||||
.info = 1000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/* Internal variables initialized with threshold count */
|
||||
._n_thresholds = 1,
|
||||
._n_to_clear = 1,
|
||||
._n_actions = 1,
|
||||
._n_action_info = 1
|
||||
},
|
||||
};
|
||||
|
||||
def_sensor_setting_t def_mp_setting = {
|
||||
.sensor_count = 1,
|
||||
.sensors = def_sensor_mp
|
||||
};
|
||||
|
||||
/* IPQ806x */
|
||||
sensor_setting_t def_ipq8064[] = {
|
||||
{
|
||||
@@ -638,9 +676,19 @@ void update_def_sensor_settings(thermal_setting_t *settings)
|
||||
case THERM_IPQ_6028:
|
||||
case THERM_IPQ_6000:
|
||||
case THERM_IPQ_6010:
|
||||
case THERM_IPQ_6005:
|
||||
msg("==== IPQ60xx ====\n");
|
||||
def_sensor_setting = &def_cp_setting;
|
||||
break;
|
||||
case THERM_IPQ_5010:
|
||||
case THERM_IPQ_5018:
|
||||
case THERM_IPQ_5028:
|
||||
case THERM_IPQ_5000:
|
||||
case THERM_IPQ_0509:
|
||||
case THERM_IPQ_0518:
|
||||
msg("==== IPQ50xx ====\n");
|
||||
def_sensor_setting = &def_mp_setting;
|
||||
break;
|
||||
default:
|
||||
msg("==== DEFAULT ===\n");
|
||||
def_sensor_setting = &def_hk_setting;
|
||||
@@ -851,6 +899,13 @@ int parse_config(thermal_setting_t *settings, int fd)
|
||||
|| settings->soc_id == THERM_IPQ_6000
|
||||
|| settings->soc_id == THERM_IPQ_6010)
|
||||
i = TSENS_TZ_SENSOR4;
|
||||
else if ( settings->soc_id == THERM_IPQ_5010
|
||||
|| settings->soc_id == THERM_IPQ_5018
|
||||
|| settings->soc_id == THERM_IPQ_5028
|
||||
|| settings->soc_id == THERM_IPQ_5000
|
||||
|| settings->soc_id == THERM_IPQ_0509
|
||||
|| settings->soc_id == THERM_IPQ_0518)
|
||||
i = TSENS_TZ_SENSOR1;
|
||||
else
|
||||
i = TSENS_TZ_SENSOR0;
|
||||
|
||||
|
||||
@@ -73,6 +73,11 @@ static void clear_all_alarms(sensor_setting_t *sensor, int sensor_temp)
|
||||
case NSS_FREQ:
|
||||
nssfreq_request(-1);
|
||||
break;
|
||||
#ifdef IPQ_5000
|
||||
case COOLING:
|
||||
cooling_request(sensor->id, sensor_temp, 0);
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -186,6 +191,11 @@ void *sensor_monitor(void *vsensor)
|
||||
case NSS_FREQ:
|
||||
nssfreq_request(sensor->t[i].actions[j].info);
|
||||
break;
|
||||
#ifdef IPQ_5000
|
||||
case COOLING:
|
||||
cooling_request(sensor->id, sensor_temp, sensor->t[i].actions[j].info);
|
||||
break;
|
||||
#endif
|
||||
#else
|
||||
case REPORT:
|
||||
if (alarm_raised)
|
||||
|
||||
@@ -93,6 +93,14 @@ static therm_msm_soc_type msm_soc_table[] = {
|
||||
{THERM_IPQ_6028, 403},
|
||||
{THERM_IPQ_6000, 421},
|
||||
{THERM_IPQ_6010, 422},
|
||||
{THERM_IPQ_6005, 453},
|
||||
/* MP variants */
|
||||
{THERM_IPQ_5010, 446},
|
||||
{THERM_IPQ_5018, 447},
|
||||
{THERM_IPQ_5028, 448},
|
||||
{THERM_IPQ_5000, 503},
|
||||
{THERM_IPQ_0509, 504},
|
||||
{THERM_IPQ_0518, 505},
|
||||
};
|
||||
|
||||
int read_id_from_binary_file(char *path, size_t size) {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,3 @@
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/m3_fw.b00
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/m3_fw.b01
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/m3_fw.b02
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/m3_fw.b00
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/m3_fw.b01
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/m3_fw.b02
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,19 +1,23 @@
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b00
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b01
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b02
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b03
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b04
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b05
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b07
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b08
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b09
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b10
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b11
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b13
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b14
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b15
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b16
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b17
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b18
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b20
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/q6_fw.b21
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b00
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b01
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b02
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b03
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b04
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b05
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b07
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b08
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b09
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b10
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b11
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b13
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b14
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b15
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b16
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b17
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b18
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b20
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b21
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b22
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b23
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b25
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/q6_fw.b26
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,3 @@
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/qcn6122/m3_fw.b00
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/qcn6122/m3_fw.b01
|
||||
build/ms/bin/5018.wlanfw2.map_spruce_eval/PIL_IMAGES/qcn6122/m3_fw.b02
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/qcn6122/m3_fw.b00
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/qcn6122/m3_fw.b01
|
||||
build/ms/bin/5018.wlanfw2.map_spr_spr_eval_cs/PIL_IMAGES/qcn6122/m3_fw.b02
|
||||
|
||||
Binary file not shown.
@@ -24,8 +24,6 @@ endef
|
||||
#
|
||||
|
||||
ALLWIFIBOARDS:= \
|
||||
cig-wf188 \
|
||||
cig-wf188n \
|
||||
cig-wf660a \
|
||||
cig-wf194c \
|
||||
cig-wf194c4 \
|
||||
@@ -127,6 +125,21 @@ $(call Package/ath11k-wifi-default)
|
||||
TITLE:=meshpp-s618 bdf
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-edgecore-oap101
|
||||
$(call Package/ath11k-wifi-default)
|
||||
TITLE:=edgecore oap101 bdf
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-cig-wf188n-ca
|
||||
$(call Package/ath11k-wifi-default)
|
||||
TITLE:=cig-wf188n bdf CA
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-cig-wf188n-us
|
||||
$(call Package/ath11k-wifi-default)
|
||||
TITLE:=cig-wf188n bdf US
|
||||
endef
|
||||
|
||||
define ath11k-wifi-install-one-to
|
||||
$(INSTALL_DIR) $(2)/lib/firmware/$(3)/
|
||||
$(INSTALL_DATA) $(1) $(2)/lib/firmware/$(3)/board.bin
|
||||
@@ -248,8 +261,25 @@ define Package/ath11k-wifi-hfcl-ion4xi/install
|
||||
$(INSTALL_DATA) ./board-hfcl-ion4xi.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board-2.bin
|
||||
endef
|
||||
|
||||
$(eval $(call generate-ath11k-wifi-package,cig-wf188,Cigtech WF188))
|
||||
$(eval $(call generate-ath11k-wifi-package,cig-wf188n,Cigtech WF188n))
|
||||
define Package/ath11k-wifi-edgecore-oap101/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ5018/hw1.0/
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/qcn6122/hw1.0/
|
||||
$(INSTALL_DATA) ./board-edgecore-oap101.bin.IPQ5018 $(1)/lib/firmware/ath11k/IPQ5018/hw1.0/board.bin
|
||||
$(INSTALL_DATA) ./board-2-edgecore-oap101.bin.QCN6122 $(1)/lib/firmware/ath11k/qcn6122/hw1.0/board-2.bin
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-cig-wf188n-ca/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/
|
||||
$(INSTALL_DATA) ./board-cig-wf188n-ca.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin
|
||||
echo -n 'CA MY DE' > $(1)/lib/firmware/country
|
||||
endef
|
||||
|
||||
define Package/ath11k-wifi-cig-wf188n-us/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/
|
||||
$(INSTALL_DATA) ./board-cig-wf188n-us.bin.IPQ6018 $(1)/lib/firmware/ath11k/IPQ6018/hw1.0/board.bin
|
||||
echo -n 'US MY DE' > $(1)/lib/firmware/country
|
||||
endef
|
||||
|
||||
$(eval $(call generate-ath11k-wifi-package,cig-wf660a,Cigtech WF660a))
|
||||
$(eval $(call generate-ath11k-wifi-package,cig-wf194c,Cigtech WF194c))
|
||||
$(eval $(call generate-ath11k-wifi-package,cig-wf194c4,Cigtech WF194c4))
|
||||
@@ -283,3 +313,6 @@ $(eval $(call BuildPackage,ath11k-wifi-cig-wf196_6g-ca))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-cig-wf196_6g-us))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-motorola-q14))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-hfcl-ion4xi))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-edgecore-oap101))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-cig-wf188n-ca))
|
||||
$(eval $(call BuildPackage,ath11k-wifi-cig-wf188n-us))
|
||||
|
||||
Binary file not shown.
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-cig-wf188n-ca.bin.IPQ6018
Normal file
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-cig-wf188n-ca.bin.IPQ6018
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-edgecore-oap101.bin.IPQ5018
Normal file
BIN
feeds/ipq807x_v5.4/ath11k-wifi/board-edgecore-oap101.bin.IPQ5018
Normal file
Binary file not shown.
@@ -84,6 +84,8 @@ ifneq ($(CONFIG_DRIVER_11AX_SUPPORT),)
|
||||
HOSTAPD_IEEE80211AX:=y
|
||||
endif
|
||||
|
||||
CORE_DEPENDS = +libubus +libucode +ucode-mod-fs +ucode-mod-nl80211 +ucode-mod-ubus +ucode-mod-uloop +libblobmsg-json
|
||||
|
||||
DRIVER_MAKEOPTS= \
|
||||
CONFIG_ACS=$(CONFIG_PACKAGE_kmod-cfg80211) \
|
||||
CONFIG_DRIVER_NL80211=$(CONFIG_PACKAGE_kmod-cfg80211) \
|
||||
@@ -91,6 +93,7 @@ DRIVER_MAKEOPTS= \
|
||||
CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \
|
||||
CONFIG_IEEE80211AX=$(HOSTAPD_IEEE80211AX) \
|
||||
CONFIG_DRIVER_WEXT=$(CONFIG_DRIVER_WEXT_SUPPORT) \
|
||||
CONFIG_UCODE=y
|
||||
|
||||
ifeq ($(SSL_VARIANT),openssl)
|
||||
DRIVER_MAKEOPTS += CONFIG_TLS=openssl CONFIG_SAE=y
|
||||
@@ -142,7 +145,7 @@ define Package/hostapd/Default
|
||||
SUBMENU:=WirelessAPD
|
||||
TITLE:=IEEE 802.1x Authenticator
|
||||
URL:=http://hostap.epitest.fi/
|
||||
DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
|
||||
DEPENDS:=$(DRV_DEPENDS) +hostapd-common $(CORE_DEPENDS)
|
||||
USERID:=network=101:network=101
|
||||
PROVIDES:=hostapd
|
||||
CONFLICTS:=$(HOSTAPD_PROVIDERS)
|
||||
@@ -226,7 +229,7 @@ define Package/wpad/Default
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=WirelessAPD
|
||||
TITLE:=IEEE 802.1x Auth/Supplicant
|
||||
DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
|
||||
DEPENDS:=$(DRV_DEPENDS) +hostapd-common $(CORE_DEPENDS)
|
||||
USERID:=network=101:network=101
|
||||
URL:=http://hostap.epitest.fi/
|
||||
PROVIDES:=hostapd wpa-supplicant
|
||||
@@ -341,7 +344,7 @@ define Package/wpa-supplicant/Default
|
||||
SUBMENU:=WirelessAPD
|
||||
TITLE:=WPA Supplicant
|
||||
URL:=http://hostap.epitest.fi/wpa_supplicant/
|
||||
DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
|
||||
DEPENDS:=$(DRV_DEPENDS) +hostapd-common $(CORE_DEPENDS)
|
||||
USERID:=network=101:network=101
|
||||
PROVIDES:=wpa-supplicant
|
||||
CONFLICTS:=$(SUPPLICANT_PROVIDERS)
|
||||
@@ -446,7 +449,7 @@ define Package/eapol-test/Default
|
||||
SECTION:=net
|
||||
SUBMENU:=WirelessAPD
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=$(DRV_DEPENDS) +libubus
|
||||
DEPENDS:=$(DRV_DEPENDS) $(CORE_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/eapol-test
|
||||
@@ -503,7 +506,7 @@ TARGET_CPPFLAGS := \
|
||||
$(if $(CONFIG_WPA_MSG_MIN_PRIORITY),-DCONFIG_MSG_MIN_PRIORITY=$(CONFIG_WPA_MSG_MIN_PRIORITY))
|
||||
|
||||
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections -flto=jobserver -fuse-linker-plugin -lubox -lubus
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections -flto=jobserver -fuse-linker-plugin -lubox -lubus -lucode
|
||||
|
||||
ifdef CONFIG_PACKAGE_kmod-cfg80211
|
||||
TARGET_LDFLAGS += -lm -lnl-tiny
|
||||
@@ -587,20 +590,24 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
define Install/hostapd
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/share/hostap
|
||||
$(INSTALL_DATA) ./files/hostapd.uc $(1)/usr/share/hostap/
|
||||
endef
|
||||
|
||||
define Install/supplicant
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/share/hostap
|
||||
$(INSTALL_DATA) ./files/wpa_supplicant.uc $(1)/usr/share/hostap/
|
||||
endef
|
||||
|
||||
define Package/hostapd-common/install
|
||||
$(INSTALL_DIR) $(1)/etc/capabilities $(1)/etc/rc.button $(1)/etc/hotplug.d/ieee80211 $(1)/etc/init.d $(1)/lib/netifd $(1)/usr/share/acl.d
|
||||
$(INSTALL_DIR) $(1)/etc/capabilities $(1)/etc/rc.button $(1)/etc/hotplug.d/ieee80211 $(1)/etc/init.d $(1)/lib/netifd $(1)/usr/share/acl.d $(1)/usr/share/hostap
|
||||
$(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/netifd/hostapd.sh
|
||||
$(INSTALL_BIN) ./files/wpad.init $(1)/etc/init.d/wpad
|
||||
$(INSTALL_BIN) ./files/wps-hotplug.sh $(1)/etc/rc.button/wps
|
||||
$(INSTALL_DATA) ./files/wpad_acl.json $(1)/usr/share/acl.d
|
||||
$(INSTALL_DATA) ./files/wpad.json $(1)/etc/capabilities
|
||||
$(INSTALL_DATA) ./files/common.uc $(1)/usr/share/hostap/
|
||||
$(INSTALL_DATA) ./files/wdev.uc $(1)/usr/share/hostap/
|
||||
endef
|
||||
|
||||
define Package/hostapd/install
|
||||
|
||||
168
feeds/ipq807x_v5.4/hostapd/files/common.uc
Normal file
168
feeds/ipq807x_v5.4/hostapd/files/common.uc
Normal file
@@ -0,0 +1,168 @@
|
||||
import * as nl80211 from "nl80211";
|
||||
import * as rtnl from "rtnl";
|
||||
import { readfile } from "fs";
|
||||
|
||||
const iftypes = {
|
||||
ap: nl80211.const.NL80211_IFTYPE_AP,
|
||||
mesh: nl80211.const.NL80211_IFTYPE_MESH_POINT,
|
||||
sta: nl80211.const.NL80211_IFTYPE_STATION,
|
||||
adhoc: nl80211.const.NL80211_IFTYPE_ADHOC,
|
||||
monitor: nl80211.const.NL80211_IFTYPE_MONITOR,
|
||||
};
|
||||
|
||||
function wdev_remove(name)
|
||||
{
|
||||
nl80211.request(nl80211.const.NL80211_CMD_DEL_INTERFACE, 0, { dev: name });
|
||||
}
|
||||
|
||||
function __phy_is_fullmac(phyidx)
|
||||
{
|
||||
let data = nl80211.request(nl80211.const.NL80211_CMD_GET_WIPHY, 0, { wiphy: phyidx });
|
||||
|
||||
return !data.software_iftypes.ap_vlan;
|
||||
}
|
||||
|
||||
function phy_is_fullmac(phy)
|
||||
{
|
||||
let phyidx = int(trim(readfile(`/sys/class/ieee80211/${phy}/index`)));
|
||||
|
||||
return __phy_is_fullmac(phyidx);
|
||||
}
|
||||
|
||||
function find_reusable_wdev(phyidx)
|
||||
{
|
||||
if (!__phy_is_fullmac(phyidx))
|
||||
return null;
|
||||
|
||||
let data = nl80211.request(
|
||||
nl80211.const.NL80211_CMD_GET_INTERFACE,
|
||||
nl80211.const.NLM_F_DUMP,
|
||||
{ wiphy: phyidx });
|
||||
for (let res in data)
|
||||
if (trim(readfile(`/sys/class/net/${res.ifname}/operstate`)) == "down")
|
||||
return res.ifname;
|
||||
return null;
|
||||
}
|
||||
|
||||
function wdev_create(phy, name, data)
|
||||
{
|
||||
let phyidx = int(readfile(`/sys/class/ieee80211/${phy}/index`));
|
||||
|
||||
wdev_remove(name);
|
||||
|
||||
if (!iftypes[data.mode])
|
||||
return `Invalid mode: ${data.mode}`;
|
||||
|
||||
let req = {
|
||||
wiphy: phyidx,
|
||||
ifname: name,
|
||||
iftype: iftypes[data.mode],
|
||||
};
|
||||
|
||||
if (data["4addr"])
|
||||
req["4addr"] = data["4addr"];
|
||||
if (data.macaddr)
|
||||
req.mac = data.macaddr;
|
||||
|
||||
nl80211.error();
|
||||
|
||||
let reuse_ifname = find_reusable_wdev(phyidx);
|
||||
if (reuse_ifname &&
|
||||
(reuse_ifname == name ||
|
||||
rtnl.request(rtnl.const.RTM_SETLINK, 0, { dev: reuse_ifname, ifname: name}) != false))
|
||||
nl80211.request(
|
||||
nl80211.const.NL80211_CMD_SET_INTERFACE, 0, {
|
||||
wiphy: phyidx,
|
||||
dev: name,
|
||||
iftype: iftypes[data.mode],
|
||||
});
|
||||
else
|
||||
nl80211.request(
|
||||
nl80211.const.NL80211_CMD_NEW_INTERFACE,
|
||||
nl80211.const.NLM_F_CREATE,
|
||||
req);
|
||||
|
||||
let error = nl80211.error();
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
if (data.powersave != null) {
|
||||
nl80211.request(nl80211.const.NL80211_CMD_SET_POWER_SAVE, 0,
|
||||
{ dev: name, ps_state: data.powersave ? 1 : 0});
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
const vlist_proto = {
|
||||
update: function(values, arg) {
|
||||
let data = this.data;
|
||||
let cb = this.cb;
|
||||
let seq = { };
|
||||
let new_data = {};
|
||||
let old_data = {};
|
||||
|
||||
this.data = new_data;
|
||||
|
||||
if (type(values) == "object") {
|
||||
for (let key in values) {
|
||||
old_data[key] = data[key];
|
||||
new_data[key] = values[key];
|
||||
delete data[key];
|
||||
}
|
||||
} else {
|
||||
for (let val in values) {
|
||||
let cur_key = val[0];
|
||||
let cur_obj = val[1];
|
||||
|
||||
old_data[cur_key] = data[cur_key];
|
||||
new_data[cur_key] = val[1];
|
||||
delete data[cur_key];
|
||||
}
|
||||
}
|
||||
|
||||
for (let key in data) {
|
||||
cb(null, data[key], arg);
|
||||
delete data[key];
|
||||
}
|
||||
for (let key in new_data)
|
||||
cb(new_data[key], old_data[key], arg);
|
||||
}
|
||||
};
|
||||
|
||||
function is_equal(val1, val2) {
|
||||
let t1 = type(val1);
|
||||
|
||||
if (t1 != type(val2))
|
||||
return false;
|
||||
|
||||
if (t1 == "array") {
|
||||
if (length(val1) != length(val2))
|
||||
return false;
|
||||
|
||||
for (let i = 0; i < length(val1); i++)
|
||||
if (!is_equal(val1[i], val2[i]))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
} else if (t1 == "object") {
|
||||
for (let key in val1)
|
||||
if (!is_equal(val1[key], val2[key]))
|
||||
return false;
|
||||
for (let key in val2)
|
||||
if (!val1[key])
|
||||
return false;
|
||||
return true;
|
||||
} else {
|
||||
return val1 == val2;
|
||||
}
|
||||
}
|
||||
|
||||
function vlist_new(cb) {
|
||||
return proto({
|
||||
cb: cb,
|
||||
data: {}
|
||||
}, vlist_proto);
|
||||
}
|
||||
|
||||
export { wdev_remove, wdev_create, is_equal, vlist_new, phy_is_fullmac };
|
||||
@@ -1203,9 +1203,6 @@ hostapd_set_bss_options() {
|
||||
append bss_conf "$val" "$N"
|
||||
done
|
||||
|
||||
bss_md5sum=$(echo $bss_conf | md5sum | cut -d" " -f1)
|
||||
append bss_conf "config_id=$bss_md5sum" "$N"
|
||||
|
||||
append "$var" "$bss_conf" "$N"
|
||||
return 0
|
||||
}
|
||||
|
||||
486
feeds/ipq807x_v5.4/hostapd/files/hostapd.uc
Normal file
486
feeds/ipq807x_v5.4/hostapd/files/hostapd.uc
Normal file
@@ -0,0 +1,486 @@
|
||||
let libubus = require("ubus");
|
||||
import { open, readfile } from "fs";
|
||||
import { wdev_create, wdev_remove, is_equal, vlist_new, phy_is_fullmac } from "common";
|
||||
|
||||
let ubus = libubus.connect();
|
||||
|
||||
hostapd.data.config = {};
|
||||
|
||||
hostapd.data.file_fields = {
|
||||
vlan_file: true,
|
||||
wpa_psk_file: true,
|
||||
accept_mac_file: true,
|
||||
deny_mac_file: true,
|
||||
eap_user_file: true,
|
||||
ca_cert: true,
|
||||
server_cert: true,
|
||||
server_cert2: true,
|
||||
private_key: true,
|
||||
private_key2: true,
|
||||
dh_file: true,
|
||||
eap_sim_db: true,
|
||||
};
|
||||
|
||||
function iface_remove(cfg)
|
||||
{
|
||||
if (!cfg || !cfg.bss || !cfg.bss[0] || !cfg.bss[0].ifname)
|
||||
return;
|
||||
|
||||
hostapd.remove_iface(cfg.bss[0].ifname);
|
||||
for (let bss in cfg.bss)
|
||||
wdev_remove(bss.ifname);
|
||||
}
|
||||
|
||||
function iface_gen_config(phy, config)
|
||||
{
|
||||
let str = `data:
|
||||
${join("\n", config.radio.data)}
|
||||
channel=${config.radio.channel}
|
||||
`;
|
||||
|
||||
for (let i = 0; i < length(config.bss); i++) {
|
||||
let bss = config.bss[i];
|
||||
let type = i > 0 ? "bss" : "interface";
|
||||
|
||||
str += `
|
||||
${type}=${bss.ifname}
|
||||
${join("\n", bss.data)}
|
||||
`;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function iface_restart(phy, config, old_config)
|
||||
{
|
||||
iface_remove(old_config);
|
||||
iface_remove(config);
|
||||
|
||||
if (!config.bss || !config.bss[0]) {
|
||||
hostapd.printf(`No bss for phy ${phy}`);
|
||||
return;
|
||||
}
|
||||
|
||||
let bss = config.bss[0];
|
||||
let err = wdev_create(phy, bss.ifname, { mode: "ap" });
|
||||
if (err)
|
||||
hostapd.printf(`Failed to create ${bss.ifname} on phy ${phy}: ${err}`);
|
||||
let config_inline = iface_gen_config(phy, config);
|
||||
|
||||
let ubus = hostapd.data.ubus;
|
||||
ubus.call("wpa_supplicant", "phy_set_state", { phy: phy, stop: true });
|
||||
if (hostapd.add_iface(`bss_config=${bss.ifname}:${config_inline}`) < 0)
|
||||
hostapd.printf(`hostapd.add_iface failed for phy ${phy} ifname=${bss.ifname}`);
|
||||
ubus.call("wpa_supplicant", "phy_set_state", { phy: phy, stop: false });
|
||||
}
|
||||
|
||||
function array_to_obj(arr, key, start)
|
||||
{
|
||||
let obj = {};
|
||||
|
||||
start ??= 0;
|
||||
for (let i = start; i < length(arr); i++) {
|
||||
let cur = arr[i];
|
||||
obj[cur[key]] = cur;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function find_array_idx(arr, key, val)
|
||||
{
|
||||
for (let i = 0; i < length(arr); i++)
|
||||
if (arr[i][key] == val)
|
||||
return i;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
function bss_reload_psk(bss, config, old_config)
|
||||
{
|
||||
if (is_equal(old_config.hash.wpa_psk_file, config.hash.wpa_psk_file))
|
||||
return;
|
||||
|
||||
old_config.hash.wpa_psk_file = config.hash.wpa_psk_file;
|
||||
if (!is_equal(old_config, config))
|
||||
return;
|
||||
|
||||
let ret = bss.ctrl("RELOAD_WPA_PSK");
|
||||
ret ??= "failed";
|
||||
|
||||
hostapd.printf(`Reload WPA PSK file for bss ${config.ifname}: ${ret}`);
|
||||
}
|
||||
|
||||
function iface_reload_config(phy, config, old_config)
|
||||
{
|
||||
if (!old_config || !is_equal(old_config.radio, config.radio))
|
||||
return false;
|
||||
|
||||
if (is_equal(old_config.bss, config.bss))
|
||||
return true;
|
||||
|
||||
if (!old_config.bss || !old_config.bss[0])
|
||||
return false;
|
||||
|
||||
if (config.bss[0].ifname != old_config.bss[0].ifname)
|
||||
return false;
|
||||
|
||||
let iface_name = config.bss[0].ifname;
|
||||
let iface = hostapd.interfaces[iface_name];
|
||||
if (!iface)
|
||||
return false;
|
||||
|
||||
let first_bss = hostapd.bss[iface_name];
|
||||
if (!first_bss)
|
||||
return false;
|
||||
|
||||
let config_inline = iface_gen_config(phy, config);
|
||||
|
||||
bss_reload_psk(first_bss, config.bss[0], old_config.bss[0]);
|
||||
if (!is_equal(config.bss[0], old_config.bss[0])) {
|
||||
if (phy_is_fullmac(phy))
|
||||
return false;
|
||||
|
||||
if (config.bss[0].bssid != old_config.bss[0].bssid)
|
||||
return false;
|
||||
|
||||
hostapd.printf(`Reload config for bss '${config.bss[0].ifname}' on phy '${phy}'`);
|
||||
if (first_bss.set_config(config_inline, 0) < 0) {
|
||||
hostapd.printf(`Failed to set config`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
let new_cfg = array_to_obj(config.bss, "ifname", 1);
|
||||
let old_cfg = array_to_obj(old_config.bss, "ifname", 1);
|
||||
|
||||
for (let name in old_cfg) {
|
||||
let bss = hostapd.bss[name];
|
||||
if (!bss) {
|
||||
hostapd.printf(`bss '${name}' not found`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!new_cfg[name]) {
|
||||
hostapd.printf(`Remove bss '${name}' on phy '${phy}'`);
|
||||
bss.delete();
|
||||
wdev_remove(name);
|
||||
continue;
|
||||
}
|
||||
|
||||
let new_cfg_data = new_cfg[name];
|
||||
delete new_cfg[name];
|
||||
|
||||
if (is_equal(old_cfg[name], new_cfg_data))
|
||||
continue;
|
||||
|
||||
hostapd.printf(`Reload config for bss '${name}' on phy '${phy}'`);
|
||||
let idx = find_array_idx(config.bss, "ifname", name);
|
||||
if (idx < 0) {
|
||||
hostapd.printf(`bss index not found`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (bss.set_config(config_inline, idx) < 0) {
|
||||
hostapd.printf(`Failed to set config`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (let name in new_cfg) {
|
||||
hostapd.printf(`Add bss '${name}' on phy '${phy}'`);
|
||||
|
||||
let idx = find_array_idx(config.bss, "ifname", name);
|
||||
if (idx < 0) {
|
||||
hostapd.printf(`bss index not found`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (iface.add_bss(config_inline, idx) < 0) {
|
||||
hostapd.printf(`Failed to add bss`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function iface_set_config(phy, config)
|
||||
{
|
||||
let old_config = hostapd.data.config[phy];
|
||||
|
||||
hostapd.data.config[phy] = config;
|
||||
|
||||
if (!config)
|
||||
return iface_remove(old_config);
|
||||
|
||||
let ret = iface_reload_config(phy, config, old_config);
|
||||
if (ret) {
|
||||
hostapd.printf(`Reloaded settings for phy ${phy}`);
|
||||
return 0;
|
||||
}
|
||||
|
||||
hostapd.printf(`Restart interface for phy ${phy}`);
|
||||
return iface_restart(phy, config, old_config);
|
||||
}
|
||||
|
||||
function config_add_bss(config, name)
|
||||
{
|
||||
let bss = {
|
||||
ifname: name,
|
||||
data: [],
|
||||
hash: {}
|
||||
};
|
||||
|
||||
push(config.bss, bss);
|
||||
|
||||
return bss;
|
||||
}
|
||||
|
||||
function iface_load_config(filename)
|
||||
{
|
||||
let f = open(filename, "r");
|
||||
if (!f)
|
||||
return null;
|
||||
|
||||
let config = {
|
||||
radio: {
|
||||
data: []
|
||||
},
|
||||
bss: [],
|
||||
orig_file: filename,
|
||||
};
|
||||
|
||||
let bss;
|
||||
let line;
|
||||
while ((line = trim(f.read("line"))) != null) {
|
||||
let val = split(line, "=", 2);
|
||||
if (!val[0])
|
||||
continue;
|
||||
|
||||
if (val[0] == "interface") {
|
||||
bss = config_add_bss(config, val[1]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (val[0] == "channel") {
|
||||
config.radio.channel = val[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
push(config.radio.data, line);
|
||||
}
|
||||
|
||||
while ((line = trim(f.read("line"))) != null) {
|
||||
let val = split(line, "=", 2);
|
||||
if (!val[0])
|
||||
continue;
|
||||
|
||||
if (val[0] == "bssid")
|
||||
bss.bssid = val[1];
|
||||
|
||||
if (val[0] == "bss") {
|
||||
bss = config_add_bss(config, val[1]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hostapd.data.file_fields[val[0]])
|
||||
bss.hash[val[0]] = hostapd.sha1(readfile(val[1]));
|
||||
|
||||
push(bss.data, line);
|
||||
}
|
||||
f.close();
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
|
||||
|
||||
let main_obj = {
|
||||
reload: {
|
||||
args: {
|
||||
phy: "",
|
||||
},
|
||||
call: function(req) {
|
||||
try {
|
||||
let phy_list = req.args.phy ? [ req.args.phy ] : keys(hostapd.data.config);
|
||||
for (let phy_name in phy_list) {
|
||||
let phy = hostapd.data.config[phy_name];
|
||||
let config = iface_load_config(phy.orig_file);
|
||||
iface_set_config(phy_name, config);
|
||||
}
|
||||
} catch(e) {
|
||||
hostapd.printf(`Error reloading config: ${e}\n${e.stacktrace[0].context}`);
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
apsta_state: {
|
||||
args: {
|
||||
phy: "",
|
||||
up: true,
|
||||
frequency: 0,
|
||||
sec_chan_offset: 0,
|
||||
csa: true,
|
||||
csa_count: 0,
|
||||
},
|
||||
call: function(req) {
|
||||
if (req.args.up == null || !req.args.phy)
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
|
||||
let phy = req.args.phy;
|
||||
let config = hostapd.data.config[phy];
|
||||
if (!config || !config.bss || !config.bss[0] || !config.bss[0].ifname)
|
||||
return 0;
|
||||
|
||||
let iface = hostapd.interfaces[config.bss[0].ifname];
|
||||
if (!iface)
|
||||
return 0;
|
||||
|
||||
if (!req.args.up) {
|
||||
iface.stop();
|
||||
return 0;
|
||||
}
|
||||
|
||||
let freq = req.args.frequency;
|
||||
if (!freq)
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
|
||||
let sec_offset = req.args.sec_chan_offset;
|
||||
if (sec_offset != -1 && sec_offset != 1)
|
||||
sec_offset = 0;
|
||||
|
||||
let width = 0;
|
||||
for (let line in config.radio.data) {
|
||||
if (!sec_offset && match(line, /^ht_capab=.*HT40/)) {
|
||||
sec_offset = null; // auto-detect
|
||||
continue;
|
||||
}
|
||||
|
||||
let val = match(line, /^(vht_oper_chwidth|he_oper_chwidth)=(\d+)/);
|
||||
if (!val)
|
||||
continue;
|
||||
|
||||
val = int(val[2]);
|
||||
if (val > width)
|
||||
width = val;
|
||||
}
|
||||
|
||||
if (freq < 4000)
|
||||
width = 0;
|
||||
|
||||
let freq_info = hostapd.freq_info(freq, sec_offset, width);
|
||||
if (!freq_info)
|
||||
return libubus.STATUS_UNKNOWN_ERROR;
|
||||
|
||||
let ret;
|
||||
if (req.args.csa) {
|
||||
freq_info.csa_count = req.args.csa_count ?? 10;
|
||||
ret = iface.switch_channel(freq_info);
|
||||
} else {
|
||||
iface.stop();
|
||||
ret = iface.start(freq_info);
|
||||
}
|
||||
if (!ret)
|
||||
return libubus.STATUS_UNKNOWN_ERROR;
|
||||
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
config_set: {
|
||||
args: {
|
||||
phy: "",
|
||||
config: "",
|
||||
prev_config: "",
|
||||
},
|
||||
call: function(req) {
|
||||
let phy = req.args.phy;
|
||||
let file = req.args.config;
|
||||
let prev_file = req.args.prev_config;
|
||||
|
||||
if (!phy)
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
|
||||
try {
|
||||
if (prev_file && !hostapd.data.config[phy]) {
|
||||
let config = iface_load_config(prev_file);
|
||||
if (config)
|
||||
config.radio.data = [];
|
||||
hostapd.data.config[phy] = config;
|
||||
}
|
||||
|
||||
let config = iface_load_config(file);
|
||||
|
||||
hostapd.printf(`Set new config for phy ${phy}: ${file}`);
|
||||
iface_set_config(phy, config);
|
||||
} catch(e) {
|
||||
hostapd.printf(`Error loading config: ${e}\n${e.stacktrace[0].context}`);
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
return {
|
||||
pid: hostapd.getpid()
|
||||
};
|
||||
}
|
||||
},
|
||||
config_add: {
|
||||
args: {
|
||||
iface: "",
|
||||
config: "",
|
||||
},
|
||||
call: function(req) {
|
||||
if (!req.args.iface || !req.args.config)
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
|
||||
if (hostapd.add_iface(`bss_config=${req.args.iface}:${req.args.config}`) < 0)
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
|
||||
return {
|
||||
pid: hostapd.getpid()
|
||||
};
|
||||
}
|
||||
},
|
||||
config_remove: {
|
||||
args: {
|
||||
iface: ""
|
||||
},
|
||||
call: function(req) {
|
||||
if (!req.args.iface)
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
|
||||
hostapd.remove_iface(req.args.iface);
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
hostapd.data.ubus = ubus;
|
||||
hostapd.data.obj = ubus.publish("hostapd", main_obj);
|
||||
|
||||
function bss_event(type, name, data) {
|
||||
let ubus = hostapd.data.ubus;
|
||||
|
||||
data ??= {};
|
||||
data.name = name;
|
||||
hostapd.data.obj.notify(`bss.${type}`, data, null, null, null, -1);
|
||||
ubus.call("service", "event", { type: `hostapd.${name}.${type}`, data: {} });
|
||||
}
|
||||
|
||||
return {
|
||||
shutdown: function() {
|
||||
for (let phy in hostapd.data.config)
|
||||
iface_set_config(phy, null);
|
||||
hostapd.ubus.disconnect();
|
||||
},
|
||||
bss_add: function(name, obj) {
|
||||
bss_event("add", name);
|
||||
},
|
||||
bss_reload: function(name, obj, reconf) {
|
||||
bss_event("reload", name, { reconf: reconf != 0 });
|
||||
},
|
||||
bss_remove: function(name, obj) {
|
||||
bss_event("remove", name);
|
||||
}
|
||||
};
|
||||
156
feeds/ipq807x_v5.4/hostapd/files/wdev.uc
Normal file
156
feeds/ipq807x_v5.4/hostapd/files/wdev.uc
Normal file
@@ -0,0 +1,156 @@
|
||||
#!/usr/bin/env ucode
|
||||
'use strict';
|
||||
import { vlist_new, is_equal, wdev_create, wdev_remove } from "/usr/share/hostap/common.uc";
|
||||
import { readfile, writefile, basename, readlink, glob } from "fs";
|
||||
|
||||
let keep_devices = {};
|
||||
let phy = shift(ARGV);
|
||||
let new_config = shift(ARGV);
|
||||
const mesh_params = [
|
||||
"mesh_retry_timeout", "mesh_confirm_timeout", "mesh_holding_timeout", "mesh_max_peer_links",
|
||||
"mesh_max_retries", "mesh_ttl", "mesh_element_ttl", "mesh_hwmp_max_preq_retries",
|
||||
"mesh_path_refresh_time", "mesh_min_discovery_timeout", "mesh_hwmp_active_path_timeout",
|
||||
"mesh_hwmp_preq_min_interval", "mesh_hwmp_net_diameter_traversal_time", "mesh_hwmp_rootmode",
|
||||
"mesh_hwmp_rann_interval", "mesh_gate_announcements", "mesh_sync_offset_max_neighor",
|
||||
"mesh_rssi_threshold", "mesh_hwmp_active_path_to_root_timeout", "mesh_hwmp_root_interval",
|
||||
"mesh_hwmp_confirmation_interval", "mesh_awake_window", "mesh_plink_timeout",
|
||||
"mesh_auto_open_plinks", "mesh_fwding", "mesh_power_mode"
|
||||
];
|
||||
|
||||
function iface_stop(wdev)
|
||||
{
|
||||
if (keep_devices[wdev.ifname])
|
||||
return;
|
||||
|
||||
wdev_remove(wdev.ifname);
|
||||
}
|
||||
|
||||
function iface_start(wdev)
|
||||
{
|
||||
let ifname = wdev.ifname;
|
||||
|
||||
if (readfile(`/sys/class/net/${ifname}/ifindex`)) {
|
||||
system([ "ip", "link", "set", "dev", ifname, "down" ]);
|
||||
wdev_remove(ifname);
|
||||
}
|
||||
wdev_create(phy, ifname, wdev);
|
||||
system([ "ip", "link", "set", "dev", ifname, "up" ]);
|
||||
if (wdev.freq)
|
||||
system(`iw dev ${ifname} set freq ${wdev.freq} ${wdev.htmode}`);
|
||||
if (wdev.mode == "adhoc") {
|
||||
let cmd = ["iw", "dev", ifname, "ibss", "join", wdev.ssid, wdev.freq, wdev.htmode, "fixed-freq" ];
|
||||
if (wdev.bssid)
|
||||
push(cmd, wdev.bssid);
|
||||
for (let key in [ "beacon-interval", "basic-rates", "mcast-rate", "keys" ])
|
||||
if (wdev[key])
|
||||
push(cmd, key, wdev[key]);
|
||||
system(cmd);
|
||||
} else if (wdev.mode == "mesh") {
|
||||
let cmd = [ "iw", "dev", ifname, "mesh", "join", wdev.ssid, "freq", wdev.freq, wdev.htmode ];
|
||||
for (let key in [ "beacon-interval", "mcast-rate" ])
|
||||
if (wdev[key])
|
||||
push(cmd, key, wdev[key]);
|
||||
system(cmd);
|
||||
|
||||
cmd = ["iw", "dev", ifname, "set", "mesh_param" ];
|
||||
let len = length(cmd);
|
||||
|
||||
for (let param in mesh_params)
|
||||
if (wdev[param])
|
||||
push(cmd, param, wdev[param]);
|
||||
|
||||
if (len == length(cmd))
|
||||
return;
|
||||
|
||||
system(cmd);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function iface_cb(new_if, old_if)
|
||||
{
|
||||
if (old_if && new_if && is_equal(old_if, new_if))
|
||||
return;
|
||||
|
||||
if (old_if)
|
||||
iface_stop(old_if);
|
||||
if (new_if)
|
||||
iface_start(new_if);
|
||||
}
|
||||
|
||||
function drop_inactive(config)
|
||||
{
|
||||
for (let key in config) {
|
||||
if (!readfile(`/sys/class/net/${key}/ifindex`))
|
||||
delete config[key];
|
||||
}
|
||||
}
|
||||
|
||||
function add_ifname(config)
|
||||
{
|
||||
for (let key in config)
|
||||
config[key].ifname = key;
|
||||
}
|
||||
|
||||
function delete_ifname(config)
|
||||
{
|
||||
for (let key in config)
|
||||
delete config[key].ifname;
|
||||
}
|
||||
|
||||
function add_existing(phy, config)
|
||||
{
|
||||
let wdevs = glob(`/sys/class/ieee80211/${phy}/device/net/*`);
|
||||
wdevs = map(wdevs, (arg) => basename(arg));
|
||||
for (let wdev in wdevs) {
|
||||
if (config[wdev])
|
||||
continue;
|
||||
|
||||
if (basename(readlink(`/sys/class/net/${wdev}/phy80211`)) != phy)
|
||||
continue;
|
||||
|
||||
if (trim(readfile(`/sys/class/net/${wdev}/operstate`)) == "down")
|
||||
config[wdev] = {};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let statefile = `/var/run/wdev-${phy}.json`;
|
||||
|
||||
for (let dev in ARGV)
|
||||
keep_devices[dev] = true;
|
||||
|
||||
if (!phy || !new_config) {
|
||||
warn(`Usage: ${basename(sourcepath())} <phy> <config> [<device]...]\n`);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!readfile(`/sys/class/ieee80211/${phy}/index`)) {
|
||||
warn(`PHY ${phy} does not exist\n`);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
new_config = json(new_config);
|
||||
if (!new_config) {
|
||||
warn("Invalid configuration\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
let old_config = readfile(statefile);
|
||||
if (old_config)
|
||||
old_config = json(old_config);
|
||||
|
||||
let config = vlist_new(iface_cb);
|
||||
if (type(old_config) == "object")
|
||||
config.data = old_config;
|
||||
|
||||
add_existing(phy, config.data);
|
||||
add_ifname(config.data);
|
||||
drop_inactive(config.data);
|
||||
|
||||
add_ifname(new_config);
|
||||
config.update(new_config);
|
||||
|
||||
drop_inactive(config.data);
|
||||
delete_ifname(config.data);
|
||||
writefile(statefile, sprintf("%J", config.data));
|
||||
253
feeds/ipq807x_v5.4/hostapd/files/wpa_supplicant.uc
Normal file
253
feeds/ipq807x_v5.4/hostapd/files/wpa_supplicant.uc
Normal file
@@ -0,0 +1,253 @@
|
||||
let libubus = require("ubus");
|
||||
import { open, readfile } from "fs";
|
||||
import { wdev_create, wdev_remove, is_equal, vlist_new } from "common";
|
||||
|
||||
let ubus = libubus.connect();
|
||||
|
||||
wpas.data.config = {};
|
||||
wpas.data.iface_phy = {};
|
||||
|
||||
function iface_stop(iface)
|
||||
{
|
||||
let ifname = iface.config.iface;
|
||||
|
||||
if (!iface.running)
|
||||
return;
|
||||
|
||||
delete wpas.data.iface_phy[ifname];
|
||||
wpas.remove_iface(ifname);
|
||||
wdev_remove(ifname);
|
||||
iface.running = false;
|
||||
}
|
||||
|
||||
function iface_start(phy, iface)
|
||||
{
|
||||
if (iface.running)
|
||||
return;
|
||||
|
||||
let ifname = iface.config.iface;
|
||||
|
||||
wpas.data.iface_phy[ifname] = phy;
|
||||
wdev_remove(ifname);
|
||||
let ret = wdev_create(phy, ifname, iface.config);
|
||||
if (ret)
|
||||
wpas.printf(`Failed to create device ${ifname}: ${ret}`);
|
||||
wpas.add_iface(iface.config);
|
||||
iface.running = true;
|
||||
}
|
||||
|
||||
function iface_cb(new_if, old_if)
|
||||
{
|
||||
if (old_if && new_if && is_equal(old_if.config, new_if.config)) {
|
||||
new_if.running = old_if.running;
|
||||
return;
|
||||
}
|
||||
|
||||
if (old_if)
|
||||
iface_stop(old_if);
|
||||
}
|
||||
|
||||
function prepare_config(config)
|
||||
{
|
||||
config.config_data = readfile(config.config);
|
||||
|
||||
return { config: config };
|
||||
}
|
||||
|
||||
function set_config(phy_name, config_list)
|
||||
{
|
||||
let phy = wpas.data.config[phy_name];
|
||||
|
||||
if (!phy) {
|
||||
phy = vlist_new(iface_cb, false);
|
||||
wpas.data.config[phy_name] = phy;
|
||||
}
|
||||
|
||||
let values = [];
|
||||
for (let config in config_list)
|
||||
push(values, [ config.iface, prepare_config(config) ]);
|
||||
|
||||
phy.update(values);
|
||||
}
|
||||
|
||||
function start_pending(phy_name)
|
||||
{
|
||||
let phy = wpas.data.config[phy_name];
|
||||
|
||||
for (let ifname in phy.data)
|
||||
iface_start(phy_name, phy.data[ifname]);
|
||||
}
|
||||
|
||||
let main_obj = {
|
||||
phy_set_state: {
|
||||
args: {
|
||||
phy: "",
|
||||
stop: true,
|
||||
},
|
||||
call: function(req) {
|
||||
if (!req.args.phy || req.args.stop == null)
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
|
||||
let phy = wpas.data.config[req.args.phy];
|
||||
if (!phy)
|
||||
return libubus.STATUS_NOT_FOUND;
|
||||
|
||||
try {
|
||||
if (req.args.stop) {
|
||||
for (let ifname in phy.data)
|
||||
iface_stop(phy.data[ifname]);
|
||||
} else {
|
||||
start_pending(req.args.phy);
|
||||
}
|
||||
} catch (e) {
|
||||
wpas.printf(`Error chaging state: ${e}\n${e.stacktrace[0].context}`);
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
config_set: {
|
||||
args: {
|
||||
phy: "",
|
||||
config: [],
|
||||
defer: true,
|
||||
},
|
||||
call: function(req) {
|
||||
if (!req.args.phy)
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
|
||||
try {
|
||||
if (req.args.config)
|
||||
set_config(req.args.phy, req.args.config);
|
||||
|
||||
if (!req.args.defer)
|
||||
start_pending(req.args.phy);
|
||||
} catch (e) {
|
||||
wpas.printf(`Error loading config: ${e}\n${e.stacktrace[0].context}`);
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
return {
|
||||
pid: wpas.getpid()
|
||||
};
|
||||
}
|
||||
},
|
||||
config_add: {
|
||||
args: {
|
||||
driver: "",
|
||||
iface: "",
|
||||
bridge: "",
|
||||
hostapd_ctrl: "",
|
||||
ctrl: "",
|
||||
config: "",
|
||||
},
|
||||
call: function(req) {
|
||||
if (!req.args.iface || !req.args.config)
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
|
||||
if (wpas.add_iface(req.args) < 0)
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
|
||||
return {
|
||||
pid: wpas.getpid()
|
||||
};
|
||||
}
|
||||
},
|
||||
config_remove: {
|
||||
args: {
|
||||
iface: ""
|
||||
},
|
||||
call: function(req) {
|
||||
if (!req.args.iface)
|
||||
return libubus.STATUS_INVALID_ARGUMENT;
|
||||
|
||||
wpas.remove_iface(req.args.iface);
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
wpas.data.ubus = ubus;
|
||||
wpas.data.obj = ubus.publish("wpa_supplicant", main_obj);
|
||||
|
||||
function iface_event(type, name, data) {
|
||||
let ubus = wpas.data.ubus;
|
||||
|
||||
data ??= {};
|
||||
data.name = name;
|
||||
wpas.data.obj.notify(`iface.${type}`, data, null, null, null, -1);
|
||||
ubus.call("service", "event", { type: `wpa_supplicant.${name}.${type}`, data: {} });
|
||||
}
|
||||
|
||||
function iface_hostapd_notify(phy, ifname, iface, state)
|
||||
{
|
||||
let ubus = wpas.data.ubus;
|
||||
let status = iface.status();
|
||||
let msg = { phy: phy };
|
||||
|
||||
switch (state) {
|
||||
case "DISCONNECTED":
|
||||
case "AUTHENTICATING":
|
||||
msg.up = false;
|
||||
break;
|
||||
case "INTERFACE_DISABLED":
|
||||
case "INACTIVE":
|
||||
msg.up = true;
|
||||
break;
|
||||
case "COMPLETED":
|
||||
msg.up = true;
|
||||
msg.frequency = status.frequency;
|
||||
msg.sec_chan_offset = status.sec_chan_offset;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
ubus.call("hostapd", "apsta_state", msg);
|
||||
}
|
||||
|
||||
function iface_channel_switch(phy, ifname, iface, info)
|
||||
{
|
||||
let msg = {
|
||||
phy: phy,
|
||||
up: true,
|
||||
csa: true,
|
||||
csa_count: info.csa_count ? info.csa_count - 1 : 0,
|
||||
frequency: info.frequency,
|
||||
sec_chan_offset: info.sec_chan_offset,
|
||||
};
|
||||
ubus.call("hostapd", "apsta_state", msg);
|
||||
}
|
||||
|
||||
return {
|
||||
shutdown: function() {
|
||||
for (let phy in wpas.data.config)
|
||||
set_config(phy, []);
|
||||
wpas.ubus.disconnect();
|
||||
},
|
||||
iface_add: function(name, obj) {
|
||||
iface_event("add", name);
|
||||
},
|
||||
iface_remove: function(name, obj) {
|
||||
iface_event("remove", name);
|
||||
},
|
||||
state: function(ifname, iface, state) {
|
||||
let phy = wpas.data.iface_phy[ifname];
|
||||
if (!phy) {
|
||||
wpas.printf(`no PHY for ifname ${ifname}`);
|
||||
return;
|
||||
}
|
||||
|
||||
iface_hostapd_notify(phy, ifname, iface, state);
|
||||
},
|
||||
event: function(ifname, iface, ev, info) {
|
||||
let phy = wpas.data.iface_phy[ifname];
|
||||
if (!phy) {
|
||||
wpas.printf(`no PHY for ifname ${ifname}`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ev == "CH_SWITCH_STARTED")
|
||||
iface_channel_switch(phy, ifname, iface, info);
|
||||
}
|
||||
};
|
||||
@@ -68,7 +68,7 @@ Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
|
||||
if (!chan) {
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -9872,6 +9872,10 @@ static int nl80211_switch_channel(void *
|
||||
@@ -9797,6 +9797,10 @@ static int nl80211_switch_channel(void *
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
};
|
||||
|
||||
#define MAX_STA_COUNT 2007
|
||||
@@ -696,6 +697,7 @@ struct hostapd_bss_config {
|
||||
@@ -694,6 +695,7 @@ struct hostapd_bss_config {
|
||||
|
||||
#define MESH_ENABLED BIT(0)
|
||||
int mesh;
|
||||
@@ -59,7 +59,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -10456,6 +10456,9 @@ static int nl80211_put_mesh_config(struc
|
||||
@@ -10381,6 +10381,9 @@ static int nl80211_put_mesh_config(struc
|
||||
if (((params->flags & WPA_DRIVER_MESH_CONF_FLAG_AUTO_PLINKS) &&
|
||||
nla_put_u8(msg, NL80211_MESHCONF_AUTO_OPEN_PLINKS,
|
||||
params->auto_plinks)) ||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/ap/ieee802_11.c
|
||||
+++ b/src/ap/ieee802_11.c
|
||||
@@ -4942,6 +4942,13 @@ static int add_associated_sta(struct hos
|
||||
@@ -4810,6 +4810,13 @@ static int add_associated_sta(struct hos
|
||||
* drivers to accept the STA parameter configuration. Since this is
|
||||
* after a new FT-over-DS exchange, a new TK has been derived, so key
|
||||
* reinstallation is not a concern for this case.
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR
|
||||
" (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)",
|
||||
@@ -4955,7 +4962,8 @@ static int add_associated_sta(struct hos
|
||||
@@ -4823,7 +4830,8 @@ static int add_associated_sta(struct hos
|
||||
(!(sta->flags & WLAN_STA_AUTHORIZED) ||
|
||||
(reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) ||
|
||||
(!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) &&
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -3431,7 +3431,7 @@ static int hostapd_change_config_freq(st
|
||||
@@ -3403,7 +3403,7 @@ static int hostapd_change_config_freq(st
|
||||
struct hostapd_freq_params *old_params)
|
||||
{
|
||||
int channel;
|
||||
|
||||
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <netpacket/packet.h>
|
||||
#include <linux/errqueue.h>
|
||||
@@ -5284,26 +5281,29 @@ fail:
|
||||
@@ -5233,26 +5230,29 @@ fail:
|
||||
|
||||
static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (err < 0) {
|
||||
wpa_printf(MSG_DEBUG, "nl80211: bridge FDB entry delete for "
|
||||
MACSTR " ifindex=%d failed: %s", MAC2STR(addr),
|
||||
@@ -5313,9 +5313,8 @@ static void rtnl_neigh_delete_fdb_entry(
|
||||
@@ -5262,9 +5262,8 @@ static void rtnl_neigh_delete_fdb_entry(
|
||||
MACSTR, MAC2STR(addr));
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
}
|
||||
|
||||
|
||||
@@ -7691,7 +7690,6 @@ static void *i802_init(struct hostapd_da
|
||||
@@ -7633,7 +7632,6 @@ static void *i802_init(struct hostapd_da
|
||||
(params->num_bridge == 0 || !params->bridge[0]))
|
||||
add_ifidx(drv, br_ifindex, drv->ifindex);
|
||||
|
||||
@@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (bss->added_if_into_bridge || bss->already_in_bridge) {
|
||||
int err;
|
||||
|
||||
@@ -7708,7 +7706,6 @@ static void *i802_init(struct hostapd_da
|
||||
@@ -7650,7 +7648,6 @@ static void *i802_init(struct hostapd_da
|
||||
goto failed;
|
||||
}
|
||||
}
|
||||
@@ -92,7 +92,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
@@ -10655,13 +10652,14 @@ static int wpa_driver_br_add_ip_neigh(vo
|
||||
@@ -10581,13 +10578,14 @@ static int wpa_driver_br_add_ip_neigh(vo
|
||||
const u8 *ipaddr, int prefixlen,
|
||||
const u8 *addr)
|
||||
{
|
||||
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
int res;
|
||||
|
||||
if (!ipaddr || prefixlen == 0 || !addr)
|
||||
@@ -10680,85 +10678,66 @@ static int wpa_driver_br_add_ip_neigh(vo
|
||||
@@ -10606,85 +10604,66 @@ static int wpa_driver_br_add_ip_neigh(vo
|
||||
}
|
||||
|
||||
if (version == 4) {
|
||||
@@ -220,7 +220,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
addrsize = 16;
|
||||
} else {
|
||||
return -EINVAL;
|
||||
@@ -10776,41 +10755,30 @@ static int wpa_driver_br_delete_ip_neigh
|
||||
@@ -10702,41 +10681,30 @@ static int wpa_driver_br_delete_ip_neigh
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
include ../src/build.rules
|
||||
|
||||
ifdef LIBS
|
||||
@@ -359,7 +360,9 @@ endif
|
||||
@@ -354,7 +355,9 @@ endif
|
||||
ifdef CONFIG_IBSS_RSN
|
||||
NEED_RSN_AUTHENTICATOR=y
|
||||
CFLAGS += -DCONFIG_IBSS_RSN
|
||||
@@ -82,7 +82,7 @@
|
||||
OBJS += ibss_rsn.o
|
||||
endif
|
||||
|
||||
@@ -897,6 +900,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
|
||||
@@ -886,6 +889,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
|
||||
CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
|
||||
LIBS += -ldl -rdynamic
|
||||
endif
|
||||
@@ -93,7 +93,7 @@
|
||||
endif
|
||||
|
||||
ifdef CONFIG_AP
|
||||
@@ -904,9 +911,11 @@ NEED_EAP_COMMON=y
|
||||
@@ -893,9 +900,11 @@ NEED_EAP_COMMON=y
|
||||
NEED_RSN_AUTHENTICATOR=y
|
||||
CFLAGS += -DCONFIG_AP
|
||||
OBJS += ap.o
|
||||
@@ -105,7 +105,7 @@
|
||||
OBJS += ../src/ap/hostapd.o
|
||||
OBJS += ../src/ap/wpa_auth_glue.o
|
||||
OBJS += ../src/ap/utils.o
|
||||
@@ -986,6 +995,12 @@ endif
|
||||
@@ -975,6 +984,12 @@ endif
|
||||
ifdef CONFIG_HS20
|
||||
OBJS += ../src/ap/hs20.o
|
||||
endif
|
||||
@@ -118,7 +118,7 @@
|
||||
endif
|
||||
|
||||
ifdef CONFIG_MBO
|
||||
@@ -994,7 +1009,9 @@ CFLAGS += -DCONFIG_MBO
|
||||
@@ -983,7 +998,9 @@ CFLAGS += -DCONFIG_MBO
|
||||
endif
|
||||
|
||||
ifdef NEED_RSN_AUTHENTICATOR
|
||||
@@ -128,7 +128,7 @@
|
||||
NEED_AES_WRAP=y
|
||||
OBJS += ../src/ap/wpa_auth.o
|
||||
OBJS += ../src/ap/wpa_auth_ie.o
|
||||
@@ -1889,6 +1906,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
|
||||
@@ -1878,6 +1895,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
|
||||
|
||||
_OBJS_VAR := OBJS
|
||||
include ../src/objs.mk
|
||||
@@ -141,7 +141,7 @@
|
||||
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||
$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
|
||||
@$(E) " LD " $@
|
||||
@@ -2021,6 +2044,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
|
||||
@@ -1983,6 +2006,12 @@ eap_eke.so: ../src/eap_peer/eap_eke.c ..
|
||||
$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
|
||||
@$(E) " sed" $<
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
wpa_cli.exe: wpa_cli
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -6025,8 +6025,8 @@ union wpa_event_data {
|
||||
@@ -6018,8 +6018,8 @@ union wpa_event_data {
|
||||
* Driver wrapper code should call this function whenever an event is received
|
||||
* from the driver.
|
||||
*/
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
/**
|
||||
* wpa_supplicant_event_global - Report a driver event for wpa_supplicant
|
||||
@@ -6038,7 +6038,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
@@ -6031,7 +6031,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
* Same as wpa_supplicant_event(), but we search for the interface in
|
||||
* wpa_global.
|
||||
*/
|
||||
@@ -178,7 +178,7 @@
|
||||
/*
|
||||
--- a/src/ap/drv_callbacks.c
|
||||
+++ b/src/ap/drv_callbacks.c
|
||||
@@ -1836,8 +1836,8 @@ err:
|
||||
@@ -1827,8 +1827,8 @@ err:
|
||||
#endif /* CONFIG_OWE */
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
{
|
||||
struct hostapd_data *hapd = ctx;
|
||||
#ifndef CONFIG_NO_STDOUT_DEBUG
|
||||
@@ -2082,7 +2082,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
@@ -2073,7 +2073,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
}
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
os_memset(&global, 0, sizeof(global));
|
||||
--- a/wpa_supplicant/events.c
|
||||
+++ b/wpa_supplicant/events.c
|
||||
@@ -4665,8 +4665,8 @@ static void wpas_event_unprot_beacon(str
|
||||
@@ -4666,8 +4666,8 @@ static void wpas_event_unprot_beacon(str
|
||||
}
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
{
|
||||
struct wpa_supplicant *wpa_s = ctx;
|
||||
int resched;
|
||||
@@ -5511,7 +5511,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
@@ -5512,7 +5512,7 @@ void wpa_supplicant_event(void *ctx, enu
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
struct wpa_supplicant *wpa_s;
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -6819,7 +6819,6 @@ struct wpa_interface * wpa_supplicant_ma
|
||||
@@ -6814,7 +6814,6 @@ struct wpa_interface * wpa_supplicant_ma
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
/**
|
||||
* wpa_supplicant_match_existing - Match existing interfaces
|
||||
* @global: Pointer to global data from wpa_supplicant_init()
|
||||
@@ -6854,6 +6853,11 @@ static int wpa_supplicant_match_existing
|
||||
@@ -6849,6 +6848,11 @@ static int wpa_supplicant_match_existing
|
||||
|
||||
#endif /* CONFIG_MATCH_IFACE */
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
/**
|
||||
* wpa_supplicant_add_iface - Add a new network interface
|
||||
@@ -7110,6 +7114,8 @@ struct wpa_global * wpa_supplicant_init(
|
||||
@@ -7105,6 +7109,8 @@ struct wpa_global * wpa_supplicant_init(
|
||||
#ifndef CONFIG_NO_WPA_MSG
|
||||
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
|
||||
#endif /* CONFIG_NO_WPA_MSG */
|
||||
@@ -333,7 +333,7 @@
|
||||
|
||||
const struct wpa_driver_ops *const wpa_drivers[] = { NULL };
|
||||
|
||||
@@ -1291,6 +1296,10 @@ static void usage(void)
|
||||
@@ -1292,6 +1297,10 @@ static void usage(void)
|
||||
"option several times.\n");
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -1311,6 +1320,8 @@ int main(int argc, char *argv[])
|
||||
@@ -1312,6 +1321,8 @@ int main(int argc, char *argv[])
|
||||
if (os_program_init())
|
||||
return -1;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -3459,6 +3459,10 @@ static int hostapd_config_fill(struct ho
|
||||
@@ -3439,6 +3439,10 @@ static int hostapd_config_fill(struct ho
|
||||
if (bss->ocv && !bss->ieee80211w)
|
||||
bss->ieee80211w = 1;
|
||||
#endif /* CONFIG_OCV */
|
||||
@@ -13,7 +13,7 @@
|
||||
} else if (os_strcmp(buf, "ht_capab") == 0) {
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -1009,6 +1009,8 @@ struct hostapd_config {
|
||||
@@ -995,6 +995,8 @@ struct hostapd_config {
|
||||
|
||||
int ht_op_mode_fixed;
|
||||
u16 ht_capab;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -5154,7 +5154,7 @@ wpa_supplicant_alloc(struct wpa_supplica
|
||||
@@ -5147,7 +5147,7 @@ wpa_supplicant_alloc(struct wpa_supplica
|
||||
if (wpa_s == NULL)
|
||||
return NULL;
|
||||
wpa_s->scan_req = INITIAL_SCAN_REQ;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/drivers/drivers.mak
|
||||
+++ b/src/drivers/drivers.mak
|
||||
@@ -54,7 +54,6 @@ NEED_SME=y
|
||||
@@ -50,7 +50,6 @@ NEED_SME=y
|
||||
NEED_AP_MLME=y
|
||||
NEED_NETLINK=y
|
||||
NEED_LINUX_IOCTL=y
|
||||
@@ -8,7 +8,7 @@
|
||||
NEED_RADIOTAP=y
|
||||
NEED_LIBNL=y
|
||||
endif
|
||||
@@ -111,7 +110,6 @@ DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT
|
||||
@@ -107,7 +106,6 @@ DRV_WPA_CFLAGS += -DCONFIG_DRIVER_WEXT
|
||||
CONFIG_WIRELESS_EXTENSION=y
|
||||
NEED_NETLINK=y
|
||||
NEED_LINUX_IOCTL=y
|
||||
@@ -16,7 +16,7 @@
|
||||
endif
|
||||
|
||||
ifdef CONFIG_DRIVER_NDIS
|
||||
@@ -137,7 +135,6 @@ endif
|
||||
@@ -133,7 +131,6 @@ endif
|
||||
ifdef CONFIG_WIRELESS_EXTENSION
|
||||
DRV_WPA_CFLAGS += -DCONFIG_WIRELESS_EXTENSION
|
||||
DRV_WPA_OBJS += ../src/drivers/driver_wext.o
|
||||
@@ -24,7 +24,7 @@
|
||||
endif
|
||||
|
||||
ifdef NEED_NETLINK
|
||||
@@ -146,6 +143,7 @@ endif
|
||||
@@ -142,6 +139,7 @@ endif
|
||||
|
||||
ifdef NEED_RFKILL
|
||||
DRV_OBJS += ../src/drivers/rfkill.o
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -4973,7 +4973,7 @@ static int nl80211_set_channel(struct i8
|
||||
@@ -4919,7 +4919,7 @@ static int nl80211_set_channel(struct i8
|
||||
freq->freq, freq->ht_enabled, freq->vht_enabled, freq->he_enabled,
|
||||
freq->bandwidth, freq->center_freq1, freq->center_freq2);
|
||||
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -115,6 +115,28 @@ static void hostapd_reload_bss(struct ho
|
||||
#endif /* CONFIG_NO_RADIUS */
|
||||
|
||||
ssid = &hapd->conf->ssid;
|
||||
+
|
||||
+ hostapd_set_freq(hapd, hapd->iconf->hw_mode, hapd->iface->freq,
|
||||
+ hapd->iconf->channel,
|
||||
+ hapd->iconf->enable_edmg,
|
||||
+ hapd->iconf->edmg_channel,
|
||||
+ hapd->iconf->ieee80211n,
|
||||
+ hapd->iconf->ieee80211ac,
|
||||
+ hapd->iconf->ieee80211ax,
|
||||
+ hapd->iconf->secondary_channel,
|
||||
+ hostapd_get_oper_chwidth(hapd->iconf),
|
||||
+ hostapd_get_oper_centr_freq_seg0_idx(hapd->iconf),
|
||||
+ hostapd_get_oper_centr_freq_seg1_idx(hapd->iconf));
|
||||
+
|
||||
+ if (hapd->iface->current_mode) {
|
||||
+ if (hostapd_prepare_rates(hapd->iface, hapd->iface->current_mode)) {
|
||||
+ wpa_printf(MSG_ERROR, "Failed to prepare rates table.");
|
||||
+ hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
|
||||
+ HOSTAPD_LEVEL_WARNING,
|
||||
+ "Failed to prepare rates table.");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next &&
|
||||
ssid->wpa_passphrase_set && ssid->wpa_passphrase) {
|
||||
/*
|
||||
@@ -216,6 +238,7 @@ int hostapd_reload_config(struct hostapd
|
||||
struct hostapd_data *hapd = iface->bss[0];
|
||||
struct hostapd_config *newconf, *oldconf;
|
||||
size_t j;
|
||||
+ int i;
|
||||
|
||||
if (iface->config_fname == NULL) {
|
||||
/* Only in-memory config in use - assume it has been updated */
|
||||
@@ -266,24 +289,20 @@ int hostapd_reload_config(struct hostapd
|
||||
}
|
||||
iface->conf = newconf;
|
||||
|
||||
+ for (i = 0; i < iface->num_hw_features; i++) {
|
||||
+ struct hostapd_hw_modes *mode = &iface->hw_features[i];
|
||||
+ if (mode->mode == iface->conf->hw_mode) {
|
||||
+ iface->current_mode = mode;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (iface->conf->channel)
|
||||
+ iface->freq = hostapd_hw_get_freq(hapd, iface->conf->channel);
|
||||
+
|
||||
for (j = 0; j < iface->num_bss; j++) {
|
||||
hapd = iface->bss[j];
|
||||
hapd->iconf = newconf;
|
||||
- hapd->iconf->channel = oldconf->channel;
|
||||
- hapd->iconf->acs = oldconf->acs;
|
||||
- hapd->iconf->secondary_channel = oldconf->secondary_channel;
|
||||
- hapd->iconf->ieee80211n = oldconf->ieee80211n;
|
||||
- hapd->iconf->ieee80211ac = oldconf->ieee80211ac;
|
||||
- hapd->iconf->ht_capab = oldconf->ht_capab;
|
||||
- hapd->iconf->vht_capab = oldconf->vht_capab;
|
||||
- hostapd_set_oper_chwidth(hapd->iconf,
|
||||
- hostapd_get_oper_chwidth(oldconf));
|
||||
- hostapd_set_oper_centr_freq_seg0_idx(
|
||||
- hapd->iconf,
|
||||
- hostapd_get_oper_centr_freq_seg0_idx(oldconf));
|
||||
- hostapd_set_oper_centr_freq_seg1_idx(
|
||||
- hapd->iconf,
|
||||
- hostapd_get_oper_centr_freq_seg1_idx(oldconf));
|
||||
hapd->conf = newconf->bss[j];
|
||||
hostapd_reload_bss(hapd);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -2918,10 +2918,15 @@ static int wpa_driver_nl80211_del_beacon
|
||||
@@ -2891,10 +2891,15 @@ static int wpa_driver_nl80211_del_beacon
|
||||
struct nl_msg *msg;
|
||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
return send_and_recv_msgs(drv, msg, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -5602,7 +5607,7 @@ static void nl80211_teardown_ap(struct i
|
||||
@@ -5550,7 +5555,7 @@ static void nl80211_teardown_ap(struct i
|
||||
nl80211_mgmt_unsubscribe(bss, "AP teardown");
|
||||
|
||||
nl80211_put_wiphy_data_ap(bss);
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -8051,8 +8056,6 @@ static int wpa_driver_nl80211_if_remove(
|
||||
@@ -7990,8 +7995,6 @@ static int wpa_driver_nl80211_if_remove(
|
||||
} else {
|
||||
wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
|
||||
nl80211_teardown_ap(bss);
|
||||
@@ -36,7 +36,7 @@
|
||||
nl80211_destroy_bss(bss);
|
||||
if (!bss->added_if)
|
||||
i802_set_iface_flags(bss, 0);
|
||||
@@ -8449,7 +8452,6 @@ static int wpa_driver_nl80211_deinit_ap(
|
||||
@@ -8388,7 +8391,6 @@ static int wpa_driver_nl80211_deinit_ap(
|
||||
if (!is_ap_interface(drv->nlmode))
|
||||
return -1;
|
||||
wpa_driver_nl80211_del_beacon(bss);
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
/*
|
||||
* If the P2P GO interface was dynamically added, then it is
|
||||
@@ -8469,7 +8471,6 @@ static int wpa_driver_nl80211_stop_ap(vo
|
||||
@@ -8408,7 +8410,6 @@ static int wpa_driver_nl80211_stop_ap(vo
|
||||
if (!is_ap_interface(drv->nlmode))
|
||||
return -1;
|
||||
wpa_driver_nl80211_del_beacon(bss);
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
--- a/hostapd/ctrl_iface.c
|
||||
+++ b/hostapd/ctrl_iface.c
|
||||
@@ -67,6 +67,7 @@
|
||||
#include "fst/fst_ctrl_iface.h"
|
||||
#include "config_file.h"
|
||||
#include "ctrl_iface.h"
|
||||
+#include "config_file.h"
|
||||
|
||||
|
||||
#define HOSTAPD_CLI_DUP_VALUE_MAX_LEN 256
|
||||
@@ -82,6 +83,7 @@ static void hostapd_ctrl_iface_send(stru
|
||||
enum wpa_msg_type type,
|
||||
const char *buf, size_t len);
|
||||
|
||||
+static char *reload_opts = NULL;
|
||||
|
||||
static int hostapd_ctrl_iface_attach(struct hostapd_data *hapd,
|
||||
struct sockaddr_storage *from,
|
||||
@@ -133,6 +135,61 @@ static int hostapd_ctrl_iface_new_sta(st
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static char *get_option(char *opt, char *str)
|
||||
+{
|
||||
+ int len = strlen(str);
|
||||
+
|
||||
+ if (!strncmp(opt, str, len))
|
||||
+ return opt + len;
|
||||
+ else
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static struct hostapd_config *hostapd_ctrl_iface_config_read(const char *fname)
|
||||
+{
|
||||
+ struct hostapd_config *conf;
|
||||
+ char *opt, *val;
|
||||
+
|
||||
+ conf = hostapd_config_read(fname);
|
||||
+ if (!conf)
|
||||
+ return NULL;
|
||||
+
|
||||
+ for (opt = strtok(reload_opts, " ");
|
||||
+ opt;
|
||||
+ opt = strtok(NULL, " ")) {
|
||||
+
|
||||
+ if ((val = get_option(opt, "channel=")))
|
||||
+ conf->channel = atoi(val);
|
||||
+ else if ((val = get_option(opt, "ht_capab=")))
|
||||
+ conf->ht_capab = atoi(val);
|
||||
+ else if ((val = get_option(opt, "ht_capab_mask=")))
|
||||
+ conf->ht_capab &= atoi(val);
|
||||
+ else if ((val = get_option(opt, "sec_chan=")))
|
||||
+ conf->secondary_channel = atoi(val);
|
||||
+ else if ((val = get_option(opt, "hw_mode=")))
|
||||
+ conf->hw_mode = atoi(val);
|
||||
+ else if ((val = get_option(opt, "ieee80211n=")))
|
||||
+ conf->ieee80211n = atoi(val);
|
||||
+ else
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return conf;
|
||||
+}
|
||||
+
|
||||
+static int hostapd_ctrl_iface_update(struct hostapd_data *hapd, char *txt)
|
||||
+{
|
||||
+ struct hostapd_config * (*config_read_cb)(const char *config_fname);
|
||||
+ struct hostapd_iface *iface = hapd->iface;
|
||||
+
|
||||
+ config_read_cb = iface->interfaces->config_read_cb;
|
||||
+ iface->interfaces->config_read_cb = hostapd_ctrl_iface_config_read;
|
||||
+ reload_opts = txt;
|
||||
+
|
||||
+ hostapd_reload_config(iface);
|
||||
+
|
||||
+ iface->interfaces->config_read_cb = config_read_cb;
|
||||
+}
|
||||
|
||||
#ifdef NEED_AP_MLME
|
||||
static int hostapd_ctrl_iface_sa_query(struct hostapd_data *hapd,
|
||||
@@ -3754,6 +3811,8 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
} else if (os_strncmp(buf, "VENDOR ", 7) == 0) {
|
||||
reply_len = hostapd_ctrl_iface_vendor(hapd, buf + 7, reply,
|
||||
reply_size);
|
||||
+ } else if (os_strncmp(buf, "UPDATE ", 7) == 0) {
|
||||
+ hostapd_ctrl_iface_update(hapd, buf + 7);
|
||||
} else if (os_strcmp(buf, "ERP_FLUSH") == 0) {
|
||||
ieee802_1x_erp_flush(hapd);
|
||||
#ifdef RADIUS_SERVER
|
||||
--- a/src/ap/ctrl_iface_ap.c
|
||||
+++ b/src/ap/ctrl_iface_ap.c
|
||||
@@ -919,7 +919,13 @@ int hostapd_parse_csa_settings(const cha
|
||||
|
||||
int hostapd_ctrl_iface_stop_ap(struct hostapd_data *hapd)
|
||||
{
|
||||
- return hostapd_drv_stop_ap(hapd);
|
||||
+ struct hostapd_iface *iface = hapd->iface;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < iface->num_bss; i++)
|
||||
+ hostapd_drv_stop_ap(iface->bss[i]);
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,414 +0,0 @@
|
||||
Index: hostapd-2021-02-20-59e9794c/wpa_supplicant/Makefile
|
||||
===================================================================
|
||||
--- hostapd-2021-02-20-59e9794c.orig/wpa_supplicant/Makefile
|
||||
+++ hostapd-2021-02-20-59e9794c/wpa_supplicant/Makefile
|
||||
@@ -103,6 +103,8 @@ OBJS_c += ../src/utils/common.o
|
||||
OBJS_c += ../src/common/cli.o
|
||||
OBJS += wmm_ac.o
|
||||
|
||||
+OBJS += ../src/common/wpa_ctrl.o
|
||||
+
|
||||
ifndef CONFIG_OS
|
||||
ifdef CONFIG_NATIVE_WINDOWS
|
||||
CONFIG_OS=win32
|
||||
Index: hostapd-2021-02-20-59e9794c/wpa_supplicant/bss.c
|
||||
===================================================================
|
||||
--- hostapd-2021-02-20-59e9794c.orig/wpa_supplicant/bss.c
|
||||
+++ hostapd-2021-02-20-59e9794c/wpa_supplicant/bss.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "utils/common.h"
|
||||
#include "utils/eloop.h"
|
||||
#include "common/ieee802_11_defs.h"
|
||||
+#include "common/ieee802_11_common.h"
|
||||
#include "drivers/driver.h"
|
||||
#include "eap_peer/eap.h"
|
||||
#include "wpa_supplicant_i.h"
|
||||
@@ -282,6 +283,10 @@ void calculate_update_time(const struct
|
||||
static void wpa_bss_copy_res(struct wpa_bss *dst, struct wpa_scan_res *src,
|
||||
struct os_reltime *fetch_time)
|
||||
{
|
||||
+ struct ieee80211_ht_capabilities *capab;
|
||||
+ struct ieee80211_ht_operation *oper;
|
||||
+ struct ieee802_11_elems elems;
|
||||
+
|
||||
dst->flags = src->flags;
|
||||
os_memcpy(dst->bssid, src->bssid, ETH_ALEN);
|
||||
dst->freq = src->freq;
|
||||
@@ -294,6 +299,15 @@ static void wpa_bss_copy_res(struct wpa_
|
||||
dst->est_throughput = src->est_throughput;
|
||||
dst->snr = src->snr;
|
||||
|
||||
+ memset(&elems, 0, sizeof(elems));
|
||||
+ ieee802_11_parse_elems((u8 *) (src + 1), src->ie_len, &elems, 0);
|
||||
+ capab = (struct ieee80211_ht_capabilities *) elems.ht_capabilities;
|
||||
+ oper = (struct ieee80211_ht_operation *) elems.ht_operation;
|
||||
+ if (capab)
|
||||
+ dst->ht_capab = le_to_host16(capab->ht_capabilities_info);
|
||||
+ if (oper)
|
||||
+ dst->ht_param = oper->ht_param;
|
||||
+
|
||||
calculate_update_time(fetch_time, src->age, &dst->last_update);
|
||||
}
|
||||
|
||||
Index: hostapd-2021-02-20-59e9794c/wpa_supplicant/bss.h
|
||||
===================================================================
|
||||
--- hostapd-2021-02-20-59e9794c.orig/wpa_supplicant/bss.h
|
||||
+++ hostapd-2021-02-20-59e9794c/wpa_supplicant/bss.h
|
||||
@@ -94,6 +94,10 @@ struct wpa_bss {
|
||||
u8 ssid[SSID_MAX_LEN];
|
||||
/** Length of SSID */
|
||||
size_t ssid_len;
|
||||
+ /** HT capabilities */
|
||||
+ u16 ht_capab;
|
||||
+ /* Five octets of HT Operation Information */
|
||||
+ u8 ht_param;
|
||||
/** Frequency of the channel in MHz (e.g., 2412 = channel 1) */
|
||||
int freq;
|
||||
/** Beacon interval in TUs (host byte order) */
|
||||
Index: hostapd-2021-02-20-59e9794c/wpa_supplicant/main.c
|
||||
===================================================================
|
||||
--- hostapd-2021-02-20-59e9794c.orig/wpa_supplicant/main.c
|
||||
+++ hostapd-2021-02-20-59e9794c/wpa_supplicant/main.c
|
||||
@@ -34,7 +34,7 @@ static void usage(void)
|
||||
"vW] [-P<pid file>] "
|
||||
"[-g<global ctrl>] \\\n"
|
||||
" [-G<group>] \\\n"
|
||||
- " -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] "
|
||||
+ " -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] [-H<hostapd path>] "
|
||||
"[-p<driver_param>] \\\n"
|
||||
" [-b<br_ifname>] [-e<entropy file>]"
|
||||
#ifdef CONFIG_DEBUG_FILE
|
||||
@@ -74,6 +74,7 @@ static void usage(void)
|
||||
" -g = global ctrl_interface\n"
|
||||
" -G = global ctrl_interface group\n"
|
||||
" -h = show this help text\n"
|
||||
+ " -H = connect to a hostapd instance to manage state changes\n"
|
||||
" -i = interface name\n"
|
||||
" -I = additional configuration file\n"
|
||||
" -K = include keys (passwords, etc.) in debug output\n"
|
||||
@@ -201,7 +202,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
for (;;) {
|
||||
c = getopt(argc, argv,
|
||||
- "b:Bc:C:D:de:f:g:G:hi:I:KLMm:No:O:p:P:qsTtuvW");
|
||||
+ "b:Bc:C:D:de:f:g:G:hH:i:I:KLMm:No:O:p:P:qsTtuvW");
|
||||
if (c < 0)
|
||||
break;
|
||||
switch (c) {
|
||||
@@ -248,6 +249,9 @@ int main(int argc, char *argv[])
|
||||
usage();
|
||||
exitcode = 0;
|
||||
goto out;
|
||||
+ case 'H':
|
||||
+ iface->hostapd_ctrl = optarg;
|
||||
+ break;
|
||||
case 'i':
|
||||
iface->ifname = optarg;
|
||||
break;
|
||||
Index: hostapd-2021-02-20-59e9794c/wpa_supplicant/wpa_supplicant.c
|
||||
===================================================================
|
||||
--- hostapd-2021-02-20-59e9794c.orig/wpa_supplicant/wpa_supplicant.c
|
||||
+++ hostapd-2021-02-20-59e9794c/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -130,6 +130,54 @@ static void wpas_update_fils_connect_par
|
||||
static void wpas_update_owe_connect_params(struct wpa_supplicant *wpa_s);
|
||||
#endif /* CONFIG_OWE */
|
||||
|
||||
+static int hostapd_stop(struct wpa_supplicant *wpa_s)
|
||||
+{
|
||||
+ const char *cmd = "STOP_AP";
|
||||
+ char buf[256];
|
||||
+ size_t len = sizeof(buf);
|
||||
+
|
||||
+ if (wpa_ctrl_request(wpa_s->hostapd, cmd, os_strlen(cmd), buf, &len, NULL) < 0) {
|
||||
+ wpa_printf(MSG_ERROR, "\nFailed to stop hostapd AP interfaces\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int hostapd_reload(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
|
||||
+{
|
||||
+ char *cmd = NULL;
|
||||
+ char buf[256];
|
||||
+ size_t len = sizeof(buf);
|
||||
+ enum hostapd_hw_mode hw_mode;
|
||||
+ u8 channel;
|
||||
+ int sec_chan = 0;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!bss)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (bss->ht_param & HT_INFO_HT_PARAM_STA_CHNL_WIDTH) {
|
||||
+ int sec = bss->ht_param & HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK;
|
||||
+ if (sec == HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE)
|
||||
+ sec_chan = 1;
|
||||
+ else if (sec == HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW)
|
||||
+ sec_chan = -1;
|
||||
+ }
|
||||
+
|
||||
+ hw_mode = ieee80211_freq_to_chan(bss->freq, &channel);
|
||||
+ if (asprintf(&cmd, "UPDATE channel=%d sec_chan=%d hw_mode=%d",
|
||||
+ channel, sec_chan, hw_mode) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ ret = wpa_ctrl_request(wpa_s->hostapd, cmd, os_strlen(cmd), buf, &len, NULL);
|
||||
+ free(cmd);
|
||||
+
|
||||
+ if (ret < 0) {
|
||||
+ wpa_printf(MSG_ERROR, "\nFailed to reload hostapd AP interfaces\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
#ifdef CONFIG_WEP
|
||||
/* Configure default/group WEP keys for static WEP */
|
||||
@@ -1007,6 +1055,8 @@ void wpa_supplicant_set_state(struct wpa
|
||||
|
||||
sme_sched_obss_scan(wpa_s, 1);
|
||||
|
||||
+ if (wpa_s->hostapd)
|
||||
+ hostapd_reload(wpa_s, wpa_s->current_bss);
|
||||
#if defined(CONFIG_FILS) && defined(IEEE8021X_EAPOL)
|
||||
if (!fils_hlp_sent && ssid && ssid->eap.erp)
|
||||
update_fils_connect_params = true;
|
||||
@@ -1017,6 +1067,8 @@ void wpa_supplicant_set_state(struct wpa
|
||||
#endif /* CONFIG_OWE */
|
||||
} else if (state == WPA_DISCONNECTED || state == WPA_ASSOCIATING ||
|
||||
state == WPA_ASSOCIATED) {
|
||||
+ if (wpa_s->hostapd)
|
||||
+ hostapd_stop(wpa_s);
|
||||
wpa_s->new_connection = 1;
|
||||
wpa_drv_set_operstate(wpa_s, 0);
|
||||
#ifndef IEEE8021X_EAPOL
|
||||
@@ -2276,6 +2328,8 @@ void wpa_supplicant_associate(struct wpa
|
||||
return;
|
||||
}
|
||||
wpa_s->current_bss = bss;
|
||||
+ if (wpa_s->hostapd)
|
||||
+ hostapd_reload(wpa_s, wpa_s->current_bss);
|
||||
#else /* CONFIG_MESH */
|
||||
wpa_msg(wpa_s, MSG_ERROR,
|
||||
"mesh mode support not included in the build");
|
||||
@@ -6419,6 +6473,16 @@ static int wpa_supplicant_init_iface(str
|
||||
sizeof(wpa_s->bridge_ifname));
|
||||
}
|
||||
|
||||
+ if (iface->hostapd_ctrl) {
|
||||
+ wpa_s->hostapd = wpa_ctrl_open(iface->hostapd_ctrl);
|
||||
+ if (!wpa_s->hostapd) {
|
||||
+ wpa_printf(MSG_ERROR, "\nFailed to connect to hostapd\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (hostapd_stop(wpa_s) < 0)
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
/* RSNA Supplicant Key Management - INITIALIZE */
|
||||
eapol_sm_notify_portEnabled(wpa_s->eapol, false);
|
||||
eapol_sm_notify_portValid(wpa_s->eapol, false);
|
||||
@@ -6756,6 +6820,11 @@ static void wpa_supplicant_deinit_iface(
|
||||
if (terminate)
|
||||
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TERMINATING);
|
||||
|
||||
+ if (wpa_s->hostapd) {
|
||||
+ wpa_ctrl_close(wpa_s->hostapd);
|
||||
+ wpa_s->hostapd = NULL;
|
||||
+ }
|
||||
+
|
||||
if (wpa_s->ctrl_iface) {
|
||||
wpa_supplicant_ctrl_iface_deinit(wpa_s->ctrl_iface);
|
||||
wpa_s->ctrl_iface = NULL;
|
||||
Index: hostapd-2021-02-20-59e9794c/wpa_supplicant/wpa_supplicant_i.h
|
||||
===================================================================
|
||||
--- hostapd-2021-02-20-59e9794c.orig/wpa_supplicant/wpa_supplicant_i.h
|
||||
+++ hostapd-2021-02-20-59e9794c/wpa_supplicant/wpa_supplicant_i.h
|
||||
@@ -103,6 +103,11 @@ struct wpa_interface {
|
||||
const char *ifname;
|
||||
|
||||
/**
|
||||
+ * hostapd_ctrl - path to hostapd control socket for notification
|
||||
+ */
|
||||
+ const char *hostapd_ctrl;
|
||||
+
|
||||
+ /**
|
||||
* bridge_ifname - Optional bridge interface name
|
||||
*
|
||||
* If the driver interface (ifname) is included in a Linux bridge
|
||||
@@ -611,6 +616,8 @@ struct wpa_supplicant {
|
||||
#endif /* CONFIG_CTRL_IFACE_BINDER */
|
||||
char bridge_ifname[16];
|
||||
|
||||
+ struct wpa_ctrl *hostapd;
|
||||
+
|
||||
char *confname;
|
||||
char *confanother;
|
||||
|
||||
Index: hostapd-2021-02-20-59e9794c/hostapd/ctrl_iface.c
|
||||
===================================================================
|
||||
--- hostapd-2021-02-20-59e9794c.orig/hostapd/ctrl_iface.c
|
||||
+++ hostapd-2021-02-20-59e9794c/hostapd/ctrl_iface.c
|
||||
@@ -2781,6 +2781,11 @@ static int hostapd_ctrl_iface_chan_switc
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ if (os_strstr(pos, " auto-ht")) {
|
||||
+ settings.freq_params.ht_enabled = iface->conf->ieee80211n;
|
||||
+ settings.freq_params.vht_enabled = iface->conf->ieee80211ac;
|
||||
+ }
|
||||
+
|
||||
for (i = 0; i < iface->num_bss; i++) {
|
||||
|
||||
/* Save CHAN_SWITCH VHT and HE config */
|
||||
Index: hostapd-2021-02-20-59e9794c/src/ap/beacon.c
|
||||
===================================================================
|
||||
--- hostapd-2021-02-20-59e9794c.orig/src/ap/beacon.c
|
||||
+++ hostapd-2021-02-20-59e9794c/src/ap/beacon.c
|
||||
@@ -1753,11 +1753,6 @@ int ieee802_11_set_beacon(struct hostapd
|
||||
struct wpabuf *beacon, *proberesp, *assocresp;
|
||||
int res, ret = -1;
|
||||
|
||||
- if (hapd->csa_in_progress) {
|
||||
- wpa_printf(MSG_ERROR, "Cannot set beacons during CSA period");
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
hapd->beacon_set_done = 1;
|
||||
|
||||
if (ieee802_11_build_ap_params(hapd, ¶ms) < 0)
|
||||
Index: hostapd-2021-02-20-59e9794c/wpa_supplicant/events.c
|
||||
===================================================================
|
||||
--- hostapd-2021-02-20-59e9794c.orig/wpa_supplicant/events.c
|
||||
+++ hostapd-2021-02-20-59e9794c/wpa_supplicant/events.c
|
||||
@@ -4666,6 +4666,60 @@ static void wpas_event_unprot_beacon(str
|
||||
}
|
||||
|
||||
|
||||
+static void
|
||||
+supplicant_ch_switch_started(struct wpa_supplicant *wpa_s,
|
||||
+ union wpa_event_data *data)
|
||||
+{
|
||||
+ char buf[256];
|
||||
+ size_t len = sizeof(buf);
|
||||
+ char *cmd = NULL;
|
||||
+ int width = 20;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!wpa_s->hostapd)
|
||||
+ return;
|
||||
+
|
||||
+ wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_CHANNEL_SWITCH
|
||||
+ "count=%d freq=%d ht_enabled=%d ch_offset=%d ch_width=%s cf1=%d cf2=%d",
|
||||
+ data->ch_switch.count,
|
||||
+ data->ch_switch.freq,
|
||||
+ data->ch_switch.ht_enabled,
|
||||
+ data->ch_switch.ch_offset,
|
||||
+ channel_width_to_string(data->ch_switch.ch_width),
|
||||
+ data->ch_switch.cf1,
|
||||
+ data->ch_switch.cf2);
|
||||
+
|
||||
+ switch (data->ch_switch.ch_width) {
|
||||
+ case CHAN_WIDTH_20_NOHT:
|
||||
+ case CHAN_WIDTH_20:
|
||||
+ width = 20;
|
||||
+ break;
|
||||
+ case CHAN_WIDTH_40:
|
||||
+ width = 40;
|
||||
+ break;
|
||||
+ case CHAN_WIDTH_80:
|
||||
+ width = 80;
|
||||
+ break;
|
||||
+ case CHAN_WIDTH_160:
|
||||
+ case CHAN_WIDTH_80P80:
|
||||
+ width = 160;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ asprintf(&cmd, "CHAN_SWITCH %d %d sec_channel_offset=%d center_freq1=%d center_freq2=%d, bandwidth=%d auto-ht\n",
|
||||
+ data->ch_switch.count - 1,
|
||||
+ data->ch_switch.freq,
|
||||
+ data->ch_switch.ch_offset,
|
||||
+ data->ch_switch.cf1,
|
||||
+ data->ch_switch.cf2,
|
||||
+ width);
|
||||
+ ret = wpa_ctrl_request(wpa_s->hostapd, cmd, os_strlen(cmd), buf, &len, NULL);
|
||||
+ free(cmd);
|
||||
+
|
||||
+ if (ret < 0)
|
||||
+ wpa_printf(MSG_ERROR, "\nFailed to reload hostapd AP interfaces\n");
|
||||
+}
|
||||
+
|
||||
void supplicant_event(void *ctx, enum wpa_event_type event,
|
||||
union wpa_event_data *data)
|
||||
{
|
||||
@@ -4981,8 +5035,10 @@ void supplicant_event(void *ctx, enum wp
|
||||
channel_width_to_string(data->ch_switch.ch_width),
|
||||
data->ch_switch.cf1,
|
||||
data->ch_switch.cf2);
|
||||
- if (event == EVENT_CH_SWITCH_STARTED)
|
||||
+ if (event == EVENT_CH_SWITCH_STARTED) {
|
||||
+ supplicant_ch_switch_started(wpa_s, data);
|
||||
break;
|
||||
+ }
|
||||
|
||||
wpa_s->assoc_freq = data->ch_switch.freq;
|
||||
wpa_s->current_ssid->frequency = data->ch_switch.freq;
|
||||
Index: hostapd-2021-02-20-59e9794c/src/drivers/driver.h
|
||||
===================================================================
|
||||
--- hostapd-2021-02-20-59e9794c.orig/src/drivers/driver.h
|
||||
+++ hostapd-2021-02-20-59e9794c/src/drivers/driver.h
|
||||
@@ -5822,6 +5822,7 @@ union wpa_event_data {
|
||||
|
||||
/**
|
||||
* struct ch_switch
|
||||
+ * @count: Count until channel switch activates
|
||||
* @freq: Frequency of new channel in MHz
|
||||
* @ht_enabled: Whether this is an HT channel
|
||||
* @ch_offset: Secondary channel offset
|
||||
@@ -5830,6 +5831,7 @@ union wpa_event_data {
|
||||
* @cf2: Center frequency 2
|
||||
*/
|
||||
struct ch_switch {
|
||||
+ int count;
|
||||
int freq;
|
||||
int ht_enabled;
|
||||
int ch_offset;
|
||||
Index: hostapd-2021-02-20-59e9794c/src/drivers/driver_nl80211_event.c
|
||||
===================================================================
|
||||
--- hostapd-2021-02-20-59e9794c.orig/src/drivers/driver_nl80211_event.c
|
||||
+++ hostapd-2021-02-20-59e9794c/src/drivers/driver_nl80211_event.c
|
||||
@@ -655,7 +655,7 @@ static void mlme_event_ch_switch(struct
|
||||
struct nlattr *ifindex, struct nlattr *freq,
|
||||
struct nlattr *type, struct nlattr *bw,
|
||||
struct nlattr *cf1, struct nlattr *cf2,
|
||||
- int finished)
|
||||
+ struct nlattr *count, int finished)
|
||||
{
|
||||
struct i802_bss *bss;
|
||||
union wpa_event_data data;
|
||||
@@ -714,6 +714,8 @@ static void mlme_event_ch_switch(struct
|
||||
data.ch_switch.cf1 = nla_get_u32(cf1);
|
||||
if (cf2)
|
||||
data.ch_switch.cf2 = nla_get_u32(cf2);
|
||||
+ if (count)
|
||||
+ data.ch_switch.count = nla_get_u32(count);
|
||||
|
||||
if (finished)
|
||||
bss->freq = data.ch_switch.freq;
|
||||
@@ -2886,6 +2888,7 @@ static void do_process_drv_event(struct
|
||||
tb[NL80211_ATTR_CHANNEL_WIDTH],
|
||||
tb[NL80211_ATTR_CENTER_FREQ1],
|
||||
tb[NL80211_ATTR_CENTER_FREQ2],
|
||||
+ tb[NL80211_ATTR_CH_SWITCH_COUNT],
|
||||
0);
|
||||
break;
|
||||
case NL80211_CMD_CH_SWITCH_NOTIFY:
|
||||
@@ -2896,6 +2899,7 @@ static void do_process_drv_event(struct
|
||||
tb[NL80211_ATTR_CHANNEL_WIDTH],
|
||||
tb[NL80211_ATTR_CENTER_FREQ1],
|
||||
tb[NL80211_ATTR_CENTER_FREQ2],
|
||||
+ NULL,
|
||||
1);
|
||||
break;
|
||||
case NL80211_CMD_DISCONNECT:
|
||||
@@ -12,7 +12,7 @@
|
||||
else
|
||||
--- a/hostapd/ctrl_iface.c
|
||||
+++ b/hostapd/ctrl_iface.c
|
||||
@@ -3569,6 +3569,7 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
@@ -3388,6 +3388,7 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
reply_size);
|
||||
} else if (os_strcmp(buf, "STATUS-DRIVER") == 0) {
|
||||
reply_len = hostapd_drv_status(hapd, reply, reply_size);
|
||||
@@ -20,7 +20,7 @@
|
||||
} else if (os_strcmp(buf, "MIB") == 0) {
|
||||
reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
|
||||
if (reply_len >= 0) {
|
||||
@@ -3610,6 +3611,7 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
@@ -3429,6 +3430,7 @@ static int hostapd_ctrl_iface_receive_pr
|
||||
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
|
||||
reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
|
||||
reply_size);
|
||||
@@ -30,7 +30,7 @@
|
||||
reply_len = -1;
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -955,6 +955,9 @@ ifdef CONFIG_FILS
|
||||
@@ -942,6 +942,9 @@ ifdef CONFIG_FILS
|
||||
OBJS += ../src/ap/fils_hlp.o
|
||||
endif
|
||||
ifdef CONFIG_CTRL_IFACE
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
--- a/wpa_supplicant/ctrl_iface.c
|
||||
+++ b/wpa_supplicant/ctrl_iface.c
|
||||
@@ -2308,7 +2308,7 @@ static int wpa_supplicant_ctrl_iface_sta
|
||||
@@ -2294,7 +2294,7 @@ static int wpa_supplicant_ctrl_iface_sta
|
||||
pos += ret;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
if (wpa_s->ap_iface) {
|
||||
pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos,
|
||||
end - pos,
|
||||
@@ -10919,6 +10919,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
@@ -10602,6 +10602,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
reply_len = -1;
|
||||
} else if (os_strncmp(buf, "NOTE ", 5) == 0) {
|
||||
wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
|
||||
@@ -59,7 +59,7 @@
|
||||
} else if (os_strcmp(buf, "MIB") == 0) {
|
||||
reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
|
||||
if (reply_len >= 0) {
|
||||
@@ -10931,6 +10932,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
@@ -10614,6 +10615,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
reply_size - reply_len);
|
||||
#endif /* CONFIG_MACSEC */
|
||||
}
|
||||
@@ -67,7 +67,7 @@
|
||||
} else if (os_strncmp(buf, "STATUS", 6) == 0) {
|
||||
reply_len = wpa_supplicant_ctrl_iface_status(
|
||||
wpa_s, buf + 6, reply, reply_size);
|
||||
@@ -11419,6 +11421,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
@@ -11102,6 +11104,7 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
reply_len = wpa_supplicant_ctrl_iface_bss(
|
||||
wpa_s, buf + 4, reply, reply_size);
|
||||
#ifdef CONFIG_AP
|
||||
@@ -75,7 +75,7 @@
|
||||
} else if (os_strcmp(buf, "STA-FIRST") == 0) {
|
||||
reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
|
||||
} else if (os_strncmp(buf, "STA ", 4) == 0) {
|
||||
@@ -11427,12 +11430,15 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
@@ -11110,12 +11113,15 @@ char * wpa_supplicant_ctrl_iface_process
|
||||
} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
|
||||
reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
|
||||
reply_size);
|
||||
@@ -144,7 +144,7 @@
|
||||
static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx)
|
||||
--- a/src/ap/wpa_auth.c
|
||||
+++ b/src/ap/wpa_auth.c
|
||||
@@ -4519,6 +4519,7 @@ static const char * wpa_bool_txt(int val
|
||||
@@ -4503,6 +4503,7 @@ static const char * wpa_bool_txt(int val
|
||||
return val ? "TRUE" : "FALSE";
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
||||
#define RSN_SUITE_ARG(s) \
|
||||
@@ -4669,7 +4670,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
|
||||
@@ -4653,7 +4654,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
|
||||
|
||||
return len;
|
||||
}
|
||||
@@ -163,7 +163,7 @@
|
||||
{
|
||||
--- a/src/rsn_supp/wpa.c
|
||||
+++ b/src/rsn_supp/wpa.c
|
||||
@@ -2767,6 +2767,8 @@ static u32 wpa_key_mgmt_suite(struct wpa
|
||||
@@ -2763,6 +2763,8 @@ static u32 wpa_key_mgmt_suite(struct wpa
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
#define RSN_SUITE "%02x-%02x-%02x-%d"
|
||||
#define RSN_SUITE_ARG(s) \
|
||||
((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff
|
||||
@@ -2848,6 +2850,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
|
||||
@@ -2844,6 +2846,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
|
||||
|
||||
return (int) len;
|
||||
}
|
||||
|
||||
@@ -36,16 +36,16 @@
|
||||
#include "fst/fst.h"
|
||||
#include "wpa_supplicant_i.h"
|
||||
#include "driver_i.h"
|
||||
@@ -202,7 +203,7 @@ int main(int argc, char *argv[])
|
||||
@@ -201,7 +202,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
for (;;) {
|
||||
c = getopt(argc, argv,
|
||||
- "b:Bc:C:D:de:f:g:G:hH:i:I:KLMm:No:O:p:P:qsTtuvW");
|
||||
+ "b:Bc:C:D:de:f:g:G:hH:i:I:KLMm:No:O:p:P:qsTtuv::W");
|
||||
- "b:Bc:C:D:de:f:g:G:hi:I:KLMm:No:O:p:P:qsTtuvW");
|
||||
+ "b:Bc:C:D:de:f:g:G:hi:I:KLMm:No:O:p:P:qsTtuv::W");
|
||||
if (c < 0)
|
||||
break;
|
||||
switch (c) {
|
||||
@@ -305,8 +306,12 @@ int main(int argc, char *argv[])
|
||||
@@ -301,8 +302,12 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
#endif /* CONFIG_CTRL_IFACE_DBUS_NEW */
|
||||
case 'v':
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
static int hostapd_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc,
|
||||
@@ -1579,13 +1575,10 @@ static const struct hostapd_cli_cmd host
|
||||
@@ -1571,13 +1567,10 @@ static const struct hostapd_cli_cmd host
|
||||
{ "disassociate", hostapd_cli_cmd_disassociate,
|
||||
hostapd_complete_stations,
|
||||
"<addr> = disassociate a station" },
|
||||
@@ -46,7 +46,7 @@
|
||||
{ "wps_pin", hostapd_cli_cmd_wps_pin, NULL,
|
||||
"<uuid> <pin> [timeout] [addr] = add WPS Enrollee PIN" },
|
||||
{ "wps_check_pin", hostapd_cli_cmd_wps_check_pin, NULL,
|
||||
@@ -1610,7 +1603,6 @@ static const struct hostapd_cli_cmd host
|
||||
@@ -1602,7 +1595,6 @@ static const struct hostapd_cli_cmd host
|
||||
"<SSID> <auth> <encr> <key> = configure AP" },
|
||||
{ "wps_get_status", hostapd_cli_cmd_wps_get_status, NULL,
|
||||
"= show current WPS status" },
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
--- a/hostapd/main.c
|
||||
+++ b/hostapd/main.c
|
||||
@@ -39,6 +39,8 @@ struct hapd_global {
|
||||
};
|
||||
|
||||
static struct hapd_global global;
|
||||
+static int daemonize = 0;
|
||||
+static char *pid_file = NULL;
|
||||
|
||||
|
||||
#ifndef CONFIG_NO_HOSTAPD_LOGGER
|
||||
@@ -146,6 +148,14 @@ static void hostapd_logger_cb(void *ctx,
|
||||
}
|
||||
#endif /* CONFIG_NO_HOSTAPD_LOGGER */
|
||||
|
||||
+static void hostapd_setup_complete_cb(void *ctx)
|
||||
+{
|
||||
+ if (daemonize && os_daemonize(pid_file)) {
|
||||
+ perror("daemon");
|
||||
+ return;
|
||||
+ }
|
||||
+ daemonize = 0;
|
||||
+}
|
||||
|
||||
/**
|
||||
* hostapd_driver_init - Preparate driver interface
|
||||
@@ -164,6 +174,8 @@ static int hostapd_driver_init(struct ho
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ hapd->setup_complete_cb = hostapd_setup_complete_cb;
|
||||
+
|
||||
/* Initialize the driver interface */
|
||||
if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5]))
|
||||
b = NULL;
|
||||
@@ -404,8 +416,6 @@ static void hostapd_global_deinit(const
|
||||
#endif /* CONFIG_NATIVE_WINDOWS */
|
||||
|
||||
eap_server_unregister_methods();
|
||||
-
|
||||
- os_daemonize_terminate(pid_file);
|
||||
}
|
||||
|
||||
|
||||
@@ -431,18 +441,6 @@ static int hostapd_global_run(struct hap
|
||||
}
|
||||
#endif /* EAP_SERVER_TNC */
|
||||
|
||||
- if (daemonize) {
|
||||
- if (os_daemonize(pid_file)) {
|
||||
- wpa_printf(MSG_ERROR, "daemon: %s", strerror(errno));
|
||||
- return -1;
|
||||
- }
|
||||
- if (eloop_sock_requeue()) {
|
||||
- wpa_printf(MSG_ERROR, "eloop_sock_requeue: %s",
|
||||
- strerror(errno));
|
||||
- return -1;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
eloop_run();
|
||||
|
||||
return 0;
|
||||
@@ -645,8 +643,7 @@ int main(int argc, char *argv[])
|
||||
struct hapd_interfaces interfaces;
|
||||
int ret = 1;
|
||||
size_t i, j;
|
||||
- int c, debug = 0, daemonize = 0;
|
||||
- char *pid_file = NULL;
|
||||
+ int c, debug = 0;
|
||||
const char *log_file = NULL;
|
||||
const char *entropy_file = NULL;
|
||||
char **bss_config = NULL, **tmp_bss;
|
||||
@@ -174,7 +174,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
* macsec_policy - Determines the policy for MACsec secure session
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -3726,6 +3726,12 @@ static void wpas_start_assoc_cb(struct w
|
||||
@@ -3673,6 +3673,12 @@ static void wpas_start_assoc_cb(struct w
|
||||
params.beacon_int = ssid->beacon_int;
|
||||
else
|
||||
params.beacon_int = wpa_s->conf->beacon_int;
|
||||
|
||||
@@ -10,7 +10,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -5951,7 +5951,7 @@ static int wpa_driver_nl80211_ibss(struc
|
||||
@@ -5886,7 +5886,7 @@ static int wpa_driver_nl80211_ibss(struc
|
||||
struct wpa_driver_associate_params *params)
|
||||
{
|
||||
struct nl_msg *msg;
|
||||
@@ -19,7 +19,7 @@ Signed-hostap: Antonio Quartulli <ordex@autistici.org>
|
||||
int count = 0;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Join IBSS (ifindex=%d)", drv->ifindex);
|
||||
@@ -5978,6 +5978,37 @@ retry:
|
||||
@@ -5913,6 +5913,37 @@ retry:
|
||||
nl80211_put_beacon_int(msg, params->beacon_int))
|
||||
goto fail;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
|
||||
struct wpa_driver_set_key_params {
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -10476,6 +10476,18 @@ static int nl80211_put_mesh_id(struct nl
|
||||
@@ -10398,6 +10398,18 @@ static int nl80211_put_mesh_id(struct nl
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich@openmesh.com>
|
||||
static int nl80211_put_mesh_config(struct nl_msg *msg,
|
||||
struct wpa_driver_mesh_bss_params *params)
|
||||
{
|
||||
@@ -10537,6 +10549,7 @@ static int nl80211_join_mesh(struct i802
|
||||
@@ -10459,6 +10471,7 @@ static int nl80211_join_mesh(struct i802
|
||||
nl80211_put_basic_rates(msg, params->basic_rates) ||
|
||||
nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
|
||||
nl80211_put_beacon_int(msg, params->beacon_int) ||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/wpa_supplicant/wpa_supplicant.c
|
||||
+++ b/wpa_supplicant/wpa_supplicant.c
|
||||
@@ -2457,11 +2457,13 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
@@ -2403,11 +2403,13 @@ void ibss_mesh_setup_freq(struct wpa_sup
|
||||
for (j = 0; j < wpa_s->last_scan_res_used; j++) {
|
||||
struct wpa_bss *bss = wpa_s->last_scan_res[j];
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
total = survey->channel_time;
|
||||
|
||||
@@ -422,20 +416,19 @@ static int acs_usable_bw160_chan(const s
|
||||
@@ -415,20 +409,19 @@ static int acs_usable_vht160_chan(const
|
||||
static int acs_survey_is_sufficient(struct freq_survey *survey)
|
||||
{
|
||||
if (!(survey->filled & SURVEY_HAS_NF)) {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS)
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -1918,31 +1918,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
|
||||
@@ -1905,31 +1905,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
|
||||
@$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
|
||||
|
||||
wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user