summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-06-04 22:45:57 +0300
committerMarcel Holtmann <marcel@holtmann.org>2014-12-03 16:51:19 +0100
commit1408bb6efb04da3efdc998df1bc032c1d86d1842 (patch)
treeeb63e30af1c8f3942b1d54bef49b772b8935e334
parentd3e54a876e35120b3355e22d78861e73a6acab6f (diff)
downloadop-kernel-dev-1408bb6efb04da3efdc998df1bc032c1d86d1842.zip
op-kernel-dev-1408bb6efb04da3efdc998df1bc032c1d86d1842.tar.gz
Bluetooth: Add dummy handler for LE SC keypress notification
Since we don not actively try to clear the keypress notification bit we might get these PDUs. To avoid failing the pairing process add a simple dummy handler for these for now. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--net/bluetooth/smp.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 9a4ce45..918ce03 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -2346,6 +2346,16 @@ static int smp_cmd_dhkey_check(struct l2cap_conn *conn, struct sk_buff *skb)
return 0;
}
+static int smp_cmd_keypress_notify(struct l2cap_conn *conn,
+ struct sk_buff *skb)
+{
+ struct smp_cmd_keypress_notify *kp = (void *) skb->data;
+
+ BT_DBG("value 0x%02x", kp->value);
+
+ return 0;
+}
+
static int smp_sig_channel(struct l2cap_chan *chan, struct sk_buff *skb)
{
struct l2cap_conn *conn = chan->conn;
@@ -2438,6 +2448,10 @@ static int smp_sig_channel(struct l2cap_chan *chan, struct sk_buff *skb)
reason = smp_cmd_dhkey_check(conn, skb);
break;
+ case SMP_CMD_KEYPRESS_NOTIFY:
+ reason = smp_cmd_keypress_notify(conn, skb);
+ break;
+
default:
BT_DBG("Unknown command code 0x%2.2x", code);
reason = SMP_CMD_NOTSUPP;
OpenPOWER on IntegriCloud