Skip to content

Commit c404f91

Browse files
authored
Merge branch 'develop' into easymesh_ap_profile
2 parents 832b1ce + aa78dd1 commit c404f91

File tree

42 files changed

+877
-564
lines changed

Some content is hidden

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

42 files changed

+877
-564
lines changed

conf/distro/include/rdk-bpi.inc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ DISTRO_FEATURES_remove = " lan0_as_wan"
4747
#Need to enable below distro once required changes are merged
4848
#DISTRO_FEATURES_append = " EasyMesh"
4949
#DISTRO_FEATURES_append = " sta_manager"
50-
PREFERRED_VERSION_go = "1.19.%"
50+
PREFERRED_VERSION_go = "1.24.%"
5151

5252
#Enable wps support
5353
DISTRO_FEATURES_append = " wps_support"
54+
55+
#Enable resource optimization
56+
DISTRO_FEATURES_append = " resource_optimization"

conf/include/rdk-bpi-bbmasks.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ BBMASK .= "|meta-cmf/recipes-core/images/rdk-ipstb-oss-image.bb"
99
BBMASK .= "|meta-cmf/recipes-core/images/rdk-ipstb-oss-tdk-image.bb"
1010
BBMASK .= "${@bb.utils.contains('DISTRO_FEATURES', 'OneWifi', '|meta-cmf-filogic/recipes-common/mesh-agent/mesh-agent.bbappend', '', d)}"
1111
BBMASK .= "${@bb.utils.contains('DISTRO_FEATURES','EasyMesh','|openembedded-core/meta/recipes-devtools/rust/','',d)}"
12+
BBMASK .= "${@bb.utils.contains('DISTRO_FEATURES','EasyMesh','|meta-cmf-filogic/recipes-ccsp/ccsp/ccsp-one-wifi.bbappend','',d)}"

meta-rdk-mtk-bpir4/recipes-ccsp/ccsp/ccsp-one-wifi-libwebconfig.bbappend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
SRC_URI_remove = "${CMF_GIT_ROOT}/rdkb/components/opensource/ccsp/OneWifi;protocol=${CMF_GIT_PROTOCOL};branch=${CMF_GIT_BRANCH};name=libwebconfig"
22

33
SRC_URI = "git://github.com/rdkcentral/OneWifi.git;protocol=https;branch=develop;name=libwebconfig"
4-
SRCREV_libwebconfig = "850296b0a26daa25e5849176baaf289b6017b519"
4+
SRCREV_libwebconfig = "5924baad3842f75f50569e73c42b80e11c0454dc"
55

66
DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'EasyMesh', ' rdk-wifi-libhostap unified-wifi-mesh-header ', '', d)}"
77
EXTRA_OECONF_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'EasyMesh', ' --enable-easymesh ', '', d)}"

meta-rdk-mtk-bpir4/recipes-ccsp/ccsp/ccsp-one-wifi.bbappend

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
44

55
SRC_URI_remove = "${CMF_GIT_ROOT}/rdkb/components/opensource/ccsp/OneWifi;protocol=${CMF_GIT_PROTOCOL};branch=${CMF_GIT_BRANCH};name=OneWifi"
66
SRC_URI = "git://github.com/rdkcentral/OneWifi.git;protocol=https;branch=develop;name=OneWifi"
7-
SRCREV_OneWifi = "850296b0a26daa25e5849176baaf289b6017b519"
7+
SRCREV_OneWifi = "5924baad3842f75f50569e73c42b80e11c0454dc"
88
DEPENDS_append = " mesh-agent "
99
DEPENDS_remove = " opensync "
1010
DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'EasyMesh', ' rdk-wifi-libhostap ', '', d)}"
@@ -32,13 +32,13 @@ EXTRA_OECONF_append = " ONEWIFI_BLASTER_APP_SUPPORT=true"
3232

3333
SRC_URI += " \
3434
file://checkwifi.sh \
35-
file://onewifi_pre_start.sh \
35+
${@bb.utils.contains('DISTRO_FEATURES', 'EasyMesh', bb.utils.contains('DISTRO_FEATURES', 'em_extender', 'file://onewifi_pre_start_em_ext.sh ','file://onewifi_pre_start_em_ctrl.sh ', d), 'file://onewifi_pre_start.sh ', d)} \
3636
file://wifi_defaults.txt \
3737
"
3838
do_install_append(){
3939
install -d ${D}/nvram
4040
install -m 777 ${WORKDIR}/checkwifi.sh ${D}/usr/ccsp/wifi/
41-
install -m 777 ${WORKDIR}/onewifi_pre_start.sh ${D}/usr/ccsp/wifi/
41+
install -m 777 ${WORKDIR}/onewifi_pre_*.sh ${D}/usr/ccsp/wifi/onewifi_pre_start.sh
4242
install -m 644 ${WORKDIR}/wifi_defaults.txt ${D}/nvram/
4343
}
4444

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include ccsp_common_bananapi.inc
2+
3+
CFLAGS_append = "${@bb.utils.contains("DISTRO_FEATURES", "resource_optimization", " -DRESOURCE_OPTIMIZATION ", " ", d)} "
4+
ENABLE_RESOURCE_OPTIMIZATION = "--enable-resourceoptimization=${@bb.utils.contains('DISTRO_FEATURES', 'resource_optimization', 'yes', 'no', d)}"
5+
EXTRA_OECONF_append = " ${ENABLE_RESOURCE_OPTIMIZATION}"
6+
7+
do_compile_prepend () {
8+
if ${@bb.utils.contains('DISTRO_FEATURES', 'resource_optimization', 'true', 'false', d)}; then
9+
sed -i '2i <?define FEATURE_RESOURCE_OPTIMIZATION=True?>' ${S}/config-arm/TR181-USGv2.XML
10+
fi
11+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/sh
2+
sleep 20
3+
4+
iw phy phy0 interface add wifi0 type __ap
5+
iw phy phy0 interface add wifi1 type __ap
6+
iw phy phy0 interface add wifi1.1 type __ap
7+
iw phy phy0 interface add wifi2 type __ap
8+
9+
#Obtain the wifi0 mac address
10+
wifi0_mac="$(cat /sys/class/ieee80211/phy0/macaddress)"
11+
#Strip the : and increment mac by 1 to get wifi1 macaddress
12+
mac=$(echo $wifi0_mac | tr -d ':')
13+
mac_incr=$((0x$mac + 2))
14+
wifi1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
15+
mac_incr=$(($mac_incr + 2))
16+
wifi1_1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
17+
#Increment again by 1 to get wifi2 address
18+
mac_incr=$(($mac_incr + 2))
19+
wifi2_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
20+
mac_incr=$(($mac_incr + 2))
21+
wifi2_1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
22+
#print the mac address
23+
echo $wifi0_mac
24+
echo $wifi1_mac
25+
echo $wifi2_mac
26+
27+
#Update the mac address using ip link command
28+
ifconfig wifi0 down
29+
ifconfig wifi1 down
30+
ifconfig wifi1.1 down
31+
ifconfig wifi2 down
32+
33+
ip link set dev wifi0 address $wifi0_mac
34+
ip link set dev wifi1 address $wifi1_mac
35+
ip link set dev wifi1.1 address $wifi1_1_mac
36+
ip link set dev wifi2 address $wifi2_mac
37+
38+
ifconfig wifi0 up
39+
ifconfig wifi1 up
40+
ifconfig wifi1.1 up
41+
ifconfig wifi2 up
42+
43+
exit 0
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/sh
2+
sleep 5
3+
4+
iw phy phy0 interface add wifi0 type __ap
5+
iw phy phy0 interface add wifi0.1 type __ap
6+
iw phy phy0 interface add wifi1 type __ap
7+
iw phy phy0 interface add wifi2 type __ap
8+
iw phy phy0 interface add wifi1.1 type __ap
9+
10+
#Obtain the wifi0 mac address
11+
wifi_mac="$(cat /sys/class/ieee80211/phy0/macaddress)"
12+
#Strip the : and increment mac by 1 to get wifi1 macaddress
13+
mac=$(echo $wifi_mac | tr -d ':')
14+
mac_incr=$((0x$mac + 8))
15+
wifi0_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
16+
#Increment again by 1 to get wifi2 address
17+
mac_incr=$(($mac_incr + 1))
18+
wifi0_1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
19+
#Increment again by 1 to get wifi2 address
20+
mac_incr=$(($mac_incr + 1))
21+
wifi1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
22+
mac_incr=$(($mac_incr + 1))
23+
wifi1_1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
24+
mac_incr=$(($mac_incr + 1))
25+
wifi2_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
26+
#print the mac address
27+
echo $wifi0_mac
28+
echo $wifi1_mac
29+
echo $wifi2_mac
30+
31+
#Update the mac address using ip link command
32+
ifconfig wifi0 down
33+
ifconfig wifi0.1 down
34+
ifconfig wifi1 down
35+
ifconfig wifi1.1 down
36+
ifconfig wifi2 down
37+
ip link set dev wifi0 address $wifi0_mac
38+
ip link set dev wifi0.1 address $wifi0_1_mac
39+
ip link set dev wifi1 address $wifi1_mac
40+
ip link set dev wifi1.1 address $wifi1_1_mac
41+
ip link set dev wifi2 address $wifi2_mac
42+
ifconfig wifi0 up
43+
ifconfig wifi1 up
44+
ifconfig wifi1.1 up
45+
ifconfig wifi2 up
46+
47+
#To update al_mac addr in EasymesgCfg.json
48+
al_mac_addr=`cat /nvram/EasymeshCfg.json | grep AL_MAC_ADDR | cut -d '"' -f4`
49+
al_mac=`iw dev wifi1.1 info | grep addr | cut -d ' ' -f2`
50+
51+
if [ "$al_mac_addr" = "00:00:00:00:00:00" ]; then
52+
sed -i "s/$al_mac_addr/$al_mac/g" /nvram/EasymeshCfg.json
53+
fi
54+
55+
exit 0
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"AL_MAC_ADDR": "00:00:00:00:00:00",
3+
"Colocated_mode": 0,
4+
"Backhaul_SSID": "mesh_backhaul",
5+
"Backhaul_KeyPassphrase": "test-backhaul",
6+
"sta_4addr_mode_enabled": true
7+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"PhyList": [
3+
{
4+
"Index": 0,
5+
"RadioList": [
6+
{
7+
"Index": 2,
8+
"RadioName": "wifi2",
9+
"InterfaceList": [
10+
{
11+
"InterfaceName": "wifi2",
12+
"Bridge": "brlan0",
13+
"vlanId": 0,
14+
"vapIndex": 3,
15+
"vapName": "private_ssid_6g"
16+
}
17+
]
18+
},
19+
{
20+
"Index": 1,
21+
"RadioName": "wifi1",
22+
"InterfaceList": [
23+
{
24+
"InterfaceName": "wifi1.1",
25+
"Bridge": "brlan0",
26+
"vlanId": 0,
27+
"vapIndex": 2,
28+
"vapName": "mesh_backhaul_5g"
29+
},
30+
{
31+
"InterfaceName": "wifi1",
32+
"Bridge": "brlan0",
33+
"vlanId": 0,
34+
"vapIndex": 1,
35+
"vapName": "private_ssid_5g"
36+
}
37+
38+
]
39+
},
40+
{
41+
"Index": 0,
42+
"RadioName": "wifi0",
43+
"InterfaceList": [
44+
{
45+
"InterfaceName": "wifi0",
46+
"Bridge": "brlan0",
47+
"vlanId": 0,
48+
"vapIndex": 0,
49+
"vapName": "private_ssid_2g"
50+
}
51+
]
52+
}
53+
]
54+
}
55+
]
56+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"PhyList": [
3+
{
4+
"Index": 0,
5+
"RadioList": [
6+
{
7+
"Index": 2,
8+
"RadioName": "wifi2",
9+
"InterfaceList": [
10+
{
11+
"InterfaceName": "wifi2",
12+
"Bridge": "brlan0",
13+
"vlanId": 0,
14+
"vapIndex": 4,
15+
"vapName": "private_ssid_6g"
16+
}
17+
]
18+
},
19+
{
20+
"Index": 1,
21+
"RadioName": "wifi1",
22+
"InterfaceList": [
23+
{
24+
"InterfaceName": "wifi1.1",
25+
"Bridge": "brlan0",
26+
"vlanId": 0,
27+
"vapIndex": 3,
28+
"vapName": "mesh_sta_5g"
29+
},
30+
{
31+
"InterfaceName": "wifi1",
32+
"Bridge": "brlan0",
33+
"vlanId": 0,
34+
"vapIndex": 2,
35+
"vapName": "private_ssid_5g"
36+
}
37+
38+
]
39+
},
40+
{
41+
"Index": 0,
42+
"RadioName": "wifi0",
43+
"InterfaceList": [
44+
{
45+
"InterfaceName": "wifi0.1",
46+
"Bridge": "brlan0",
47+
"vlanId": 0,
48+
"vapIndex": 1,
49+
"vapName": "mesh_backhaul_2g"
50+
},
51+
{
52+
"InterfaceName": "wifi0",
53+
"Bridge": "brlan0",
54+
"vlanId": 0,
55+
"vapIndex": 0,
56+
"vapName": "private_ssid_2g"
57+
}
58+
]
59+
}
60+
]
61+
}
62+
]
63+
}

0 commit comments

Comments
 (0)