04 Aug, 2015

1 commit

  • commit 781f899f2f9d8b71e35225a087f90052059486c5 upstream.

    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
    Signed-off-by: Greg Kroah-Hartman

    Marcel Holtmann
     

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


15 Mar, 2015

8 commits


13 Mar, 2015

3 commits


07 Mar, 2015

2 commits


03 Mar, 2015

2 commits

  • …etooth/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>

    David S. Miller
     
  • After TIPC doesn't depend on iocb argument in its internal
    implementations of sendmsg() and recvmsg() hooks defined in proto
    structure, no any user is using iocb argument in them at all now.
    Then we can drop the redundant iocb argument completely from kinds of
    implementations of both sendmsg() and recvmsg() in the entire
    networking stack.

    Cc: Christoph Hellwig
    Suggested-by: Al Viro
    Signed-off-by: Ying Xue
    Signed-off-by: David S. Miller

    Ying Xue
     

02 Mar, 2015

2 commits


28 Feb, 2015

1 commit

  • 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
    Signed-off-by: Marcel Holtmann
    Cc: Gustavo Padovan
    Cc: Johan Hedberg

    Jiri Slaby
     

21 Feb, 2015

2 commits


12 Jan, 2015

4 commits


24 Nov, 2014

1 commit


11 Nov, 2014

1 commit

  • …inville/wireless-next

    John W. Linville says:

    ====================
    pull request: wireless-next 2014-11-07

    Please pull this batch of updates intended for the 3.19 stream!

    For the mac80211 bits, Johannes says:

    "This relatively large batch of changes is comprised of the following:
    * large mac80211-hwsim changes from Ben, Jukka and a bit myself
    * OCB/WAVE/11p support from Rostislav on behalf of the Czech Technical
    University in Prague and Volkswagen Group Research
    * minstrel VHT work from Karl
    * more CSA work from Luca
    * WMM admission control support in mac80211 (myself)
    * various smaller fixes, spelling corrections, and minor API additions"

    For the Bluetooth bits, Johan says:

    "Here's the first bluetooth-next pull request for 3.19. The vast majority
    of patches are for ieee802154 from Alexander Aring with various fixes
    and cleanups. There are also several LE/SMP fixes as well as improved
    support for handling LE devices that have lost their pairing information
    (the patches from Alfonso). Jukka provides a couple of stability fixes
    for 6lowpan and Szymon conformance fixes for RFCOMM. For the HCI drivers
    we have one new USB ID for an Acer controller as well as a reset
    handling fix for H5."

    For the Atheros bits, Kalle says:

    "Major changes are:

    o ethtool support (Ben)

    o print dev string prefix with debug hex buffers dump (Michal)

    o debugfs file to read calibration data from the firmware verification
    purposes (me)

    o fix fw_stats debugfs file, now results are more reliable (Michal)

    o firmware crash counters via debugfs (Ben&me)

    o various tracing points to debug firmware (Rajkumar)

    o make it possible to provide firmware calibration data via a file (me)

    And we have quite a lot of smaller fixes and clean up."

    For the iwlwifi bits, Emmanuel says:

    "The big new thing here is netdetect which allows the
    firmware to wake up the platform when a specific network
    is detected. Along with that I have fixes for d3 operation.
    The usual amount of rate scaling stuff - we now support STBC.
    The other commit that stands out is Johannes's work on
    devcoredump. He basically starts to use the standard
    infrastructure he built."

    Along with that are the usual sort of updates and such for ath9k,
    brcmfmac, wil6210, and a handful of other bits here and there...

    Please let me know if there are problems!
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     

06 Nov, 2014

1 commit

  • This encapsulates all of the skb_copy_datagram_iovec() callers
    with call argument signature "skb, offset, msghdr->msg_iov, length".

    When we move to iov_iters in the networking, the iov_iter object will
    sit in the msghdr.

    Having a helper like this means there will be less places to touch
    during that transformation.

    Based upon descriptions and patch from Al Viro.

    Signed-off-by: David S. Miller

    David S. Miller
     

29 Oct, 2014

1 commit


11 Jul, 2014

3 commits


09 Jul, 2014

1 commit

  • We already have several lists with struct bdaddr_list entries, and there
    will be more in the future. Since the operations for adding, removing,
    looking up and clearing entries in these lists are exactly the same it
    doesn't make sense to define new functions for every single list. This
    patch unifies the functions by passing the list_head to them instead of
    a hci_dev pointer.

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

    Johan Hedberg
     

06 Jul, 2014

1 commit

  • When the external configuration triggers the switch to a configured
    controller, it means the setup needs to be run. Controllers that start
    out unconfigured have only run limited set of HCI commands. This is
    not enough for complete operation and thus run the setup procedure
    before announcing the new controller index.

    This introduces HCI_CONFIG flag as companion to HCI_SETUP flag. The
    HCI_SETUP flag is only used once for the initial setup procedure. And
    during that procedure hdev->setup driver callback is called. With the
    new HCI_CONFIG the switch from unconfigured to configured state is
    triggering the same setup procedure just without hdev->setup. This
    is required since bringing a controller back to unconfigured state
    from configured state is possible.

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

    Marcel Holtmann
     

03 Jul, 2014

3 commits

  • When a controller is in unconfigured state it is currently hidden
    from the management interface. This change now announces the new
    controller with an Unconfigured Index Added event and allows clients
    to easily detect the controller.

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

    Marcel Holtmann
     
  • With the new unconfigured controller state it is possible to provide a
    fully functional HCI transport, but disable the higher level operations
    that would normally happen. This way userspace can try to configure the
    controller before releases the unconfigured state.

    The internal state is represented by HCI_UNCONFIGURED. This replaces the
    HCI_QUIRK_RAW_DEVICE quirk as internal state representation. This is now
    a real state and drivers can use the quirk to actually trigger this
    state. In the future this will allow a more fine grained switching from
    unconfigured state to configured state for controller inititialization.

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

    Marcel Holtmann
     
  • Bluetooth controllers that are marked for raw-only usage can only be
    used with user channel access. Any other operation should be rejected.

    This simplifies the whole raw-only support since it now depends on
    the fact that the controller is marked with HCI_QUIRK_RAW_DEVICE and
    runtime raw access is restricted to user channel operation.

    The kernel internal processing of HCI commands and events is designed
    around the case that either the kernel has full control over the device
    or that the device is driven from userspace. This now makes a clear
    distinction between these two possible operation modes.

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

    Marcel Holtmann