1. 06 Jul, 2018 12 commits
    • Jaganath Kanakkassery's avatar
      Bluetooth: Process extended ADV report event · c215e939
      Jaganath Kanakkassery authored
      This patch enables Extended ADV report event if extended scanning
      is supported in the controller and process the same.
      
      The new features are not handled and for now its as good as
      legacy ADV report.
      
      > HCI Event: LE Meta Event (0x3e) plen 53
            LE Extended Advertising Report (0x0d)
              Num reports: 1
              Entry 0
                Event type: 0x0013
                  Props: 0x0013
                    Connectable
                    Scannable
                    Use legacy advertising PDUs
                  Data status: Complete
                Legacy PDU Type: ADV_IND (0x0013)
                Address type: Random (0x01)
                Address: DB:7E:2E:1A:85:E8 (Static)
                Primary PHY: LE 1M
                Secondary PHY: LE 1M
                SID: 0x00
                TX power: 0 dBm
                RSSI: -90 dBm (0xa6)
                Periodic advertising invteral: 0.00 msec (0x0000)
                Direct address type: Public (0x00)
                Direct address: 00:00:00:00:00:00 (OUI 00-00-00)
                Data length: 0x1b
              0f 09 44 65 73 69 67 6e 65 72 20 4d 6f 75 73 65  ..Designer Mouse
              03 19 c2 03 02 01 05 03 03 12 18                 ...........
      Signed-off-by: default avatarJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      c215e939
    • Jaganath Kanakkassery's avatar
      Bluetooth: Use extended scanning if controller supports · a2344b9e
      Jaganath Kanakkassery authored
      This implements Set extended scan param and set extended scan enable
      commands and use it for start LE scan based on controller support.
      
      The new features added in these commands are setting of new PHY for
      scanning and setting of scan duration. Both features are disabled
      for now, meaning only 1M PHY is set and scan duration is set to 0
      which means that scanning will be done untill scan disable is called.
      
      < HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 8
              Own address type: Random (0x01)
              Filter policy: Accept all advertisement (0x00)
              PHYs: 0x01
              Entry 0: LE 1M
                Type: Active (0x01)
                Interval: 11.250 msec (0x0012)
                Window: 11.250 msec (0x0012)
      > HCI Event: Command Complete (0x0e) plen 4
            LE Set Extended Scan Parameters (0x08|0x0041) ncmd 1
              Status: Success (0x00)
      < HCI Command: LE Set Extended Scan Enable (0x08|0x0042) plen 6
              Extended scan: Enabled (0x01)
              Filter duplicates: Enabled (0x01)
              Duration: 0 msec (0x0000)
              Period: 0.00 sec (0x0000)
      > HCI Event: Command Complete (0x0e) plen 4
            LE Set Extended Scan Enable (0x08|0x0042) ncmd 2
              Status: Success (0x00)
      Signed-off-by: default avatarJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      a2344b9e
    • Jaganath Kanakkassery's avatar
      Bluetooth: Introduce helpers for LE set scan start and complete · 3baef810
      Jaganath Kanakkassery authored
      Introduce a helper hci_req_start_scan() which starts an LE
      scan and call it from passive_Scan() and active_scan().
      There is not functionality change in this patch.
      
      This is basically done to enable extended scanning if the
      controller supports which will be done in the subsequent
      patch
      Signed-off-by: default avatarJaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      3baef810
    • Corentin Labbe's avatar
      Bluetooth: remove unused bt-nokia-h4p.h header · 1b0707a7
      Corentin Labbe authored
      Nothing in tree use this header which seems a remains of a staging
      driver.
      This patch remove it.
      Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
      Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      1b0707a7
    • Ankit Navik's avatar
      Bluetooth: Add HCI command for clear Resolv list · 545f2596
      Ankit Navik authored
      Check for Resolv list supported by controller. So check the supported
      commmand first before issuing this command i.e.,HCI_OP_LE_CLEAR_RESOLV_LIST
      
      Before patch:
      < HCI Command: LE Read White List... (0x08|0x000f) plen 0  #55 [hci0] 13.338168
      > HCI Event: Command Complete (0x0e) plen 5                #56 [hci0] 13.338842
            LE Read White List Size (0x08|0x000f) ncmd 1
              Status: Success (0x00)
              Size: 25
      < HCI Command: LE Clear White List (0x08|0x0010) plen 0    #57 [hci0] 13.339029
      > HCI Event: Command Complete (0x0e) plen 4                #58 [hci0] 13.339939
            LE Clear White List (0x08|0x0010) ncmd 1
              Status: Success (0x00)
      < HCI Command: LE Read Resolving L.. (0x08|0x002a) plen 0  #59 [hci0] 13.340152
      > HCI Event: Command Complete (0x0e) plen 5                #60 [hci0] 13.340952
            LE Read Resolving List Size (0x08|0x002a) ncmd 1
              Status: Success (0x00)
              Size: 25
      < HCI Command: LE Read Maximum Dat.. (0x08|0x002f) plen 0  #61 [hci0] 13.341180
      > HCI Event: Command Complete (0x0e) plen 12               #62 [hci0] 13.341898
            LE Read Maximum Data Length (0x08|0x002f) ncmd 1
              Status: Success (0x00)
              Max TX octets: 251
              Max TX time: 17040
              Max RX octets: 251
              Max RX time: 17040
      
      After patch:
      < HCI Command: LE Read White List... (0x08|0x000f) plen 0  #55 [hci0] 28.919131
      > HCI Event: Command Complete (0x0e) plen 5                #56 [hci0] 28.920016
            LE Read White List Size (0x08|0x000f) ncmd 1
              Status: Success (0x00)
              Size: 25
      < HCI Command: LE Clear White List (0x08|0x0010) plen 0    #57 [hci0] 28.920164
      > HCI Event: Command Complete (0x0e) plen 4                #58 [hci0] 28.920873
            LE Clear White List (0x08|0x0010) ncmd 1
              Status: Success (0x00)
      < HCI Command: LE Read Resolving L.. (0x08|0x002a) plen 0  #59 [hci0] 28.921109
      > HCI Event: Command Complete (0x0e) plen 5                #60 [hci0] 28.922016
            LE Read Resolving List Size (0x08|0x002a) ncmd 1
              Status: Success (0x00)
              Size: 25
      < HCI Command: LE Clear Resolving... (0x08|0x0029) plen 0  #61 [hci0] 28.922166
      > HCI Event: Command Complete (0x0e) plen 4                #62 [hci0] 28.922872
            LE Clear Resolving List (0x08|0x0029) ncmd 1
              Status: Success (0x00)
      < HCI Command: LE Read Maximum Dat.. (0x08|0x002f) plen 0  #63 [hci0] 28.923117
      > HCI Event: Command Complete (0x0e) plen 12               #64 [hci0] 28.924030
            LE Read Maximum Data Length (0x08|0x002f) ncmd 1
              Status: Success (0x00)
              Max TX octets: 251
              Max TX time: 17040
              Max RX octets: 251
              Max RX time: 17040
      Signed-off-by: default avatarAnkit Navik <ankit.p.navik@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      545f2596
    • Ankit Navik's avatar
      Bluetooth: Store Resolv list size · cfdb0c2d
      Ankit Navik authored
      When the controller supports the Read LE Resolv List size feature, the
      maximum list size are read and now stored.
      
      Before patch:
      < HCI Command: LE Read White List... (0x08|0x000f) plen 0  #55 [hci0] 17.979791
      > HCI Event: Command Complete (0x0e) plen 5                #56 [hci0] 17.980629
            LE Read White List Size (0x08|0x000f) ncmd 1
              Status: Success (0x00)
              Size: 25
      < HCI Command: LE Clear White List (0x08|0x0010) plen 0    #57 [hci0] 17.980786
      > HCI Event: Command Complete (0x0e) plen 4                #58 [hci0] 17.981627
            LE Clear White List (0x08|0x0010) ncmd 1
              Status: Success (0x00)
      < HCI Command: LE Read Maximum Dat.. (0x08|0x002f) plen 0  #59 [hci0] 17.981786
      > HCI Event: Command Complete (0x0e) plen 12               #60 [hci0] 17.982636
            LE Read Maximum Data Length (0x08|0x002f) ncmd 1
              Status: Success (0x00)
              Max TX octets: 251
              Max TX time: 17040
              Max RX octets: 251
              Max RX time: 17040
      
      After patch:
      < HCI Command: LE Read White List... (0x08|0x000f) plen 0  #55 [hci0] 13.338168
      > HCI Event: Command Complete (0x0e) plen 5                #56 [hci0] 13.338842
            LE Read White List Size (0x08|0x000f) ncmd 1
              Status: Success (0x00)
              Size: 25
      < HCI Command: LE Clear White List (0x08|0x0010) plen 0    #57 [hci0] 13.339029
      > HCI Event: Command Complete (0x0e) plen 4                #58 [hci0] 13.339939
            LE Clear White List (0x08|0x0010) ncmd 1
              Status: Success (0x00)
      < HCI Command: LE Read Resolving L.. (0x08|0x002a) plen 0  #59 [hci0] 13.340152
      > HCI Event: Command Complete (0x0e) plen 5                #60 [hci0] 13.340952
            LE Read Resolving List Size (0x08|0x002a) ncmd 1
              Status: Success (0x00)
              Size: 25
      < HCI Command: LE Read Maximum Dat.. (0x08|0x002f) plen 0  #61 [hci0] 13.341180
      > HCI Event: Command Complete (0x0e) plen 12               #62 [hci0] 13.341898
            LE Read Maximum Data Length (0x08|0x002f) ncmd 1
              Status: Success (0x00)
              Max TX octets: 251
              Max TX time: 17040
              Max RX octets: 251
              Max RX time: 17040
      Signed-off-by: default avatarAnkit Navik <ankit.p.navik@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      cfdb0c2d
    • Sebastian Andrzej Siewior's avatar
      Bluetooth: btusb: use irqsave() in URB's complete callback · a5e50d5b
      Sebastian Andrzej Siewior authored
      The USB completion callback does not disable interrupts while acquiring
      the ->lock. We want to remove the local_irq_disable() invocation from
      __usb_hcd_giveback_urb() and therefore it is required for the callback
      handler to disable the interrupts while acquiring the lock.
      The callback may be invoked either in IRQ or BH context depending on the
      USB host controller.
      Use the _irqsave variant of the locking primitives.
      
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: Johan Hedberg <johan.hedberg@gmail.com>
      Cc: linux-bluetooth@vger.kernel.org
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      a5e50d5b
    • Jian-Hong Pan's avatar
      Bluetooth: Add a new Realtek 8723DE ID 0bda:b009 · 45ae68b8
      Jian-Hong Pan authored
      Without this patch we cannot turn on the Bluethooth adapter on HP
      14-bs007la.
      
      T:  Bus=01 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#=  4 Spd=12   MxCh= 0
      D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=0bda ProdID=b009 Rev= 2.00
      S:  Manufacturer=Realtek
      S:  Product=802.11n WLAN Adapter
      S:  SerialNumber=00e04c000001
      C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=81(I) Atr=03(Int.) MxPS=  16 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
      Signed-off-by: default avatarJian-Hong Pan <jian-hong@endlessm.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      45ae68b8
    • Michael Scott's avatar
      6lowpan: iphc: reset mac_header after decompress to fix panic · 03bc05e1
      Michael Scott authored
      After decompression of 6lowpan socket data, an IPv6 header is inserted
      before the existing socket payload.  After this, we reset the
      network_header value of the skb to account for the difference in payload
      size from prior to decompression + the addition of the IPv6 header.
      
      However, we fail to reset the mac_header value.
      
      Leaving the mac_header value untouched here, can cause a calculation
      error in net/packet/af_packet.c packet_rcv() function when an
      AF_PACKET socket is opened in SOCK_RAW mode for use on a 6lowpan
      interface.
      
      On line 2088, the data pointer is moved backward by the value returned
      from skb_mac_header().  If skb->data is adjusted so that it is before
      the skb->head pointer (which can happen when an old value of mac_header
      is left in place) the kernel generates a panic in net/core/skbuff.c
      line 1717.
      
      This panic can be generated by BLE 6lowpan interfaces (such as bt0) and
      802.15.4 interfaces (such as lowpan0) as they both use the same 6lowpan
      sources for compression and decompression.
      Signed-off-by: default avatarMichael Scott <michael@opensourcefoundries.com>
      Acked-by: default avatarAlexander Aring <aring@mojatatu.com>
      Acked-by: default avatarJukka Rissanen <jukka.rissanen@linux.intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      03bc05e1
    • David S. Miller's avatar
      Merge branch 'IP-listification-follow-ups' · ab8565af
      David S. Miller authored
      Edward Cree says:
      
      ====================
      IP listification follow-ups
      
      While working on IPv6 list processing, I found another bug in the IPv4
       version.  So this patch series has that fix, and the IPv6 version with
       both fixes incorporated.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ab8565af
    • Edward Cree's avatar
      net: ipv6: listify ipv6_rcv() and ip6_rcv_finish() · d8269e2c
      Edward Cree authored
      Essentially the same as the ipv4 equivalents.
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d8269e2c
    • Edward Cree's avatar
      net: ipv4: fix list processing on L3 slave devices · efe6aaca
      Edward Cree authored
      If we have an L3 master device, l3mdev_ip_rcv() will steal the skb, but
       we were returning NET_RX_SUCCESS from ip_rcv_finish_core() which meant
       that ip_list_rcv_finish() would keep it on the list.  Instead let's
       move the l3mdev_ip_rcv() call into the caller, so that our response to
       a steal can be different in the single packet path (return
       NET_RX_SUCCESS) and the list path (forget this packet and continue).
      
      Fixes: 5fa12739 ("net: ipv4: listify ip_rcv_finish")
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      efe6aaca
  2. 05 Jul, 2018 28 commits