aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2011-12-14 17:47:36 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-12-18 14:34:48 -0500
commitf7c6869cebe631582fdc2ac57459ee217ce9b015 (patch)
treeb9094ddb8ed6a8254958f245eecf1a4b1467f76d /net
parent69ab39ea5da03e632a51b31534da713aff8d1e3b (diff)
Bluetooth: Move mgmt_set_fast_connectable to the right location
Fast connectable is logically after the connectable property so that's where it should show up in the code as well (it's also after connectable in the settings bitfield). Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/mgmt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 087cf00a443d..34e48101339e 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2052,7 +2052,7 @@ static int set_fast_connectable(struct sock *sk, u16 index,
2052 unsigned char *data, u16 len) 2052 unsigned char *data, u16 len)
2053{ 2053{
2054 struct hci_dev *hdev; 2054 struct hci_dev *hdev;
2055 struct mgmt_cp_set_fast_connectable *cp = (void *) data; 2055 struct mgmt_mode *cp = (void *) data;
2056 struct hci_cp_write_page_scan_activity acp; 2056 struct hci_cp_write_page_scan_activity acp;
2057 u8 type; 2057 u8 type;
2058 int err; 2058 int err;
@@ -2070,7 +2070,7 @@ static int set_fast_connectable(struct sock *sk, u16 index,
2070 2070
2071 hci_dev_lock(hdev); 2071 hci_dev_lock(hdev);
2072 2072
2073 if (cp->enable) { 2073 if (cp->val) {
2074 type = PAGE_SCAN_TYPE_INTERLACED; 2074 type = PAGE_SCAN_TYPE_INTERLACED;
2075 acp.interval = 0x0024; /* 22.5 msec page scan interval */ 2075 acp.interval = 0x0024; /* 22.5 msec page scan interval */
2076 } else { 2076 } else {
@@ -2154,6 +2154,10 @@ int mgmt_control(struct sock *sk, struct msghdr *msg, size_t msglen)
2154 case MGMT_OP_SET_CONNECTABLE: 2154 case MGMT_OP_SET_CONNECTABLE:
2155 err = set_connectable(sk, index, buf + sizeof(*hdr), len); 2155 err = set_connectable(sk, index, buf + sizeof(*hdr), len);
2156 break; 2156 break;
2157 case MGMT_OP_SET_FAST_CONNECTABLE:
2158 err = set_fast_connectable(sk, index, buf + sizeof(*hdr),
2159 len);
2160 break;
2157 case MGMT_OP_SET_PAIRABLE: 2161 case MGMT_OP_SET_PAIRABLE:
2158 err = set_pairable(sk, index, buf + sizeof(*hdr), len); 2162 err = set_pairable(sk, index, buf + sizeof(*hdr), len);
2159 break; 2163 break;
@@ -2232,10 +2236,6 @@ int mgmt_control(struct sock *sk, struct msghdr *msg, size_t msglen)
2232 case MGMT_OP_UNBLOCK_DEVICE: 2236 case MGMT_OP_UNBLOCK_DEVICE:
2233 err = unblock_device(sk, index, buf + sizeof(*hdr), len); 2237 err = unblock_device(sk, index, buf + sizeof(*hdr), len);
2234 break; 2238 break;
2235 case MGMT_OP_SET_FAST_CONNECTABLE:
2236 err = set_fast_connectable(sk, index, buf + sizeof(*hdr),
2237 len);
2238 break;
2239 default: 2239 default:
2240 BT_DBG("Unknown op %u", opcode); 2240 BT_DBG("Unknown op %u", opcode);
2241 err = cmd_status(sk, index, opcode, 2241 err = cmd_status(sk, index, opcode,