diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-10-19 13:57:46 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-10-24 09:11:21 -0400 |
commit | 572c7f8429e3c015dd8931b2d3f71b512a7f15f1 (patch) | |
tree | b204484cbbd2ea9da500266946a2eb7f4423651d /net/bluetooth | |
parent | e1171e8d9c50c38a9adba72bb23949d9b975335c (diff) |
Bluetooth: Fix LE MTU reporting for HCIGETDEVINFO
This patch fixes the use of le_mtu and le_pkts values in the
HCIGETDEVINFO ioctl for LE-only controllers.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_core.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 854202679c49..5a3400d8a6e5 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -992,10 +992,17 @@ int hci_get_dev_info(void __user *arg) | |||
992 | di.type = (hdev->bus & 0x0f) | (hdev->dev_type << 4); | 992 | di.type = (hdev->bus & 0x0f) | (hdev->dev_type << 4); |
993 | di.flags = hdev->flags; | 993 | di.flags = hdev->flags; |
994 | di.pkt_type = hdev->pkt_type; | 994 | di.pkt_type = hdev->pkt_type; |
995 | di.acl_mtu = hdev->acl_mtu; | 995 | if (lmp_bredr_capable(hdev)) { |
996 | di.acl_pkts = hdev->acl_pkts; | 996 | di.acl_mtu = hdev->acl_mtu; |
997 | di.sco_mtu = hdev->sco_mtu; | 997 | di.acl_pkts = hdev->acl_pkts; |
998 | di.sco_pkts = hdev->sco_pkts; | 998 | di.sco_mtu = hdev->sco_mtu; |
999 | di.sco_pkts = hdev->sco_pkts; | ||
1000 | } else { | ||
1001 | di.acl_mtu = hdev->le_mtu; | ||
1002 | di.acl_pkts = hdev->le_pkts; | ||
1003 | di.sco_mtu = 0; | ||
1004 | di.sco_pkts = 0; | ||
1005 | } | ||
999 | di.link_policy = hdev->link_policy; | 1006 | di.link_policy = hdev->link_policy; |
1000 | di.link_mode = hdev->link_mode; | 1007 | di.link_mode = hdev->link_mode; |
1001 | 1008 | ||