Bluetooth: Clear role switch pending flag
authorKuba Pawlak <kubax.t.pawlak@intel.com>
Thu, 6 Nov 2014 18:36:52 +0000 (19:36 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 6 Nov 2014 18:38:42 +0000 (19:38 +0100)
commit50fc85f1b04908301c463e5b963f16d18a90d5cc
tree25b58968cdfa61f1351b36e1e34f2fdd9017db43
parent6cc6399c719d3a6ad6d6aa54a7f26f90b4bb171d
Bluetooth: Clear role switch pending flag

If role switch was rejected by the controller and HCI Event: Command Status
returned with status "Command Disallowed" (0x0C) the flag
HCI_CONN_RSWITCH_PEND remains set. No further role switches are
possible as this flag prevents us from sending any new HCI Switch Role
requests and the only way to clear it is to receive a valid
HCI Event Switch Role.

This patch clears the flag if command was rejected.

2013-01-01 00:03:44.209913 < HCI Command: Switch Role (0x02|0x000b) plen 7
    bdaddr BC:C6:DB:C4:6F:79 role 0x00
    Role: Master
2013-01-01 00:03:44.210867 > HCI Event: Command Status (0x0f) plen 4
    Switch Role (0x02|0x000b) status 0x0c ncmd 1
    Error: Command Disallowed

Signed-off-by: Kuba Pawlak <kubax.t.pawlak@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_event.c
This page took 0.024387 seconds and 5 git commands to generate.