Skip to content

Commit 774f276

Browse files
authored
Merge pull request #148 from kpandu987/uwm_support
RDKBACCL-700 : unified-wifi-mesh integration in BPI
2 parents 8d54295 + 86299a0 commit 774f276

File tree

9 files changed

+82
-30
lines changed

9 files changed

+82
-30
lines changed

conf/distro/include/rdk-bpi.inc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ DISTRO_FEATURES_append = " HOSTAPD_2_11"
1616
DISTRO_FEATURES_append = " OneWifi"
1717

1818
# MacFilter Feature
19-
DISTRO_FEATURES_append = " acl_nl_support"
19+
DISTRO_FEATURES_append = " disable_nl80211_acl"
2020

2121
#No Moca Support
2222
DISTRO_FEATURES_append = " no_moca_support"
@@ -43,3 +43,7 @@ DISTRO_FEATURES_append = " sdmmc"
4343

4444
#disabling lan0_as_wan to allow lan0 interface to come
4545
DISTRO_FEATURES_remove = " lan0_as_wan"
46+
47+
#Need to enable below distro once required changes are merged
48+
#DISTRO_FEATURES_append = " EasyMesh"
49+
PREFERRED_VERSION_go = "1.19.%"
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
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 = "7d4697bc74017e0ec57c3ba903a70dfe56809cb4"
4+
SRCREV_libwebconfig = "fa41ece5df6e6589f70fcb5b554c1a835c8d0409"
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)}"
88
EXTRA_OECONF_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'EasyMesh', ' --enable-em-app ', '', d)}"
99

10-
CFLAGS += " ${@bb.utils.contains('DISTRO_FEATURES', 'EasyMesh', ' -Wno-error=maybe-uninitialized -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=incompatible-pointer-types -Wno-error=sign-compare -Wno-error -DEASY_MESH_NODE ', '', d)}"
10+
CFLAGS += " ${@bb.utils.contains('DISTRO_FEATURES', 'EasyMesh', ' -Wno-error=maybe-uninitialized -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=incompatible-pointer-types -Wno-error=sign-compare -Wno-error -DEASY_MESH_NODE ', '', d)}"
11+
12+
CFLAGS_append = " -Wno-enum-conversion"
13+
14+
do_compile_append() {
15+
oe_runmake -C source/platform
16+
}
1117

1218
do_install_append() {
19+
oe_runmake -C source/platform DESTDIR=${D} install
1320
install -m 644 ${S}/include/webconfig_external_proto_easymesh.h ${D}/usr/include/ccsp
1421
}
22+
23+
FILES_${PN} += " \
24+
${libdir}/libwifi_bus.so* \
25+
"
26+

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

Lines changed: 1 addition & 1 deletion
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 = "7d4697bc74017e0ec57c3ba903a70dfe56809cb4"
7+
SRCREV_OneWifi = "fa41ece5df6e6589f70fcb5b554c1a835c8d0409"
88
DEPENDS_append = " mesh-agent "
99
DEPENDS_remove = " opensync "
1010
DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'EasyMesh', ' rdk-wifi-libhostap ', '', d)}"

meta-rdk-mtk-bpir4/recipes-ccsp/ccsp/files/onewifi_pre_start.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/bin/sh
22
sleep 20
33

4-
#To update al_mac_addr in EasyMeshCfg.json
4+
#To update al_mac_addr in EasyMeshCfg.json to avoid onewifi restarting during fresh boot-up
55
wan_mac="$(cat /sys/class/ieee80211/phy0/macaddress)"
66
old_al_mac_addr=`cat /nvram/EasymeshCfg.json | grep AL_MAC_ADDR | cut -d '"' -f4`
7-
sed -i "s/$old_al_mac_addr/$wan_mac/g" /nvram/EasymeshCfg.json
7+
if [ "$old_al_mac_addr" == "00:00:00:00:00:00" ]; then
8+
sed -i "s/$old_al_mac_addr/$wan_mac/g" /nvram/EasymeshCfg.json
9+
fi
810

911
iw phy phy0 interface add wifi0 type __ap
1012
iw phy phy0 interface add wifi1 type __ap

meta-rdk-mtk-bpir4/recipes-ccsp/hal/files/hal_interface.patch

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,20 @@
66
#Signed-off-by:[email protected]
77
################################################
88
diff --git a/wifi_hal_ap.h b/wifi_hal_ap.h
9-
index f5c37db..4453112 100644
9+
index f5c37db..7daf939 100644
1010
--- a/wifi_hal_ap.h
1111
+++ b/wifi_hal_ap.h
12-
@@ -2736,6 +2736,14 @@ typedef struct {
12+
@@ -349,7 +349,8 @@ typedef enum
13+
WIFI_RADIO_SCAN_MODE_FULL,
14+
WIFI_RADIO_SCAN_MODE_ONCHAN,
15+
WIFI_RADIO_SCAN_MODE_OFFCHAN,
16+
- WIFI_RADIO_SCAN_MODE_SURVEY
17+
+ WIFI_RADIO_SCAN_MODE_SURVEY,
18+
+ WIFI_RADIO_SCAN_MODE_SELECT_CHANNELS
19+
} wifi_neighborScanMode_t;
20+
21+
/**
22+
@@ -2736,6 +2737,14 @@ typedef struct {
1323
} __attribute__((packed)) wifi_back_haul_sta_t;
1424

1525
#define WIFI_AP_MAX_SSID_LEN 33
@@ -24,7 +34,7 @@ index f5c37db..4453112 100644
2434
typedef struct {
2535
CHAR ssid[WIFI_AP_MAX_SSID_LEN];
2636
BOOL enabled;
27-
@@ -2763,6 +2771,8 @@ typedef struct {
37+
@@ -2763,6 +2772,8 @@ typedef struct {
2838
UINT wmmNoAck;
2939
UINT wepKeyLength;
3040
BOOL bssHotspot;
@@ -33,7 +43,7 @@ index f5c37db..4453112 100644
3343
UINT wpsPushButton;
3444
char beaconRateCtl[32];
3545
BOOL network_initiated_greylist;
36-
@@ -2919,4 +2929,4 @@ INT wifi_hal_analytics_callback_register(wifi_analytics_callback callback);
46+
@@ -2919,4 +2930,4 @@ INT wifi_hal_analytics_callback_register(wifi_analytics_callback callback);
3747
}
3848
#endif
3949

@@ -52,3 +62,22 @@ index a55ede6..c8ca1a8 100644
5262

5363
//Device Information related fields
5464
CHAR manufacturer[DEFAULT_DEVICE_FIELD_LEN];
65+
diff --git a/wifi_hal_telemetry.h b/wifi_hal_telemetry.h
66+
index 6867002..3596ea0 100644
67+
--- a/wifi_hal_telemetry.h
68+
+++ b/wifi_hal_telemetry.h
69+
@@ -102,6 +102,7 @@ typedef struct _wifi_neighbor_ap2
70+
CHAR ap_SupportedDataTransferRates[256]; /**< Comma-separated list (maximum list length 256) of strings. Data transmit rates (in Mbps) for unicast frames at which the SSID will permit a station to connect. For example, ifSupportedDataTransferRatesis "1,2,5.5", this indicates that the SSID will only permit connections at 1 Mbps, 2 Mbps and 5.5 Mbps. */
71+
UINT ap_DTIMPeriod; /**< The number of beacon intervals that elapse between transmission of Beacon frames containing a TIM element whose DTIM count field is 0. This value is transmitted in the DTIM Period field of beacon frames. [802.11-2012] */
72+
UINT ap_ChannelUtilization; /**< Indicates the fraction of the time AP senses that the channel is in use by the neighboring AP for transmissions. */
73+
+ UINT ap_freq; /**< Frequency. */
74+
} wifi_neighbor_ap2_t; //COSA_DML_NEIGHTBOURING_WIFI_RESULT
75+
76+
/* Explanation:
77+
@@ -338,4 +339,4 @@ INT wifi_getVAPTelemetry(UINT apIndex, wifi_VAPTelemetry_t *telemetry);
78+
}
79+
#endif
80+
81+
-#endif
82+
\ No newline at end of file
83+
+#endif

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
SRC_URI_remove = "git://github.com/rdkcentral/rdk-wifi-hal.git;protocol=https;branch=main;name=rdk-wifi-hal"
22

33
SRC_URI += "git://github.com/rdkcentral/rdk-wifi-hal.git;protocol=https;branch=develop;name=rdk-wifi-hal"
4-
SRCREV_rdk-wifi-hal = "1232914fc172a2ba81997b983f68970c908eadaf"
4+
SRCREV_rdk-wifi-hal = "a8bdea1dce2761060f54e4dfe8e69af19f3d9b1f"
55

66
CFLAGS_append = " -D_PLATFORM_BANANAPI_R4_ -DBANANA_PI_PORT -DFEATURE_SINGLE_PHY "
77
CFLAGS_append_kirkstone = " -fcommon"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
SRC_URI_remove = "git://github.com/rdkcentral/rdk-wifi-hal.git;protocol=https;branch=main;name=rdk-wifi-util"
22

33
SRC_URI = "git://github.com/rdkcentral/rdk-wifi-hal.git;protocol=https;branch=develop;name=rdk-wifi-util"
4-
SRCREV_rdk-wifi-util = "51ce6f510012f1d3989bbe7141429498c9158d82"
4+
SRCREV_rdk-wifi-util = "a8bdea1dce2761060f54e4dfe8e69af19f3d9b1f"

meta-rdk-mtk-bpir4/recipes-core/images/rdk-generic-broadband-image.bbappend

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ add_busybox_fixes() {
2121
}
2222

2323
IMAGE_INSTALL_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'ppp-enabled', '', 'pptp-linux rp-pppoe xl2tpd', d)}"
24+
IMAGE_INSTALL_append = "${@bb.utils.contains('DISTRO_FEATURES', 'EasyMesh',' unified-wifi-mesh unified-wifi-mesh-cli','',d)}"

setup-environment-refboard-rdkb

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,6 @@ fi
3939
# default BSP layer is meta-cmf-bananapi for B-PI builds
4040
export RDK_BSP_LAYER=meta-cmf-bananapi
4141

42-
if [ "X$BPI_IMG_TYPE" == "Xnand" ]; then
43-
sed -i '/sdmmc/s/^/#/' ${_TOPDIR}/meta-cmf-bananapi/conf/distro/include/rdk-bpi.inc
44-
else # SD card image is default
45-
mkdir -p ${_TOPDIR}/downloads
46-
if [ -f ${_TOPDIR}/downloads/bpi-r4_sdmmc_bl2.img ] && [ -f ${_TOPDIR}/downloads/bpi-r4_sdmmc_fip.bin ]; then
47-
echo "Both bl2 and fip binaries are present in local workspace."
48-
else
49-
echo "**********************************************************************"
50-
echo "> CAUTION: YOU ARE TRYING TO BUILD SD CARD IMAGE WITHOUT BL2 AND FIP BINARIES."
51-
echo "> Please download the binaries from https://artifactory.rdkcentral.com/artifactory/RDKB-Platform/BPI-R4/uboot-2024.04/bpi-r4_sdmmc_bl2.img and https://artifactory.rdkcentral.com/artifactory/RDKB-Platform/BPI-R4/uboot-2024.04/bpi-r4_sdmmc_fip.bin"
52-
echo "> If you don't have access to above resources, please follow instruction in https://wiki.rdkcentral.com/pages/viewpage.action?pageId=354648448#SDMonoliticimagebuildandflashingstepsforBPIR4.-Buildingbl2.imgandfip.binincaseofnothavingaccesstoartifactoryrepository to build bl2 and fip binaries yourselves."
53-
echo "> Place those binaries under ${_TOPDIR}/downloads/"
54-
echo "> EXITING NOW."
55-
echo "**********************************************************************"
56-
return 1
57-
fi
58-
fi
59-
6042
if [ ! -e ${_TOPDIR}/meta-cmf-filogic/recipes-ccsp/util/utopia_changes_applied ]; then
6143
sed -i '19 s/^/#/' ${_TOPDIR}/meta-cmf-filogic/recipes-ccsp/util/utopia.bbappend
6244
sed -i '39 s/^/#/' ${_TOPDIR}/meta-cmf-filogic/recipes-ccsp/util/utopia.bbappend
@@ -101,3 +83,25 @@ if [ ! -e ${_TOPDIR}/meta-cmf-filogic/recipes-core/dbus/dbus_change ]; then
10183
sed -i '19 s/^/#/' ${_TOPDIR}/meta-cmf-filogic/recipes-core/dbus/dbus_%.bbappend
10284
touch ${_TOPDIR}/meta-cmf-filogic/recipes-core/dbus/dbus_change
10385
fi
86+
87+
if [ "X$FEATURE_TYPE" == "XEasyMesh" ]; then
88+
sed -i '/EasyMesh/s/^#//' ${_TOPDIR}/meta-cmf-bananapi/conf/distro/include/rdk-bpi.inc
89+
fi
90+
91+
if [ "X$BPI_IMG_TYPE" == "Xnand" ]; then
92+
sed -i '/sdmmc/s/^/#/' ${_TOPDIR}/meta-cmf-bananapi/conf/distro/include/rdk-bpi.inc
93+
else # SD card image is default
94+
mkdir -p ${_TOPDIR}/downloads
95+
if [ -f ${_TOPDIR}/downloads/bpi-r4_sdmmc_bl2.img ] && [ -f ${_TOPDIR}/downloads/bpi-r4_sdmmc_fip.bin ]; then
96+
echo "Both bl2 and fip binaries are present in local workspace."
97+
else
98+
echo "**********************************************************************"
99+
echo "> CAUTION: YOU ARE TRYING TO BUILD SD CARD IMAGE WITHOUT BL2 AND FIP BINARIES."
100+
echo "> Please download the binaries from https://artifactory.rdkcentral.com/artifactory/RDKB-Platform/BPI-R4/uboot-2024.04/bpi-r4_sdmmc_bl2.img and https://artifactory.rdkcentral.com/artifactory/RDKB-Platform/BPI-R4/uboot-2024.04/bpi-r4_sdmmc_fip.bin"
101+
echo "> If you don't have access to above resources, please follow instruction in https://wiki.rdkcentral.com/pages/viewpage.action?pageId=354648448#SDMonoliticimagebuildandflashingstepsforBPIR4.-Buildingbl2.imgandfip.binincaseofnothavingaccesstoartifactoryrepository to build bl2 and fip binaries yourselves."
102+
echo "> Place those binaries under ${_TOPDIR}/downloads/"
103+
echo "> EXITING NOW."
104+
echo "**********************************************************************"
105+
return 1
106+
fi
107+
fi

0 commit comments

Comments
 (0)