Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266326
b: refs/heads/master
c: cfafccf
h: refs/heads/master
v: v3
  • Loading branch information
Vinicius Costa Gomes authored and Gustavo F. Padovan committed Sep 21, 2011
1 parent d82941a commit ca5e887
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 160dc6ac1256ed15a507bec9a2ff1f6d24a5a3ff
refs/heads/master: cfafccf730d363accacbd165542095ce6f7d2de8
2 changes: 1 addition & 1 deletion trunk/include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ int mgmt_powered(u16 index, u8 powered);
int mgmt_discoverable(u16 index, u8 discoverable);
int mgmt_connectable(u16 index, u8 connectable);
int mgmt_new_key(u16 index, struct link_key *key, u8 persistent);
int mgmt_connected(u16 index, bdaddr_t *bdaddr);
int mgmt_connected(u16 index, bdaddr_t *bdaddr, u8 link_type);
int mgmt_disconnected(u16 index, bdaddr_t *bdaddr);
int mgmt_disconnect_failed(u16 index);
int mgmt_connect_failed(u16 index, bdaddr_t *bdaddr, u8 status);
Expand Down
1 change: 1 addition & 0 deletions trunk/include/net/bluetooth/mgmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ struct mgmt_ev_new_key {
#define MGMT_EV_CONNECTED 0x000B
struct mgmt_ev_connected {
bdaddr_t bdaddr;
__u8 link_type;
} __packed;

#define MGMT_EV_DISCONNECTED 0x000C
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,7 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s
conn->state = BT_CONFIG;
hci_conn_hold(conn);
conn->disc_timeout = HCI_DISCONN_TIMEOUT;
mgmt_connected(hdev->id, &ev->bdaddr);
mgmt_connected(hdev->id, &ev->bdaddr, conn->type);
} else
conn->state = BT_CONNECTED;

Expand Down Expand Up @@ -2816,7 +2816,7 @@ static inline void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff
goto unlock;
}

mgmt_connected(hdev->id, &ev->bdaddr);
mgmt_connected(hdev->id, &ev->bdaddr, conn->type);

conn->sec_level = BT_SECURITY_LOW;
conn->handle = __le16_to_cpu(ev->handle);
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2012,11 +2012,12 @@ int mgmt_new_key(u16 index, struct link_key *key, u8 persistent)
return err;
}

int mgmt_connected(u16 index, bdaddr_t *bdaddr)
int mgmt_connected(u16 index, bdaddr_t *bdaddr, u8 link_type)
{
struct mgmt_ev_connected ev;

bacpy(&ev.bdaddr, bdaddr);
ev.link_type = link_type;

return mgmt_event(MGMT_EV_CONNECTED, index, &ev, sizeof(ev), NULL);
}
Expand Down

0 comments on commit ca5e887

Please sign in to comment.