diff options
author | David S. Miller <davem@davemloft.net> | 2012-09-30 02:30:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-30 02:30:16 -0400 |
commit | a248afdc1b5916c2bfd007233112333d85aa28f6 (patch) | |
tree | 49d4a0b8fdcf7624ea6b0bdf0af2567d7392210e /net/bluetooth/mgmt.c | |
parent | d379142bc4d9b78cdd9fc5aa696ca1ea083fb7d4 (diff) | |
parent | c487606f835a93a725bac1aefd536be98f22474d (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
John W. Linville says:
====================
Here is another batch of updates intended for 3.7...
Highlights include an hci_connect re-write in Bluetooth, HCI/LLC
layer separation in NFC, removal of the raw pn544 NFC driver, NFC LLCP
raw sockets support, improved IBSS auth frame handling in mac80211,
full-MAC AP mode notification support in mac80211, a lot of attention
paid to brcmfmac, and the usual level of updates to iwlwifi, ath9k,
mwifiex, and rt2x00, and various other updates.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index e3296319606b..aa2ea0a8142c 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -35,7 +35,7 @@ | |||
35 | bool enable_hs; | 35 | bool enable_hs; |
36 | 36 | ||
37 | #define MGMT_VERSION 1 | 37 | #define MGMT_VERSION 1 |
38 | #define MGMT_REVISION 1 | 38 | #define MGMT_REVISION 2 |
39 | 39 | ||
40 | static const u16 mgmt_commands[] = { | 40 | static const u16 mgmt_commands[] = { |
41 | MGMT_OP_READ_INDEX_LIST, | 41 | MGMT_OP_READ_INDEX_LIST, |
@@ -99,6 +99,7 @@ static const u16 mgmt_events[] = { | |||
99 | MGMT_EV_DEVICE_BLOCKED, | 99 | MGMT_EV_DEVICE_BLOCKED, |
100 | MGMT_EV_DEVICE_UNBLOCKED, | 100 | MGMT_EV_DEVICE_UNBLOCKED, |
101 | MGMT_EV_DEVICE_UNPAIRED, | 101 | MGMT_EV_DEVICE_UNPAIRED, |
102 | MGMT_EV_PASSKEY_NOTIFY, | ||
102 | }; | 103 | }; |
103 | 104 | ||
104 | /* | 105 | /* |
@@ -3093,16 +3094,17 @@ static void unpair_device_rsp(struct pending_cmd *cmd, void *data) | |||
3093 | } | 3094 | } |
3094 | 3095 | ||
3095 | int mgmt_device_disconnected(struct hci_dev *hdev, bdaddr_t *bdaddr, | 3096 | int mgmt_device_disconnected(struct hci_dev *hdev, bdaddr_t *bdaddr, |
3096 | u8 link_type, u8 addr_type) | 3097 | u8 link_type, u8 addr_type, u8 reason) |
3097 | { | 3098 | { |
3098 | struct mgmt_addr_info ev; | 3099 | struct mgmt_ev_device_disconnected ev; |
3099 | struct sock *sk = NULL; | 3100 | struct sock *sk = NULL; |
3100 | int err; | 3101 | int err; |
3101 | 3102 | ||
3102 | mgmt_pending_foreach(MGMT_OP_DISCONNECT, hdev, disconnect_rsp, &sk); | 3103 | mgmt_pending_foreach(MGMT_OP_DISCONNECT, hdev, disconnect_rsp, &sk); |
3103 | 3104 | ||
3104 | bacpy(&ev.bdaddr, bdaddr); | 3105 | bacpy(&ev.addr.bdaddr, bdaddr); |
3105 | ev.type = link_to_bdaddr(link_type, addr_type); | 3106 | ev.addr.type = link_to_bdaddr(link_type, addr_type); |
3107 | ev.reason = reason; | ||
3106 | 3108 | ||
3107 | err = mgmt_event(MGMT_EV_DEVICE_DISCONNECTED, hdev, &ev, sizeof(ev), | 3109 | err = mgmt_event(MGMT_EV_DEVICE_DISCONNECTED, hdev, &ev, sizeof(ev), |
3108 | sk); | 3110 | sk); |
@@ -3291,6 +3293,22 @@ int mgmt_user_passkey_neg_reply_complete(struct hci_dev *hdev, bdaddr_t *bdaddr, | |||
3291 | MGMT_OP_USER_PASSKEY_NEG_REPLY); | 3293 | MGMT_OP_USER_PASSKEY_NEG_REPLY); |
3292 | } | 3294 | } |
3293 | 3295 | ||
3296 | int mgmt_user_passkey_notify(struct hci_dev *hdev, bdaddr_t *bdaddr, | ||
3297 | u8 link_type, u8 addr_type, u32 passkey, | ||
3298 | u8 entered) | ||
3299 | { | ||
3300 | struct mgmt_ev_passkey_notify ev; | ||
3301 | |||
3302 | BT_DBG("%s", hdev->name); | ||
3303 | |||
3304 | bacpy(&ev.addr.bdaddr, bdaddr); | ||
3305 | ev.addr.type = link_to_bdaddr(link_type, addr_type); | ||
3306 | ev.passkey = __cpu_to_le32(passkey); | ||
3307 | ev.entered = entered; | ||
3308 | |||
3309 | return mgmt_event(MGMT_EV_PASSKEY_NOTIFY, hdev, &ev, sizeof(ev), NULL); | ||
3310 | } | ||
3311 | |||
3294 | int mgmt_auth_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | 3312 | int mgmt_auth_failed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, |
3295 | u8 addr_type, u8 status) | 3313 | u8 addr_type, u8 status) |
3296 | { | 3314 | { |