* [PATCH 0/2] Add debug macros to Discovery @ 2011-11-22 20:14 Andre Guedes 2011-11-22 20:14 ` [PATCH 1/2] Bluetooth: Move debug macros Andre Guedes 2011-11-22 20:14 ` [PATCH 2/2] Bluetooth: Add BT_DBG to mgmt_discovering() Andre Guedes 0 siblings, 2 replies; 7+ messages in thread From: Andre Guedes @ 2011-11-22 20:14 UTC (permalink / raw) To: linux-bluetooth Hi all, These two patches helped me during tracing analysis of mgmt discovery commands and It would be good to have them pushed upstream. Andre Guedes (2): Bluetooth: Move debug macros Bluetooth: Add BT_DBG to mgmt_discovering() net/bluetooth/hci_core.c | 8 ++++---- net/bluetooth/mgmt.c | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) -- 1.7.7.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] Bluetooth: Move debug macros 2011-11-22 20:14 [PATCH 0/2] Add debug macros to Discovery Andre Guedes @ 2011-11-22 20:14 ` Andre Guedes 2012-02-03 23:27 ` Marcel Holtmann 2011-11-22 20:14 ` [PATCH 2/2] Bluetooth: Add BT_DBG to mgmt_discovering() Andre Guedes 1 sibling, 1 reply; 7+ messages in thread From: Andre Guedes @ 2011-11-22 20:14 UTC (permalink / raw) To: linux-bluetooth Move debug macros so they provide us more meaningful information during debugging analysis. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> --- net/bluetooth/hci_core.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index ef0423e..8487483 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -2594,11 +2594,11 @@ int hci_do_inquiry(struct hci_dev *hdev, u8 length) u8 lap[3] = { 0x33, 0x8b, 0x9e }; struct hci_cp_inquiry cp; - BT_DBG("%s", hdev->name); - if (test_bit(HCI_INQUIRY, &hdev->flags)) return -EINPROGRESS; + BT_DBG("%s", hdev->name); + memset(&cp, 0, sizeof(cp)); memcpy(&cp.lap, lap, sizeof(cp.lap)); cp.length = length; @@ -2608,11 +2608,11 @@ int hci_do_inquiry(struct hci_dev *hdev, u8 length) int hci_cancel_inquiry(struct hci_dev *hdev) { - BT_DBG("%s", hdev->name); - if (!test_bit(HCI_INQUIRY, &hdev->flags)) return -EPERM; + BT_DBG("%s", hdev->name); + return hci_send_cmd(hdev, HCI_OP_INQUIRY_CANCEL, 0, NULL); } -- 1.7.7.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Bluetooth: Move debug macros 2011-11-22 20:14 ` [PATCH 1/2] Bluetooth: Move debug macros Andre Guedes @ 2012-02-03 23:27 ` Marcel Holtmann 0 siblings, 0 replies; 7+ messages in thread From: Marcel Holtmann @ 2012-02-03 23:27 UTC (permalink / raw) To: Andre Guedes; +Cc: linux-bluetooth Hi Andre, > Move debug macros so they provide us more meaningful information > during debugging analysis. > > Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> > --- > net/bluetooth/hci_core.c | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c > index ef0423e..8487483 100644 > --- a/net/bluetooth/hci_core.c > +++ b/net/bluetooth/hci_core.c > @@ -2594,11 +2594,11 @@ int hci_do_inquiry(struct hci_dev *hdev, u8 length) > u8 lap[3] = { 0x33, 0x8b, 0x9e }; > struct hci_cp_inquiry cp; > > - BT_DBG("%s", hdev->name); > - > if (test_bit(HCI_INQUIRY, &hdev->flags)) > return -EINPROGRESS; > > + BT_DBG("%s", hdev->name); > + I actually do not like this change much. Can we just add the flags into the debug print instead. Regards Marcel ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] Bluetooth: Add BT_DBG to mgmt_discovering() 2011-11-22 20:14 [PATCH 0/2] Add debug macros to Discovery Andre Guedes 2011-11-22 20:14 ` [PATCH 1/2] Bluetooth: Move debug macros Andre Guedes @ 2011-11-22 20:14 ` Andre Guedes 2012-02-03 23:17 ` Andre Guedes 2012-02-03 23:27 ` Marcel Holtmann 1 sibling, 2 replies; 7+ messages in thread From: Andre Guedes @ 2011-11-22 20:14 UTC (permalink / raw) To: linux-bluetooth Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> --- net/bluetooth/mgmt.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index f615a5a..19503f9 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -2680,6 +2680,8 @@ int mgmt_discovering(struct hci_dev *hdev, u8 discovering) { struct pending_cmd *cmd; + BT_DBG("%s discovering %u", hdev->name, discovering); + if (discovering) cmd = mgmt_pending_find(MGMT_OP_START_DISCOVERY, hdev); else -- 1.7.7.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] Bluetooth: Add BT_DBG to mgmt_discovering() 2011-11-22 20:14 ` [PATCH 2/2] Bluetooth: Add BT_DBG to mgmt_discovering() Andre Guedes @ 2012-02-03 23:17 ` Andre Guedes 2012-02-03 23:27 ` Marcel Holtmann 1 sibling, 0 replies; 7+ messages in thread From: Andre Guedes @ 2012-02-03 23:17 UTC (permalink / raw) To: linux-bluetooth Please consider applying this patch. It is really helpful during discovery debugging. On Tue, Nov 22, 2011 at 5:14 PM, Andre Guedes <andre.guedes@openbossa.org> wrote: > Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> > --- > net/bluetooth/mgmt.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c > index f615a5a..19503f9 100644 > --- a/net/bluetooth/mgmt.c > +++ b/net/bluetooth/mgmt.c > @@ -2680,6 +2680,8 @@ int mgmt_discovering(struct hci_dev *hdev, u8 discovering) > { > struct pending_cmd *cmd; > > + BT_DBG("%s discovering %u", hdev->name, discovering); > + > if (discovering) > cmd = mgmt_pending_find(MGMT_OP_START_DISCOVERY, hdev); > else > -- > 1.7.7.1 > Andre ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] Bluetooth: Add BT_DBG to mgmt_discovering() 2011-11-22 20:14 ` [PATCH 2/2] Bluetooth: Add BT_DBG to mgmt_discovering() Andre Guedes 2012-02-03 23:17 ` Andre Guedes @ 2012-02-03 23:27 ` Marcel Holtmann 2012-02-03 23:33 ` Johan Hedberg 1 sibling, 1 reply; 7+ messages in thread From: Marcel Holtmann @ 2012-02-03 23:27 UTC (permalink / raw) To: Andre Guedes; +Cc: linux-bluetooth Hi Andre, > Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> > --- > net/bluetooth/mgmt.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) Acked-by: Marcel Holtmann <marcel@holtmann.org> Regards Marcel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] Bluetooth: Add BT_DBG to mgmt_discovering() 2012-02-03 23:27 ` Marcel Holtmann @ 2012-02-03 23:33 ` Johan Hedberg 0 siblings, 0 replies; 7+ messages in thread From: Johan Hedberg @ 2012-02-03 23:33 UTC (permalink / raw) To: Marcel Holtmann; +Cc: Andre Guedes, linux-bluetooth Hi, On Fri, Feb 03, 2012, Marcel Holtmann wrote: > > Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> > > --- > > net/bluetooth/mgmt.c | 2 ++ > > 1 files changed, 2 insertions(+), 0 deletions(-) > > Acked-by: Marcel Holtmann <marcel@holtmann.org> Applied to my bluetooth-next tree. Johan ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-02-03 23:33 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-11-22 20:14 [PATCH 0/2] Add debug macros to Discovery Andre Guedes 2011-11-22 20:14 ` [PATCH 1/2] Bluetooth: Move debug macros Andre Guedes 2012-02-03 23:27 ` Marcel Holtmann 2011-11-22 20:14 ` [PATCH 2/2] Bluetooth: Add BT_DBG to mgmt_discovering() Andre Guedes 2012-02-03 23:17 ` Andre Guedes 2012-02-03 23:27 ` Marcel Holtmann 2012-02-03 23:33 ` Johan Hedberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).