Home | History | Annotate | Download | only in src

Lines Matching refs:sba

216 static int get_handle(int dev, bdaddr_t *sba, bdaddr_t *dba, uint16_t *handle)
225 ba2str(sba, addr);
248 static inline int get_bdaddr(int dev, bdaddr_t *sba, uint16_t handle, bdaddr_t *dba)
257 ba2str(sba, addr);
279 static inline void update_lastseen(bdaddr_t *sba, bdaddr_t *dba)
287 write_lastseen_info(sba, dba, tm);
290 static inline void update_lastused(bdaddr_t *sba, bdaddr_t *dba)
298 write_lastused_info(sba, dba, tm);
303 static void link_key_request(int dev, bdaddr_t *sba, bdaddr_t *dba)
313 if (!get_adapter_and_device(sba, dba, &adapter, &device, FALSE))
316 ba2str(sba, sa); ba2str(dba, da);
317 info("link_key_request (sba=%s, dba=%s)", sa, da);
334 else if (read_link_key(sba, dba, key, &type) < 0 || type == 0x03) {
360 static void link_key_notify(int dev, bdaddr_t *sba, void *ptr)
369 ba2str(sba, sa); ba2str(dba, da);
370 info("link_key_notify (sba=%s, dba=%s, type=%d)", sa, da,
373 err = read_link_key(sba, dba, old_key, &old_key_type);
381 err = hcid_dbus_link_key_notify(sba, dba, evt->link_key,
392 hcid_dbus_bonding_process_complete(sba, dba,
395 hcid_dbus_bonding_process_complete(sba, dba,
398 if (get_handle(dev, sba, dba, &handle) == 0) {
411 static void return_link_keys(int dev, bdaddr_t *sba, void *ptr)
420 ba2str(sba, sa);
427 info("return_link_keys (sba=%s, dba=%s)", sa, da);
429 hcid_dbus_returned_link_key(sba, &dba);
437 static void user_confirm_request(int dev, bdaddr_t *sba, void *ptr)
441 if (hcid_dbus_user_confirm(sba, &req->bdaddr,
447 static void user_passkey_request(int dev, bdaddr_t *sba, void *ptr)
451 if (hcid_dbus_user_passkey(sba, &req->bdaddr) < 0)
456 static void user_passkey_notify(int dev, bdaddr_t *sba, void *ptr)
460 hcid_dbus_user_notify(sba, &req->bdaddr, btohl(req->passkey));
463 static void remote_oob_data_request(int dev, bdaddr_t *sba, void *ptr)
467 if (hcid_dbus_get_oob_data(sba, &req->bdaddr) < 0)
472 static void io_capa_request(int dev, bdaddr_t *sba, bdaddr_t *dba)
476 ba2str(sba, sa);
478 info("io_capa_request (sba=%s, dba=%s)", sa, da);
480 if (hcid_dbus_get_io_cap(sba, dba) < 0) {
490 static void io_capa_response(int dev, bdaddr_t *sba, void *ptr)
495 ba2str(sba, sa); ba2str(&evt->bdaddr, da);
496 info("io_capa_response (sba=%s, dba=%s)", sa, da);
498 hcid_dbus_set_io_cap(sba, &evt->bdaddr,
504 void set_pin_length(bdaddr_t *sba, int length)
509 ba2str(sba, addr);
516 static void pin_code_request(int dev, bdaddr_t *sba, bdaddr_t *dba)
527 ba2str(sba, sa); ba2str(dba, da);
528 info("pin_code_request (sba=%s, dba=%s)", sa, da);
541 pinlen = read_pin_code(sba, dba, pin);
544 set_pin_length(sba, pinlen);
551 if (hcid_dbus_request_pin(dev, sba, ci) < 0)
664 static inline void remote_features_notify(int dev, bdaddr_t *sba, void *ptr)
669 hcid_dbus_set_legacy_pairing(sba, &evt->bdaddr, FALSE);
671 hcid_dbus_set_legacy_pairing(sba, &evt->bdaddr, TRUE);
673 write_features_info(sba, &evt->bdaddr, NULL, evt->features);
676 static inline void cmd_status(int dev, bdaddr_t *sba, void *ptr)
682 start_inquiry(sba, evt->status, FALSE);
685 static inline void cmd_complete(int dev, bdaddr_t *sba, void *ptr)
693 start_inquiry(sba, status, TRUE);
696 inquiry_complete(sba, status, TRUE);
699 inquiry_complete(sba, status, FALSE);
702 adapter_setname_complete(sba, status);
705 hcid_dbus_setscan_enable_complete(sba);
708 adapter_set_class_complete(sba, status);
711 hcid_dbus_write_simple_pairing_mode_complete(sba);
715 adapter_update_local_name(sba, status, ptr);
719 adapter_update_tx_power(sba
724 static inline void remote_name_information(int dev, bdaddr_t *sba, void *ptr)
740 write_device_name(sba, &dba, name);
743 hcid_dbus_remote_name(sba, &dba, evt->status, name);
746 static inline void remote_version_information(int dev, bdaddr_t *sba, void *ptr)
754 if (get_bdaddr(dev, sba, btohs(evt->handle), &dba) < 0)
757 write_version_info(sba, &dba, btohs(evt->manufacturer),
761 static inline void inquiry_result(int dev, bdaddr_t *sba, int plen, void *ptr)
772 hcid_dbus_inquiry_result(sba, &info->bdaddr, class, 0, NULL);
774 update_lastseen(sba, &info->bdaddr);
780 static inline void inquiry_result_with_rssi(int dev, bdaddr_t *sba,
796 hcid_dbus_inquiry_result(sba, &info->bdaddr,
799 update_lastseen(sba, &info->bdaddr);
810 hcid_dbus_inquiry_result(sba, &info->bdaddr,
813 update_lastseen(sba, &info->bdaddr);
820 static inline void extended_inquiry_result(int dev, bdaddr_t *sba,
832 hcid_dbus_inquiry_result(sba, &info->bdaddr, class,
835 update_lastseen(sba, &info->bdaddr);
841 static inline void remote_features_information(int dev, bdaddr_t *sba,
850 if (get_bdaddr(dev, sba, btohs(evt->handle), &dba) < 0)
853 write_features_info(sba, &dba, evt->features, NULL);
856 static inline void conn_complete(int dev, int dev_id, bdaddr_t *sba, void *ptr)
867 hcid_dbus_conn_complete(sba, evt->status, btohs(evt->handle),
873 update_lastused(sba, &evt->bdaddr);
888 ba2str(sba, local_addr);
911 static inline void disconn_complete(int dev, bdaddr_t *sba, void *ptr)
915 hcid_dbus_disconn_complete(sba, evt->status, btohs(evt->handle),
919 static inline void auth_complete(int dev, bdaddr_t *sba, void *ptr)
924 if (get_bdaddr(dev, sba, btohs(evt->handle), &dba) < 0)
927 hcid_dbus_bonding_process_complete(sba, &dba, evt->status);
930 static inline void simple_pairing_complete(int dev, bdaddr_t *sba, void *ptr)
934 hcid_dbus_simple_pairing_complete(sba, &evt->bdaddr, evt->status);
937 static inline void conn_request(int dev, bdaddr_t *sba, void *ptr)
943 hcid_dbus_remote_class(sba, &evt->bdaddr, class);
945 write_remote_class(sba, &evt->bdaddr, class);