diff options
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 62c23927684f..d769b428b630 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -219,8 +219,9 @@ static u8 mgmt_status(u8 hci_status) | |||
219 | return MGMT_STATUS_FAILED; | 219 | return MGMT_STATUS_FAILED; |
220 | } | 220 | } |
221 | 221 | ||
222 | static int mgmt_event(u16 event, struct hci_dev *hdev, void *data, u16 data_len, | 222 | static int mgmt_send_event(u16 event, struct hci_dev *hdev, |
223 | struct sock *skip_sk) | 223 | unsigned short channel, void *data, u16 data_len, |
224 | struct sock *skip_sk) | ||
224 | { | 225 | { |
225 | struct sk_buff *skb; | 226 | struct sk_buff *skb; |
226 | struct mgmt_hdr *hdr; | 227 | struct mgmt_hdr *hdr; |
@@ -243,12 +244,19 @@ static int mgmt_event(u16 event, struct hci_dev *hdev, void *data, u16 data_len, | |||
243 | /* Time stamp */ | 244 | /* Time stamp */ |
244 | __net_timestamp(skb); | 245 | __net_timestamp(skb); |
245 | 246 | ||
246 | hci_send_to_channel(HCI_CHANNEL_CONTROL, skb, skip_sk); | 247 | hci_send_to_channel(channel, skb, skip_sk); |
247 | kfree_skb(skb); | 248 | kfree_skb(skb); |
248 | 249 | ||
249 | return 0; | 250 | return 0; |
250 | } | 251 | } |
251 | 252 | ||
253 | static int mgmt_event(u16 event, struct hci_dev *hdev, void *data, u16 len, | ||
254 | struct sock *skip_sk) | ||
255 | { | ||
256 | return mgmt_send_event(event, hdev, HCI_CHANNEL_CONTROL, data, len, | ||
257 | skip_sk); | ||
258 | } | ||
259 | |||
252 | static int mgmt_cmd_status(struct sock *sk, u16 index, u16 cmd, u8 status) | 260 | static int mgmt_cmd_status(struct sock *sk, u16 index, u16 cmd, u8 status) |
253 | { | 261 | { |
254 | struct sk_buff *skb; | 262 | struct sk_buff *skb; |