1. 22 Jul, 2022 38 commits
    • Zijun Hu's avatar
      Bluetooth: btusb: Remove HCI_QUIRK_BROKEN_ERR_DATA_REPORTING for QCA · 1172c59f
      Zijun Hu authored
      Core driver addtionally checks LMP feature bit "Erroneous Data Reporting"
      instead of quirk HCI_QUIRK_BROKEN_ERR_DATA_REPORTING to decide if HCI
      commands HCI_Read|Write_Default_Erroneous_Data_Reporting are broken, so
      remove this unnecessary quirk for QCA controllers.
      
      The reason why these two HCI commands are broken for QCA controllers is
      that feature "Erroneous Data Reporting" is not enabled by their firmware
      as shown by below log:
      
      @ RAW Open: hcitool (privileged) version 2.22
      < HCI Command: Read Local Supported Commands (0x04|0x0002) plen 0
      > HCI Event: Command Complete (0x0e) plen 68
        Read Local Supported Commands (0x04|0x0002) ncmd 1
          Status: Success (0x00)
          Commands: 288 entries
      ......
            Read Default Erroneous Data Reporting (Octet 18 - Bit 2)
            Write Default Erroneous Data Reporting (Octet 18 - Bit 3)
      ......
      
      < HCI Command: Read Default Erroneous Data Reporting (0x03|0x005a) plen 0
      > HCI Event: Command Complete (0x0e) plen 4
        Read Default Erroneous Data Reporting (0x03|0x005a) ncmd 1
          Status: Unknown HCI Command (0x01)
      
      < HCI Command: Read Local Supported Features (0x04|0x0003) plen 0
      > HCI Event: Command Complete (0x0e) plen 12
        Read Local Supported Features (0x04|0x0003) ncmd 1
          Status: Success (0x00)
          Features: 0xff 0xfe 0x0f 0xfe 0xd8 0x3f 0x5b 0x87
            3 slot packets
      ......
      Signed-off-by: default avatarZijun Hu <quic_zijuhu@quicinc.com>
      Tested-by: default avatarZijun Hu <quic_zijuhu@quicinc.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      1172c59f
    • Zijun Hu's avatar
      Bluetooth: hci_sync: Check LMP feature bit instead of quirk · 766ae242
      Zijun Hu authored
      BT core driver should addtionally check LMP feature bit
      "Erroneous Data Reporting" instead of quirk
      HCI_QUIRK_BROKEN_ERR_DATA_REPORTING set by BT device driver to decide if
      HCI commands HCI_Read|Write_Default_Erroneous_Data_Reporting are broken.
      
      BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 2, Part C | page 587
      This feature indicates whether the device is able to support the
      Packet_Status_Flag and the HCI commands HCI_Write_Default_-
      Erroneous_Data_Reporting and HCI_Read_Default_Erroneous_-
      Data_Reporting.
      
      the quirk was introduced by 'commit cde1a8a9 ("Bluetooth: btusb: Fix
      and detect most of the Chinese Bluetooth controllers")' to mark HCI
      commands HCI_Read|Write_Default_Erroneous_Data_Reporting broken by BT
      device driver, but the reason why these two HCI commands are broken is
      that feature "Erroneous Data Reporting" is not enabled by firmware, this
      scenario is illustrated by below log of QCA controllers with USB I/F:
      
      @ RAW Open: hcitool (privileged) version 2.22
      < HCI Command: Read Local Supported Commands (0x04|0x0002) plen 0
      > HCI Event: Command Complete (0x0e) plen 68
            Read Local Supported Commands (0x04|0x0002) ncmd 1
              Status: Success (0x00)
              Commands: 288 entries
      ......
                Read Default Erroneous Data Reporting (Octet 18 - Bit 2)
                Write Default Erroneous Data Reporting (Octet 18 - Bit 3)
      ......
      
      < HCI Command: Read Default Erroneous Data Reporting (0x03|0x005a) plen 0
      > HCI Event: Command Complete (0x0e) plen 4
            Read Default Erroneous Data Reporting (0x03|0x005a) ncmd 1
              Status: Unknown HCI Command (0x01)
      
      < HCI Command: Read Local Supported Features (0x04|0x0003) plen 0
      > HCI Event: Command Complete (0x0e) plen 12
            Read Local Supported Features (0x04|0x0003) ncmd 1
              Status: Success (0x00)
              Features: 0xff 0xfe 0x0f 0xfe 0xd8 0x3f 0x5b 0x87
                3 slot packets
      ......
      Signed-off-by: default avatarZijun Hu <quic_zijuhu@quicinc.com>
      Tested-by: default avatarZijun Hu <quic_zijuhu@quicinc.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      766ae242
    • Zijun Hu's avatar
      Bluetooth: hci_sync: Correct hci_set_event_mask_page_2_sync() event mask · 0feb8af0
      Zijun Hu authored
      Event HCI_Truncated_Page_Complete should belong to central
      and HCI_Peripheral_Page_Response_Timeout should belong to
      peripheral, but hci_set_event_mask_page_2_sync() take these
      two events for wrong roles, so correct it by this change.
      Signed-off-by: default avatarZijun Hu <quic_zijuhu@quicinc.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      0feb8af0
    • He Wang's avatar
      Bluetooth: btusb: Add a new VID/PID 0489/e0e2 for MT7922 · 57117d72
      He Wang authored
      Add VID/PID 0489:e0e2 for MediaTek MT7922 Bluetooth chip. Found and
      tested with Asus UM5302TA.
      
      From /sys/kernel/debug/usb/devices:
      
      T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
      D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=0489 ProdID=e0e2 Rev= 1.00
      S:  Manufacturer=MediaTek Inc.
      S:  Product=Wireless_Device
      S:  SerialNumber=000000000
      C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA
      A:  FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01
      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=125us
      E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=03(O) 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=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=03(O) 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=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=03(O) 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=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E:  Ad=03(O) 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=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E:  Ad=03(O) 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=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E:  Ad=03(O) 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=83(I) Atr=01(Isoc) MxPS=  63 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  63 Ivl=1ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
      E:  Ad=8a(I) Atr=03(Int.) MxPS=  64 Ivl=125us
      E:  Ad=0a(O) Atr=03(Int.) MxPS=  64 Ivl=125us
      I:  If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
      E:  Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us
      E:  Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us
      Signed-off-by: default avatarHe Wang <xw897002528@gmail.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      57117d72
    • Yuri D'Elia's avatar
      Bluetooth: btusb: Set HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN for MTK · e11523e9
      Yuri D'Elia authored
      This sets HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN for MTK controllers
      since SCO appear to not work when using HCI_OP_ENHANCED_SETUP_SYNC_CONN.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=215576Signed-off-by: default avatarYuri D'Elia <wavexx@thregr.org>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      e11523e9
    • Hakan Jansson's avatar
      Bluetooth: hci_bcm: Increase host baudrate for CYW55572 in autobaud mode · 46459cb6
      Hakan Jansson authored
      Add device specific data for max baudrate in autobaud mode. This allows the
      host to use a baudrate higher than "init speed" when loading FW in autobaud
      mode.
      
      The device specific max baudrate in autobaud mode for CYW55572 is set to
      921600 bps. Devices without device specific max baudrate in autobaud mode
      will use init speed as before. If no device specific init speed has been
      specified, it will default to the bcm_proto default 115200 bps.
      
      The increased baud rate improves FW load time. The exact load time will
      depend on the specific system and FW being used. As a rough indication,
      the FW load time dropped from ~9s @ 115.2kbps to ~1.7s @ 921.6kbps in one
      test.
      Signed-off-by: default avatarHakan Jansson <hakan.jansson@infineon.com>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      46459cb6
    • Hakan Jansson's avatar
      Bluetooth: hci_bcm: Prevent early baudrate setting in autobaud mode · 9baee415
      Hakan Jansson authored
      Always prevent trying to set device baudrate before calling setup() when
      using autobaud mode.
      
      This was previously happening for devices which had device specific data
      with member no_early_set_baudrate set to 0.
      Signed-off-by: default avatarHakan Jansson <hakan.jansson@infineon.com>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      9baee415
    • Hakan Jansson's avatar
      Bluetooth: hci_bcm: Add DT compatible for CYW55572 · f8cad620
      Hakan Jansson authored
      CYW55572 is a Wi-Fi + Bluetooth combo device from Infineon.
      Signed-off-by: default avatarHakan Jansson <hakan.jansson@infineon.com>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      f8cad620
    • Hakan Jansson's avatar
      dt-bindings: net: broadcom-bluetooth: Add conditional constraints · c8ce6490
      Hakan Jansson authored
      Add conditional constraint to make property "reset-gpios" available only
      for compatible devices acually having the reset pin.
      
      Make property "brcm,requires-autobaud-mode" depend on property
      "shutdown-gpios" as the shutdown pin is required to enter autobaud mode.
      
      I looked at all compatible devices and compiled the matrix below before
      formulating the conditional constraint. This was a pure paper exercise and
      no verification testing has been performed.
      
                                      d
                                      e
                                      v h
                                      i o
                                      c s
                                  s   e t
                                  h   - -
                                  u   w w       v
                                  t r a a     v d
                                  d e k k     b d
                                  o s e e     a i
                                  w e u u     t o
                                  n t p p     - -
                                  - - - -     s s
                                  g g g g     u u
                                  p p p p t   p p
                                  i i i i x l p p
                                  o o o o c p l l
                                  s s s s o o y y
          ---------------------------------------
          brcm,bcm20702a1         X X X X X X X X
          brcm,bcm4329-bt         X X X X X X X X
          brcm,bcm4330-bt         X X X X X X X X
          brcm,bcm4334-bt         X - X X X X X X
          brcm,bcm43438-bt        X - X X X X X X
          brcm,bcm4345c5          X - X X X X X X
          brcm,bcm43540-bt        X - X X X X X X
          brcm,bcm4335a0          X - X X X X X X
          brcm,bcm4349-bt         X - X X X X X X
          infineon,cyw55572-bt    X - X X X X X X
      Signed-off-by: default avatarHakan Jansson <hakan.jansson@infineon.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      c8ce6490
    • Hakan Jansson's avatar
      dt-bindings: net: broadcom-bluetooth: Add CYW55572 DT binding · cba6164f
      Hakan Jansson authored
      CYW55572 is a Wi-Fi + Bluetooth combo device from Infineon.
      Extend the binding with its DT compatible.
      Signed-off-by: default avatarHakan Jansson <hakan.jansson@infineon.com>
      Acked-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      cba6164f
    • Dan Carpenter's avatar
      Bluetooth: clean up error pointer checking · 6f43f616
      Dan Carpenter authored
      The bt_skb_sendmsg() function can't return NULL so there is no need to
      check for that.  Several of these checks were removed previously but
      this one was missed.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      6f43f616
    • Hilda Wu's avatar
      Bluetooth: btusb: Add Realtek RTL8852C support ID 0x13D3:0x3586 · 6ad353df
      Hilda Wu authored
      Add the support ID(0x13D3, 0x3586) to usb_device_id table for
      Realtek RTL8852C.
      
      The device info from /sys/kernel/debug/usb/devices as below.
      
      T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
      D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=13d3 ProdID=3586 Rev= 0.00
      S:  Manufacturer=Realtek
      S:  Product=Bluetooth Radio
      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 avatarHilda Wu <hildawu@realtek.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      6ad353df
    • Hilda Wu's avatar
      Bluetooth: btusb: Add Realtek RTL8852C support ID 0x13D3:0x3587 · 8f0054dd
      Hilda Wu authored
      Add the support ID(0x13D3, 0x3587) to usb_device_id table for
      Realtek RTL8852C.
      
      The device info from /sys/kernel/debug/usb/devices as below.
      
      T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
      D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=13d3 ProdID=3587 Rev= 0.00
      S:  Manufacturer=Realtek
      S:  Product=Bluetooth Radio
      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 avatarHilda Wu <hildawu@realtek.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      8f0054dd
    • Hilda Wu's avatar
      Bluetooth: btusb: Add Realtek RTL8852C support ID 0x0CB8:0xC558 · 5b75ee37
      Hilda Wu authored
      Add the support ID(0x0CB8, 0xC558) to usb_device_id table for
      Realtek RTL8852C.
      
      The device info from /sys/kernel/debug/usb/devices as below.
      
      T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
      D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=0cb8 ProdID=c558 Rev= 0.00
      S:  Manufacturer=Realtek
      S:  Product=Bluetooth Radio
      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 avatarHilda Wu <hildawu@realtek.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      5b75ee37
    • Hilda Wu's avatar
      Bluetooth: btusb: Add Realtek RTL8852C support ID 0x04C5:0x1675 · 893fa8bc
      Hilda Wu authored
      Add the support ID(0x04c5, 0x1675) to usb_device_id table for
      Realtek RTL8852C.
      
      The device info from /sys/kernel/debug/usb/devices as below.
      
      T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
      D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=04c5 ProdID=1675 Rev= 0.00
      S:  Manufacturer=Realtek
      S:  Product=Bluetooth Radio
      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 avatarHilda Wu <hildawu@realtek.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      893fa8bc
    • Hilda Wu's avatar
      Bluetooth: btusb: Add Realtek RTL8852C support ID 0x04CA:0x4007 · c379c96c
      Hilda Wu authored
      Add the support ID(0x04CA, 0x4007) to usb_device_id table for
      Realtek RTL8852C.
      
      The device info from /sys/kernel/debug/usb/devices as below.
      
      T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
      D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=04ca ProdID=4007 Rev= 0.00
      S:  Manufacturer=Realtek
      S:  Product=Bluetooth Radio
      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 avatarHilda Wu <hildawu@realtek.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      c379c96c
    • Ying Hsu's avatar
      Bluetooth: Add default wakeup callback for HCI UART driver · bee5395c
      Ying Hsu authored
      Bluetooth HCI devices indicate if they are able to wakeup in the wakeup
      callback since 'commit 4539ca67 ("Bluetooth: Rename driver
      .prevent_wake to .wakeup")'. This patch adds a default wakeup callback
      for Bluetooth HCI UAR devices. It assumes Bluetooth HCI UART devices are
      wakeable for backward compatibility. For those who need a customized
      behavior, one can override it before calling hci_uart_register_device().
      
      Fixes: 4539ca67 ("Bluetooth: Rename driver .prevent_wake to .wakeup")
      Signed-off-by: default avatarYing Hsu <yinghsu@chromium.org>
      Reviewed-by: default avatarAlain Michaud <alainm@chromium.org>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      bee5395c
    • Luiz Augusto von Dentz's avatar
      Bluetooth: hci_sync: Don't remove connected devices from accept list · 6828b583
      Luiz Augusto von Dentz authored
      These devices are likely going to be reprogrammed when disconnected so
      this avoid a whole bunch of commands attempt to remove and the add back
      to the list.
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      Tested-by: default avatarZhengping Jiang <jiangzp@google.com>
      6828b583
    • Luiz Augusto von Dentz's avatar
      Bluetooth: hci_sync: Fix not updating privacy_mode · 0900b1c6
      Luiz Augusto von Dentz authored
      When programming a new entry into the resolving list it shall default
      to network mode since the params may contain the mode programmed when
      the device was last added to the resolving list.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=209745
      Fixes: 853b70b5 ("Bluetooth: hci_sync: Set Privacy Mode when updating the resolving list")
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      Tested-by: default avatarZhengping Jiang <jiangzp@google.com>
      0900b1c6
    • Tamas Koczka's avatar
      Bluetooth: Collect kcov coverage from hci_rx_work · 9f30de9e
      Tamas Koczka authored
      Annotate hci_rx_work() with kcov_remote_start() and kcov_remote_stop()
      calls, so remote KCOV coverage is collected while processing the rx_q
      queue which is the main incoming Bluetooth packet queue.
      
      Coverage is associated with the thread which created the packet skb.
      
      The collected extra coverage helps kernel fuzzing efforts in finding
      vulnerabilities.
      
      This change only has effect if the kernel is compiled with CONFIG_KCOV,
      otherwise kcov_ functions don't do anything.
      Signed-off-by: default avatarTamas Koczka <poprdi@google.com>
      Tested-by: default avatarAleksandr Nogikh <nogikh@google.com>
      Reviewed-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      9f30de9e
    • Zhengping Jiang's avatar
      Bluetooth: hci_sync: Fix resuming scan after suspend resume · 68253f3c
      Zhengping Jiang authored
      After resuming, remove setting scanning_paused to false, because it is
      checked and set to false in hci_resume_scan_sync. Also move setting
      the value to false before updating passive scan, because the value is
      used when resuming passive scan.
      
      Fixes: 3b420553 (Bluetooth: hci_sync: Fix attempting to suspend with
      unfiltered passive scan)
      Signed-off-by: default avatarZhengping Jiang <jiangzp@google.com>
      Reviewed-by: default avatarAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      68253f3c
    • Sean Wang's avatar
      Bluetooth: btmtksdio: Add in-band wakeup support · df332800
      Sean Wang authored
      Commit ce64b3e9 ("Bluetooth: mt7921s: Support wake on bluetooth")
      adds the wake on bluethooth via a dedicated GPIO.
      
      Extend the wake-on-bluetooth to use the SDIO DAT1 pin (in-band wakeup),
      when supported by the SDIO host driver.
      Co-developed-by: default avatarYake Yang <yake.yang@mediatek.com>
      Signed-off-by: default avatarYake Yang <yake.yang@mediatek.com>
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      df332800
    • Zhengping Jiang's avatar
      Bluetooth: mgmt: Fix refresh cached connection info · d7b2fdfb
      Zhengping Jiang authored
      Set the connection data before calling get_conn_info_sync, so it can be
      verified the connection is still connected, before refreshing cached
      values.
      
      Fixes: 47db6b42 ("Bluetooth: hci_sync: Convert MGMT_OP_GET_CONN_INFO")
      Signed-off-by: default avatarZhengping Jiang <jiangzp@google.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      d7b2fdfb
    • Luiz Augusto von Dentz's avatar
      Bluetooth: HCI: Fix not always setting Scan Response/Advertising Data · 34a718bc
      Luiz Augusto von Dentz authored
      The scan response and advertising data needs to be tracked on a per
      instance (adv_info) since when these instaces are removed so are their
      data, to fix that new flags are introduced which is used to mark when
      the data changes and then checked to confirm when the data needs to be
      synced with the controller.
      Tested-by: default avatarTedd Ho-Jeong An <tedd.an@intel.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      34a718bc
    • Luiz Augusto von Dentz's avatar
      Bluetooth: eir: Fix using strlen with hdev->{dev_name,short_name} · dd7b8cdd
      Luiz Augusto von Dentz authored
      Both dev_name and short_name are not guaranteed to be NULL terminated so
      this instead use strnlen and then attempt to determine if the resulting
      string needs to be truncated or not.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=216018Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      dd7b8cdd
    • Xiaohui Zhang's avatar
      Bluetooth: use memset avoid memory leaks · a5133fe8
      Xiaohui Zhang authored
      Similar to the handling of l2cap_ecred_connect in commit d3715b23
      ("Bluetooth: use memset avoid memory leaks"), we thought a patch
      might be needed here as well.
      
      Use memset to initialize structs to prevent memory leaks
      in l2cap_le_connect
      Signed-off-by: default avatarXiaohui Zhang <xiaohuizhang@ruc.edu.cn>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      a5133fe8
    • Dan Carpenter's avatar
      Bluetooth: fix an error code in hci_register_dev() · 91117864
      Dan Carpenter authored
      Preserve the error code from hci_register_suspend_notifier().  Don't
      return success.
      
      Fixes: d6bb2a91f95b ("Bluetooth: Unregister suspend with userchannel")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      91117864
    • Ahmad Fatoum's avatar
      Bluetooth: hci_bcm: Add BCM4349B1 variant · 4f17c2b6
      Ahmad Fatoum authored
      The BCM4349B1, aka CYW/BCM89359, is a WiFi+BT chip and its Bluetooth
      portion can be controlled over serial.
      
      Two subversions are added for the chip, because ROM firmware reports
      002.002.013 (at least for the chips I have here), while depending on
      patchram firmware revision, either 002.002.013 or 002.002.014 is
      reported.
      Signed-off-by: default avatarAhmad Fatoum <a.fatoum@pengutronix.de>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      4f17c2b6
    • Ahmad Fatoum's avatar
      dt-bindings: bluetooth: broadcom: Add BCM4349B1 DT binding · 88b65887
      Ahmad Fatoum authored
      The BCM4349B1, aka CYW/BCM89359, is a WiFi+BT chip and its Bluetooth
      portion can be controlled over serial.
      Extend the binding with its DT compatible.
      Acked-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarAhmad Fatoum <a.fatoum@pengutronix.de>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      88b65887
    • Abhishek Pandit-Subedi's avatar
      Bluetooth: Unregister suspend with userchannel · 359ee4f8
      Abhishek Pandit-Subedi authored
      When HCI_USERCHANNEL is used, unregister the suspend notifier when
      binding and register when releasing. The userchannel socket should be
      left alone after open is completed.
      Signed-off-by: default avatarAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      359ee4f8
    • Abhishek Pandit-Subedi's avatar
      Bluetooth: Fix index added after unregister · 0acef50b
      Abhishek Pandit-Subedi authored
      When a userchannel socket is released, we should check whether the hdev
      is already unregistered before sending out an IndexAdded.
      Signed-off-by: default avatarAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      0acef50b
    • Schspa Shi's avatar
      Bluetooth: When HCI work queue is drained, only queue chained work · 877afada
      Schspa Shi authored
      The HCI command, event, and data packet processing workqueue is drained
      to avoid deadlock in commit
      76727c02 ("Bluetooth: Call drain_workqueue() before resetting state").
      
      There is another delayed work, which will queue command to this drained
      workqueue. Which results in the following error report:
      
      Bluetooth: hci2: command 0x040f tx timeout
      WARNING: CPU: 1 PID: 18374 at kernel/workqueue.c:1438 __queue_work+0xdad/0x1140
      Workqueue: events hci_cmd_timeout
      RIP: 0010:__queue_work+0xdad/0x1140
      RSP: 0000:ffffc90002cffc60 EFLAGS: 00010093
      RAX: 0000000000000000 RBX: ffff8880b9d3ec00 RCX: 0000000000000000
      RDX: ffff888024ba0000 RSI: ffffffff814e048d RDI: ffff8880b9d3ec08
      RBP: 0000000000000008 R08: 0000000000000000 R09: 00000000b9d39700
      R10: ffffffff814f73c6 R11: 0000000000000000 R12: ffff88807cce4c60
      R13: 0000000000000000 R14: ffff8880796d8800 R15: ffff8880796d8800
      FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 000000c0174b4000 CR3: 000000007cae9000 CR4: 00000000003506e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
       <TASK>
       ? queue_work_on+0xcb/0x110
       ? lockdep_hardirqs_off+0x90/0xd0
       queue_work_on+0xee/0x110
       process_one_work+0x996/0x1610
       ? pwq_dec_nr_in_flight+0x2a0/0x2a0
       ? rwlock_bug.part.0+0x90/0x90
       ? _raw_spin_lock_irq+0x41/0x50
       worker_thread+0x665/0x1080
       ? process_one_work+0x1610/0x1610
       kthread+0x2e9/0x3a0
       ? kthread_complete_and_exit+0x40/0x40
       ret_from_fork+0x1f/0x30
       </TASK>
      
      To fix this, we can add a new HCI_DRAIN_WQ flag, and don't queue the
      timeout workqueue while command workqueue is draining.
      
      Fixes: 76727c02 ("Bluetooth: Call drain_workqueue() before resetting state")
      Reported-by: syzbot+63bed493aebbf6872647@syzkaller.appspotmail.com
      Signed-off-by: default avatarSchspa Shi <schspa@gmail.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      877afada
    • Jiasheng Jiang's avatar
      Bluetooth: hci_intel: Add check for platform_driver_register · ab2d2a98
      Jiasheng Jiang authored
      As platform_driver_register() could fail, it should be better
      to deal with the return value in order to maintain the code
      consisitency.
      
      Fixes: 1ab1f239 ("Bluetooth: hci_intel: Add support for platform driver")
      Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      ab2d2a98
    • Alain Michaud's avatar
      Bluetooth: clear the temporary linkkey in hci_conn_cleanup · 629f66aa
      Alain Michaud authored
      If a hardware error occurs and the connections are flushed without a
      disconnection_complete event being signaled, the temporary linkkeys are
      not flushed.
      
      This change ensures that any outstanding flushable linkkeys are flushed
      when the connection are flushed from the hash table.
      
      Additionally, this also makes use of test_and_clear_bit to avoid
      multiple attempts to delete the link key that's already been flushed.
      Signed-off-by: default avatarAlain Michaud <alainm@chromium.org>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      629f66aa
    • Hakan Jansson's avatar
      Bluetooth: hci_bcm: Add support for FW loading in autobaud mode · af35e28f
      Hakan Jansson authored
      Use the presence of a DT property, "brcm,requires-autobaud-mode", to enable
      startup in autobaud mode. If the property is present, the device is started
      in autobaud mode by asserting RTS (BT_UART_CTS_N) prior to powering on the
      device.
      
      Also prevent the use of unsupported commands for devices started in
      autobaud mode. Only a limited subset of HCI commands are supported in
      autobaud mode.
      
      Some devices (e.g. CYW5557x) require autobaud mode to enable FW loading.
      Autobaud mode can also be required on some boards where the controller
      device is using a non-standard baud rate in normal mode when first powered
      on.
      Signed-off-by: default avatarHakan Jansson <hakan.jansson@infineon.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      af35e28f
    • Hakan Jansson's avatar
      dt-bindings: net: broadcom-bluetooth: Add property for autobaud mode · 0b4de252
      Hakan Jansson authored
      Add property, "brcm,requires-autobaud-mode", to enable autobaud mode
      selection.
      
      Some devices (e.g. CYW5557x) require autobaud mode to enable FW loading.
      Autobaud mode can also be required on some boards where the controller
      device is using a non-standard baud rate when first powered on.
      Signed-off-by: default avatarHakan Jansson <hakan.jansson@infineon.com>
      Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      0b4de252
    • Sai Teja Aluvala's avatar
      Bluetooth: hci_qca: Return wakeup for qca_wakeup · bde63e9e
      Sai Teja Aluvala authored
      This fixes the return value of qca_wakeup(), since
      .wakeup work inversely with original .prevent_wake.
      
      Fixes: 4539ca67 (Bluetooth: Rename driver .prevent_wake to .wakeup)
      Signed-off-by: default avatarSai Teja Aluvala <quic_saluvala@quicinc.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      bde63e9e
    • Aaron Ma's avatar
      Bluetooth: btusb: Add support of IMC Networks PID 0x3568 · c69ecb0e
      Aaron Ma authored
      It is 13d3:3568 for MediaTek MT7922 USB Bluetooth chip.
      
      T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
      D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=13d3 ProdID=3568 Rev=01.00
      S:  Manufacturer=MediaTek Inc.
      S:  Product=Wireless_Device
      S:  SerialNumber=...
      C:  #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA
      I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=125us
      E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 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#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
      E:  Ad=0a(O) Atr=03(Int.) MxPS=  64 Ivl=125us
      E:  Ad=8a(I) Atr=03(Int.) MxPS=  64 Ivl=125us
      Signed-off-by: default avatarAaron Ma <aaron.ma@canonical.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      c69ecb0e
  2. 21 Jul, 2022 2 commits
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 6e0e846e
      Jakub Kicinski authored
      No conflicts.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6e0e846e
    • Linus Torvalds's avatar
      Merge tag 'net-5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 7ca433dc
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from can.
      
        Still no major regressions, most of the changes are still due to data
        races fixes, plus the usual bunch of drivers fixes.
      
        Previous releases - regressions:
      
         - tcp/udp: make early_demux back namespacified.
      
         - dsa: fix issues with vlan_filtering_is_global
      
        Previous releases - always broken:
      
         - ip: fix data-races around ipv4_net_table (round 2, 3 & 4)
      
         - amt: fix validation and synchronization bugs
      
         - can: fix detection of mcp251863
      
         - eth: iavf: fix handling of dummy receive descriptors
      
         - eth: lan966x: fix issues with MAC table
      
         - eth: stmmac: dwmac-mediatek: fix clock issue
      
        Misc:
      
         - dsa: update documentation"
      
      * tag 'net-5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (107 commits)
        mlxsw: spectrum_router: Fix IPv4 nexthop gateway indication
        net/sched: cls_api: Fix flow action initialization
        tcp: Fix data-races around sysctl_tcp_max_reordering.
        tcp: Fix a data-race around sysctl_tcp_abort_on_overflow.
        tcp: Fix a data-race around sysctl_tcp_rfc1337.
        tcp: Fix a data-race around sysctl_tcp_stdurg.
        tcp: Fix a data-race around sysctl_tcp_retrans_collapse.
        tcp: Fix data-races around sysctl_tcp_slow_start_after_idle.
        tcp: Fix a data-race around sysctl_tcp_thin_linear_timeouts.
        tcp: Fix data-races around sysctl_tcp_recovery.
        tcp: Fix a data-race around sysctl_tcp_early_retrans.
        tcp: Fix data-races around sysctl knobs related to SYN option.
        udp: Fix a data-race around sysctl_udp_l3mdev_accept.
        ip: Fix data-races around sysctl_ip_prot_sock.
        ipv4: Fix data-races around sysctl_fib_multipath_hash_fields.
        ipv4: Fix data-races around sysctl_fib_multipath_hash_policy.
        ipv4: Fix a data-race around sysctl_fib_multipath_use_neigh.
        can: rcar_canfd: Add missing of_node_put() in rcar_canfd_probe()
        can: mcp251xfd: fix detection of mcp251863
        Documentation: fix udp_wmem_min in ip-sysctl.rst
        ...
      7ca433dc