lr-wpan: Debloat MAC PD-DATA.indication (part 1)
This MR starts a series of changes long overdue.
The PD-DATA.indication function in the MAC layer (main entry point of data in the MAC layer) is very bloated with much content that could be broken into multiple functions and a required reduction in the number of nested if statements to improve readability.
Because of the critical nature of this primitive, I prefer to go slowly and break the changes in multiple MR.
In this first MR:
- Removed some large nested if statements that cover most of the function.
- Processed the reception of packets in promiscuous mode in a separate function.
- Fixed formatting of some comments and cleaned unnecessary comments.
Changes and release notes will be added before the merge.
Edited by Alberto Gallegos