summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* xen: Use eth_<foo>_addr instead of memsetJoe Perches2015-03-031-1/+1
| | | | | | | | | Use the built-in function instead of memset. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netconsole: Use eth_<foo>_addr instead of memsetJoe Perches2015-03-031-2/+3
| | | | | | | | | | | Use the built-in function instead of memset. Miscellanea: Add #include <linux/etherdevice.h> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* wireless: Use eth_<foo>_addr instead of memsetJoe Perches2015-03-0341-116/+118
| | | | | | | | | | | | Use the built-in function instead of memset. Miscellanea: Add #include <linux/etherdevice.h> where appropriate Use ETH_ALEN instead of 6 Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: usb: Use eth_<foo>_addr instead of memsetJoe Perches2015-03-034-5/+5
| | | | | | | Use the built-in function instead of memset. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ethernet: Use eth_<foo>_addr instead of memsetJoe Perches2015-03-0317-25/+25
| | | | | | | | Use the built-in function instead of memset. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* i40e: Fix dependencies in the i40e driver on configfsGreg Rose2015-03-034-8/+17
| | | | | | | | | Module dependencies are broken in the case where CONFIG_I40E=y and CONFIG_CONFIGFS_FS=m. This fixes the broken dependency. Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ax25: Stop using magic neighbour cache operations.Eric W. Biederman2015-03-0310-74/+31Star
| | | | | | | | | | | | | | | | | | | | | | | Before the ax25 stack calls dev_queue_xmit it always calls ax25_type_trans which sets skb->protocol to ETH_P_AX25. Which means that by looking at the protocol type it is possible to detect IP packets that have not been munged by the ax25 stack in ndo_start_xmit and call a function to munge them. Rename ax25_neigh_xmit to ax25_ip_xmit and tweak the return type and value to be appropriate for an ndo_start_xmit function. Update all of the ax25 devices to test the protocol type for ETH_P_IP and return ax25_ip_xmit as the first thing they do. This preserves the existing semantics of IP packet processing, but the timing will be a little different as the IP packets now pass through the qdisc layer before reaching the ax25 ip packet processing. Remove the now unnecessary ax25 neighbour table operations. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/atm/signaling.c: remove WAIT_FOR_DEMON codeFabian Frederick2015-03-031-24/+0Star
| | | | | | | | | | WAIT_FOR_DEMON code is directly undefined at the beginning of signaling.c since initial git version and thus never compiled. This also removes buggy current->state direct access. Suggested-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'neigh_cleanups'David S. Miller2015-03-0232-544/+105Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eric W. Biederman says: ==================== Neighbour table and ax25 cleanups While looking at the neighbour table to what it would take to allow using next hops in a different address family than the current packets I found a partial resolution for my issues and I stumbled upon some work that makes the neighbour table code easier to understand and maintain. Long ago in a much younger kernel ax25 found a hack to use dev_rebuild_header to transmit it's packets instead of going through what today is ndo_start_xmit. When the neighbour table was rewritten into it's current form the ax25 code was such a challenge that arp_broken_ops appeard in arp.c and neigh_compat_output appeared in neighbour.c to keep the ax25 hack alive. With a little bit of work I was able to remove some of the hack that is the ax25 transmit path for ip packets and to isolate what remains into a slightly more readable piece of code in ax25_ip.c. Removing the need for the generic code to worry about ax25 special cases. After cleaning up the old ax25 hacks I also performed a little bit of work on neigh_resolve_output to remove the need for a dst entry and to ensure cached headers get a deterministic protocol value in their cached header. This guarantees that a cached header will not be different depending on which protocol of packet is transmitted, and it allows packets to be transmitted that don't have a dst entry. There remains a small amount of code that takes advantage of when packets have a dst entry but that is something different. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * neigh: Don't require a dst in neigh_resolve_outputEric W. Biederman2015-03-021-6/+0Star
| | | | | | | | | | | | | | | | | | Having a dst helps a little bit for teql but is fundamentally unnecessary and there are code paths where a dst is not available that it would be nice to use the neighbour cache. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * neigh: Don't require dst in neigh_hh_initEric W. Biederman2015-03-025-4/+8
| | | | | | | | | | | | | | | | | | | | | | - Add protocol to neigh_tbl so that dst->ops->protocol is not needed - Acquire the device from neigh->dev This results in a neigh_hh_init that will cache the samve values regardless of the packets flowing through it. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * arp: Kill arp_findEric W. Biederman2015-03-022-66/+0Star
| | | | | | | | | | | | | | There are no more callers so kill this function. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: Kill dev_rebuild_headerEric W. Biederman2015-03-0216-306/+1Star
| | | | | | | | | | | | | | | | | | | | Now that there are no more users kill dev_rebuild_header and all of it's implementations. This is long overdue. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ax25: Stop depending on arp_findEric W. Biederman2015-03-021-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have ax25_neigh_output perform ordinary arp resolution before calling ax25_neigh_xmit. Call dev_hard_header in ax25_neigh_output with a destination address so it will not fail, and the destination mac address will not need to be set in ax25_neigh_xmit. Remove arp_find from ax25_neigh_xmit (the ordinary arp resolution added to ax25_neigh_output removes the need for calling arp_find). Document how close ax25_neigh_output is to neigh_resolve_output. Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-hams@vger.kernel.org Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ax25: Stop calling/abusing dev_rebuild_headerEric W. Biederman2015-03-021-8/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | - Rename ax25_rebuild_header to ax25_neigh_xmit and call it from ax25_neigh_output directly. The rename is to make it clear that this is not a rebuild_header operation. - Remove ax25_rebuild_header from ax25_header_ops. Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-hams@vger.kernel.org Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * neigh: Move neigh_compat_output into ax25_ip.cEric W. Biederman2015-03-023-23/+16Star
| | | | | | | | | | | | | | | | | | | | | | The only caller is now is ax25_neigh_construct so move neigh_compat_output into ax25_ip.c make it static and rename it ax25_neigh_output. Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-hams@vger.kernel.org Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * arp: Remove special case to give AX25 it's open arp operations.Eric W. Biederman2015-03-021-37/+0Star
| | | | | | | | | | | | | | | | The special case has been pushed out into ax25_neigh_construct so there is no need to keep this code in arp.c Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ax25: Refactor to use private neighbour operations.Eric W. Biederman2015-03-0210-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | AX25 already has it's own private arp cache operations to isolate it's abuse of dev_rebuild_header to transmit packets. Add a function ax25_neigh_construct that will allow all of the ax25 devices to force using these operations, so that the generic arp code does not need to. Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-hams@vger.kernel.org Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ax25: Make ax25_header and ax25_rebuild_header staticEric W. Biederman2015-03-022-13/+8Star
| | | | | | | | | | | | | | | | | | The only user is in ax25_ip.c so stop exporting these functions. Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-hams@vger.kernel.org Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ax25/6pack: Replace sp_header_ops with ax25_header_opsEric W. Biederman2015-03-021-27/+1Star
| | | | | | | | | | | | | | | | | | | | The two sets of header operations are functionally identical remove the duplicate definition. Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-hams@vger.kernel.org Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ax25/kiss: Replace ax_header_ops with ax25_header_opsEric W. Biederman2015-03-021-32/+1Star
| | | | | | | | | | | | | | | | | | | | The two sets of header operations are functionally identical remove the duplicate definition. Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-hams@vger.kernel.org Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * rose: Transmit packets in rose_xmit not rose_rebuild_headerEric W. Biederman2015-03-021-27/+11Star
| | | | | | | | | | | | | | | | | | | | Patterned after the similar code in net/rom this turns out to be a trivial obviously correct transmformation. Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-hams@vger.kernel.org Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * rose: Set the destination address in rose_headerEric W. Biederman2015-03-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not setting the destination address is a bug that I suspect causes no problems today, as only the arp code seems to call dev_hard_header and the description I have of rose is that it is expected to be used with a static neigbour table. I have derived the offset and the length of the rose destination address from rose_rebuild_header where arp_find calls neigh_ha_snapshot to set the destination address. Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-hams@vger.kernel.org Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ax25: In ax25_rebuild_header add missing kfree_skbEric W. Biederman2015-03-021-0/+1
|/ | | | | | | | | | | In the unlikely (impossible?) event that we attempt to transmit an ax25 packet over a non-ax25 device free the skb so we don't leak it. Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-hams@vger.kernel.org Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ebpf: move CONFIG_BPF_SYSCALL-only function declarationsDaniel Borkmann2015-03-021-9/+9
| | | | | | | | | | | Masami noted that it would be better to hide the remaining CONFIG_BPF_SYSCALL-only function declarations within the BPF header ifdef, w/o else path dummy alternatives since these functions are not supposed to have a user outside of CONFIG_BPF_SYSCALL. Suggested-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Reference: http://article.gmane.org/gmane.linux.kernel.api/8658 Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-nextDavid S. Miller2015-03-0210-152/+326
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pablo Neira Ayuso says: ==================== Netfilter updates for net-next A small batch with accumulated updates in nf-next, mostly IPVS updates, they are: 1) Add 64-bits stats counters to IPVS, from Julian Anastasov. 2) Move NETFILTER_XT_MATCH_ADDRTYPE out of NETFILTER_ADVANCED as docker seem to require this, from Anton Blanchard. 3) Use boolean instead of numeric value in set_match_v*(), from coccinelle via Fengguang Wu. 4) Allows rescheduling of new connections in IPVS when port reuse is detected, from Marcelo Ricardo Leitner. 5) Add missing bits to support arptables extensions from nft_compat, from Arturo Borrero. Patrick is preparing a large batch to enhance the set infrastructure, named expressions among other things, that should follow up soon after this batch. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * netfilter: nft_compat: add support for arptables extensionsArturo Borrero2015-03-021-0/+9
| | | | | | | | | | | | | | This patch adds support to arptables extensions from nft_compat. Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * ipvs: allow rescheduling of new connections when port reuse is detectedMarcelo Ricardo Leitner2015-02-255-6/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when TCP/SCTP port reusing happens, IPVS will find the old entry and use it for the new one, behaving like a forced persistence. But if you consider a cluster with a heavy load of small connections, such reuse will happen often and may lead to a not optimal load balancing and might prevent a new node from getting a fair load. This patch introduces a new sysctl, conn_reuse_mode, that allows controlling how to proceed when port reuse is detected. The default value will allow rescheduling of new connections only if the old entry was in TIME_WAIT state for TCP or CLOSED for SCTP. Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com> Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
| * netfilter: ipset: fix boolreturn.cocci warningsWu Fengguang2015-02-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | net/netfilter/xt_set.c:196:9-10: WARNING: return of 0/1 in function 'set_match_v3' with return type bool net/netfilter/xt_set.c:242:9-10: WARNING: return of 0/1 in function 'set_match_v4' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci CC: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * netfilter: Don't hide NETFILTER_XT_MATCH_ADDRTYPE behind NETFILTER_ADVANCEDAnton Blanchard2015-02-111-1/+1
| | | | | | | | | | | | | | | | Docker needs NETFILTER_XT_MATCH_ADDRTYPE, so move it out from behind NETFILTER_ADVANCED and make it default to a module. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * ipvs: use 64-bit rates in statsJulian Anastasov2015-02-095-143/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IPVS stats are limited to 2^(32-10) conns/s and packets/s, 2^(32-5) bytes/s. It is time to use 64 bits: * Change all conn/packet kernel counters to 64-bit and update them in u64_stats_update_{begin,end} section * In kernel use struct ip_vs_kstats instead of the user-space struct ip_vs_stats_user and use new func ip_vs_export_stats_user to export it to sockopt users to preserve compatibility with 32-bit values * Rename cpu counters "ustats" to "cnt" * To netlink users provide additionally 64-bit stats: IPVS_SVC_ATTR_STATS64 and IPVS_DEST_ATTR_STATS64. Old stats remain for old binaries. * We can use ip_vs_copy_stats in ip_vs_stats_percpu_show Thanks to Chris Caputo for providing initial patch for ip_vs_est.c Signed-off-by: Chris Caputo <ccaputo@alt.net> Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
* | filter: refactor common filter attach code into __sk_attach_progDaniel Borkmann2015-03-021-38/+33Star
| | | | | | | | | | | | | | | | | | Both sk_attach_filter() and sk_attach_bpf() are setting up sk_filter, charging skmem and attaching it to the socket after we got the eBPF prog up and ready. Lets refactor that into a common helper. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'for-upstream' of ↵David S. Miller2015-03-0238-489/+1283
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2015-03-02 Here's the first bluetooth-next pull request targeting the 4.1 kernel: - ieee802154/6lowpan cleanups - SCO routing to host interface support for the btmrvl driver - AMP code cleanups - Fixes to AMP HCI init sequence - Refactoring of the HCI callback mechanism - Added shutdown routine for Intel controllers in the btusb driver - New config option to enable/disable Bluetooth debugfs information - Fix for early data reception on L2CAP fixed channels Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | at86rf230: add warning if edge-triggered irqAlexander Aring2015-02-272-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While testing I experience a deadlock while using the at86rf233 on a raspberry pi. The reason was an edge triggered gpio irq because the irq triggered while irq was disabled. This issue doesn't happend on a level triggered irq because the irq will hit after calling enable_irq. This patch adds a warning that it's not recommended to use a edge-triggered irq type. Also change the examples to high-level irqtype. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | at86rf230: add irq low-level for polarityAlexander Aring2015-02-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The at86rf2xx chips supports the setting of irq polarity if active low or active high. This patch adds a handling for IRQ_ACTIVE_LOW if the irq_type is IRQ_TYPE_LEVEL_LOW. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | at86rf230: add irqmask mode settingAlexander Aring2015-02-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since we support at86rf233 we need to ensure that basic operation default values are the same. This patch always sets IRQ_MASK_MODE to 0 which is after reset 1 at the at86rf233 and 0 at the at86rf231. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | at86rf230: remove tx_timeoutAlexander Aring2015-02-271-5/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes tx_timeout handling. We used it in sync xmit handling. Since we support async xmit handling a xmit timeout handling isn't easy to implement and should be implemented by netdev watchdog mechanism. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | at86rf230: add support for external xtal trimAlexander Aring2015-02-273-4/+54
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for setting the xtal trim register. Some at86rf2xx transceiver boards needs fine tuning the xtal capacitor. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | at86rf230: copy pdata to driver allocated spaceAlexander Aring2015-02-271-26/+25Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch copies the platform data in driver allocated space at first. With this change we ensure that we access the allocated platform data as readonly space. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reported-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: make hci_test_bit's addr constJiri Slaby2015-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc5 warns about passing a const array to hci_test_bit which takes a non-const pointer: net/bluetooth/hci_sock.c: In function ‘hci_sock_sendmsg’: net/bluetooth/hci_sock.c:955:8: warning: passing argument 2 of ‘hci_test_bit’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-array-qualifiers] &hci_sec_filter.ocf_mask[ogf])) && ^ net/bluetooth/hci_sock.c:49:19: note: expected ‘void *’ but argument is of type ‘const __u32 (*)[4] {aka const unsigned int (*)[4]}’ static inline int hci_test_bit(int nr, void *addr) ^ So make 'addr' 'const void *'. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Cc: Gustavo Padovan <gustavo@padovan.org> Cc: Johan Hedberg <johan.hedberg@gmail.com>
| * | Bluetooth: Update New CSRK event to match latest specificationJohan Hedberg2015-02-274-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'master' parameter of the New CSRK event was recently renamed to 'type', with the old values kept for backwards compatibility as unauthenticated local/remote keys. This patch updates the code to take into account the two new (authenticated) values and ensures they get used based on the security level of the connection that the respective keys get distributed over. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Remove unnecessary queue_monitor_skb() functionJohan Hedberg2015-02-201-30/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that there's the general purpose hci_send_to_channel() API it will do the exact same thing as queue_monitor_skb() when passed the monitor HCI channel. This patch removes queue_monitor_skb() and replaces any users of it with calls to hci_send_to_channel(). Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Rename hci_send_to_control to hci_send_to_channelJohan Hedberg2015-02-203-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hci_send_to_control() can be made more general purpose with a small change of passing the desired HCI channel as a parameter to it. This allows using it for the monitor channel as well as e.g. 6lowpan in the future. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Use hci_copy_identity_addr() helper for SMP chan creationJohan Hedberg2015-02-201-17/+7Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only reason the SMP code is essentially duplicating the hci_copy_identity_addr() function is that the helper returns the address type in the HCI format rather than the three-value format expected by l2cap_chan. This patch converts the SMP code to use the helper and then do a simple conversion from one address type to another. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Fix checking for pending Set SSP in Set HS handlerJohan Hedberg2015-02-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing the HS setting requires that SSP is enabled, however so far the code only checked for the SSP flag but not a potentially ongoing Set SSP operation. This patch adds a check for a pending Set SSP command in the Set HS handler, and returns a 'busy' error if one is found. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Remove bogus check for pending mgmt Set HS commandJohan Hedberg2015-02-191-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command handler for Set HS doesn't use mgmt_pending_add() so we can never have a pending Set HS command that mgmt_pending_find() would return. This patch removes an unnecessary lookup for it in the set_ssp() handler function. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Convert disconn_cfm to be triggered through hci_cbJohan Hedberg2015-02-195-32/+28Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves all the disconn_cfm callbacks to be based on the hci_cb list. This means making l2cap_disconn_cfm private to l2cap_core.c and sco_conn_cb private to sco.c respectively. Since the hci_conn type filtering isn't done any more on the wrapper level the callbacks themselves need to check that they were passed a relevant type of connection. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Convert connect_cfm to be triggered through hci_cbJohan Hedberg2015-02-195-46/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves all the connect_cfm callbacks to be based on the hci_cb list. This means making l2cap_connect_cfm private to l2cap_core.c and sco_connect_cb private to sco.c respectively. Since the hci_conn type filtering isn't done any more on the wrapper level the callbacks themselves need to check that they were passed a relevant type of connection. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Convert L2CAP security callback to use hci_cbJohan Hedberg2015-02-192-38/+16Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no reason to have the custom hci_proto_auth/encrypt_cfm helpers when the hci_cb list works equally well. This patch adds L2CAP to the hci_cb list and makes l2cap_security_cfm a private function of l2cap_core.c. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Convert hci_cb_list_lock to a mutexJohan Hedberg2015-02-192-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll soon need to be able to sleep inside the loops that iterate the hci_cb list, so neither a spinlock, rwlock or rcu are usable. This patch changes the lock to a mutex which permits sleeping while holding the lock. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>