diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2012-04-03 07:46:54 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo@padovan.org> | 2012-05-08 23:41:37 -0400 |
commit | 0ed09148fa61e01cd27c92933ba275ea8078b34d (patch) | |
tree | f0369054b06186149844c40a43f49b50213bf972 /net/bluetooth/mgmt.c | |
parent | eb19aaacb3f88dbd69e1cd9a2b1f054d4dade678 (diff) |
Bluetooth: Remove MGMT_ADDR_INVALID macro
This patch removes the MGMT_ADDR_INVALID macro. If the address type
isn't LE, we consider it is BR/EDR type.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 1ec16721ed7a..5e80c6db6ae7 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -1640,15 +1640,15 @@ static u8 link_to_mgmt(u8 link_type, u8 addr_type) | |||
1640 | switch (addr_type) { | 1640 | switch (addr_type) { |
1641 | case ADDR_LE_DEV_PUBLIC: | 1641 | case ADDR_LE_DEV_PUBLIC: |
1642 | return MGMT_ADDR_LE_PUBLIC; | 1642 | return MGMT_ADDR_LE_PUBLIC; |
1643 | case ADDR_LE_DEV_RANDOM: | 1643 | |
1644 | return MGMT_ADDR_LE_RANDOM; | ||
1645 | default: | 1644 | default: |
1646 | return MGMT_ADDR_INVALID; | 1645 | /* Fallback to LE Random address type */ |
1646 | return MGMT_ADDR_LE_RANDOM; | ||
1647 | } | 1647 | } |
1648 | case ACL_LINK: | 1648 | |
1649 | return MGMT_ADDR_BREDR; | ||
1650 | default: | 1649 | default: |
1651 | return MGMT_ADDR_INVALID; | 1650 | /* Fallback to BR/EDR type */ |
1651 | return MGMT_ADDR_BREDR; | ||
1652 | } | 1652 | } |
1653 | } | 1653 | } |
1654 | 1654 | ||
@@ -1690,7 +1690,7 @@ static int get_connections(struct sock *sk, struct hci_dev *hdev, void *data, | |||
1690 | continue; | 1690 | continue; |
1691 | bacpy(&rp->addr[i].bdaddr, &c->dst); | 1691 | bacpy(&rp->addr[i].bdaddr, &c->dst); |
1692 | rp->addr[i].type = link_to_mgmt(c->type, c->dst_type); | 1692 | rp->addr[i].type = link_to_mgmt(c->type, c->dst_type); |
1693 | if (rp->addr[i].type == MGMT_ADDR_INVALID) | 1693 | if (c->type == SCO_LINK || c->type == ESCO_LINK) |
1694 | continue; | 1694 | continue; |
1695 | i++; | 1695 | i++; |
1696 | } | 1696 | } |