1. 23 May, 2017 2 commits
  2. 22 May, 2017 3 commits
  3. 19 May, 2017 1 commit
  4. 18 May, 2017 9 commits
    • Tobias Regnery's avatar
      Bluetooth: hci_nokia: select BT_HCIUART_H4 · c42c88e6
      Tobias Regnery authored
      We see the following build failure with CONFIG_BT_HCIUART_NOKIA=y and
      CONFIG_BT_HCIUART_H4=n:
      
      drivers/bluetooth/hci_nokia.c: In function 'nokia_recv':
      drivers/bluetooth/hci_nokia.c:644:18: error: implicit declaration of function 'h4_recv_buf' [-Werror=implicit-function-declaration]
      ...
      
      Fix this by selecting the BT_HCIUART_H4 symbol like all the other users
      of the protocoll.
      
      Fixes: 7bb31868 ("Bluetooth: add nokia driver")
      Signed-off-by: default avatarTobias Regnery <tobias.regnery@gmail.com>
      Reviewed-by: default avatarSebastian Reichel <sre@kernel.org>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      c42c88e6
    • Dean Jenkins's avatar
      Bluetooth: hci_ldisc: Use rwlocking to avoid closing proto races · dec2c928
      Dean Jenkins authored
      When HCI_UART_PROTO_READY is in the set state, the Data Link protocol
      layer (proto) is bound to the HCI UART driver. This state allows the
      registered proto function pointers to be used by the HCI UART driver.
      
      When unbinding (closing) the Data Link protocol layer, the proto
      function pointers much be prevented from being used immediately before
      running the proto close function pointer. Otherwise, there is a risk
      that a proto non-close function pointer is used during or after the
      proto close function pointer is used. The consequences are likely to
      be a kernel crash because the proto close function pointer will free
      resources used in the Data Link protocol layer.
      
      Therefore, add a reader writer lock (rwlock) solution to prevent the
      close proto function pointer from running by using write_lock_irqsave()
      whilst the other proto function pointers are protected using
      read_lock(). This means HCI_UART_PROTO_READY can safely be cleared
      in the knowledge that no proto function pointers are running.
      
      When flag HCI_UART_PROTO_READY is put into the clear state,
      proto close function pointer can safely be run. Note
      flag HCI_UART_PROTO_SET being in the set state prevents the proto
      open function pointer from being run so there is no race condition
      between proto open and close function pointers.
      Signed-off-by: default avatarDean Jenkins <Dean_Jenkins@mentor.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      dec2c928
    • Marcel Holtmann's avatar
      Bluetooth: Skip vendor diagnostic configuration for HCI User Channel · b56c7b25
      Marcel Holtmann authored
      When the HCI User Channel access is requested, then do not try to
      undermine it with vendor diagnostic configuration. The exclusive user
      is required to configure its own vendor diagnostic in that case and
      can not rely on the host stack support.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      b56c7b25
    • Tobias Regnery's avatar
      Bluetooth: hci_uart: fix kconfig dependency · 76c4969f
      Tobias Regnery authored
      We see the following link error with CONFIG_BT_HCIUART=y,
      CONFIG_BT_HCIUART_LL=y and CONFIG_SERIAL_DEV_BUS=m:
      
      drivers/built-in.o: In function 'll_close':
      supp.c:(.text+0x55add4): undefined reference to 'serdev_device_close'
      supp.c:(.text+0x55add4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_close'
      drivers/built-in.o: In function 'll_open':
      supp.c:(.text+0x55aed0): undefined reference to 'serdev_device_open'
      supp.c:(.text+0x55aed0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_open'
      drivers/built-in.o: In function `hci_ti_probe':
      supp.c:(.text+0x55b00c): undefined reference to 'hci_uart_register_device'
      supp.c:(.text+0x55b00c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'hci_uart_register_device'
      drivers/built-in.o: In function `ll_setup':
      supp.c:(.text+0x55b08c): undefined reference to 'serdev_device_set_flow_control'
      supp.c:(.text+0x55b08c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_set_flow_control'
      supp.c:(.text+0x55b324): undefined reference to 'serdev_device_set_baudrate'
      supp.c:(.text+0x55b324): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 'serdev_device_set_baudrate'
      drivers/built-in.o: In function 'll_init':
      supp.c:(.init.text+0x1b508): undefined reference to '__serdev_device_driver_register'
      supp.c:(.init.text+0x1b508): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol '__serdev_device_driver_register'
      
      Fix this by dependig BT_HCIUART_LL on the BT_HCIUART_SERDEV symbol.
      This implies a dependency on BT_HCIUART and hci_ll.c is only compiled in
      if SERIAl_DEV_BUS is built in or SERIAL_DEV_BUS and BT_HCIUART are
      modules.
      
      Fixes: 37180552 ("bluetooth: hci_uart: add LL protocol serdev driver support")
      Signed-off-by: default avatarTobias Regnery <tobias.regnery@gmail.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      76c4969f
    • Marcel Holtmann's avatar
      Bluetooth: Set LE Default PHY preferences · de2ba303
      Marcel Holtmann authored
      If the LE Set Default PHY command is supported, the indicate to the
      controller that the host has no preferences for transmitter PHY or
      receiver PHY selection.
      
      Issuing this command gives the controller a clear indication that other
      PHY can be selected if available.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      de2ba303
    • Marcel Holtmann's avatar
      Bluetooth: Enable LE PHY Update Complete event · 27bbca44
      Marcel Holtmann authored
      If either LE Set Default PHY command or LE Set PHY commands is
      supported, then enable the LE PHY Update Complete event.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      27bbca44
    • Marcel Holtmann's avatar
      Bluetooth: Enable LE Channel Selection Algorithm event · 9756d33b
      Marcel Holtmann authored
      If the Channel Selection Algorithm #2 feature is supported, then enable
      the new LE Channel Selection Algorithm event.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      9756d33b
    • Marcel Holtmann's avatar
      Bluetooth: Set LE Suggested Default Data Length to maximum · 12204875
      Marcel Holtmann authored
      When LE Data Packet Length Extension is supported, then actually
      increase the suggested default data length to the maximum to enable
      higher througput.
      
      < HCI Command: LE Read Maximum Data Length (0x08|0x002f) plen 0
      > HCI Event: Command Complete (0x0e) plen 12
            LE Read Maximum Data Length (0x08|0x002f) ncmd 1
              Status: Success (0x00)
              Max TX octets: 251
              Max TX time: 2120
              Max RX octets: 251
              Max RX time: 2120
      
      < HCI Command: LE Read Suggested Default Data Length (0x08|0x0023) plen 0
      > HCI Event: Command Complete (0x0e) plen 8
            LE Read Suggested Default Data Length (0x08|0x0023) ncmd 1
              Status: Success (0x00)
              TX octets: 27
              TX time: 328
      
      < HCI Command: LE Write Suggested Default Data Length (0x08|0x0024) plen 4
              TX octets: 251
              TX time: 2120
      > HCI Event: Command Complete (0x0e) plen 4
            LE Write Suggested Default Data Length (0x08|0x0024) ncmd 1
              Status: Success (0x00)
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      12204875
    • Tedd Ho-Jeong An's avatar
      Bluetooth: Add support for Intel Bluetooth device 9460/9560 [8087:0aaa] · 86a6129a
      Tedd Ho-Jeong An authored
      This patch adds support for Intel Bluetooth device 9460/9560 also known
      as Jefferson Peak (JfP). The firmware downloading mechanism is same as
      previous generation. So include the new USB product identifier and
      whitelist the hardware variant.
      
      T:  Bus=01 Lev=01 Prnt=01 Port=09 Cnt=04 Dev#=  5 Spd=12   MxCh= 0
      D:  Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=8087 ProdID=0aaa Rev= 0.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
      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
      
      Bootloader version:
      < HCI Command: Intel Read Version (0x3f|0x0005) plen 0
      > HCI Event: Command Complete (0x0e) plen 13
            Intel Read Version (0x3f|0x0005) ncmd 32
              Status: Success (0x00)
              Hardware platform: 0x37
              Hardware variant: 0x11
              Hardware revision: 0.0
              Firmware variant: 0x06
              Firmware revision: 0.1
              Firmware build: 42-52.2015
              Firmware patch: 0
      Signed-off-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      86a6129a
  5. 17 May, 2017 25 commits