Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation/networking/ieee802154: update MAC chapter

Update the documentation according to latest changes.

Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

alex.bluesman.smirnov@gmail.com and committed by
David S. Miller
dd456d45 e1e49b64

+59 -16
+59 -16
Documentation/networking/ieee802154.txt
··· 4 4 5 5 Introduction 6 6 ============ 7 + The IEEE 802.15.4 working group focuses on standartization of bottom 8 + two layers: Medium Accsess Control (MAC) and Physical (PHY). And there 9 + are mainly two options available for upper layers: 10 + - ZigBee - proprietary protocol from ZigBee Alliance 11 + - 6LowPAN - IPv6 networking over low rate personal area networks 7 12 8 13 The Linux-ZigBee project goal is to provide complete implementation 9 - of IEEE 802.15.4 / ZigBee / 6LoWPAN protocols. IEEE 802.15.4 is a stack 14 + of IEEE 802.15.4 and 6LoWPAN protocols. IEEE 802.15.4 is a stack 10 15 of protocols for organizing Low-Rate Wireless Personal Area Networks. 11 16 12 - Currently only IEEE 802.15.4 layer is implemented. We have chosen 13 - to use plain Berkeley socket API, the generic Linux networking stack 14 - to transfer IEEE 802.15.4 messages and a special protocol over genetlink 15 - for configuration/management 17 + The stack is composed of three main parts: 18 + - IEEE 802.15.4 layer; We have chosen to use plain Berkeley socket API, 19 + the generic Linux networking stack to transfer IEEE 802.15.4 messages 20 + and a special protocol over genetlink for configuration/management 21 + - MAC - provides access to shared channel and reliable data delivery 22 + - PHY - represents device drivers 16 23 17 24 18 25 Socket API ··· 36 29 One can use SOCK_RAW for passing raw data towards device xmit function. YMMV. 37 30 38 31 39 - MLME - MAC Level Management 40 - ============================ 41 - 42 - Most of IEEE 802.15.4 MLME interfaces are directly mapped on netlink commands. 43 - See the include/net/nl802154.h header. Our userspace tools package 44 - (see above) provides CLI configuration utility for radio interfaces and simple 45 - coordinator for IEEE 802.15.4 networks as an example users of MLME protocol. 46 - 47 - 48 32 Kernel side 49 33 ============= 50 34 ··· 47 49 comparation, automagic ACK handling, address matching, etc. 48 50 49 51 Those types of devices require different approach to be hooked into Linux kernel. 52 + 53 + 54 + MLME - MAC Level Management 55 + ============================ 56 + 57 + Most of IEEE 802.15.4 MLME interfaces are directly mapped on netlink commands. 58 + See the include/net/nl802154.h header. Our userspace tools package 59 + (see above) provides CLI configuration utility for radio interfaces and simple 60 + coordinator for IEEE 802.15.4 networks as an example users of MLME protocol. 50 61 51 62 52 63 HardMAC ··· 80 73 SoftMAC 81 74 ======= 82 75 83 - We are going to provide intermediate layer implementing IEEE 802.15.4 MAC 84 - in software. This is currently WIP. 76 + The MAC is the middle layer in the IEEE 802.15.4 Linux stack. This moment it 77 + provides interface for drivers registration and management of slave interfaces. 78 + 79 + NOTE: Currently the only monitor device type is supported - it's IEEE 802.15.4 80 + stack interface for network sniffers (e.g. WireShark). 81 + 82 + This layer is going to be extended soon. 85 83 86 84 See header include/net/mac802154.h and several drivers in drivers/ieee802154/. 85 + 86 + 87 + Device drivers API 88 + ================== 89 + 90 + The include/net/mac802154.h defines following functions: 91 + - struct ieee802154_dev *ieee802154_alloc_device 92 + (size_t priv_size, struct ieee802154_ops *ops): 93 + allocation of IEEE 802.15.4 compatible device 94 + 95 + - void ieee802154_free_device(struct ieee802154_dev *dev): 96 + freeing allocated device 97 + 98 + - int ieee802154_register_device(struct ieee802154_dev *dev): 99 + register PHY in the system 100 + 101 + - void ieee802154_unregister_device(struct ieee802154_dev *dev): 102 + freeing registered PHY 103 + 104 + Moreover IEEE 802.15.4 device operations structure should be filled. 105 + 106 + Fake drivers 107 + ============ 108 + 109 + In addition there are two drivers available which simulate real devices with 110 + HardMAC (fakehard) and SoftMAC (fakelb - IEEE 802.15.4 loopback driver) 111 + interfaces. This option provides possibility to test and debug stack without 112 + usage of real hardware. 113 + 114 + See sources in drivers/ieee802154 folder for more details. 115 + 87 116 88 117 6LoWPAN Linux implementation 89 118 ============================