net/ieee802154: Add Sub-Ghz dedicated function on the radio API

Sub-Ghz bands have different limit of channels. 10, or more than a
thousand is actually possible. Thus the device needs to expose such
limit to the L2 which is unaware of frequency band logic. L2 will
then allow user to select a proper channel.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2017-09-11 09:59:25 +02:00 committed by Jukka Rissanen
commit 9aa2f45d23
2 changed files with 14 additions and 0 deletions

View file

@ -32,6 +32,7 @@ enum ieee802154_hw_caps {
IEEE802154_HW_CSMA = BIT(3), /* CSMA-CA supported */
IEEE802154_HW_2_4_GHZ = BIT(4), /* 2.4Ghz radio supported */
IEEE802154_HW_TX_RX_ACK = BIT(5), /* Handles ACK request on TX */
IEEE802154_HW_SUB_GHZ = BIT(6), /* Sub-GHz radio supported */
};
enum ieee802154_filter_type {
@ -86,6 +87,11 @@ struct ieee802154_radio_api {
/** Stop the device */
int (*stop)(struct device *dev);
#ifdef CONFIG_NET_L2_IEEE802154_SUB_GHZ
/** Get the available amount of Sub-GHz channels */
u16_t (*get_subg_channel_count)(struct device *dev);
#endif /* CONFIG_NET_L2_IEEE802154_SUB_GHZ */
} __packed;
/**

View file

@ -18,6 +18,14 @@ config NET_L2_IEEE802154_MGMT
select NET_MGMT_EVENT
default n
config NET_L2_IEEE802154_SUB_GHZ
bool
default n
help
Enable support for Sub-GHz devices. This will add a tiny bit more
logic in L2 code for channel management. This option is automatically
selected when relevant device driver is enabled.
config NET_DEBUG_L2_IEEE802154
bool "Enable IEEE 802.15.4 stack debug messages"
default n