diff options
-rw-r--r-- | include/net/bluetooth/hci_core.h | 2 | ||||
-rw-r--r-- | net/bluetooth/hci_core.c | 9 | ||||
-rw-r--r-- | net/bluetooth/sco.c | 3 |
3 files changed, 3 insertions, 11 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index ce3c99e5fa25..9830a88f487e 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -637,7 +637,7 @@ int hci_unregister_notifier(struct notifier_block *nb); | |||
637 | 637 | ||
638 | int hci_send_cmd(struct hci_dev *hdev, __u16 opcode, __u32 plen, void *param); | 638 | int hci_send_cmd(struct hci_dev *hdev, __u16 opcode, __u32 plen, void *param); |
639 | int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags); | 639 | int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags); |
640 | int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb); | 640 | void hci_send_sco(struct hci_conn *conn, struct sk_buff *skb); |
641 | 641 | ||
642 | void *hci_sent_cmd_data(struct hci_dev *hdev, __u16 opcode); | 642 | void *hci_sent_cmd_data(struct hci_dev *hdev, __u16 opcode); |
643 | 643 | ||
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 4ad23192c7a5..1c9aef97f519 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -1308,18 +1308,13 @@ int hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags) | |||
1308 | EXPORT_SYMBOL(hci_send_acl); | 1308 | EXPORT_SYMBOL(hci_send_acl); |
1309 | 1309 | ||
1310 | /* Send SCO data */ | 1310 | /* Send SCO data */ |
1311 | int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb) | 1311 | void hci_send_sco(struct hci_conn *conn, struct sk_buff *skb) |
1312 | { | 1312 | { |
1313 | struct hci_dev *hdev = conn->hdev; | 1313 | struct hci_dev *hdev = conn->hdev; |
1314 | struct hci_sco_hdr hdr; | 1314 | struct hci_sco_hdr hdr; |
1315 | 1315 | ||
1316 | BT_DBG("%s len %d", hdev->name, skb->len); | 1316 | BT_DBG("%s len %d", hdev->name, skb->len); |
1317 | 1317 | ||
1318 | if (skb->len > hdev->sco_mtu) { | ||
1319 | kfree_skb(skb); | ||
1320 | return -EINVAL; | ||
1321 | } | ||
1322 | |||
1323 | hdr.handle = cpu_to_le16(conn->handle); | 1318 | hdr.handle = cpu_to_le16(conn->handle); |
1324 | hdr.dlen = skb->len; | 1319 | hdr.dlen = skb->len; |
1325 | 1320 | ||
@@ -1332,8 +1327,6 @@ int hci_send_sco(struct hci_conn *conn, struct sk_buff *skb) | |||
1332 | 1327 | ||
1333 | skb_queue_tail(&conn->data_q, skb); | 1328 | skb_queue_tail(&conn->data_q, skb); |
1334 | tasklet_schedule(&hdev->tx_task); | 1329 | tasklet_schedule(&hdev->tx_task); |
1335 | |||
1336 | return 0; | ||
1337 | } | 1330 | } |
1338 | EXPORT_SYMBOL(hci_send_sco); | 1331 | EXPORT_SYMBOL(hci_send_sco); |
1339 | 1332 | ||
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index b406d3eff53a..541b26efb724 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -249,8 +249,7 @@ static inline int sco_send_frame(struct sock *sk, struct msghdr *msg, int len) | |||
249 | goto fail; | 249 | goto fail; |
250 | } | 250 | } |
251 | 251 | ||
252 | if ((err = hci_send_sco(conn->hcon, skb)) < 0) | 252 | hci_send_sco(conn->hcon, skb); |
253 | return err; | ||
254 | 253 | ||
255 | return count; | 254 | return count; |
256 | 255 | ||