diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/mgmt.c | 12 |
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, |