@@ -1,36 +1,33 @@// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause-/*-+/**LoRaWANstackrelateddefinitions*-*Copyright(c)2018Jian-Hong,Pan<starnight@g.ncu.edu.tw>-*+*Copyright(c)2018Jian-HongPan<starnight@g.ncu.edu.tw>*/#define LORAWAN_MODULE_NAME "lorawan"#define pr_fmt(fmt) LORAWAN_MODULE_NAME ": " fmt+#include<linux/if_arp.h>#include<linux/init.h>-#include<linux/module.h>#include<linux/list.h>+#include<linux/lora/lorawan_netdev.h>+#include<linux/module.h>#include<linux/net.h>-#include<linux/if_arp.h>#include<linux/termios.h>/* For TIOCOUTQ/INQ */#include<net/sock.h>-#include<linux/lora/lorawan_netdev.h>/***dgram_sock-ThisstructureholdsthestatesofDatagramsocket**@sk:networklayerrepresentationofthesocket-*skmustbethefirstmemberofdgram_sock*@src_devaddr:theLoRaWANdeviceaddressforthisconnection*@bound:thissocketisboundornot*@connected:thissocketisconnectedtothedestinationornot-*@want_ack:thissocketneedstoackfortheconnectionornot*/structdgram_sock{-structsocksk;+structsocksk;/* sk must be the first member of dgram_sock */u32src_devaddr;u8bound:1;
@@ -557,7 +554,7 @@ lorawan_creat(struct net *net, struct socket *sock, int protocol, int kern)ret=sk->sk_prot->hash(sk);if(ret){sk_common_release(sk);-gotolorawan_creat_end;+gotolrw_create_end;}}
@@ -567,14 +564,14 @@ lorawan_creat(struct net *net, struct socket *sock, int protocol, int kern)sk_common_release(sk);}-lorawan_creat_end:+lrw_create_end:returnret;}staticconststructnet_proto_familylorawan_family_ops={.owner=THIS_MODULE,.family=PF_LORAWAN,-.create=lorawan_creat,+.create=lrw_create,};staticint
From: Jian-Hong Pan <hidden> Date: 2019-01-16 14:25:37
The lorawan module is an abastraction layer over the LoRaWAN soft and
hard MAC. It passes the original buffer to the real MAC layer. So,
this patch removes the lrw_dev_hard_header function.
Signed-off-by: Jian-Hong Pan <redacted>
---
net/lorawan/socket.c | 12 ------------
1 file changed, 12 deletions(-)
From: Jian-Hong Pan <hidden> Date: 2019-01-16 14:26:05
The net device may be missed to be put after error check. This patch
fixes the issue to prevent the leakage.
Signed-off-by: Jian-Hong Pan <redacted>
---
net/lorawan/socket.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
From: Jian-Hong Pan <hidden> Date: 2019-01-16 14:26:22
Mention the LoRaWAN network feature to distinguish it from other
Low-Power Wide-Area Network like Sigfox and NB-IoT.
Signed-off-by: Jian-Hong Pan <redacted>
---
net/lorawan/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Wed, Jan 16, 2019 at 03:24:58PM CET, starnight@g.ncu.edu.tw wrote:
quoted hunk
The net device may be missed to be put after error check. This patch
fixes the issue to prevent the leakage.
Signed-off-by: Jian-Hong Pan <redacted>
---
net/lorawan/socket.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
Wed, Jan 16, 2019 at 03:25:00PM CET, starnight@g.ncu.edu.tw wrote:
quoted hunk
Mention the LoRaWAN network feature to distinguish it from other
Low-Power Wide-Area Network like Sigfox and NB-IoT.
Signed-off-by: Jian-Hong Pan <redacted>
---
net/lorawan/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
LoRaWAN defines low data rate, low power and long range wireless
wide area networks. It was designed to organize networks of automation
devices, such as sensors, switches and actuators. It can operate
- multiple kilometers wide.
+ multiple kilometers wide. The network is client/server technology
Please avoid double spaces.
+ centered around gateways.
Say Y here to compile LoRaWAN support into the kernel or say M to
compile it as a module.
--
2.20.1
_______________________________________________
linux-lpwan mailing list
linux-lpwan@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-lpwan
From: Andreas Färber <afaerber@suse.de> Date: 2019-01-16 14:50:55
Am 16.01.19 um 15:36 schrieb Jiri Pirko:
Wed, Jan 16, 2019 at 03:25:02PM CET, starnight@g.ncu.edu.tw wrote:
quoted
Split LoRaWAN related skb definitions from lora/lorawan_netdev.h into
another header lora/lorawan_skb.h.
What is the motivation for this change?
I suggested it because skbs could be used with either LoRa or LoRaWAN
netdevs. I have a lora/skb.h.
In general the lorawan_foo.h looks ugly to me, so I thought I suggested
to avoid that by using [lora/]lorawan/skb.h?
Regards,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
From: Andreas Färber <afaerber@suse.de> Date: 2019-01-16 15:07:36
Am 16.01.19 um 15:33 schrieb Jiri Pirko:
Wed, Jan 16, 2019 at 03:24:54PM CET, starnight@g.ncu.edu.tw wrote:
quoted
Signed-off-by: Jian-Hong Pan <redacted>
---
Patches like this are in general frowned upon. Do one change in one
patch. Put some patch description.
This patch simply shouldn't have gone to netdev and LKML, as it is a
fixup against a non-stable tree (missing "lora-next"). Once squashed, it
doesn't matter whether it once had a verbose explanation or not. And I
prefer to not mix style and functional changes.
I simply was too impatient to wait for more respins before being able to
base work on it. ;)
Cheers,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
From: Jian-Hong Pan <hidden> Date: 2019-01-16 16:06:09
Andreas Färber [off-list ref] 於 2019年1月16日 週三 下午11:07寫道:
Am 16.01.19 um 15:33 schrieb Jiri Pirko:
quoted
Wed, Jan 16, 2019 at 03:24:54PM CET, starnight@g.ncu.edu.tw wrote:
quoted
Signed-off-by: Jian-Hong Pan <redacted>
---
Patches like this are in general frowned upon. Do one change in one
patch. Put some patch description.
This patch simply shouldn't have gone to netdev and LKML, as it is a
fixup against a non-stable tree (missing "lora-next"). Once squashed, it
doesn't matter whether it once had a verbose explanation or not. And I
prefer to not mix style and functional changes.
Uh! I see.
Regards,
Jian-Hong Pan
I simply was too impatient to wait for more respins before being able to
base work on it. ;)
From: Jian-Hong Pan <hidden> Date: 2019-01-16 16:35:08
Andreas Färber [off-list ref] 於 2019年1月16日 週三 下午10:50寫道:
Am 16.01.19 um 15:36 schrieb Jiri Pirko:
quoted
Wed, Jan 16, 2019 at 03:25:02PM CET, starnight@g.ncu.edu.tw wrote:
quoted
Split LoRaWAN related skb definitions from lora/lorawan_netdev.h into
another header lora/lorawan_skb.h.
What is the motivation for this change?
I suggested it because skbs could be used with either LoRa or LoRaWAN
netdevs. I have a lora/skb.h.
In general the lorawan_foo.h looks ugly to me, so I thought I suggested
to avoid that by using [lora/]lorawan/skb.h?
Seems we have some choices:
1. Split the lorawan skb stuff from lora/lorawan_netdev.h and merge
into include/linux/lora/skb.h
2. Split the lorawan skb stuff from lora/lorawan_netdev.h to
include/linux/lora/lorawan_skb.h
3. Split the lorawan skb stuff from lora/lorawan_netdev.h to
include/linux/lora/lorawan/skb.h
4. Split the lorawan skb stuff from lora/lorawan_netdev.h to
include/linux/lorawan/skb.h
#1, #2 and #3 are good to me.
So, the intersection is choice #3.
Regards,
Jian-Hong Pan