diff options
author | Marco Sinigaglia <marco.sinigaglia@csr.com> | 2011-03-09 16:59:45 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2011-03-10 11:11:17 +0200 |
commit | 39454251efae92460f2beb3b593b02219266a11b (patch) | |
tree | 313d4d65d77c85e456f9167fda26997f34f5a1fe /lib/hci.c | |
parent | 1f6f8f2c13ea46b2b6f74c6f81b43034004b4758 (diff) | |
download | bluez-39454251efae92460f2beb3b593b02219266a11b.tar.gz |
Adjust LE command timeout and API
The timeout value has been hardcoded on hci_send_req call and, instead,
it should be passed from above (for ex from hci_le_set_scan_enable).
This patch removes the hardcoded value from hci_send_req and it
increases the timeout to 1000ms.
Diffstat (limited to 'lib/hci.c')
-rw-r--r-- | lib/hci.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -2735,7 +2735,7 @@ int hci_read_clock(int dd, uint16_t handle, uint8_t which, uint32_t *clock, return 0; } -int hci_le_set_scan_enable(int dd, uint8_t enable, uint8_t filter_dup) +int hci_le_set_scan_enable(int dd, uint8_t enable, uint8_t filter_dup, int to) { struct hci_request rq; le_set_scan_enable_cp scan_cp; @@ -2753,7 +2753,7 @@ int hci_le_set_scan_enable(int dd, uint8_t enable, uint8_t filter_dup) rq.rparam = &status; rq.rlen = 1; - if (hci_send_req(dd, &rq, 100) < 0) + if (hci_send_req(dd, &rq, to) < 0) return -1; if (status) { @@ -2766,7 +2766,7 @@ int hci_le_set_scan_enable(int dd, uint8_t enable, uint8_t filter_dup) int hci_le_set_scan_parameters(int dd, uint8_t type, uint16_t interval, uint16_t window, - uint8_t own_type, uint8_t filter) + uint8_t own_type, uint8_t filter, int to) { struct hci_request rq; le_set_scan_parameters_cp param_cp; @@ -2787,7 +2787,7 @@ int hci_le_set_scan_parameters(int dd, uint8_t type, rq.rparam = &status; rq.rlen = 1; - if (hci_send_req(dd, &rq, 100) < 0) + if (hci_send_req(dd, &rq, to) < 0) return -1; if (status) { @@ -2798,7 +2798,7 @@ int hci_le_set_scan_parameters(int dd, uint8_t type, return 0; } -int hci_le_set_advertise_enable(int dd, uint8_t enable) +int hci_le_set_advertise_enable(int dd, uint8_t enable, int to) { struct hci_request rq; le_set_advertise_enable_cp adv_cp; @@ -2815,7 +2815,7 @@ int hci_le_set_advertise_enable(int dd, uint8_t enable) rq.rparam = &status; rq.rlen = 1; - if (hci_send_req(dd, &rq, 100) < 0) + if (hci_send_req(dd, &rq, to) < 0) return -1; if (status) { |