linux-wpan / wpan-tools

Userspace tools for Linux IEEE 802.15.4 stack
https://linux-wpan.org/
Other
54 stars 28 forks source link

kernel: maximum channel value, may page as well? #19

Open alexaring opened 4 years ago

alexaring commented 4 years ago

Hi.

We have two max defines which are not IEEE 802.15.4 specfic:

IEEE802154_MAX_PAGE IEEE802154_MAX_CHANNEL

however we have a lot of static arrays where we cannot defines numbers above that, as I looked into the spec. It seems page setting is still fine because it's getting incremented for a new page and we don't get a issue yet. But channel is currently problematic because there exists channel values above this define and also above the netlink type u8 (which should be easy changeable)... there need some better dynamic handling here and we probably should not depend on using these values as index arrays (because such arrays getting big) or as bitfields (because channel values around number ~500).