1. 15 5月, 2020 9 次提交
  2. 14 5月, 2020 26 次提交
  3. 13 5月, 2020 5 次提交
    • A
      Bluetooth: L2CAP: add support for waiting disconnection resp · 5b440676
      Archie Pusaka 提交于
      Whenever we disconnect a L2CAP connection, we would immediately
      report a disconnection event (EPOLLHUP) to the upper layer, without
      waiting for the response of the other device.
      
      This patch offers an option to wait until we receive a disconnection
      response before reporting disconnection event, by using the "how"
      parameter in l2cap_sock_shutdown(). Therefore, upper layer can opt
      to wait for disconnection response by shutdown(sock, SHUT_WR).
      
      This can be used to enforce proper disconnection order in HID,
      where the disconnection of the interrupt channel must be complete
      before attempting to disconnect the control channel.
      Signed-off-by: NArchie Pusaka <apusaka@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      5b440676
    • S
      Bluetooth: Handle Inquiry Cancel error after Inquiry Complete · adf1d692
      Sonny Sasaka 提交于
      After sending Inquiry Cancel command to the controller, it is possible
      that Inquiry Complete event comes before Inquiry Cancel command complete
      event. In this case the Inquiry Cancel command will have status of
      Command Disallowed since there is no Inquiry session to be cancelled.
      This case should not be treated as error, otherwise we can reach an
      inconsistent state.
      
      Example of a btmon trace when this happened:
      
      < HCI Command: Inquiry Cancel (0x01|0x0002) plen 0
      > HCI Event: Inquiry Complete (0x01) plen 1
              Status: Success (0x00)
      > HCI Event: Command Complete (0x0e) plen 4
            Inquiry Cancel (0x01|0x0002) ncmd 1
              Status: Command Disallowed (0x0c)
      Signed-off-by: NSonny Sasaka <sonnysasaka@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      adf1d692
    • R
      Bluetooth: serdev: Constify serdev_device_ops · 608c39f4
      Rikard Falkeborn 提交于
      serdev_device_ops is not modified and can be const. Also, remove the
      unneeded declaration of it.
      
      Output from the file command before and after:
      
      Before:
         text    data     bss     dec     hex filename
         7192    2408     192    9792    2640 drivers/bluetooth/hci_serdev.o
      
      After:
         text    data     bss     dec     hex filename
         7256    2344     192    9792    2640 drivers/bluetooth/hci_serdev.o
      Signed-off-by: NRikard Falkeborn <rikard.falkeborn@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      608c39f4
    • R
      Bluetooth: btusb: Add support for Intel Bluetooth Device Typhoon Peak (8087:0032) · 875e1675
      Raghuram Hegde 提交于
      Device from /sys/kernel/debug/usb/devices:
      
      T:  Bus=01 Lev=01 Prnt=01 Port=13 Cnt=02 Dev#=  3 Spd=12   MxCh= 0
      D:  Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=8087 ProdID=0032 Rev= 0.00
      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
      E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=1ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      I:  If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  63 Ivl=1ms
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  63 Ivl=1ms
      Signed-off-by: NRaghuram Hegde <raghuram.hegde@intel.com>
      Signed-off-by: NChethan T N <chethan.tumkur.narayan@intel.com>
      Signed-off-by: NAmit K Bag <amit.k.bag@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      875e1675
    • A
      Bluetooth: btusb: Implement hdev->prevent_wake · b7d0bf11
      Abhishek Pandit-Subedi 提交于
      Implement the prevent_wake hook by checking device_may_wakeup on the usb
      interface. This prevents the Bluetooth core from enabling scanning when
      the device isn't expected to wake from suspend.
      Signed-off-by: NAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
      Reviewed-by: NAlain Michaud <alainm@chromium.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      b7d0bf11