Skip to content

Commit 1408bb6

Browse files
jhedbergholtmann
authored andcommitted
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>
1 parent d3e54a8 commit 1408bb6

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎net/bluetooth/smp.c‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,6 +2346,16 @@ static int smp_cmd_dhkey_check(struct l2cap_conn *conn, struct sk_buff *skb)
23462346
return 0;
23472347
}
23482348

2349+
static int smp_cmd_keypress_notify(struct l2cap_conn *conn,
2350+
struct sk_buff *skb)
2351+
{
2352+
struct smp_cmd_keypress_notify *kp = (void *) skb->data;
2353+
2354+
BT_DBG("value 0x%02x", kp->value);
2355+
2356+
return 0;
2357+
}
2358+
23492359
static int smp_sig_channel(struct l2cap_chan *chan, struct sk_buff *skb)
23502360
{
23512361
struct l2cap_conn *conn = chan->conn;
@@ -2438,6 +2448,10 @@ static int smp_sig_channel(struct l2cap_chan *chan, struct sk_buff *skb)
24382448
reason = smp_cmd_dhkey_check(conn, skb);
24392449
break;
24402450

2451+
case SMP_CMD_KEYPRESS_NOTIFY:
2452+
reason = smp_cmd_keypress_notify(conn, skb);
2453+
break;
2454+
24412455
default:
24422456
BT_DBG("Unknown command code 0x%2.2x", code);
24432457
reason = SMP_CMD_NOTSUPP;

0 commit comments

Comments
 (0)