diff options
author | Alain Michaud <alainm@chromium.org> | 2020-06-22 15:30:28 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2020-06-22 16:03:46 +0200 |
commit | 5cbd3ebde859bd43bd0584c146060638b1a3abb4 (patch) | |
tree | b0ac0f736136a36d58c4e7980852cc265fdce7dd /include/net | |
parent | Bluetooth: Add hci_dev_lock to get/set device flags (diff) | |
download | linux-5cbd3ebde859bd43bd0584c146060638b1a3abb4.tar.xz linux-5cbd3ebde859bd43bd0584c146060638b1a3abb4.zip |
Bluetooth: use configured params for ext adv
When the extended advertisement feature is enabled, a hardcoded min and
max interval of 0x8000 is used. This patch fixes this issue by using
the configured min/max value.
This was validated by setting min/max in main.conf and making sure the
right setting is applied:
< HCI Command: LE Set Extended Advertising Parameters (0x08|0x0036) plen
25 #93 [hci0] 10.953011
…
Min advertising interval: 181.250 msec (0x0122)
Max advertising interval: 181.250 msec (0x0122)
…
Signed-off-by: Alain Michaud <alainm@chromium.org>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: Daniel Winkler <danielwinkler@google.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/bluetooth/hci.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 16ab6ce87883..1f18f71363e9 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -2516,4 +2516,12 @@ static inline struct hci_sco_hdr *hci_sco_hdr(const struct sk_buff *skb) #define hci_iso_data_len(h) ((h) & 0x3fff) #define hci_iso_data_flags(h) ((h) >> 14) +/* le24 support */ +static inline void hci_cpu_to_le24(__u32 val, __u8 dst[3]) +{ + dst[0] = val & 0xff; + dst[1] = (val & 0xff00) >> 8; + dst[2] = (val & 0xff0000) >> 16; +} + #endif /* __HCI_H */ |