28 Feb, 2017

1 commit

  • Fix typos and add the following to the scripts/spelling.txt:

    an user||a user
    an userspace||a userspace

    I also added "userspace" to the list since it is a common word in Linux.
    I found some instances for "an userfaultfd", but I did not add it to the
    list. I felt it is endless to find words that start with "user" such as
    "userland" etc., so must draw a line somewhere.

    Link: http://lkml.kernel.org/r/1481573103-11329-4-git-send-email-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     

20 Sep, 2016

13 commits


26 Aug, 2016

1 commit


10 Jul, 2016

1 commit

  • The HCI_BREDR naming is confusing since it actually stands for Primary
    Bluetooth Controller. Which is a term that has been used in the latest
    standard. However from a legacy point of view there only really have
    been Basic Rate (BR) and Enhanced Data Rate (EDR). Recent versions of
    Bluetooth introduced Low Energy (LE) and made this terminology a little
    bit confused since Dual Mode Controllers include BR/EDR and LE. To
    simplify this the name HCI_PRIMARY stands for the Primary Controller
    which can be a single mode or dual mode controller.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     

08 Jul, 2016

1 commit

  • If recvmsg is called with a destination buffer that is too small to
    receive the contents of skb in its entirety, the return value from
    recvmsg was inconsistent with common SOCK_SEQPACKET or SOCK_DGRAM
    semantics.

    If destination buffer provided by userspace is too small (e.g. len <
    copied), then MSG_TRUNC flag is set and copied is returned. Instead, it
    should return the length of the message, which is consistent with how
    other datagram based sockets act. Quoting 'man recv':

    "All three calls return the length of the message on successful comple‐
    tion. If a message is too long to fit in the supplied buffer, excess
    bytes may be discarded depending on the type of socket the message is
    received from."

    and

    "MSG_TRUNC (since Linux 2.2)

    For raw (AF_PACKET), Internet datagram (since Linux
    2.4.27/2.6.8), netlink (since Linux 2.6.22), and UNIX datagram
    (since Linux 3.4) sockets: return the real length of the packet
    or datagram, even when it was longer than the passed buffer."

    Signed-off-by: Denis Kenzior
    Signed-off-by: Marcel Holtmann

    Denis Kenzior
     

06 Jan, 2016

1 commit


20 Nov, 2015

6 commits


26 Oct, 2015

2 commits

  • The SKB context buffer for HCI request is really not just for requests,
    information in their are preserved for the whole HCI layer. So it makes
    more sense to actually rename it into bt_cb()->hci and also call it then
    struct hci_ctrl.

    In addition that allows moving the decoded opcode for outgoing packets
    into that struct. So far it was just consuming valuable space from the
    main shared items. And opcode are not valid for L2CAP packets.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     
  • There are two checks that are still using (MSG_OOB) instead of just
    MSG_OOB and so lets just fix them.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     

21 Oct, 2015

3 commits


08 Oct, 2015

2 commits

  • Introduce hci_recv_diag function for HCI drivers to allow sending vendor
    specific diagnostic messages into the Bluetooth core stack. The messages
    are not processed, but they are forwarded to the monitor channel and can
    be retrieved by user space diagnostic tools.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     
  • The Bluetooth public device address might change during controller setup
    and it makes it a lot simpler for monitoring tools if they just get told
    what the new address is. In addition include the manufacturer / company
    information of the controller. That allows for easy vendor specific HCI
    command and event handling.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     

05 Oct, 2015

2 commits


17 Sep, 2015

1 commit

  • With 9380f9eacfbbee701daa416edd6625efcd3e29e1 the order of unsetting
    the HCI_USER_CHANNEL flag of the HCI device was reverted to ensure
    the device is first closed before making it available again.

    Due to hci_dev_close checking for HCI_USER_CHANNEL being set on the
    device it was never really closed and was kept opened. We're now
    calling hci_dev_do_close directly to make sure the device is correctly
    closed and we keep the correct order to unset the flag on our device
    object.

    Signed-off-by: Simon Fels
    Signed-off-by: Marcel Holtmann

    Simon Fels
     

08 Jun, 2015

1 commit

  • During the initial setup stage of a controller, the low-level transport
    is actually active. This means that HCI_UP is true. To avoid toggling
    the transport off and back on again for normal operation the kernel
    holds a grace period with HCI_AUTO_OFF that will turn the low-level
    transport off in case no user is present.

    The idea of the grace period is important to avoid having to initialize
    all of the controller twice. So legacy ioctl and the new management
    interface knows how to clear this grace period and then start normal
    operation.

    For the user channel operation this grace period has not been taken into
    account which results in the problem that HCI_UP and HCI_AUTO_OFF are
    set and the kernel will return EBUSY. However from a system point of
    view the controller is ready to be grabbed by either the ioctl, the
    management interface or the user channel.

    This patch brings the user channel to the same level as the other two
    entries for operating a controller.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg
    Cc: stable@vger.kernel.org

    Marcel Holtmann
     

07 Jun, 2015

1 commit


11 May, 2015

1 commit


31 Mar, 2015

1 commit

  • In order to shrink the size of bt_skb_cb, this patch moves the HCI
    request related variables into their own req_ctrl struct. Additionall
    the L2CAP and HCI request structs are placed inside the same union since
    they will never be used at the same time for the same skb.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Johan Hedberg
     

18 Mar, 2015

2 commits