net: ieee802154_radio: Enable ed_scan unconditionally

Energy scan procedure, while introduced specifically for OpenThread in
Zephyr, may also be used by other upper layers (like Zigbee).
Therefore, disable conditional inclusion of the `ed_scan` API.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2020-04-01 11:45:18 +02:00 committed by Jukka Rissanen
commit 111313581d
2 changed files with 2 additions and 8 deletions

View file

@ -183,7 +183,6 @@ static int nrf5_set_channel(struct device *dev, u16_t channel)
return 0; return 0;
} }
#ifdef CONFIG_NET_L2_OPENTHREAD
static int nrf5_energy_scan_start(struct device *dev, static int nrf5_energy_scan_start(struct device *dev,
u16_t duration, u16_t duration,
energy_scan_done_cb_t done_cb) energy_scan_done_cb_t done_cb)
@ -205,7 +204,6 @@ static int nrf5_energy_scan_start(struct device *dev,
return err; return err;
} }
#endif /* CONFIG_NET_L2_OPENTHREAD */
static int nrf5_set_pan_id(struct device *dev, u16_t pan_id) static int nrf5_set_pan_id(struct device *dev, u16_t pan_id)
{ {
@ -610,9 +608,7 @@ static struct ieee802154_radio_api nrf5_radio_api = {
.start = nrf5_start, .start = nrf5_start,
.stop = nrf5_stop, .stop = nrf5_stop,
.tx = nrf5_tx, .tx = nrf5_tx,
#ifdef CONFIG_NET_L2_OPENTHREAD
.ed_scan = nrf5_energy_scan_start, .ed_scan = nrf5_energy_scan_start,
#endif /* CONFIG_NET_L2_OPENTHREAD */
.configure = nrf5_configure, .configure = nrf5_configure,
}; };

View file

@ -157,15 +157,13 @@ struct ieee802154_radio_api {
u16_t (*get_subg_channel_count)(struct device *dev); u16_t (*get_subg_channel_count)(struct device *dev);
#endif /* CONFIG_NET_L2_IEEE802154_SUB_GHZ */ #endif /* CONFIG_NET_L2_IEEE802154_SUB_GHZ */
#ifdef CONFIG_NET_L2_OPENTHREAD
/** Run an energy detection scan. /** Run an energy detection scan.
* Note: channel must be set prior to request this function. * Note: channel must be set prior to request this function.
* duration parameter is in ms. * duration parameter is in ms.
*/ */
int (*ed_scan)(struct device *dev, int (*ed_scan)(struct device *dev,
u16_t duration, u16_t duration,
energy_scan_done_cb_t done_cb); energy_scan_done_cb_t done_cb);
#endif /* CONFIG_NET_L2_OPENTHREAD */
}; };
/* Make sure that the network interface API is properly setup inside /* Make sure that the network interface API is properly setup inside