1. 04 Apr, 2013 5 commits
    • Chan-yeol Park's avatar
      Bluetooth: Fix H4 crash from incoming UART packets · c2578202
      Chan-yeol Park authored
      This patch adds a check HCI_UART_REGISTERED before reading UART data in
      the HCI UART H4 driver. UART data could arrive when inside the
      hci_uart_tty_ioctl function after calling test_and_set_bit for
      HCI_UART_PROTO_SET but before the hci_uart_set_proto function has
      returned.
      
      Backtrace:
      [<c05f27ec>] (hci_recv_stream_fragment+0x0/0x74) from [<c04126f4>] (h4_recv+0x18/0x40)
       r7:eb1d4d1c r6:eb7683b0 r5:eae8e800 r4:0000000c
      [<c04126dc>] (h4_recv+0x0/0x40) from [<c0411870>] (hci_uart_tty_receive+0x6c/0x94)
       r5:eae8e800 r4:eb768380
      [<c0411804>] (hci_uart_tty_receive+0x0/0x94) from [<c027be88>] (flush_to_ldisc+0x16c/0x17c)
       r6:eae8e8d8 r5:eae8e800 r4:eae8e8c8
      [<c027bd1c>] (flush_to_ldisc+0x0/0x17c) from [<c0050ae8>] (process_one_work+0x144/0x4d4)
      [<c00509a4>] (process_one_work+0x0/0x4d4) from [<c0051208>] (worker_thread+0x180/0x370)
      [<c0051088>] (worker_thread+0x0/0x370) from [<c005617c>] (kthread+0x90/0x9c)
      [<c00560ec>] (kthread+0x0/0x9c) from [<c003a3a0>] (do_exit+0x0/0x7ec)
      Signed-off-by: default avatarChan-yeol Park <chanyeol.park@samsung.com>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      c2578202
    • Andre Guedes's avatar
      Bluetooth: Remove unneeded hci_req_cmd_status function · d4299ce6
      Andre Guedes authored
      This patch removes the hci_req_cmd_status function since it is not
      used anymore. The HCI request framework now considers the HCI command
      has complete once the Command Status or Command Complete Event is
      received.
      Signed-off-by: default avatarAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      d4299ce6
    • Andre Guedes's avatar
      Bluetooth: Fix hci_inquiry ioctl usage · 3e13fa1e
      Andre Guedes authored
      Since the HCI request framework was properly fixed, the hci_req_sync
      call, in hci_inquiry, will return as soon as the HCI command completes
      (not the Inquiry procedure). However, in inquiry ioctl implementation,
      we want to sleep the user process until the inquiry procedure finishes.
      
      This patch changes hci_inquiry so, in case the HCI Inquiry command
      was executed successfully, it waits the HCI_INQUIRY flag to be cleared.
      This way, the user process will sleep until the inquiry procedure
      finishes.
      Signed-off-by: default avatarAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      3e13fa1e
    • Andre Guedes's avatar
      Bluetooth: Fix HCI request framework · 33720450
      Andre Guedes authored
      Some HCI commands don't send a Command Complete Event once the HCI
      command has completed so they require some special handling from the
      HCI request framework. These HCI commands, however, send a Command
      Status Event to indicate that the command has been received, and
      that the controller is currently performing the task for the command.
      
      So, in order to properly handle those HCI commands, the HCI request
      framework should consider the HCI command has completed once the
      Command Status Event is received.
      
      This way, we fix some issues regarding the Inquiry command support,
      as well as add support for all those HCI commands which would require
      some special handling from the HCI request framework.
      Signed-off-by: default avatarAndre Guedes <andre.guedes@openbossa.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      33720450
    • Noguchi Kazutosi's avatar
      Bluetooth: Add support for Foxconn/Hon Hai [0489:e04d] · 0fc110f4
      Noguchi Kazutosi authored
      Add support for the AR3012 chip.
      
      T:  Bus=01 Lev=02 Prnt=02 Port=05 Cnt=03 Dev#= 21 Spd=12  MxCh= 0
      D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=0489 ProdID=e04d Rev=00.02
      S:  Manufacturer=Atheros Communications
      S:  Product=Bluetooth USB Host Controller
      S:  SerialNumber=Alaska Day 2006
      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
      I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      Signed-off-by: default avatarNoguchi Kazutosi <linux@scaltinof.net>
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      0fc110f4
  2. 03 Apr, 2013 27 commits
  3. 01 Apr, 2013 8 commits