All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Bluetooth: Remove redundant check for remote_key_dist
@ 2014-08-07  7:03 johan.hedberg
  2014-08-07  7:03 ` [PATCH 2/2] Bluetooth: Fix confusion between parent and child channel for 6lowpan johan.hedberg
  2014-08-07 16:21 ` [PATCH 1/2] Bluetooth: Remove redundant check for remote_key_dist Marcel Holtmann
  0 siblings, 2 replies; 4+ messages in thread
From: johan.hedberg @ 2014-08-07  7:03 UTC (permalink / raw)
  To: linux-bluetooth

From: Johan Hedberg <johan.hedberg@intel.com>

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().

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
 net/bluetooth/smp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index fd3294300803..40db728f044b 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -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;
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] Bluetooth: Fix confusion between parent and child channel for 6lowpan
  2014-08-07  7:03 [PATCH 1/2] Bluetooth: Remove redundant check for remote_key_dist johan.hedberg
@ 2014-08-07  7:03 ` johan.hedberg
  2014-08-07 16:21   ` Marcel Holtmann
  2014-08-07 16:21 ` [PATCH 1/2] Bluetooth: Remove redundant check for remote_key_dist Marcel Holtmann
  1 sibling, 1 reply; 4+ messages in thread
From: johan.hedberg @ 2014-08-07  7:03 UTC (permalink / raw)
  To: linux-bluetooth

From: Johan Hedberg <johan.hedberg@intel.com>

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.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
 net/bluetooth/6lowpan.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index 206b65ccd5b8..35ebe79c87b0 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -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)
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] Bluetooth: Remove redundant check for remote_key_dist
  2014-08-07  7:03 [PATCH 1/2] Bluetooth: Remove redundant check for remote_key_dist johan.hedberg
  2014-08-07  7:03 ` [PATCH 2/2] Bluetooth: Fix confusion between parent and child channel for 6lowpan johan.hedberg
@ 2014-08-07 16:21 ` Marcel Holtmann
  1 sibling, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2014-08-07 16:21 UTC (permalink / raw)
  To: Johan Hedberg; +Cc: linux-bluetooth

Hi Johan,

> 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().
> 
> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
> ---
> net/bluetooth/smp.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] Bluetooth: Fix confusion between parent and child channel for 6lowpan
  2014-08-07  7:03 ` [PATCH 2/2] Bluetooth: Fix confusion between parent and child channel for 6lowpan johan.hedberg
@ 2014-08-07 16:21   ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2014-08-07 16:21 UTC (permalink / raw)
  To: Johan Hedberg; +Cc: linux-bluetooth

Hi Johan,

> 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.
> 
> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
> ---
> net/bluetooth/6lowpan.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-07 16:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-07  7:03 [PATCH 1/2] Bluetooth: Remove redundant check for remote_key_dist johan.hedberg
2014-08-07  7:03 ` [PATCH 2/2] Bluetooth: Fix confusion between parent and child channel for 6lowpan johan.hedberg
2014-08-07 16:21   ` Marcel Holtmann
2014-08-07 16:21 ` [PATCH 1/2] Bluetooth: Remove redundant check for remote_key_dist Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.