ieee802154: 6lowpan: separate receive/transmit functionality
Subsystems (2)
Alexander Aring
maintainercover ieee802154: 6lowpan: separate receive/transmit functionality
Hi,
this patch series based on "ieee802154: structural directory changes" and contains splitting of receive/transmit functionality in separate tx and rx files. At least we rename the 6lowpan_rtnl to core which contains core functionality for 802.15.4 6LoWPAN.
Alexander Aring (3):
ieee802154: 6lowpan: move receive functionality
ieee802154: 6lowpan: move transmit functionality
ieee802154: 6lowpan: rename to core
net/ieee802154/6lowpan/6lowpan_i.h | 31 ++ net/ieee802154/6lowpan/6lowpan_rtnl.c | 729 ---------------------------------- net/ieee802154/6lowpan/Makefile | 2 +- net/ieee802154/6lowpan/core.c | 304 ++++++++++++++ net/ieee802154/6lowpan/rx.c | 171 ++++++++ net/ieee802154/6lowpan/tx.c | 271 +++++++++++++ 6 files changed, 778 insertions(+), 730 deletions(-) delete mode 100644 net/ieee802154/6lowpan/6lowpan_rtnl.c create mode 100644 net/ieee802154/6lowpan/core.c create mode 100644 net/ieee802154/6lowpan/rx.c create mode 100644 net/ieee802154/6lowpan/tx.c
Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 1/3 ieee802154: 6lowpan: move receive functionality
This patch moves all relevant receive functionality into a separate rx.c file. We can simple separate this functionality like we did it in mac802154.
--- net/ieee802154/6lowpan/6lowpan_i.h | 25 +++++ net/ieee802154/6lowpan/6lowpan_rtnl.c | 169 +-------------------------------- net/ieee802154/6lowpan/Makefile | 2 +- net/ieee802154/6lowpan/rx.c | 171 ++++++++++++++++++++++++++++++++++ 4 files changed, 200 insertions(+), 167 deletions(-) create mode 100644 net/ieee802154/6lowpan/rx.c
net/ieee802154/6lowpan/6lowpan_i.h +25 -0
@@ -1,6 +1,8 @@#ifndef __IEEE802154_6LOWPAN_I_H__#define __IEEE802154_6LOWPAN_I_H__ +#include <linux/list.h> +#include <net/inet_frag.h> struct lowpan_create_arg {
@@ -34,8 +36,31 @@ static inline u32 ieee802154_addr_hash(const struct ieee802154_addr *a) } } +struct lowpan_dev_record { +struct net_device *ldev; +struct list_head list; +}; + +/* private device info */ +struct lowpan_dev_info { +struct net_device *real_dev;/* real WPAN device ptr */ +struct mutex dev_list_mtx;/* mutex for list ops */ +u16 fragment_tag; +}; + +static inline struct +lowpan_dev_info *lowpan_dev_info (const struct net_device *dev) +{ +return netdev_priv (dev); +} + +extern struct list_head lowpan_devices; +int lowpan_frag_rcv (struct sk_buff *skb,const u8 frag_type);void lowpan_net_frag_exit (void );int lowpan_net_frag_init (void ); +void lowpan_rx_init (void ); +void lowpan_rx_exit (void ); +#endif /* __IEEE802154_6LOWPAN_I_H__ */
net/ieee802154/6lowpan/6lowpan_rtnl.c +3 -166
207 lines not on this page · raw message
net/ieee802154/6lowpan/Makefile +1 -1
@@ -1,3 +1,3 @@ obj-y += ieee802154_6lowpan.o -ieee802154_6lowpan-y := 6lowpan_rtnl.o reassembly.o +ieee802154_6lowpan-y := 6lowpan_rtnl.o rx.o reassembly.o
net/ieee802154/6lowpan/rx.c new file +171 -0
171 lines not on this page · raw message
Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 2/3 ieee802154: 6lowpan: move transmit functionality
In reply to Alexander AringThis patch moves all relevant transmit functionality into a separate tx.c file. We can simple separate this functionality like we did it in mac802154.
--- net/ieee802154/6lowpan/6lowpan_i.h | 6 + net/ieee802154/6lowpan/6lowpan_rtnl.c | 264 +-------------------------------- net/ieee802154/6lowpan/Makefile | 2 +- net/ieee802154/6lowpan/tx.c | 271 ++++++++++++++++++++++++++++++++++ 4 files changed, 279 insertions(+), 264 deletions(-) create mode 100644 net/ieee802154/6lowpan/tx.c
net/ieee802154/6lowpan/6lowpan_i.h +6 -0
@@ -3,6 +3,7 @@#include <linux/list.h> +#include <net/ieee802154_netdev.h> #include <net/inet_frag.h> struct lowpan_create_arg {
@@ -63,4 +64,9 @@ int lowpan_net_frag_init(void);void lowpan_rx_init (void );void lowpan_rx_exit (void ); +int lowpan_header_create (struct sk_buff *skb,struct net_device *dev, +unsigned short type,const void *_daddr, +const void *_saddr,unsigned int len); +netdev_tx_t lowpan_xmit (struct sk_buff *skb,struct net_device *dev); +#endif /* __IEEE802154_6LOWPAN_I_H__ */
net/ieee802154/6lowpan/6lowpan_rtnl.c +1 -263
279 lines not on this page · raw message
net/ieee802154/6lowpan/Makefile +1 -1
@@ -1,3 +1,3 @@ obj-y += ieee802154_6lowpan.o -ieee802154_6lowpan-y := 6lowpan_rtnl.o rx.o reassembly.o +ieee802154_6lowpan-y := 6lowpan_rtnl.o rx.o reassembly.o tx.o
net/ieee802154/6lowpan/tx.c new file +271 -0
271 lines not on this page · raw message
Signature · 1 line
2.2.0
Alexander Aring
maintainerPATCH 3/3 ieee802154: 6lowpan: rename to core
In reply to Alexander AringThis patch renames the 6lowpan_rtnl.c file to core.c. 6lowpan_rtnl.c contains functionality to put all 802.15.4 6LoWPAN functionality together. This is just keeping the same name convention like af802154.
---
net/ieee802154/6lowpan/Makefile | 2 +-
net/ieee802154/6lowpan/{6lowpan_rtnl.c => core.c} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename net/ieee802154/6lowpan/{6lowpan_rtnl.c => core.c} (100%)net/ieee802154/6lowpan/Makefile +1 -1
@@ -1,3 +1,3 @@ obj-y += ieee802154_6lowpan.o -ieee802154_6lowpan-y := 6lowpan_rtnl.o rx.o reassembly.o tx.o +ieee802154_6lowpan-y := core.o rx.o reassembly.o tx.o
net/ieee802154/6lowpan/core.c renamed from net/ieee802154/6lowpan/6lowpan_rtnl.c +0 -0
Signature · 1 line
2.2.0
Hi Alex,
Quoted 7 lines · Alexander Aring
Hi,
this patch series based on "ieee802154: structural directory changes" and contains splitting of receive/transmit functionality in separate tx and rx files. At least we rename the 6lowpan_rtnl to core which contains core functionality for 802.15.4 6LoWPAN.
Quoted 5 lines
Alexander Aring (3):
ieee802154: 6lowpan: move receive functionality
ieee802154: 6lowpan: move transmit functionality
ieee802154: 6lowpan: rename to core
Nice work. By this change we can easily identify the Tx and Rx part separately.
Quoted 19 lines
net/ieee802154/6lowpan/6lowpan_i.h | 31 ++ net/ieee802154/6lowpan/6lowpan_rtnl.c | 729 ---------------------------------- net/ieee802154/6lowpan/Makefile | 2 +- net/ieee802154/6lowpan/core.c | 304 ++++++++++++++ net/ieee802154/6lowpan/rx.c | 171 ++++++++ net/ieee802154/6lowpan/tx.c | 271 +++++++++++++ 6 files changed, 778 insertions(+), 730 deletions(-) delete mode 100644 net/ieee802154/6lowpan/6lowpan_rtnl.c create mode 100644 net/ieee802154/6lowpan/core.c create mode 100644 net/ieee802154/6lowpan/rx.c create mode 100644 net/ieee802154/6lowpan/tx.c--
2.2.0--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Thanks and Regards, Varka Bhadram.