Commit Graph

174 Commits

Author SHA1 Message Date
Johan Hedberg
fe53cb366d Add support for reading controller info to hciops 2010-11-02 00:10:25 +02:00
Johan Hedberg
4d91fb30e0 Keep track of discovered controllers in mgmtops 2010-11-01 23:18:44 +02:00
Johan Hedberg
6275027dcb Store management version info into global variables for easy access
In the future when the mgmtops code needs to behave in different ways
depending on the kernel side management API version it's convenient to
have the exact version/revision number in easily accessible global
variables inside mgmtops.c.
2010-11-01 21:16:44 +02:00
Johan Hedberg
3d3063f323 Remove unnecessary status parameter from mgmt version response 2010-11-01 21:00:49 +02:00
Johan Hedberg
c0882114c2 Add support for getting the controller index list 2010-11-01 20:58:48 +02:00
Johan Hedberg
fb91c88916 Change hci_mgmt_ prefix to simply mgmt_ 2010-11-01 20:23:03 +02:00
Johan Hedberg
1d555f47c4 Add support for parsing management version response 2010-11-01 20:19:17 +02:00
Johan Hedberg
908795609b Pass the management message body to event callbacks
For parsing purposes it's more practical to simply pass the message body
instead of the entire packet to the individual callbacks.
2010-11-01 17:21:56 +02:00
Johan Hedberg
14b60d8002 Add basic parsing support for management events 2010-11-01 17:12:45 +02:00
Johan Hedberg
d8a9a0e7c0 Make all unimplemented mgmtops functions fail by default 2010-11-01 16:46:50 +02:00
Johan Hedberg
93d8dc9eed Add debug prints to mgmtops functions 2010-11-01 16:46:50 +02:00
Johan Hedberg
49a10b37b7 mgmtops: add initial setup support
This patch adds initial mgmtops setup support. The code will fail on
kernels without Bluetooth Management support and cause bluetoothd to
fall back to using hciops.
2010-10-27 15:18:26 -04:00
Johan Hedberg
80f5ccd70c Remove remote name requests upon connect complete events
Newer kernel versions will deal with the automated name request for
connection complete events, so remove it from userspace to avoid
unnecessary traffic and potential interop issues.
2010-10-27 12:22:16 -04:00
Johan Hedberg
0c3e080828 Add initial skeleton for mgmtops 2010-10-27 11:21:38 -04:00
Johan Hedberg
d57934d1d0 Minor coding style fix 2010-10-27 11:09:36 -04:00
Johan Hedberg
d300441574 Add support for multiple potential adapter_ops implementations
This patch changes the adapter_ops registration procedure to simply add
the callback struct into a list. The actual adapter_ops implementation
that gets used gets chosen in the adapter_ops_setup function.
2010-10-27 11:07:36 -04:00
Johan Hedberg
f92841301d hciops: don't initialize existing adapters in hciops_setup()
Initializing existing adapters requires calls into adapter.c and a fully
setup adapter_ops so this can only be done after the adapter_ops setup
function (hciops_setup in this case) has returned.
2010-10-27 11:04:18 -04:00
Claudio Takahasi
5ade59881c Move HCI_REQ_TIMEOUT to hciops.c 2010-10-26 19:05:19 -03:00
Johan Hedberg
abe7cd4412 Move ACL encryption functions to hciops 2010-10-26 17:51:41 -04:00
Johan Hedberg
5288199788 Move security.c callbacks into hciops 2010-10-26 16:06:18 -04:00
Johan Hedberg
16d507e0bb Rename dbus-hci.c event.c and use btd_event_ prefix for it 2010-10-26 14:59:49 -04:00
Rafal Michalski
4ebe698e22 Adjust mce_bt_set flag to gboolean type values
This patch makes assignment to mce_bt_set flag more readable and makes
sure that it takes only TRUE or FALSE value from gboolean type.
2010-10-13 17:23:21 +03:00
Johan Hedberg
646f0c7e6b Move remote name and version requests to hciops
Move the remote name and version requests that are done upon a
connection complete event to hciops. Instead of queuing the version
request after the name just delay it for one second (this simplifies the
logic quite a bit).
2010-10-10 22:44:25 +01:00
Johan Hedberg
ef071f94a7 Add struct for hciops per-adapter data
For future extensibility it's better to have a whole struct for each
adapter in hciops.
2010-10-10 18:05:11 +03:00
Johan Hedberg
6844ac4ce5 Create a global HCI socket array in hciops
This patch adds a global HCI array in hciops to avoid hci_open_dev calls
for each hciops callback.
2010-10-06 23:26:56 +02:00
Marcel Holtmann
ecb835fca7 Remove netlink plugin 2010-10-06 10:21:11 +02:00
Claudio Takahasi
9ebc8d3b0f Read local extended features asynchronously 2010-10-04 17:38:23 -03:00
Claudio Takahasi
3af792e57b Rename hciops {start, stop}_discovery to {start, stop}_inquiry
With dual mode adapters, "discovery" expression is being used to
represent both BR/EDR inquiry and LE scanning.
2010-10-04 17:38:22 -03:00
Claudio Takahasi
7ff8fd32eb Set the LE host supported and disable simultaneous LE and BR/EDR flags
For BlueZ if the controller supports LE, extended feature mask shall be
set to indicate that the host supports LE and disable simultaneous LE and
BR/EDR for simplicity even if the controller supports simultaneous LE and
BR/EDR.
2010-10-04 17:38:22 -03:00
Claudio Takahasi
388cdea438 Add length argument on hciops start discovery function
For BR/EDR only adapters, the recommended inquiry length is 0x08
(10.24 seconds). For interleave discovery the inquiry length is
0x04(5.12 seconds).
2010-10-04 17:38:22 -03:00
Vinicius Costa Gomes
e0e4bd6e26 Add BR/EDR LE interleaved discovery
According to the general discovery procedure should interleave the
general discovery procedure over BR/EDR with the general discovery
procedure over LE. LE Scanning is reporting found remote devices
using DeviceFound signals. Currently, only the Bluetooth address is
extracted from the Advertising event.

Step 1: BR/EDR discovery for TGAP(100)/2 sec
Step 2: LE discovery for TGAP(100)/2 sec
2010-10-04 17:38:22 -03:00
Claudio Takahasi
70cd37db7c Add LE start and stop scanning
Changes hciops plugin to add LE start/stop scanning options and
metaevent decoding.
2010-10-04 17:38:22 -03:00
Johan Hedberg
73c8e7ac37 Make link key removal HCI command asynchronous 2010-10-04 21:28:14 +02:00
Johan Hedberg
195cb7501b Make inquiry mode writing asynchronous 2010-10-04 21:25:55 +02:00
Johan Hedberg
197eb53c0b Make EIR data writing asynchronous 2010-10-04 21:05:55 +02:00
Johan Hedberg
132374b512 Make SSP mode reading and writing asynchronous 2010-10-04 16:10:52 +02:00
Johan Hedberg
f8b7d84e2c Move scan mode reading to hciops 2010-10-03 21:59:37 +02:00
Johan Hedberg
4b625a87bd Move authentication requirements fetching to hciops 2010-10-01 19:48:05 +03:00
Johan Hedberg
889c7513b3 Move user passkey reply to hciops 2010-10-01 19:37:57 +03:00
Johan Hedberg
df6c074158 Move user confirmation reply to hciops 2010-10-01 19:23:34 +03:00
Johan Hedberg
e7daece858 Move PIN code reply to hciops 2010-10-01 19:15:55 +03:00
Johan Hedberg
424ffb2640 Move authentication request to hciops 2010-10-01 15:15:52 +03:00
Johan Hedberg
1bf7ec6b5c Move link key removal from controller to hciops 2010-10-01 15:02:40 +03:00
Johan Hedberg
06dcf6ada5 Move disconnect command sending to hciops 2010-10-01 12:22:38 +03:00
Johan Hedberg
98dbebb8ed Move default link policy read command to hciops 2010-10-01 12:10:38 +03:00
Johan Hedberg
0133f1bc40 Move SSP mode initialization to hciops 2010-10-01 12:07:23 +03:00
Johan Hedberg
48e6007a98 Move local features reading to hciops 2010-10-01 12:01:45 +03:00
Johan Hedberg
e38fdde63c Move local version reading to hciops 2010-10-01 12:01:12 +03:00
Johan Hedberg
f7b4b3fcd1 Move connection list fetching to hciops 2010-09-30 22:12:37 +03:00
Johan Hedberg
885c513fdf Move device blocking to hciops 2010-09-30 16:52:43 +03:00