Skip to content

Commit 5ed4e5d

Browse files
committed
feat(openthread): change border agent to kconfig option
1 parent 4ea1fac commit 5ed4e5d

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

components/openthread/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,13 @@ menu "OpenThread"
263263
help
264264
Select this option to enable link metrics feature
265265

266+
config OPENTHREAD_BORDER_AGENT_ENABLE
267+
bool "Enable border agent feature"
268+
default y if OPENTHREAD_BORDER_ROUTER
269+
default n if !OPENTHREAD_BORDER_ROUTER
270+
help
271+
Select this option to enable border agent feature
272+
266273
config OPENTHREAD_MACFILTER_ENABLE
267274
bool "Enable mac filter feature"
268275
default n

components/openthread/linker.lf

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
archive: libopenthread.a
33
entries:
44
if OPENTHREAD_CSL_ENABLE = y || OPENTHREAD_LINK_METRICS = y:
5-
mesh_forwarder (noflash_text)
6-
mac_frame (noflash_text)
7-
csl_tx_scheduler (noflash_text)
8-
link_metrics (noflash_text)
9-
mac (noflash_text)
10-
sub_mac (noflash_text)
5+
csl_tx_scheduler (noflash)
6+
link_metrics (noflash)
7+
link_quality (noflash)
8+
mac (noflash)
9+
mac_frame (noflash)
10+
mesh_forwarder (noflash)
11+
radio (noflash)
12+
sub_mac (noflash)
1113

1214
if OPENTHREAD_RCP_SPI = y:
13-
ncp_spi (noflash_text)
15+
ncp_spi (noflash)

components/openthread/private_include/openthread-core-esp32x-ftd-config.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,19 +367,24 @@
367367
#endif
368368
#define OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_DIRECT CONFIG_OPENTHREAD_MAC_MAX_CSMA_BACKOFFS_DIRECT
369369

370-
/*----The following options set fixed default values but can be overridden by the user header file.----*/
371-
372-
#if CONFIG_OPENTHREAD_BORDER_ROUTER
373370
/**
374371
* @def OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE
375372
*
376373
* Define to 1 to enable Border Agent support.
377374
*
378375
*/
379-
#ifndef OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE
376+
#ifdef OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE
377+
#error `OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE` is redefined.
378+
#endif
379+
#if CONFIG_OPENTHREAD_BORDER_AGENT_ENABLE
380380
#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 1
381+
#else
382+
#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 0
381383
#endif
382384

385+
/*----The following options set fixed default values but can be overridden by the user header file.----*/
386+
387+
#if CONFIG_OPENTHREAD_BORDER_ROUTER
383388
/**
384389
* @def OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE
385390
*

0 commit comments

Comments
 (0)