@@ -1799,8 +1799,9 @@ int __hci_req_setup_ext_adv_instance(struct hci_request *req, u8 instance)
int err;
struct adv_info *adv_instance;
bool secondary_adv;
- /* In ext adv set param interval is 3 octets */
- const u8 adv_interval[3] = { 0x00, 0x08, 0x00 };
+ /* In ext adv set param interval is 3 octets in le format */
+ const __le32 min_adv_interval = cpu_to_le32(hdev->le_adv_min_interval);
+ const __le32 max_adv_interval = cpu_to_le32(hdev->le_adv_max_interval);
if (instance > 0) {
adv_instance = hci_find_adv_instance(hdev, instance);
@@ -1833,8 +1834,9 @@ int __hci_req_setup_ext_adv_instance(struct hci_request *req, u8 instance)
memset(&cp, 0, sizeof(cp));
- memcpy(cp.min_interval, adv_interval, sizeof(cp.min_interval));
- memcpy(cp.max_interval, adv_interval, sizeof(cp.max_interval));
+ /* take least significant 3 bytes */
+ memcpy(cp.min_interval, &min_adv_interval, sizeof(cp.min_interval));
+ memcpy(cp.max_interval, &max_adv_interval, sizeof(cp.max_interval));
secondary_adv = (flags & MGMT_ADV_FLAG_SEC_MASK);