net: openthread: make receive sensitivity configurable
OpenThread route cost calculations are dependent on this being accurate for the hardware design. Signed-off-by: Nick Ward <nix.ward@gmail.com>
This commit is contained in:
parent
43897a4e60
commit
89b7336876
3 changed files with 9 additions and 3 deletions
|
|
@ -175,6 +175,13 @@ config OPENTHREAD_MAC_STAY_AWAKE_BETWEEN_FRAGMENTS
|
|||
help
|
||||
This optimization is done at the expense of power consumption on SED/SSED devices.
|
||||
|
||||
config OPENTHREAD_DEFAULT_RX_SENSITIVITY
|
||||
int "OpenThread default RX sensitivity in dBm"
|
||||
range $(INT8_MIN) $(INT8_MAX)
|
||||
default -100
|
||||
help
|
||||
Set the default receive sensitivity [dBm] in radio driver.
|
||||
|
||||
config OPENTHREAD_DEFAULT_TX_POWER
|
||||
int "OpenThread default tx power in dBm"
|
||||
range -40 20 if NRF_802154_RADIO_DRIVER
|
||||
|
|
|
|||
|
|
@ -69,8 +69,6 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME, CONFIG_OPENTHREAD_L2_LOG_LEVEL);
|
|||
*/
|
||||
#define PHR_DURATION_US 32U
|
||||
|
||||
#define DEFAULT_SENSITIVITY -100
|
||||
|
||||
enum pending_events {
|
||||
PENDING_EVENT_FRAME_TO_SEND, /* There is a tx frame to send */
|
||||
PENDING_EVENT_FRAME_RECEIVED, /* Radio has received new frame */
|
||||
|
|
@ -1173,7 +1171,7 @@ int8_t otPlatRadioGetReceiveSensitivity(otInstance *aInstance)
|
|||
{
|
||||
ARG_UNUSED(aInstance);
|
||||
|
||||
return DEFAULT_SENSITIVITY;
|
||||
return CONFIG_OPENTHREAD_DEFAULT_RX_SENSITIVITY;
|
||||
}
|
||||
|
||||
otError otPlatRadioGetTransmitPower(otInstance *aInstance, int8_t *aPower)
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#define OT_WORKER_PRIORITY K_PRIO_COOP(CONFIG_OPENTHREAD_THREAD_PRIORITY)
|
||||
#define CONFIG_NET_L2_OPENTHREAD 1
|
||||
#define CONFIG_OPENTHREAD_RADIO_WORKQUEUE_STACK_SIZE 512
|
||||
#define CONFIG_OPENTHREAD_DEFAULT_RX_SENSITIVITY -100
|
||||
#define CONFIG_OPENTHREAD_DEFAULT_TX_POWER 0
|
||||
|
||||
/* file itself */
|
||||
|
|
|
|||
Loading…
Reference in a new issue