Skip to content

Commit 271c4be

Browse files
authored
Merge branch 'develop' into fix_mesh_disabled
2 parents 396b90f + ea26c23 commit 271c4be

File tree

103 files changed

+9644
-1685
lines changed

Some content is hidden

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

103 files changed

+9644
-1685
lines changed

build/linux/EasymeshCfg.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"_comment": [
3+
"This is a sample JSON file of Easymesh configuration to be read by OneWifi",
4+
"and will be configured in /nvram as part of either",
5+
" a) Wifi-reset by the controller, in case of collocated agent OR",
6+
" b) as part of DPP Onboarding, in case of remote agent.",
7+
"The AL_MAC_ADDR is the mac address of interface on which IEEE1905 packets are transmitted",
8+
"Colocated_mode is to indicate whether OneWifi is part of local or remote agent.",
9+
"The backhaul SSID and KeyPassphrase will be used for configuring Mesh backhaul",
10+
"or connecting to Mesh backhaul in case of backhaul STA"
11+
],
12+
"AL_MAC_ADDR": "d8:3a:dd:a2:05:5c",
13+
"Colocated_mode": 0,
14+
"Backhaul_SSID": "Mesh_Backhaul",
15+
"Backhaul_KeyPassphrase": "test-backhaul"
16+
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"_comment": [
3+
"This is a sample JSON configuration for Raspberry PI with below assumptions:",
4+
" 1) External USB wifi adapter being used is Canakit usb wifi adapter, which supports 8 2.4G VAPs.",
5+
" Link: https://www.canakit.com/raspberry-pi-wifi.html",
6+
" 2) Interfaces specified in InterfaceName have already been created seperately and",
7+
" this file is only providing the interface mapping associated for that interface.",
8+
" 3) Built in Wifi of Rpi is using interface wlan0.",
9+
"Some details on the outline of the elements:",
10+
"PhyList is an array of phys supported on device with Index specifying the actual phy index.",
11+
"Each phy has an array of RadioList which depicts the radios supported on that phy.",
12+
"The index in the RadioList specifies the radio type 0 means 2.4G, 1 means 5G and 2 means 6G.",
13+
"The RadioName in the RadioList specifies the primary interface associate with that radio.",
14+
"The fields in InterfaceList is self-explanatory with vapName specifying the type of VAP."
15+
],
16+
"PhyList": [
17+
{
18+
"Index": 0,
19+
"RadioList": [
20+
{
21+
"Index": 1,
22+
"RadioName": "wlan0",
23+
"InterfaceList": [
24+
{
25+
"InterfaceName": "wlan0",
26+
"Bridge": "brlan0",
27+
"vlanId": 0,
28+
"vapIndex": 1,
29+
"vapName": "private_ssid_5g"
30+
}
31+
]
32+
}
33+
]
34+
},
35+
{
36+
"Index": 1,
37+
"RadioList": [
38+
{
39+
"Index": 0,
40+
"RadioName": "wlan1",
41+
"InterfaceList": [
42+
{
43+
"InterfaceName": "wlan1.1",
44+
"Bridge": "brlan0",
45+
"vlanId": 0,
46+
"vapIndex": 2,
47+
"vapName": "private_ssid_2g"
48+
},
49+
{
50+
"InterfaceName": "wlan1.2",
51+
"Bridge": "brlan0",
52+
"vlanId": 0,
53+
"vapIndex": 3,
54+
"vapName": "iot_ssid_2g"
55+
},
56+
{
57+
"InterfaceName": "wlan1.3",
58+
"Bridge": "brlan0",
59+
"vlanId": 0,
60+
"vapIndex": 4,
61+
"vapName": "lnf_psk_2g"
62+
},
63+
{
64+
"InterfaceName": "wlan1.4",
65+
"Bridge": "brlan0",
66+
"vlanId": 0,
67+
"vapIndex": 5,
68+
"vapName": "mesh_backhaul_2g"
69+
},
70+
{
71+
"InterfaceName": "wlan1",
72+
"Bridge": "brlan0",
73+
"vlanId": 0,
74+
"vapIndex": 0,
75+
"vapName": "mesh_sta_2g"
76+
}
77+
]
78+
}
79+
]
80+
}
81+
]
82+
}

build/linux/create_virtual_intf.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/sh
2+
3+
#This file creates virtual interfaces on the primary interface passed in argument#1
4+
#The number of interfaces created is specified in argument#2.
5+
6+
#check whether number of input argument is 2
7+
if [ $# -ne 2 ]; then
8+
echo "Usage: $0 <primary_interface> <number_of_interfaces>"
9+
exit 1
10+
fi
11+
12+
primary_intf=$1
13+
num_intf=$2
14+
15+
#check if primary interface exists before proceeding
16+
if [ ! -e "/sys/class/net/$primary_intf" ]; then
17+
echo "Error: Primary interface $primary_intf does not exist"
18+
exit 1
19+
fi
20+
21+
# Create virtual interfaces
22+
for i in $(seq 1 $num_intf); do
23+
virtual_intf="${primary_intf}.$i"
24+
sudo iw dev "$primary_intf" interface add "$virtual_intf" type managed
25+
if [ -e "/sys/class/net/$virtual_intf" ]; then
26+
echo "Created virtual interface: $virtual_intf"
27+
sudo ifconfig "$virtual_intf" down
28+
else
29+
echo "Error: Unable to create virtual interface: $virtual_intf"
30+
exit 1
31+
fi
32+
done
33+
34+
echo "Created $num_intf virtual interfaces based on $primary_intf"

build/linux/makefile

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ include build/linux/makefile.inc
3131

3232

3333
EASY_MESH_NODE = 1
34+
EM_APP = 1
35+
ONEWIFI_STA_MGR_APP_SUPPORT = 1
3436

3537
# wifi hal rules
3638
HAL_LIBRARY = $(INSTALLDIR)/lib/libwifihal.a
@@ -69,6 +71,7 @@ HAL_LIB_SOURCES = $(filter-out $(EXCLUDE),$(wildcard $(WIFI_RDK_HAL)/src/*.c)) \
6971
$(WIFI_HOSTAP_SRC)/ap/ap_mlme.c \
7072
$(WIFI_HOSTAP_SRC)/ap/ap_list.c \
7173
$(WIFI_HOSTAP_SRC)/ap/sta_info.c \
74+
$(WIFI_HOSTAP_SRC)/ap/wnm_ap.c \
7275
$(WIFI_HOSTAP_SRC)/ap/wpa_auth.c \
7376
$(WIFI_HOSTAP_SRC)/ap/wpa_auth_ie.c \
7477
$(WIFI_HOSTAP_SRC)/ap/wpa_auth_glue.c \
@@ -174,7 +177,7 @@ HAL_LIB_SOURCES = $(filter-out $(EXCLUDE),$(wildcard $(WIFI_RDK_HAL)/src/*.c)) \
174177
HAL_LIB_OBJECTS = $(HAL_LIB_SOURCES:.c=.o) # expands to list of object files
175178
ALL_HAL_LIB_OBJECTS = $(HAL_LIB_OBJECTS)
176179
HAL_LIB_FLAGS = -g -fPIC $(INCLUDE_HAL_LIB_DIRS) -DENABLE_FEATURE_MESHWIFI -DRASPBERRY_PI_PORT -D_PLATFORM_RASPBERRYPI_ -DCONFIG_HW_CAPABILITIES
177-
HOSTAP_LIB_FLAGS = -g -fPIC $(INCLUDE_HOSTAP_LIB_DIRS) -DHOSTAPD -DCONFIG_CRYPTO_INTERNAL -DCONFIG_DRIVER_NL80211 -DNEED_AP_MLME -DCONFIG_IEEE80211AC -DCONFIG_IEEE80211AX -DCONFIG_IEEE80211N -DCONFIG_WPS -DIEEE8021X_EAPOL -DEAP_SERVER_IDENTITY -DEAP_SERVER_MD5 -DEAP_SERVER_TLS -DEAP_SERVER_MSCHAPV2 -DEAP_SERVER_PEAP -DEAP_SERVER_TTLS -DCONFIG_ECC -DRDK_ONEWIFI -DCONFIG_IEEE80211W -DCONFIG_OPENSSL_CMAC -DCONFIG_LIBNL20
180+
HOSTAP_LIB_FLAGS = -g -fPIC $(INCLUDE_HOSTAP_LIB_DIRS) -DHOSTAPD -DCONFIG_CRYPTO_INTERNAL -DCONFIG_DRIVER_NL80211 -DNEED_AP_MLME -DCONFIG_IEEE80211AC -DCONFIG_IEEE80211AX -DCONFIG_IEEE80211N -DCONFIG_WPS -DIEEE8021X_EAPOL -DEAP_SERVER_IDENTITY -DEAP_SERVER_MD5 -DEAP_SERVER_TLS -DEAP_SERVER_MSCHAPV2 -DEAP_SERVER_PEAP -DEAP_SERVER_TTLS -DCONFIG_ECC -DRDK_ONEWIFI -DCONFIG_IEEE80211W -DCONFIG_OPENSSL_CMAC -DCONFIG_LIBNL20 -DCONFIG_WNM_AP
178181
HOSTAP_LIB_FLAGS += -DHOSTAPD_2_10 -DCONFIG_WEP -DFEATURE_SUPPORT_RADIUSGREYLIST -DCONFIG_DRIVER_BRCM -DCONFIG_DRIVER_BRCM_MAP
179182

180183
# wifi agent rules
@@ -222,10 +225,13 @@ INCLUDEDIRS = \
222225
-I$(ONE_WIFI_HOME)/source/apps/csi \
223226
-I$(ONE_WIFI_HOME)/source/apps/harvester \
224227
-I$(ONE_WIFI_HOME)/source/apps/levl \
228+
-I$(ONE_WIFI_HOME)/source/apps/sta_mgr \
225229
-I$(ONE_WIFI_HOME)/source/apps/motion \
226230
-I$(ONE_WIFI_HOME)/source/apps/ocs \
227231
-I$(ONE_WIFI_HOME)/source/apps/sm \
228232
-I$(ONE_WIFI_HOME)/source/apps/whix \
233+
-I$(ONE_WIFI_HOME)/source/apps/easyconnect \
234+
-I$(ONE_WIFI_HOME)/source/apps/em \
229235
-I$(ONE_WIFI_HOME)/source/core/services \
230236
-I$(ONE_WIFI_HOME)/include/tr_181/ml \
231237
-I$(ONE_WIFI_HOME)/include \
@@ -240,6 +246,7 @@ INCLUDEDIRS = \
240246
-I$(ONE_WIFI_HOME)/lib/osa \
241247
-I$(ONE_WIFI_HOME)/lib/const \
242248
-I$(ONE_WIFI_HOME)/lib/schema \
249+
-I$(ONE_WIFI_HOME)/lib/datapipeline \
243250
-I$(WIFI_HAL_INTERFACE) \
244251
-I/usr/local/ssl/include/ \
245252
-I/usr/include/libnl3 \
@@ -376,6 +383,22 @@ ifdef ONEWIFI_BLASTER_APP_SUPPORT
376383
WEBCONFIG_SOURCES += $(ONE_WIFI_HOME)/source/webconfig/wifi_webconfig_blaster.c
377384
endif
378385

386+
ifdef ONEWIFI_EASYCONNECT_APP_SUPPORT
387+
CSOURCES += $(wildcard $(ONE_WIFI_HOME)/source/apps/easyconnect/*.c)
388+
endif
389+
390+
ifdef ONEWIFI_STA_MGR_APP_SUPPORT
391+
CSOURCES += $(wildcard $(ONE_WIFI_HOME)/source/apps/sta_mgr/*.c)
392+
endif
393+
394+
ifdef EM_APP
395+
#INCLUDEDIRS += -I$(ONE_WIFI_HOME)/source/apps/em
396+
CSOURCES += $(wildcard $(ONE_WIFI_HOME)/source/apps/em/*.c)
397+
WEBCONFIG_SOURCES += $(ONE_WIFI_HOME)/source/webconfig/wifi_webconfig_easymesh_config.c \
398+
$(ONE_WIFI_HOME)/source/webconfig/wifi_webconfig_beacon_report.c \
399+
$(ONE_WIFI_HOME)/source/webconfig/wifi_webconfig_em_channel_stats.c \
400+
$(ONE_WIFI_HOME)/source/webconfig/wifi_webconfig_em_sta_link_metrics.c
401+
endif
379402

380403
COBJECTS = $(CSOURCES:.c=.o) # expands to list of object files
381404

@@ -387,7 +410,7 @@ ALL_HEBUS_LIB_OBJECTS = $(HEBUS_OBJECTS)
387410

388411
ALLOBJECTS = $(CXXOBJECTS) $(COBJECTS) $(WEBCONFIG_OBJECTS) $(HEBUS_OBJECTS)
389412

390-
CFLAGS = $(INCLUDEDIRS) $(INCLUDE_HE_LIB_DIRS) -g -fPIC -D_ANSC_LINUX -D_COSA_INTEL_USG_ATOM_ -DUSE_NOTIFY_COMPONENT -DCISCO_XB3_PLATFORM_CHANGES -DDUAL_CORE_XB3 -DFEATURE_ONE_WIFI -DWIFI_HAL_VERSION_3 -DFEATURE_SUPPORT_PASSPOINT -DFEATURE_SUPPORT_WEBCONFIG -DRASPBERRY_PI_PORT -DNL80211_ACL -D_PLATFORM_RASPBERRYPI_ -DEASY_MESH_NODE
413+
CFLAGS = $(INCLUDEDIRS) $(INCLUDE_HE_LIB_DIRS) -g -fPIC -D_ANSC_LINUX -D_COSA_INTEL_USG_ATOM_ -DUSE_NOTIFY_COMPONENT -DCISCO_XB3_PLATFORM_CHANGES -DDUAL_CORE_XB3 -DFEATURE_ONE_WIFI -DWIFI_HAL_VERSION_3 -DFEATURE_SUPPORT_PASSPOINT -DFEATURE_SUPPORT_WEBCONFIG -DRASPBERRY_PI_PORT -DNL80211_ACL -D_PLATFORM_RASPBERRYPI_ -DEASY_MESH_NODE -DEM_APP
391414

392415
ifneq ($(OS), Darwin)
393416
CFLAGS += -DPLATFORM_LINUX
@@ -457,3 +480,7 @@ run:
457480
setup:
458481
./build/linux/setup.sh
459482

483+
vapsetup:
484+
cp ./build/linux/MultiVap_InterfaceMap.json /nvram/InterfaceMap.json
485+
cp ./build/linux/EasymeshCfg.json /nvram/EasymeshCfg.json
486+
./build/linux/create_virtual_intf.sh wlan1 4

build/linux/setup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ git clone https://github.com/rdkcentral/hostap-patches.git hostap-patches
3535
#Apply the patch
3636
patch_filenames="hostap-patches/0001-OneWifi-related-hostap-patch-for-2.10-based-hostap.patch \
3737
hostap-patches/0002-radius_failover_2.10.patch \
38-
hostap-patches/0003-mbssid_support_2.10.patch"
38+
hostap-patches/0003-mbssid_support_2.10.patch \
39+
hostap-patches/wpa3_compatibility_hostap_2_10.patch \
40+
hostap-patches/0005-RDKB-58414-Dynamically-update-NAS_2_10.patch"
3941
echo "Applying patches ..."
4042
git am $patch_filenames
4143

config/TR181-WiFi-USGv2.XML

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,12 @@
337337
<syntax>bool</syntax>
338338
<writable>true</writable>
339339
</parameter>
340+
<parameter>
341+
<name>WPA3_Personal_Compatibility</name>
342+
<type>boolean</type>
343+
<syntax>bool</syntax>
344+
<writable>true</writable>
345+
</parameter>
340346
</parameters>
341347
<objects>
342348
<object>

config/rdkb-wifi.ovsschema

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Wifi_Rdk_Database",
3-
"version": "1.00.031",
3+
"version": "1.00.033",
44
"cksum": "2353365742 523",
55
"tables": {
66
"Wifi_Device_Config": {
@@ -306,6 +306,15 @@
306306
"min": 0,
307307
"max": 1
308308
}
309+
},
310+
"security_mode_new": {
311+
"type": {
312+
"key": {
313+
"type": "integer"
314+
},
315+
"min": 0,
316+
"max": 1
317+
}
309318
}
310319
},
311320
"isRoot": true
@@ -1736,6 +1745,15 @@
17361745
"max": 1
17371746
}
17381747
},
1748+
"wpa3_compatibility_enable": {
1749+
"type": {
1750+
"key": {
1751+
"type": "boolean"
1752+
},
1753+
"min": 0,
1754+
"max": 1
1755+
}
1756+
},
17391757
"rfc_id": {
17401758
"type": "string"
17411759
}

configure.ac

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,22 @@ AC_ARG_ENABLE([sm_app],
7575
AM_CONDITIONAL([SM_APP_SUPPORT], [test x$SM_APP_ENABLE = xtrue])
7676
AC_SUBST(SM_APP_FLAG)
7777

78+
EM_APP_FLAG = " "
79+
AC_ARG_ENABLE([em_app],
80+
AS_HELP_STRING([--enable-em-app],[enable em app (default is no)]),
81+
[
82+
case "${enableval}" in
83+
yes) EM_APP_ENABLE=true
84+
EM_APP_FLAG="-DEM_APP"
85+
;;
86+
no) EM_APP_ENABLE=false AC_MSG_ERROR([em app is disabled]);;
87+
*) AC_MSG_ERROR([bad value ${enableval} for --enable-em-app ]);;
88+
esac
89+
],
90+
[echo "em app is disabled"])
91+
AM_CONDITIONAL([EM_APP_SUPPORT], [test x$EM_APP_ENABLE = xtrue])
92+
AC_SUBST(EM_APP_FLAG)
93+
7894
JOURNALCTL_ENABLE_FLAG = " "
7995
AC_ARG_ENABLE([journalctl],
8096
AS_HELP_STRING([--enable-journalctl],[enable journalctl logging support (default is no)]),
@@ -105,7 +121,9 @@ AM_CONDITIONAL([EASYCONNECT_SUPPORT], [test x$EASYCONNECT_SUPPORT_ENABLE = xtrue
105121

106122
AM_CONDITIONAL([HAL_IPC], [test x$HAL_IPC = xtrue])
107123
AM_CONDITIONAL([ONEWIFI_CAC_APP_SUPPORT], [test x$ONEWIFI_CAC_APP_SUPPORT = xtrue])
124+
AM_CONDITIONAL([ONEWIFI_STA_MGR_APP_SUPPORT], [test x$ONEWIFI_STA_MGR_APP_SUPPORT = xtrue])
108125
AM_CONDITIONAL([ONEWIFI_DML_SUPPORT], [test x$ONEWIFI_DML_SUPPORT_MAKEFILE = xtrue])
126+
AM_CONDITIONAL([ONEWIFI_DBUS_SUPPORT], [test x$ONEWIFI_DBUS_SUPPORT = xtrue])
109127

110128
# Specify ccsp cpu arch
111129

@@ -227,6 +245,7 @@ AC_C_INLINE
227245
AC_FUNC_MALLOC
228246

229247
AC_CONFIG_FILES(
248+
source/platform/Makefile
230249
source/dml/tr_181/sbapi/Makefile
231250
source/dml/tr_181/ml/Makefile
232251
source/dml/tr_181/Makefile

include/webconfig_external_proto_easymesh.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@ typedef em_sta_info_t * (*ext_proto_get_next_sta_info_t)(void *data_model, em_st
4242
typedef em_sta_info_t * (*ext_proto_get_sta_info_t)(void *data_model, mac_address_t sta, bssid_t bssid, mac_address_t ruid, em_target_sta_map_t target);
4343
typedef void (*ext_proto_put_sta_info_t)(void *data_model, em_sta_info_t *sta_info, em_target_sta_map_t target);
4444
typedef em_bss_info_t * (*ext_proto_em_get_bss_info_with_mac_t)(void *data_model, mac_address_t mac);
45+
typedef void (*ext_proto_put_scan_results_t)(void *data_model, em_scan_result_t *scan_result);
4546

4647
typedef struct {
4748
void *data_model; /* agent data model dm_easy_mesh_t */
4849

49-
void *m2ctrl_vapconfig;
50+
void *m2ctrl_radioconfig;
51+
void *policy_config;
5052
// descriptors to access data model
5153
ext_proto_get_num_radio_t get_num_radio;
5254
ext_proto_set_num_radio_t set_num_radio;
@@ -65,17 +67,19 @@ typedef struct {
6567
ext_proto_get_sta_info_t get_sta_info;
6668
ext_proto_put_sta_info_t put_sta_info;
6769
ext_proto_em_get_bss_info_with_mac_t get_bss_info_with_mac;
70+
ext_proto_put_scan_results_t put_scan_results;
6871
} webconfig_external_easymesh_t;
6972

70-
void webconfig_proto_easymesh_init(webconfig_external_easymesh_t *proto, void *data_model, void *m2ctrl_vapconfig,
73+
void webconfig_proto_easymesh_init(webconfig_external_easymesh_t *proto, void *data_model, void *m2ctrl_vapconfig, void *policy_config,
7174
ext_proto_get_num_radio_t get_num_radio, ext_proto_set_num_radio_t set_num_radio,
7275
ext_proto_get_num_op_class_t get_num_op_class, ext_proto_set_num_op_class_t set_num_op_class,
7376
ext_proto_get_num_bss_t get_num_bss, ext_proto_set_num_bss_t set_num_bss,
7477
ext_proto_em_get_device_info_t get_dev, ext_proto_em_get_network_info_t get_net,
7578
ext_proto_em_get_radio_info_t get_radio, ext_proto_em_get_ieee_1905_security_info_t get_sec,
7679
ext_proto_em_get_bss_info_t get_bss, ext_proto_em_get_op_class_info_t get_op_class,
7780
ext_proto_get_first_sta_info_t get_first_sta, ext_proto_get_next_sta_info_t get_next_sta,
78-
ext_proto_get_sta_info_t get_sta, ext_proto_put_sta_info_t put_sta, ext_proto_em_get_bss_info_with_mac_t get_bss_info_with_mac);
81+
ext_proto_get_sta_info_t get_sta, ext_proto_put_sta_info_t put_sta, ext_proto_em_get_bss_info_with_mac_t get_bss_info_with_mac,
82+
ext_proto_put_scan_results_t put_scan_results);
7983

8084
#ifdef __cplusplus
8185
}

0 commit comments

Comments
 (0)