Bluetooth: Use Set ext adv/scan rsp data if controller supports
This patch implements Set Ext Adv data and Set Ext Scan rsp data if controller support extended advertising. Currently the operation is set as Complete data and fragment preference is set as no fragment < 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: 0x15 16-bit Service UUIDs (complete): 2 entries Heart Rate (0x180d) Battery Service (0x180f) Name (complete): Test LE Company: Google (224) Data: 0102 > HCI Event: Command Complete (0x0e) plen 4 LE Set Extended Advertising Data (0x08|0x0037) ncmd 1 Status: Success (0x00) Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:

committed by
Marcel Holtmann

parent
de181e887a
commit
a0fb3726ba
@@ -1625,6 +1625,28 @@ struct hci_cp_ext_adv_set {
|
||||
__u8 max_events;
|
||||
} __packed;
|
||||
|
||||
#define HCI_OP_LE_SET_EXT_ADV_DATA 0x2037
|
||||
struct hci_cp_le_set_ext_adv_data {
|
||||
__u8 handle;
|
||||
__u8 operation;
|
||||
__u8 frag_pref;
|
||||
__u8 length;
|
||||
__u8 data[HCI_MAX_AD_LENGTH];
|
||||
} __packed;
|
||||
|
||||
#define HCI_OP_LE_SET_EXT_SCAN_RSP_DATA 0x2038
|
||||
struct hci_cp_le_set_ext_scan_rsp_data {
|
||||
__u8 handle;
|
||||
__u8 operation;
|
||||
__u8 frag_pref;
|
||||
__u8 length;
|
||||
__u8 data[HCI_MAX_AD_LENGTH];
|
||||
} __packed;
|
||||
|
||||
#define LE_SET_ADV_DATA_OP_COMPLETE 0x03
|
||||
|
||||
#define LE_SET_ADV_DATA_NO_FRAG 0x01
|
||||
|
||||
/* ---- HCI Events ---- */
|
||||
#define HCI_EV_INQUIRY_COMPLETE 0x01
|
||||
|
||||
|
Reference in New Issue
Block a user