]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Change page scan interval in fast connectable mode
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 28 Jun 2012 10:44:30 +0000 (13:44 +0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Mon, 16 Jul 2012 13:50:11 +0000 (10:50 -0300)
This patch is based on a user space (hciops) patch which never made it
upstream but does make sense to include in the mgmt part of the kernel.

(User space) commit message from Dmitriy Paliy:
"
Page scan interval in fast connectable mode is changed from 22.5 msec to
160 msec to perform less aggressive page scanning. This is done
accordingly to controller vendor recommendation.

Primary concern is that current parameters 22.5 interval, 11.25 window,
and interleaved scanning occupy whole radio bandwidth. Changing interval
to 160 msec should be sufficient for both speeding up connection
establishment and leaving space for other activities, like inquiry scan,
e.g.
"

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/mgmt.c

index 0475f376ebfefe262b4ce94b7dfdcca324d35c00..ad6613d17ca6de815be200b9576d6ecf510fef0d 100644 (file)
@@ -2596,8 +2596,8 @@ static int set_fast_connectable(struct sock *sk, struct hci_dev *hdev,
        if (cp->val) {
                type = PAGE_SCAN_TYPE_INTERLACED;
 
-               /* 22.5 msec page scan interval */
-               acp.interval = __constant_cpu_to_le16(0x0024);
+               /* 160 msec page scan interval */
+               acp.interval = __constant_cpu_to_le16(0x0100);
        } else {
                type = PAGE_SCAN_TYPE_STANDARD; /* default */