Bluetooth: Fix advertising duplicated flags
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Sun, 3 Nov 2019 21:58:15 +0000 (23:58 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 4 Nov 2019 08:12:05 +0000 (10:12 +0200)
commit6012b9346d8959194c239fd60a62dfec98d43048
treeb9bdb7d1de1339cff4e8e3725966ee21ef1ee8be
parent492ad783a150cd352abba8723e5942521d938c8d
Bluetooth: Fix advertising duplicated flags

Instances may have flags set as part of its data in which case the code
should not attempt to add it again otherwise it can cause duplication:

< HCI Command: LE Set Extended Advertising Data (0x08|0x0037) plen 35
        Handle: 0x00
        Operation: Complete extended advertising data (0x03)
        Fragment preference: Minimize fragmentation (0x01)
        Data length: 0x06
        Flags: 0x04
          BR/EDR Not Supported
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/hci_request.c