summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tipc: safely copy UDP netlink data from userRichard Alpe2016-03-061-11/+13
| | | | | | | | | | | | | | | | | | | | | | | The netlink policy for TIPC_NLA_UDP_LOCAL and TIPC_NLA_UDP_REMOTE is of type binary with a defined length. This causes the policy framework to threat the defined length as maximum length. There is however no protection against a user sending a smaller amount of data. Prior to this patch this wasn't handled which could result in a partially incomplete sockaddr_storage struct containing uninitialized data. In this patch we use nla_memcpy() when copying the user data. This ensures a potential gap at the end is cleared out properly. This was found by Julia with Coccinelle tool. Reported-by: Daniel Borkmann <daniel@iogearbox.net> Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Richard Alpe <richard.alpe@ericsson.com> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Erik Hugne <erik.hugne@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: don't check link reset on non existing linkRichard Alpe2016-03-061-1/+1
| | | | | | | | | | | | Make sure we have a link before checking if it has been reset or not. Prior to this patch tipc_link_is_reset() could be called with a non existing link, resulting in a null pointer dereference. Signed-off-by: Richard Alpe <richard.alpe@ericsson.com> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Erik Hugne <erik.hugne@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: add net device to skb before UDP xmitRichard Alpe2016-03-061-0/+2
| | | | | | | | | | | | | Prior to this patch enabling a IPv4 UDP bearer caused a null pointer dereference in iptunnel_xmit_stats(), when it tried to dereference the net device from the skb. To resolve this we now point the skb device to the net device resolved from the routing table. Fixes: 039f50629b7f (ip_tunnel: Move stats update to iptunnel_xmit()) Signed-off-by: Richard Alpe <richard.alpe@ericsson.com> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Erik Hugne <erik.hugne@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: fec: Rename "phy-reset-active-low" propertyBernhard Walle2016-03-062-5/+5
| | | | | | | | | | | | is actually "active high". Thanks for Troy Kisky for pointing that out. Since the patch is in linux-next, this patch is incremental and doesn't replace the original patch. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Acked-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: fix noderef.cocci warningsWu Fengguang2016-03-061-1/+1
| | | | | | | | | | | | | drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:115:15-21: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci CC: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* act_ife: fix a typo in kmemdup() parametersWANG Cong2016-03-061-2/+2
| | | | | | | Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'reset_mac_header'David S. Miller2016-03-047-15/+15
|\ | | | | | | | | | | | | | | | | | | | | | | Zhang Shengju says: ==================== use reset to set header pointers This patch series replace set function with reset when offset is zero. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * wireless: use reset to set mac headerZhang Shengju2016-03-041-1/+1
| | | | | | | | | | | | | | | | | | Since offset is zero, it's not necessary to use set function. Reset function is straightforward, and will remove the unnecessary add operation in set function. Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * mac80211: use reset to set header pointerZhang Shengju2016-03-044-9/+9
| | | | | | | | | | | | | | | | | | Since offset is zero, it's not necessary to use set function. Reset function is straightforward, and will remove the unnecessary add operation in set function. Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * mac80211_hwsim: use reset to set mac headerZhang Shengju2016-03-041-2/+2
| | | | | | | | | | | | | | | | | | Since offset is zero, it's not necessary to use set function. Reset function is straightforward, and will remove the unnecessary add operation in set function. Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * vxlan: use reset to set header pointersZhang Shengju2016-03-041-3/+3
|/ | | | | | | | | Since offset is zero, it's not necessary to use set function. Reset function is straightforward, and will remove the unnecessary add operation in set function. Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge tag 'rxrpc-rewrite-20160304' of ↵David S. Miller2016-03-0420-572/+639
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== RxRPC: Rewrite part 1 Here's the first set of patches from my RxRPC rewrite, aimed at net-next. These do some clean ups and bug fixes. Most of the changes are small, but there are a couple of bigger changes: (*) Convert call flag numbers and event numbers into enums. Then rename the event numbers to all have _EV_ in their name to stop confusion. Fix one instance of an event bit being used instead of a flag bit. (*) A copy of the Rx protocol header is kept in the sk_buff private data. Keep this in host byte order rather than network byte order as it makes more sense. A number of other fields then get converted into host byte order too. Conversion between host and network byte order is then done at the packet reception/generation stage. This is based on net-next/master ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * rxrpc: Don't try to map ICMP to error as the lower layer already did thatDavid Howells2016-03-041-10/+0
| | | | | | | | | | | | | | In the ICMP message processing code, don't try to map ICMP codes to UNIX error codes as the caller (IPv4/IPv6) already did that for us (ee_errno). Signed-off-by: David Howells <dhowells@redhat.com>
| * rxrpc: Clear the unused part of a sockaddr_rxrpc for memcmp() useDavid Howells2016-03-041-3/+5
| | | | | | | | | | | | | | Clear the unused part of a sockaddr_rxrpc structs so that memcmp() can be used to compare them. Signed-off-by: David Howells <dhowells@redhat.com>
| * rxrpc: rxkad: Casts are needed when comparing be32 valuesDavid Howells2016-03-041-1/+1
| | | | | | | | | | | | | | Forced casts are needed to avoid sparse warning when directly comparing be32 values. Signed-off-by: David Howells <dhowells@redhat.com>
| * rxrpc: rxkad: The version number in the response should be net byte orderDavid Howells2016-03-041-8/+9
| | | | | | | | | | | | | | | | | | The version number rxkad places in the response should be network byte order. Whilst we're at it, rearrange the code to be more readable. Signed-off-by: David Howells <dhowells@redhat.com>
| * rxrpc: Use ACCESS_ONCE() when accessing circular buffer pointersDavid Howells2016-03-041-4/+7
| | | | | | | | | | | | | | | | | | Use ACCESS_ONCE() when accessing the other-end pointer into a circular buffer as it's possible the other-end pointer might change whilst we're doing this, and if we access it twice, we might get some weird things happening. Signed-off-by: David Howells <dhowells@redhat.com>
| * rxrpc: Adjust some whitespace and commentsDavid Howells2016-03-047-29/+22
| | | | | | | | | | | | | | Remove some excess whitespace, insert some missing spaces and adjust a couple of comments. Signed-off-by: David Howells <dhowells@redhat.com>
| * rxrpc: Be more selective about the types of received packets we acceptDavid Howells2016-03-042-1/+13
| | | | | | | | | | | | | | | | Currently, received RxRPC packets outside the range 1-13 are rejected. There are, however, holes in the range that should also be rejected - plus at least one type we don't yet support - so reject these also. Signed-off-by: David Howells <dhowells@redhat.com>
| * rxrpc: Fix defined range for /proc/sys/net/rxrpc/rx_mtuDavid Howells2016-03-041-1/+1
| | | | | | | | | | | | | | | | The upper bound of the defined range for rx_mtu is being set in the same member as the lower bound (extra1) rather than the correct place (extra2). I'm not entirely sure why this compiles. Signed-off-by: David Howells <dhowells@redhat.com>
| * rxrpc: The protocol family should be set to PF_RXRPC not PF_UNIXDavid Howells2016-03-041-1/+1
| | | | | | | | | | | | | | Fix the protocol family set in the proto_ops for rxrpc to be PF_RXRPC not PF_UNIX. Signed-off-by: David Howells <dhowells@redhat.com>
| * rxrpc: Keep the skb private record of the Rx header in host byte orderDavid Howells2016-03-0418-384/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, a copy of the Rx packet header is copied into the the sk_buff private data so that we can advance the pointer into the buffer, potentially discarding the original. At the moment, this copy is held in network byte order, but this means we're doing a lot of unnecessary translations. The reasons it was done this way are that we need the values in network byte order occasionally and we can use the copy, slightly modified, as part of an iov array when sending an ack or an abort packet. However, it seems more reasonable on review that it would be better kept in host byte order and that we make up a new header when we want to send another packet. To this end, rename the original header struct to rxrpc_wire_header (with BE fields) and institute a variant called rxrpc_host_header that has host order fields. Change the struct in the sk_buff private data into an rxrpc_host_header and translate the values when filling it in. This further allows us to keep values kept in various structures in host byte order rather than network byte order and allows removal of some fields that are byteswapped duplicates. Signed-off-by: David Howells <dhowells@redhat.com>
| * rxrpc: Rename call events to begin RXRPC_CALL_EV_David Howells2016-03-0410-101/+101
| | | | | | | | | | | | | | Rename call event names to begin RXRPC_CALL_EV_ to distinguish them from the flags. Signed-off-by: David Howells <dhowells@redhat.com>
| * rxrpc: Convert call flag and event numbers into enumsDavid Howells2016-03-043-47/+65
| | | | | | | | | | | | | | | | | | | | Convert call flag and event numbers into enums and move their definitions outside of the struct. Also move the call state enum outside of the struct and add an extra element to count the number of states. Signed-off-by: David Howells <dhowells@redhat.com>
| * rxrpc: Fix a case where a call event bit is being used as a flag bitDavid Howells2016-03-041-1/+1
| | | | | | | | | | | | | | Fix a case where RXRPC_CALL_RELEASE (an event) is being used to specify a flag bit. RXRPC_CALL_RELEASED should be used instead. Signed-off-by: David Howells <dhowells@redhat.com>
* | Merge branch 'DIV_ROUND_UP-uapi'David S. Miller2016-03-046-19/+22
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nicolas Dichtel says: ==================== uapi: consolidate DIV_ROUND_UP definition The inital goal was to consolidate ethtool.h uapi header. But I took the opportunity to remove all duplicate definitions of DIV_ROUND_UP. v3: add patch #2 and #3 v2: split the patch define DIV_ROUND_UP in uapi ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ethtool.h: define INT_MAX for userlandNicolas Dichtel2016-03-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INT_MAX needs limits.h in userland. When ethtool.h is included by a userland app, we got the following error: .../usr/include/linux/ethtool.h: In function 'ethtool_validate_speed': .../usr/include/linux/ethtool.h:1471:18: error: 'INT_MAX' undeclared (first use in this function) return speed <= INT_MAX || speed == SPEED_UNKNOWN ^ Fixes: e02564ee334a ("ethtool: make validate_speed accept all speeds between 0 and INT_MAX") CC: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | drm/vmwgfx: remove userland definition of DIV_ROUND_UPNicolas Dichtel2016-03-041-9/+11
| | | | | | | | | | | | | | | | | | | | | Let's use __KERNEL_DIV_ROUND_UP, which is defined in uapi/linux/kernel.h. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | cxgb4i: don't redefine DIV_ROUND_UPNicolas Dichtel2016-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | let's use the common definition to avoid the following warning during the compilation: drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:161:0: warning: "DIV_ROUND_UP" redefined #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ In file included from include/linux/list.h:8:0, from include/linux/module.h:9, from drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:16: include/linux/kernel.h:67:0: note: this is the location of the previous definition #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP ^ Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | uapi: define DIV_ROUND_UP for userlandNicolas Dichtel2016-03-044-9/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DIV_ROUND_UP is defined in linux/kernel.h only for the kernel. When ethtool.h is included by a userland app, we got the following error: include/linux/ethtool.h:1218:8: error: variably modified 'queue_mask' at file scope __u32 queue_mask[DIV_ROUND_UP(MAX_NUM_QUEUE, 32)]; ^ Let's add a common definition in uapi and use it everywhere. Fixes: ac2c7ad0e5d6 ("net/ethtool: introduce a new ioctl for per queue setting") CC: Kan Liang <kan.liang@intel.com> Suggested-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | nfp: remove Rolf Neugebauer as co-maintainerSimon Horman2016-03-041-1/+0
|/ | | | | | | | | | Rolf is no longer in his previous role at Netronome and as far as I know no longer working on the NFP driver. Thus it does not seem appropriate for him to be a co-maintainer anymore. Reviewed-by: Dinan Gunawardena <dinan.gunawardena@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: sched: use pfifo_fast for non real queuesEric Dumazet2016-03-034-2/+10
| | | | | | | | | | | Some devices declare a high number of TX queues, then set a much lower real_num_tx_queues This cause setups using fq_codel, sfq or fq as the default qdisc to consume more memory than really needed. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ipv6: Fix refcnt on host routesDavid Ahern2016-03-031-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Andrew and Ying Huang's test robot both reported usage count problems that trace back to the 'keep address on ifdown' patch. >From Andrew: We execute CRIU test on linux-next. On the current linux-next kernel they hangs on creating a network namespace. The kernel log contains many massages like this: [ 1036.122108] unregister_netdevice: waiting for lo to become free. Usage count = 2 [ 1046.165156] unregister_netdevice: waiting for lo to become free. Usage count = 2 [ 1056.210287] unregister_netdevice: waiting for lo to become free. Usage count = 2 I tried to revert this patch and the bug disappeared. Here is a set of commands to reproduce this bug: [root@linux-next-test linux-next]# uname -a Linux linux-next-test 4.5.0-rc6-next-20160301+ #3 SMP Wed Mar 2 17:32:18 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux [root@linux-next-test ~]# unshare -n [root@linux-next-test ~]# ip link set up dev lo [root@linux-next-test ~]# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever [root@linux-next-test ~]# logout [root@linux-next-test ~]# unshare -n ----- The problem is a change made to RTM_DELADDR case in __ipv6_ifa_notify that was added in an early version of the offending patch and is no longer needed. Fixes: f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional") Cc: Andrey Wagin <avagin@gmail.com> Cc: Ying Huang <ying.huang@linux.intel.com> Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Tested-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ezchip: adapt driver to little endian architectureLada Trimasova2016-03-032-332/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since ezchip network driver is written with big endian EZChip platform it is necessary to add support for little endian architecture. The first issue is that the order of the bits in a bit field is implementation specific. So all the bit fields are removed. Named constants are used to access necessary fields. And the second one is that network byte order is big endian. For example, data on ethernet is transmitted with most-significant octet (byte) first. So in case of little endian architecture it is important to swap data byte order when we read it from register. In case of unaligned access we can use "get_unaligned_be32" and in other case we can use function "ioread32_rep" which reads all data from register and works either with little endian or big endian architecture. And then when we are going to write data to register we need to restore byte order using the function "put_unaligned_be32" in case of unaligned access and in other case "iowrite32_rep". The last little fix is a space between type and pointer to observe coding style. Signed-off-by: Lada Trimasova <ltrimas@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Cc: Noam Camus <noamc@ezchip.com> Cc: Tal Zilcer <talz@ezchip.com> Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* sh_eth, ravb: Use ARCH_RENESASSimon Horman2016-03-031-2/+2
| | | | | | | | | | | | Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: mellanox: add DEVLINK dependenciesArnd Bergmann2016-03-034-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new NET_DEVLINK infrastructure can be a loadable module, but the drivers using it might be built-in, which causes link errors like: drivers/net/built-in.o: In function `mlx4_load_one': :(.text+0x2fbfda): undefined reference to `devlink_port_register' :(.text+0x2fc084): undefined reference to `devlink_port_unregister' drivers/net/built-in.o: In function `mlxsw_sx_port_remove': :(.text+0x33a03a): undefined reference to `devlink_port_type_clear' :(.text+0x33a04e): undefined reference to `devlink_port_unregister' There are multiple ways to avoid this: a) add 'depends on NET_DEVLINK || !NET_DEVLINK' dependencies for each user b) use 'select NET_DEVLINK' from each driver that uses it and hide the symbol in Kconfig. c) make NET_DEVLINK a 'bool' option so we don't have to list it as a dependency, and rely on the APIs to be stubbed out when it is disabled d) use IS_REACHABLE() rather than IS_ENABLED() to check for NET_DEVLINK in include/net/devlink.h This implements a variation of approach a) by adding an intermediate symbol that drivers can depend on, and changes the three drivers using it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 09d4d087cd48 ("mlx4: Implement devlink interface") Fixes: c4745500e988 ("mlxsw: Implement devlink interface") Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'for-upstream' of ↵David S. Miller2016-03-0326-80/+1192
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2016-03-01 Here's our main set of Bluetooth & 802.15.4 patches for the 4.6 kernel. - New Bluetooth HCI driver for Intel/AG6xx controllers - New Broadcom ACPI IDs - LED trigger support for indicating Bluetooth powered state - Various fixes in mac802154, 6lowpan and related drivers - New USB IDs for AR3012 Bluetooth controllers Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * Bluetooth: hci_uart: Add diag and address support for Intel/AG6xxMarcel Holtmann2016-02-291-1/+12
| | | | | | | | | | | | | | | | | | The AG6xx devices behave similar to Wilkens Peak and Stone Peak and with that it is needed to check for Intel default address. In addition it is possible to enable vendor events and diag support. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: btusb: Add a new AR3012 ID 04ca:3014Dmitry Tunin2016-02-282-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=03 Dev#= 5 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=04ca ProdID=3014 Rev=00.02 C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb BugLink: https://bugs.launchpad.net/bugs/1546694 Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Cc: stable@vger.kernel.org
| * 6lowpan: iphc: fix invalid case handlingAlexander Aring2016-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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 <dan.carpenter@oracle.com> Signed-off-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: hci_uart: Add Intel/AG6xx supportLoic Poulain2016-02-245-1/+351
| | | | | | | | | | | | | | | | | | | | This driver implements support for iBT2.1 Bluetooth controller embedded in the AG620 communication combo. The controller needs to be configured with bddata and can be patched with a binary patch file (pbn). These operations are performed in manufacturing mode. Signed-off-by: Loic Poulain <loic.poulain@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * 6lowpan: fix error checking codeAndrzej Hajda2016-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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.cocci Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Acked-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * 6lowpan: iphc: fix stateful multicast compressionAlexander Aring2016-02-241-1/+2
| | | | | | | | | | | | | | | | | | 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 <aar@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * ieee802154: 6lowpan: fix return of netdev notifierAlexander Aring2016-02-231-4/+3
| | | | | | | | | | | | | | | | | | | | This patch fixed the return value of netdev notifier. If the command is a don't care a NOTIFY_DONE should be returned. If the command matched a NOTIFY_OK should be returned. Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com> Signed-off-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * 6lowpan: iphc: add support for stateful compressionAlexander Aring2016-02-234-58/+674
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <stefan@osg.samsung.com> Signed-off-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * mac802154: Fixes kernel oops when unloading a radio driverKoen Zandberg2016-02-231-1/+1
| | | | | | | | | | | | | | | | | | Destroying the workqueue before unregistering the net device caused a kernel oops Signed-off-by: Koen Zandberg <koen@bergzand.net> Acked-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * mrf24j40: add writeable missing regAlexander Aring2016-02-231-0/+1
| | | | | | | | | | | | | | | | This patch adds a missing reg for writeable stuff for regmap. Cc: Alan Ott <alan@signal11.us> Signed-off-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: fix state change handling on errorAlexander Aring2016-02-231-4/+3
| | | | | | | | | | | | | | | | | | This patch force always to set "is_tx_from_off", when calibration timeout was not occurred. In case of error handling the is_tx_from_off can be inside in an invalid state. Signed-off-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: fix race on error handlingAlexander Aring2016-02-231-4/+14
| | | | | | | | | | | | | | | | | | The resource "ctx" can be still used by at86rf230_async_state_change, we need to free it at the complete handler of the async state change to avoid a use after free. Signed-off-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * mac802154: fix mac header length checkAlexander Aring2016-02-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | I got report about that sometimes the WARN_ON occurs there which should never happen. I came to the conclusion that the mac header is there but inside the headroom of skb. The skb->len information doesn't contain the information about the headroom length and skb->len is lesser than two. We check now if the skb_mac_header pointer is set and the room between mac header pointer and tail pointer. Signed-off-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
OpenPOWER on IntegriCloud