mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
Bluetooth: btmtk: fix wrong status for short WMT FUNC_CTRL events
A too-short BTMTK_WMT_FUNC_CTRL event (WMT header only, no trailing
2-byte status word) is always treated as BTMTK_WMT_ON_UNDONE. This
short form is how firmware acks a plain enable/disable request, and
the actual result is carried in the header's own flag byte (0 =
success), not a separate status word. Decode it from there instead of
assuming failure.
Verified setup on MT7920, MT7921, MT7922 and MT7925: no regression.
Fixes: e3ac0d9f1a ("Bluetooth: btmtk: accept too short WMT FUNC_CTRL events")
Assisted-by: Claude:claude-opus-5
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
296e7f3c50
commit
78b6abd6c7
|
|
@ -721,7 +721,12 @@ static int btmtk_usb_hci_wmt_sync(struct hci_dev *hdev,
|
|||
case BTMTK_WMT_FUNC_CTRL:
|
||||
if (!skb_pull_data(data->evt_skb,
|
||||
sizeof(wmt_evt_funcc->status))) {
|
||||
status = BTMTK_WMT_ON_UNDONE;
|
||||
/* A plain enable/disable request is acked with just
|
||||
* the WMT header and no trailing status word; the
|
||||
* result is carried in the header's own flag byte.
|
||||
*/
|
||||
status = wmt_evt->whdr.flag ? BTMTK_WMT_ON_UNDONE :
|
||||
BTMTK_WMT_ON_DONE;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user