Bluetooth: Remove redundant check for remote_key_dist
Subsystems (2)
PATCH 1/2 Bluetooth: Remove redundant check for remote_key_dist
From: Johan Hedberg <[email protected]>
In the smp_cmd_sign_info() function the SMP_DIST_SIGN bit is explicitly cleared early on in the function. This means that there's no need to check for it again before calling smp_distribute_keys().
--- net/bluetooth/smp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
net/bluetooth/smp.c +1 -2
@@ -1168,8 +1168,7 @@ static int smp_cmd_sign_info(struct l2cap_conn *conn, struct sk_buff *skb)memcpy (csrk->val, rp->csrk,sizeof (csrk->val)); } smp->csrk = csrk; -if (!(smp->remote_key_dist &SMP_DIST_SIGN )) -smp_distribute_keys (conn); +smp_distribute_keys (conn);hci_dev_unlock (hdev);return 0 ;
Signature · 1 line
1.9.3
PATCH 2/2 Bluetooth: Fix confusion between parent and child channel for 6lowpan
From: Johan Hedberg <[email protected]>
The new_connection L2CAP channel callback creates a new channel based on the provided parent channel. The 6lowpan code was confusingly naming the child channel "pchan" and the parent channel "chan". This patch swaps the names.
--- net/bluetooth/6lowpan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
net/bluetooth/6lowpan.c +5 -5
@@ -772,16 +772,16 @@ static inline void chan_ready_cb(struct l2cap_chan *chan)ifup (dev->netdev); } -static inline struct l2cap_chan *chan_new_conn_cb (struct l2cap_chan *chan) +static inline struct l2cap_chan *chan_new_conn_cb (struct l2cap_chan *pchan) { -struct l2cap_chan *pchan; +struct l2cap_chan *chan; - pchan =chan_open (chan); - pchan->ops = chan->ops; + chan =chan_open (pchan); + chan->ops = pchan->ops;BT_DBG ("chan %p pchan %p" , chan, pchan); -return pchan; +return chan; }static void delete_netdev (struct work_struct *work)
Signature · 1 line
1.9.3
Marcel Holtmann
maintainerRe: [PATCH 2/2] Bluetooth: Fix confusion between parent and child channel for 6lowpan
Hi Johan,
Quoted 9 lines
The
new_connectionL2CAP channel callback creates a new channel based on the provided parent channel. The 6lowpan code was confusingly naming the child channel "pchan" and the parent channel "chan". This patch swaps the names.Signed-off-by Johan Hedberg <[email protected]>---
net/bluetooth/6lowpan.c| 10 +++++-----1 file changed, 5 insertions(+), 5 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
Marcel Holtmann
maintainerHi Johan,
Quoted 8 lines
In the
smp_cmd_sign_info()function theSMP_DIST_SIGNbit is explicitly cleared early on in the function. This means that there's no need to check for it again before callingsmp_distribute_keys().Signed-off-by Johan Hedberg <[email protected]>---
net/bluetooth/smp.c| 3 +--1 file changed, 1 insertion(+), 2 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel