1. 05 Mar, 2022 15 commits
  2. 04 Mar, 2022 25 commits
    • Helmut Grohne's avatar
      Bluetooth: btusb: Add another Realtek 8761BU · 6dfbe29f
      Helmut Grohne authored
      This device is sometimes wrapped with a label "EDUP".
      
      T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=03 Dev#=107 Spd=12   MxCh= 0
      D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=2550 ProdID=8761 Rev= 2.00
      S:  Manufacturer=Realtek
      S:  Product=Bluetooth Radio
      S:  SerialNumber=00E04C239987
      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 avatarHelmut Grohne <helmut@subdivi.de>
      Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1955351Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      6dfbe29f
    • Luca Weiss's avatar
      Bluetooth: hci_bcm: add BCM43430A0 & BCM43430A1 · 01da346c
      Luca Weiss authored
      Add the compatible for BCM43430A0 bluetooth used in lg-lenok and
      BCM43430A1 used in asus-sparrow.
      Signed-off-by: default avatarLuca Weiss <luca@z3ntu.xyz>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      01da346c
    • Minghao Chi (CGEL ZTE)'s avatar
      Bluetooth: use memset avoid memory leaks · d3715b23
      Minghao Chi (CGEL ZTE) authored
      Use memset to initialize structs to prevent memory leaks
      in l2cap_ecred_connect
      Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
      Signed-off-by: default avatarMinghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      d3715b23
    • Yake Yang's avatar
      Bluetooth: btmtksdio: Fix kernel oops when sdio suspend. · eb3f0517
      Yake Yang authored
      Do not kfree the skb when the skb failed to send with __hci_cmd_sync
      
      2435.241210] Call trace:
      [ 2435.241224]  kfree_skb+0x20/0x140
      [ 2435.241240]  btmtksdio_sdio_wakeup+0x8c/0xcc
      [ 2435.241360]  hci_suspend_notifier+0x108/0x184
      [ 2435.241377]  notifier_call_chain_robust+0x58/0xd8
      [ 2435.241390]  blocking_notifier_call_chain_robust+0x54/0x84
      [ 2435.241402]  pm_notifier_call_chain_robust+0x2c/0x4c
      [ 2435.241414]  suspend_prepare+0x40/0x238
      [ 2435.241425]  enter_state+0xec/0x3a8
      [ 2435.241436]  pm_suspend+0x60/0xcc
      [ 2435.241446]  state_store+0xb8/0x114
      [ 2435.241460]  kobj_attr_store+0x18/0x2c
      [ 2435.241473]  sysfs_kf_write+0x44/0x58
      [ 2435.241486]  kernfs_fop_write_iter+0xf4/0x190
      [ 2435.241500]  vfs_write+0x2b0/0x2e4
      [ 2435.241511]  ksys_write+0x80/0xec
      [ 2435.241523]  __arm64_sys_write+0x24/0x30
      [ 2435.241538]  el0_svc_common+0xf0/0x1d8
      [ 2435.241550]  do_el0_svc_compat+0x28/0x54
      [ 2435.241564]  el0_svc_compat+0x10/0x1c
      [ 2435.241574]  el0_sync_compat_handler+0xa8/0xcc
      [ 2435.241586]  el0_sync_compat+0x188/0x1c0
      [ 2435.241606] Code: a9014ff4 910003fd b40002c0 aa0003f3 (b84d4c08)
      [ 2435.241619] ---[ end trace d496539b850baf14 ]---
      
      Fixes: ce64b3e9  ("Bluetooth: mt7921s: Support wake on bluetooth")
      Co-developed-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarYake Yang <yake.yang@mediatek.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      eb3f0517
    • Yake Yang's avatar
      Bluetooth: btusb: Add a new PID/VID 13d3/3567 for MT7921 · c5e25bb5
      Yake Yang authored
      Add VID 13D3 & PID 3567 for MediaTek MT7921 USB Bluetooth chip.
      
      The information in /sys/kernel/debug/usb/devices about the Bluetooth
      device is listed as the below.
      
      T:  Bus=05 Lev=01 Prnt=01 Port=00 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=3567 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=  64 Ivl=125us
      E:  Ad=0a(O) Atr=03(Int.) MxPS=  64 Ivl=125us
      Co-developed-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarYake Yang <yake.yang@mediatek.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      c5e25bb5
    • Niels Dossche's avatar
      Bluetooth: move adv_instance_cnt read within the device lock · 4bd80d7a
      Niels Dossche authored
      The field adv_instance_cnt is always accessed within a device lock,
      except in the function add_advertising. A concurrent remove of an
      advertisement with adding another one could result in the if check
      "if a new instance was actually added" to not trigger, resulting
      in not triggering the "advertising added event".
      Signed-off-by: default avatarNiels Dossche <niels.dossche@ugent.be>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      4bd80d7a
    • Niels Dossche's avatar
      Bluetooth: hci_event: Add missing locking on hdev in hci_le_ext_adv_term_evt · 728abc01
      Niels Dossche authored
      Both hci_find_adv_instance and hci_remove_adv_instance have a comment
      above their function definition saying that these two functions require
      the caller to hold the hdev->lock lock. However, hci_le_ext_adv_term_evt
      does not acquire that lock and neither does its caller hci_le_meta_evt
      (hci_le_meta_evt calls hci_le_ext_adv_term_evt via an indirect function
      call because of the lookup in hci_le_ev_table).
      
      The other event handlers all acquire and release the hdev->lock and they
      follow the rule that hci_find_adv_instance and hci_remove_adv_instance
      must be called while holding the hdev->lock lock.
      
      The solution is to make sure hci_le_ext_adv_term_evt also acquires and
      releases the hdev->lock lock. The check on ev->status which logs a
      warning and does an early return is not covered by the lock because
      other functions also access ev->status without holding the lock.
      Signed-off-by: default avatarNiels Dossche <niels.dossche@ugent.be>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      728abc01
    • Luiz Augusto von Dentz's avatar
      Bluetooth: btusb: Make use of of BIT macro to declare flags · f95fd5f3
      Luiz Augusto von Dentz authored
      This makes use of BIT macro when declaring BTUSB flags which makes it
      understand how many bits are in use and many are left.
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      f95fd5f3
    • Luiz Augusto von Dentz's avatar
      Bluetooth: Fix not checking for valid hdev on bt_dev_{info,warn,err,dbg} · 9b392e0e
      Luiz Augusto von Dentz authored
      This fixes attemting to print hdev->name directly which causes them to
      print an error:
      
      kernel: read_version:367: (efault): sock 000000006a3008f2
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      9b392e0e
    • Sean Wang's avatar
      Bluetooth: mediatek: fix the conflict between mtk and msft vendor event · e4412654
      Sean Wang authored
      There is a conflict between MediaTek wmt event and msft vendor extension
      logic in the core layer since 145373cb ("Bluetooth: Add framework for
      Microsoft vendor extension") was introduced because we changed the type of
      mediatek wmt event to the type of msft vendor event in the driver.
      
      But the purpose we reported mediatek event to the core layer is for the
      diagnostic purpose with that we are able to see the full packet trace via
      monitoring socket with btmon. Thus, it is harmless we keep the original
      type of mediatek vendor event here to avoid breaking the msft extension
      function especially they can be supported by Mediatek chipset like MT7921
      , MT7922 devices and future devices.
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      e4412654
    • Chih-Ying Chiang's avatar
      Bluetooth: mt7921s: support bluetooth reset mechanism · 8fafe702
      Chih-Ying Chiang authored
      Implement .cmd_timeout to reset the MT7921s device via a dedicated GPIO
      pin when the firmware hang or the command has no response.
      Co-developed-by: default avatarMark Chen <mark-yw.chen@mediatek.com>
      Signed-off-by: default avatarMark Chen <mark-yw.chen@mediatek.com>
      Co-developed-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarChih-Ying Chiang <chih-yin.chiang@mediatek.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      8fafe702
    • Colin Ian King's avatar
      Bluetooth: make array bt_uuid_any static const · e616fec6
      Colin Ian King authored
      Don't populate the read-only array bt_uuid_any on the stack but
      instead make it static const. Also makes the object code a little
      smaller.
      Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      e616fec6
    • Christophe JAILLET's avatar
      Bluetooth: 6lowpan: No need to clear memory twice · f1b8eea0
      Christophe JAILLET authored
      'peer_addr' is a structure embedded in 'struct lowpan_peer'. So there is no
      need to explicitly call memset(0) on it. It is already zeroed by kzalloc()
      when 'peer' is allocated.
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      f1b8eea0
    • Zijun Hu's avatar
      Bluetooth: btusb: Improve stability for QCA devices · 599ece4f
      Zijun Hu authored
      WCN6855 2.1 will reset to apply firmware downloaded, so wait
      a moment for reset done then go ahead to improve stability.
      Signed-off-by: default avatarZijun Hu <quic_zijuhu@quicinc.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      599ece4f
    • Piotr Dymacz's avatar
      Bluetooth: btusb: add support for LG LGSBWAC02 (MT7663BUN) · 467e98cd
      Piotr Dymacz authored
      The LG LGSBWAC02 (FCC ID: BEJLGSBWAC02) is a combo Wi-Fi/BT module which
      can be found in several different LG TV models. This module is based on
      already supported MediaTek MT7663U series.
      
      Device from /sys/kernel/debug/usb/devices:
      
      T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=02 Dev#=  4 Spd=480  MxCh= 0
      D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=043e ProdID=310c Rev= 1.00
      S:  Manufacturer=MediaTek Inc.
      S:  Product=Wireless_Device
      S:  SerialNumber=000000000
      C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=100mA
      A:  FirstIf#= 0 IfCount= 2 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= 8 Cls=ff(vend.) Sub=ff Prot=ff Driver=mt7663u
      E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      Signed-off-by: default avatarPiotr Dymacz <pepe2k@gmail.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      467e98cd
    • Kiran K's avatar
      Bluetooth: btusb: Add support for Intel Madison Peak (MsP2) device · 2ca57c80
      Kiran K authored
      $ lsusb
      Bus 003 Device 003: ID 8087:0035 Intel Corp.
      
      $ cat /sys/kernel/debug/usb/devices
      T:  Bus=03 Lev=01 Prnt=01 Port=09 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=0035 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: default avatarKiran K <kiran.k@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      2ca57c80
    • Radoslaw Biernacki's avatar
      Bluetooth: Improve skb handling in mgmt_device_connected() · c2b2a1a7
      Radoslaw Biernacki authored
      This patch introduce eir_skb_put_data() that can be used to simplify
      operations on eir in goal of eliminating the necessity of intermediary
      buffers.
      eir_skb_put_data() is in pair to what eir_append_data() does with help of
      eir_len, but without awkwardness when passing return value to skb_put() (as
      it returns updated offset not size).
      Signed-off-by: default avatarRadoslaw Biernacki <rad@semihalf.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      c2b2a1a7
    • Radoslaw Biernacki's avatar
      Bluetooth: Fix skb allocation in mgmt_remote_name() & mgmt_device_connected() · ba17bb62
      Radoslaw Biernacki authored
      This patch fixes skb allocation, as lack of space for ev might push skb
      tail beyond its end.
      Also introduce eir_precalc_len() that can be used instead of magic
      numbers for similar eir operations on skb.
      
      Fixes: cf1bce1d ("Bluetooth: mgmt: Make use of mgmt_send_event_skb in MGMT_EV_DEVICE_FOUND")
      Fixes: e9674143 ("Bluetooth: mgmt: Make use of mgmt_send_event_skb in MGMT_EV_DEVICE_CONNECTED")
      Signed-off-by: default avatarAngela Czubak <acz@semihalf.com>
      Signed-off-by: default avatarMarek Maslanka <mm@semihalf.com>
      Signed-off-by: default avatarRadoslaw Biernacki <rad@semihalf.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      ba17bb62
    • Minghao Chi's avatar
      Bluetooth: mgmt: Remove unneeded variable · a6fbb2bf
      Minghao Chi authored
      Return value from mgmt_cmd_complete() directly instead
      of taking this in another redundant variable.
      Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
      Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
      Signed-off-by: default avatarCGEL ZTE <cgel.zte@gmail.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      a6fbb2bf
    • Tom Rix's avatar
      Bluetooth: hci_sync: fix undefined return of hci_disconnect_all_sync() · 8cd3c55c
      Tom Rix authored
      clang static analysis reports this problem
      hci_sync.c:4428:2: warning: Undefined or garbage value
        returned to caller
              return err;
              ^~~~~~~~~~
      
      If there are no connections this function is a noop but
      err is never set and a false error could be reported.
      Return 0 as other hci_* functions do.
      
      Fixes: 182ee45d ("Bluetooth: hci_sync: Rework hci_suspend_notifier")
      Signed-off-by: default avatarTom Rix <trix@redhat.com>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      8cd3c55c
    • Changcheng Deng's avatar
      Bluetooth: mgmt: Replace zero-length array with flexible-array member · 3a031814
      Changcheng Deng authored
      There is a regular need in the kernel to provide a way to declare having
      a dynamically sized set of trailing elements in a structure. Kernel code
      should always use "flexible array members" for these cases. The older
      style of one-element or zero-length arrays should no longer be used.
      Reference:
      https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arraysReported-by: default avatarZeal Robot <zealci@zte.com.cn>
      Signed-off-by: default avatarChangcheng Deng <deng.changcheng@zte.com.cn>
      Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
      3a031814
    • Jiapeng Chong's avatar
      net: ethernet: sun: Remove redundant code · 1039135a
      Jiapeng Chong authored
      Since the starting value in the for loop is greater than or equal to 1,
      the restriction is CAS_FLAG_REG_PLUS is in the file cassini.h is
      defined as 0x1 by macro, and the for loop and if condition is not
      satisfied, so the code here is redundant.
      
      Clean up the following smatch warning:
      
      drivers/net/ethernet/sun/cassini.c:3513 cas_start_dma() warn: we never
      enter this loop.
      
      drivers/net/ethernet/sun/cassini.c:1239 cas_init_rx_dma() warn: we never
      enter this loop.
      
      drivers/net/ethernet/sun/cassini.c:1247 cas_init_rx_dma() warn: we never
      enter this loop.
      Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
      Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1039135a
    • David S. Miller's avatar
      Merge branch 'nfp-AF_XDP-zero-copy' · 844f63f5
      David S. Miller authored
      Simon Horman says:
      
      ====================
      Add AF_XDP zero-copy support for NFP
      
      Niklas Söderlund says:
      
      This series adds AF_XDP zero-copy support for the NFP driver. The series
      is based on previous work done by Jakub Kicinski.
      
      Patch 1/5 and 2/5 prepares the driver for AF_XDP support by refactoring
      functions that will act differently once AF_XDP is active or not making
      the driver easier to read and by preparing some functions to be reused
      outside the local file scope. Patch 3/5 and 4/5 prepares the driver for
      dealing the UMEM while finally patch 5/5 adds AF_XDP support.
      
      Based on work by Jakub Kicinski.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      844f63f5
    • Niklas Söderlund's avatar
      nfp: xsk: add AF_XDP zero-copy Rx and Tx support · 6402528b
      Niklas Söderlund authored
      This patch adds zero-copy Rx and Tx support for AF_XDP sockets. It do so
      by adding a separate NAPI poll function that is attached to a each
      channel when the XSK socket is attached with XDP_SETUP_XSK_POOL, and
      restored when the XSK socket is terminated, this is done per channel.
      
      Support for XDP_TX is implemented and the XDP buffer can safely be moved
      from the Rx to the Tx queue and correctly freed and returned to the XSK
      pool once it's transmitted.
      
      Note that when AF_XDP zero-copy is enabled, the XDP action XDP_PASS
      will allocate a new buffer and copy the zero-copy frame prior
      passing it to the kernel stack.
      
      This patch is based on previous work by Jakub Kicinski.
      Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund@corigine.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6402528b
    • Niklas Söderlund's avatar
      nfp: xsk: add configuration check for XSK socket chunk size · 9c91a365
      Niklas Söderlund authored
      In preparation for adding AF_XDP support add a configuration check to
      make sure the buffer size can not be set to a larger value then the XSK
      socket chunk size.
      Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund@corigine.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9c91a365