06 Jul, 2019
1 commit
-
When calling debugfs functions, there is no need to ever check the
return value. The function can work or not, but the code logic should
never do something different based on this.Because we don't care if debugfs works or not, this trickles back a bit
so we can clean things up by making some functions return void instead
of an error value that is never going to fail.Signed-off-by: Greg Kroah-Hartman
Acked-by: Jukka Rissanen
Signed-off-by: Marcel Holtmann
31 May, 2019
2 commits
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation this program is
distributed in the hope that it will be useful but without any
warranty without even the implied warranty of merchantability or
fitness for a particular purpose see the gnu general public license
for more detailsextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 655 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Reviewed-by: Kate Stewart
Reviewed-by: Richard Fontana
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de
Signed-off-by: Greg Kroah-Hartman -
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later versionextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 3029 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman
21 May, 2019
1 commit
-
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:GPL-2.0-only
Signed-off-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
24 Apr, 2019
1 commit
-
NEXTHDR_MAX is 255. What happens here is that we take a u8 value
"hdr->nexthdr" from the network and then look it up in
lowpan_nexthdr_nhcs[]. The problem is that if hdr->nexthdr is 0xff then
we read one element beyond the end of the array so the array needs to
be one element larger.Fixes: 92aa7c65d295 ("6lowpan: add generic nhc layer interface")
Signed-off-by: Dan Carpenter
Acked-by: Jukka Rissanen
Acked-by: Alexander Aring
Signed-off-by: Marcel Holtmann
22 Jan, 2019
1 commit
-
Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
for debugfs files.Semantic patch information:
Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
imposes some significant overhead as compared to
DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci
Signed-off-by: YueHaibing
Signed-off-by: Marcel Holtmann
19 Dec, 2018
1 commit
-
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Yangtao Li
Signed-off-by: Marcel Holtmann
06 Jul, 2018
1 commit
-
After decompression of 6lowpan socket data, an IPv6 header is inserted
before the existing socket payload. After this, we reset the
network_header value of the skb to account for the difference in payload
size from prior to decompression + the addition of the IPv6 header.However, we fail to reset the mac_header value.
Leaving the mac_header value untouched here, can cause a calculation
error in net/packet/af_packet.c packet_rcv() function when an
AF_PACKET socket is opened in SOCK_RAW mode for use on a 6lowpan
interface.On line 2088, the data pointer is moved backward by the value returned
from skb_mac_header(). If skb->data is adjusted so that it is before
the skb->head pointer (which can happen when an old value of mac_header
is left in place) the kernel generates a panic in net/core/skbuff.c
line 1717.This panic can be generated by BLE 6lowpan interfaces (such as bt0) and
802.15.4 interfaces (such as lowpan0) as they both use the same 6lowpan
sources for compression and decompression.Signed-off-by: Michael Scott
Acked-by: Alexander Aring
Acked-by: Jukka Rissanen
Signed-off-by: Marcel Holtmann
02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
13 Apr, 2017
4 commits
-
There is no point in setting IFF_NO_QUEUE should already have taken
care of setting it if tx_queue_len is not set, in fact this may
actually disable queue for interfaces that require it and do set
tx_queue_len.Signed-off-by: Luiz Augusto von Dentz
Acked-by: Jukka Rissanen
Signed-off-by: Marcel Holtmann -
This allow technologies such as Bluetooth to use its native lladdr which
is eui48 instead of eui64 which was expected by functions like
lowpan_header_decompress and lowpan_header_compress.Signed-off-by: Luiz Augusto von Dentz
Reviewed-by: Stefan Schmidt
Signed-off-by: Marcel Holtmann -
The skb->pkt_type need to be set by L2, but on 6LoWPAN there exists L2
e.g. BTLE which doesn't has multicast addressing. If it's a multicast or
not is detected by IPHC headers multicast bit. The IPv6 layer will
evaluate this pkt_type, so we force set this type while uncompressing.
Should be okay for 802.15.4 as well.Signed-off-by: Alexander Aring
Reviewed-by: Stefan Schmidt
Signed-off-by: Marcel Holtmann -
Set MAC address length according to the 6LoWPAN link layer in use.
Bluetooth Low Energy uses 48 bit addressing while IEEE802.15.4 uses
64 bits.Signed-off-by: Patrik Flykt
Reviewed-by: Stefan Schmidt
Signed-off-by: Marcel Holtmann
23 Jan, 2017
1 commit
-
To make the code clearer, use rb_entry() instead of container_of() to
deal with rbtree.Signed-off-by: Geliang Tang
Signed-off-by: David S. Miller
20 Sep, 2016
1 commit
-
This patch removes handling to remove short address for a neigbour entry
if RS/RA/NS/NA doesn't contain a short address. If these messages
doesn't has any short address option, the existing short address from
ndisc cache will be used. The current behaviour will set that the
neigbour doesn't has a short address anymore.Signed-off-by: Alexander Aring
Signed-off-by: Marcel Holtmann
08 Jul, 2016
3 commits
-
When receiving neighbour information with short address option field we
should check the complete range of invalid short addresses and set it to
one invalid address setting which is the unspecified address. This
address is also used when by creating at first a new neighbour entry to
indicate no short address is set.Signed-off-by: Alexander Aring
Signed-off-by: Marcel Holtmann -
This patch adds a missing check to handle short address parsing for
802.15.4 6LoWPAN only.Signed-off-by: Alexander Aring
Reviewed-by: Stefan Schmidt
Signed-off-by: Marcel Holtmann -
This patch removes a double unlock case to accessing neighbour private
data.Reported-by: Dan Carpenter
Signed-off-by: Alexander Aring
Reviewed-by: Stefan Schmidt
Signed-off-by: Marcel Holtmann
16 Jun, 2016
5 commits
-
This patch adds necessary handling for use the short address for
802.15.4 6lowpan. It contains support for IPHC address compression
and new matching algorithmn to decide which link layer address will be
used for 802.15.4 frame.Reviewed-by: Stefan Schmidt
Signed-off-by: Alexander Aring
Signed-off-by: David S. Miller -
In case of sending RA messages we need some way to get the short address
from an 802.15.4 6LoWPAN interface. This patch will add a temporary
debugfs entry for experimental userspace api.Reviewed-by: Stefan Schmidt
Signed-off-by: Alexander Aring
Signed-off-by: David S. Miller -
This patch introduce different 6lowpan handling for receive and transmit
NS/NA messages for the ipv6 neighbour discovery. The first use-case is
for supporting 802.15.4 short addresses inside the option fields and
handling for RFC6775 6CO option field as userspace option.Cc: David S. Miller
Cc: Alexey Kuznetsov
Cc: James Morris
Cc: Hideaki YOSHIFUJI
Cc: Patrick McHardy
Reviewed-by: Stefan Schmidt
Acked-by: YOSHIFUJI Hideaki
Signed-off-by: Alexander Aring
Signed-off-by: David S. Miller -
Since we use exported function from ipv6 kernel module we don't need to
request the module anymore to have ipv6 functionality.Acked-by: Hannes Frederic Sowa
Reviewed-by: Stefan Schmidt
Signed-off-by: Alexander Aring
Signed-off-by: David S. Miller -
This patch adds the autoconfiguration if a valid 802.15.4 short address
is available for 802.15.4 6LoWPAN interfaces.Cc: David S. Miller
Cc: Alexey Kuznetsov
Cc: James Morris
Cc: Hideaki YOSHIFUJI
Cc: Patrick McHardy
Acked-by: Hannes Frederic Sowa
Reviewed-by: Stefan Schmidt
Signed-off-by: Alexander Aring
Signed-off-by: David S. Miller
13 Apr, 2016
6 commits
-
In case of link-layer specific handling for 802.15.4 we need to cast to
802.15.4 sepcific structures. Simple add this header when include the
6lowpan header.Signed-off-by: Alexander Aring
Reviewed-by: Stefan Schmidt
Acked-by: Jukka Rissanen
Signed-off-by: Marcel Holtmann -
This patch adds the lowpan_is_ll function, which can be used to make a
special 6lowpan linklayer handling for a specific 6lowpan linklayer
type.Signed-off-by: Alexander Aring
Reviewed-by: Stefan Schmidt
Acked-by: Jukka Rissanen
Signed-off-by: Marcel Holtmann -
This function will be use in later functionality in other branches than
generic 6lowpan, so we move it to the global 6lowpan header.Signed-off-by: Alexander Aring
Reviewed-by: Stefan Schmidt
Acked-by: Jukka Rissanen
Signed-off-by: Marcel Holtmann -
This patch removes unnecessary zero data for a stack variable.
Signed-off-by: Alexander Aring
Acked-by: Jukka Rissanen
Signed-off-by: Marcel Holtmann -
This patch adds a lowpan prefix to each functions which doesn't have
such prefix currently.Reviewed-by: Stefan Schmidt
Signed-off-by: Alexander Aring
Acked-by: Jukka Rissanen
Signed-off-by: Marcel Holtmann -
This patch changes the naming for interface private data for lowpan
intefaces. The current private data scheme is:-------------------------------------------------
| 6LoWPAN Generic | LinkLayer 6LoWPAN |
-------------------------------------------------the current naming schemes are:
- 6LoWPAN Generic:
- lowpan_priv
- LinkLayer 6LoWPAN:
- BTLE
- lowpan_dev
- 802.15.4:
- lowpan_dev_infothe new naming scheme with this patch will be:
- 6LoWPAN Generic:
- lowpan_dev
- LinkLayer 6LoWPAN:
- BTLE
- lowpan_btle_dev
- 802.15.4:
- lowpan_802154_devSigned-off-by: Alexander Aring
Reviewed-by: Stefan Schmidt
Acked-by: Jukka Rissanen
Signed-off-by: Marcel Holtmann
09 Apr, 2016
1 commit
-
This patch fixes handling in case of link-local address compression. A
IPv6 link-local address is defined as fe80::/10 prefix which is also
what ipv6_addr_type checks for link-local addresses.But IPHC compression for link-local addresses are for fe80::/64 types
only. This patch adds additional checks for zero padded bits in case of
link-local address compression to match on a fe80::/64 address only.Signed-off-by: Alexander Aring
Acked-by: Jukka Rissanen
Reviewed-by: Stefan Schmidt
Signed-off-by: Marcel Holtmann
11 Mar, 2016
2 commits
-
This patch fixes the comments for SAM/DAM value.
Signed-off-by: Alexander Aring
Signed-off-by: Marcel Holtmann -
This patch solves the sparse warning:
net/6lowpan/debugfs.c:164:30: warning: symbol 'lowpan_ctx_pfx_fops' was
not declared. Should it be static?
net/6lowpan/debugfs.c:241:30: warning: symbol 'lowpan_context_fops' was
not declared. Should it be static?Signed-off-by: Alexander Aring
Signed-off-by: Marcel Holtmann
26 Feb, 2016
1 commit
-
This patch fixes the return value in a case which should never occur.
Instead returning "-EINVAL" we return LOWPAN_IPHC_DAM_00 which is
invalid on context based addresses. Also change the WARN_ON_ONCE to
WARN_ONCE which was suggested by Dan Carpenter.Reported-by: Dan Carpenter
Signed-off-by: Alexander Aring
Signed-off-by: Marcel Holtmann
24 Feb, 2016
3 commits
-
Bool variable 'fail' is always non-negative, it indicates an error if it
is true.The problem has been detected using coccinelle script
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocciSigned-off-by: Andrzej Hajda
Acked-by: Alexander Aring
Signed-off-by: Marcel Holtmann -
In case of multicast address we need to set always the LOWPAN_IPHC_M bit
and if a destination context identifier was found for a multicast
address then we need to set the LOWPAN_IPHC_DAC as well.Signed-off-by: Alexander Aring
Signed-off-by: Marcel Holtmann -
This patch introduce support for IPHC stateful address compression. It
will offer the context table via one debugfs entry.
This debugfs has and directory for each cid entry for the context table.
Inside each cid directory there exists the following files:- "active": If the entry is added or deleted. The context table is
original a list implementation, this flag will indicate if the
context is part of list or not.
- "prefix": The ipv6 prefix.
- "prefix_length": The prefix length for the prefix.
- "compression": The compression flag according RFC6775.This part should be moved into sysfs after some testing time.
Also the debugfs entry contains a "show" file which is a pretty-printout
for the current context table information.Reviewed-by: Stefan Schmidt
Signed-off-by: Alexander Aring
Signed-off-by: Marcel Holtmann
20 Dec, 2015
1 commit
-
This patches moves the debugfs interface related register after
netdevice register. The function lowpan_dev_debugfs_init will use
"dev->name" which can be before register_netdevice a format string.
The function register_netdevice will evaluate the format string if
necessary and replace "dev->name" to the real interface name.Reported-by: Lukasz Duda
Signed-off-by: Alexander Aring
Acked-by: Lukasz Duda
Signed-off-by: Marcel Holtmann
10 Dec, 2015
3 commits
-
This patch will introduce a 6lowpan entry into the debugfs if enabled.
Inside this 6lowpan directory we create a subdirectories of all 6lowpan
interfaces to offer a per interface debugfs support.Reviewed-by: Stefan Schmidt
Signed-off-by: Alexander Aring
Signed-off-by: Marcel Holtmann -
This patch introduces register and unregister functionality for lowpan
interfaces. While register a lowpan interface there are several things
which need to be initialize by the 6lowpan subsystem. Upcoming
functionality need to register/unregister per interface components e.g.
debugfs entry.Reviewed-by: Stefan Schmidt
Signed-off-by: Alexander Aring
Signed-off-by: Marcel Holtmann -
Acked-by: Jukka Rissanen
Signed-off-by: Stefan Schmidt
Signed-off-by: Alexander Aring
Signed-off-by: Marcel Holtmann