* [RFC] Bluetooth: btmrvl: Do not send vendor events to bluetooth stack
@ 2012-06-13 10:35 Andrei Emeltchenko
2012-06-14 18:11 ` Bing Zhao
0 siblings, 1 reply; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-06-13 10:35 UTC (permalink / raw)
To: linux-bluetooth, bzhao
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Vendor-specific events shall be processed in driver and not sent
to bluetooth stack where they screw up HCI command countings.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
drivers/bluetooth/btmrvl_drv.h | 2 +-
drivers/bluetooth/btmrvl_main.c | 14 ++++++++++++--
drivers/bluetooth/btmrvl_sdio.c | 8 +++++---
3 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h
index 94f2d65..27068d1 100644
--- a/drivers/bluetooth/btmrvl_drv.h
+++ b/drivers/bluetooth/btmrvl_drv.h
@@ -136,7 +136,7 @@ int btmrvl_remove_card(struct btmrvl_private *priv);
void btmrvl_interrupt(struct btmrvl_private *priv);
-void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb);
+bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb);
int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb);
int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd);
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
index 681ca9d..dc304de 100644
--- a/drivers/bluetooth/btmrvl_main.c
+++ b/drivers/bluetooth/btmrvl_main.c
@@ -44,23 +44,33 @@ void btmrvl_interrupt(struct btmrvl_private *priv)
}
EXPORT_SYMBOL_GPL(btmrvl_interrupt);
-void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
+bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
{
struct hci_event_hdr *hdr = (void *) skb->data;
struct hci_ev_cmd_complete *ec;
- u16 opcode, ocf;
+ u16 opcode, ocf, ogf;
if (hdr->evt == HCI_EV_CMD_COMPLETE) {
ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE);
opcode = __le16_to_cpu(ec->opcode);
ocf = hci_opcode_ocf(opcode);
+ ogf = hci_opcode_ogf(opcode);
+
if (ocf == BT_CMD_MODULE_CFG_REQ &&
priv->btmrvl_dev.sendcmdflag) {
priv->btmrvl_dev.sendcmdflag = false;
priv->adapter->cmd_complete = true;
wake_up_interruptible(&priv->adapter->cmd_wait_q);
}
+
+ if (ogf == OGF) {
+ BT_DBG("vendor event skipped: ogf 0x%4.4x", ogf);
+ kfree_skb(skb);
+ return false;
+ }
}
+
+ return true;
}
EXPORT_SYMBOL_GPL(btmrvl_check_evtpkt);
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index 3b9a8a3..8255a5e 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -565,10 +565,12 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
skb_put(skb, buf_len);
skb_pull(skb, SDIO_HEADER_LEN);
- if (type == HCI_EVENT_PKT)
- btmrvl_check_evtpkt(priv, skb);
+ if (type == HCI_EVENT_PKT) {
+ if (btmrvl_check_evtpkt(priv, skb))
+ hci_recv_frame(skb);
+ } else
+ hci_recv_frame(skb);
- hci_recv_frame(skb);
hdev->stat.byte_rx += buf_len;
break;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: [RFC] Bluetooth: btmrvl: Do not send vendor events to bluetooth stack
2012-06-13 10:35 [RFC] Bluetooth: btmrvl: Do not send vendor events to bluetooth stack Andrei Emeltchenko
@ 2012-06-14 18:11 ` Bing Zhao
2012-06-15 6:10 ` [PATCHv2] " Andrei Emeltchenko
0 siblings, 1 reply; 10+ messages in thread
From: Bing Zhao @ 2012-06-14 18:11 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
Hi Andrei,
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> Vendor-specific events shall be processed in driver and not sent
> to bluetooth stack where they screw up HCI command countings.
I tested this patch and it actually fixed the "hci0 command tx timeout" issue for me.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
Thanks,
Bing
> ---
> drivers/bluetooth/btmrvl_drv.h | 2 +-
> drivers/bluetooth/btmrvl_main.c | 14 ++++++++++++--
> drivers/bluetooth/btmrvl_sdio.c | 8 +++++---
> 3 files changed, 18 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h
> index 94f2d65..27068d1 100644
> --- a/drivers/bluetooth/btmrvl_drv.h
> +++ b/drivers/bluetooth/btmrvl_drv.h
> @@ -136,7 +136,7 @@ int btmrvl_remove_card(struct btmrvl_private *priv);
>
> void btmrvl_interrupt(struct btmrvl_private *priv);
>
> -void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb);
> +bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb);
> int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb);
>
> int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd);
> diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
> index 681ca9d..dc304de 100644
> --- a/drivers/bluetooth/btmrvl_main.c
> +++ b/drivers/bluetooth/btmrvl_main.c
> @@ -44,23 +44,33 @@ void btmrvl_interrupt(struct btmrvl_private *priv)
> }
> EXPORT_SYMBOL_GPL(btmrvl_interrupt);
>
> -void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
> +bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
> {
> struct hci_event_hdr *hdr = (void *) skb->data;
> struct hci_ev_cmd_complete *ec;
> - u16 opcode, ocf;
> + u16 opcode, ocf, ogf;
>
> if (hdr->evt == HCI_EV_CMD_COMPLETE) {
> ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE);
> opcode = __le16_to_cpu(ec->opcode);
> ocf = hci_opcode_ocf(opcode);
> + ogf = hci_opcode_ogf(opcode);
> +
> if (ocf == BT_CMD_MODULE_CFG_REQ &&
> priv->btmrvl_dev.sendcmdflag) {
> priv->btmrvl_dev.sendcmdflag = false;
> priv->adapter->cmd_complete = true;
> wake_up_interruptible(&priv->adapter->cmd_wait_q);
> }
> +
> + if (ogf == OGF) {
> + BT_DBG("vendor event skipped: ogf 0x%4.4x", ogf);
> + kfree_skb(skb);
> + return false;
> + }
> }
> +
> + return true;
> }
> EXPORT_SYMBOL_GPL(btmrvl_check_evtpkt);
>
> diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
> index 3b9a8a3..8255a5e 100644
> --- a/drivers/bluetooth/btmrvl_sdio.c
> +++ b/drivers/bluetooth/btmrvl_sdio.c
> @@ -565,10 +565,12 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
> skb_put(skb, buf_len);
> skb_pull(skb, SDIO_HEADER_LEN);
>
> - if (type == HCI_EVENT_PKT)
> - btmrvl_check_evtpkt(priv, skb);
> + if (type == HCI_EVENT_PKT) {
> + if (btmrvl_check_evtpkt(priv, skb))
> + hci_recv_frame(skb);
> + } else
> + hci_recv_frame(skb);
>
> - hci_recv_frame(skb);
> hdev->stat.byte_rx += buf_len;
> break;
>
> --
> 1.7.9.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCHv2] Bluetooth: btmrvl: Do not send vendor events to bluetooth stack
2012-06-14 18:11 ` Bing Zhao
@ 2012-06-15 6:10 ` Andrei Emeltchenko
2012-06-19 3:26 ` Gustavo Padovan
0 siblings, 1 reply; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-06-15 6:10 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Vendor-specific events shall be processed in driver and not sent
to bluetooth stack where they screw up HCI command countings.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
---
drivers/bluetooth/btmrvl_drv.h | 2 +-
drivers/bluetooth/btmrvl_main.c | 18 +++++++++++++++---
drivers/bluetooth/btmrvl_sdio.c | 9 ++++++---
3 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h
index 94f2d65..27068d1 100644
--- a/drivers/bluetooth/btmrvl_drv.h
+++ b/drivers/bluetooth/btmrvl_drv.h
@@ -136,7 +136,7 @@ int btmrvl_remove_card(struct btmrvl_private *priv);
void btmrvl_interrupt(struct btmrvl_private *priv);
-void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb);
+bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb);
int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb);
int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd);
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
index 681ca9d..3a4343b 100644
--- a/drivers/bluetooth/btmrvl_main.c
+++ b/drivers/bluetooth/btmrvl_main.c
@@ -44,23 +44,35 @@ void btmrvl_interrupt(struct btmrvl_private *priv)
}
EXPORT_SYMBOL_GPL(btmrvl_interrupt);
-void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
+bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
{
struct hci_event_hdr *hdr = (void *) skb->data;
- struct hci_ev_cmd_complete *ec;
- u16 opcode, ocf;
if (hdr->evt == HCI_EV_CMD_COMPLETE) {
+ struct hci_ev_cmd_complete *ec;
+ u16 opcode, ocf, ogf;
+
ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE);
opcode = __le16_to_cpu(ec->opcode);
ocf = hci_opcode_ocf(opcode);
+ ogf = hci_opcode_ogf(opcode);
+
if (ocf == BT_CMD_MODULE_CFG_REQ &&
priv->btmrvl_dev.sendcmdflag) {
priv->btmrvl_dev.sendcmdflag = false;
priv->adapter->cmd_complete = true;
wake_up_interruptible(&priv->adapter->cmd_wait_q);
}
+
+ if (ogf == OGF) {
+ BT_DBG("vendor event skipped: ogf 0x%4.4x ocf 0x%4.4x",
+ ogf, ocf);
+ kfree_skb(skb);
+ return false;
+ }
}
+
+ return true;
}
EXPORT_SYMBOL_GPL(btmrvl_check_evtpkt);
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index 3b9a8a3..e602cbd 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -565,10 +565,13 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
skb_put(skb, buf_len);
skb_pull(skb, SDIO_HEADER_LEN);
- if (type == HCI_EVENT_PKT)
- btmrvl_check_evtpkt(priv, skb);
+ if (type == HCI_EVENT_PKT) {
+ if (btmrvl_check_evtpkt(priv, skb))
+ hci_recv_frame(skb);
+ } else {
+ hci_recv_frame(skb);
+ }
- hci_recv_frame(skb);
hdev->stat.byte_rx += buf_len;
break;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCHv2] Bluetooth: btmrvl: Do not send vendor events to bluetooth stack
2012-06-15 6:10 ` [PATCHv2] " Andrei Emeltchenko
@ 2012-06-19 3:26 ` Gustavo Padovan
2012-06-28 13:48 ` Andrei Emeltchenko
0 siblings, 1 reply; 10+ messages in thread
From: Gustavo Padovan @ 2012-06-19 3:26 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
Hi Andrei,
* Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com> [2012-06-15 09:10:54 +0300]:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> Vendor-specific events shall be processed in driver and not sent
> to bluetooth stack where they screw up HCI command countings.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> Tested-by: Bing Zhao <bzhao@marvell.com>
> ---
> drivers/bluetooth/btmrvl_drv.h | 2 +-
> drivers/bluetooth/btmrvl_main.c | 18 +++++++++++++++---
> drivers/bluetooth/btmrvl_sdio.c | 9 ++++++---
> 3 files changed, 22 insertions(+), 7 deletions(-)
Patch has been applied to the bluetooth tree. Thanks.
Gustavo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCHv2] Bluetooth: btmrvl: Do not send vendor events to bluetooth stack
2012-06-19 3:26 ` Gustavo Padovan
@ 2012-06-28 13:48 ` Andrei Emeltchenko
2012-06-29 14:06 ` Johan Hedberg
0 siblings, 1 reply; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-06-28 13:48 UTC (permalink / raw)
To: Gustavo Padovan, linux-bluetooth
Hi Gustavo,
On Tue, Jun 19, 2012 at 12:26:30AM -0300, Gustavo Padovan wrote:
> Hi Andrei,
>
> * Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com> [2012-06-15 09:10:54 +0300]:
>
> > From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> >
> > Vendor-specific events shall be processed in driver and not sent
> > to bluetooth stack where they screw up HCI command countings.
> >
> > Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> > Tested-by: Bing Zhao <bzhao@marvell.com>
> > ---
> > drivers/bluetooth/btmrvl_drv.h | 2 +-
> > drivers/bluetooth/btmrvl_main.c | 18 +++++++++++++++---
> > drivers/bluetooth/btmrvl_sdio.c | 9 ++++++---
> > 3 files changed, 22 insertions(+), 7 deletions(-)
>
> Patch has been applied to the bluetooth tree. Thanks.
Which version have you applied? Old one?
Best regards
Andrei Emeltchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCHv2] Bluetooth: btmrvl: Do not send vendor events to bluetooth stack
2012-06-28 13:48 ` Andrei Emeltchenko
@ 2012-06-29 14:06 ` Johan Hedberg
2012-06-29 14:23 ` Andrei Emeltchenko
0 siblings, 1 reply; 10+ messages in thread
From: Johan Hedberg @ 2012-06-29 14:06 UTC (permalink / raw)
To: Andrei Emeltchenko, Gustavo Padovan, linux-bluetooth
Hi Andrei,
On Thu, Jun 28, 2012, Andrei Emeltchenko wrote:
> On Tue, Jun 19, 2012 at 12:26:30AM -0300, Gustavo Padovan wrote:
> > Hi Andrei,
> >
> > * Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com> [2012-06-15 09:10:54 +0300]:
> >
> > > From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> > >
> > > Vendor-specific events shall be processed in driver and not sent
> > > to bluetooth stack where they screw up HCI command countings.
> > >
> > > Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> > > Tested-by: Bing Zhao <bzhao@marvell.com>
> > > ---
> > > drivers/bluetooth/btmrvl_drv.h | 2 +-
> > > drivers/bluetooth/btmrvl_main.c | 18 +++++++++++++++---
> > > drivers/bluetooth/btmrvl_sdio.c | 9 ++++++---
> > > 3 files changed, 22 insertions(+), 7 deletions(-)
> >
> > Patch has been applied to the bluetooth tree. Thanks.
>
> Which version have you applied? Old one?
The patch that's upstream doesn't have the Tested-by tag so it seems
Gustavo might have applied the old version of the patch instead of v2.
Could you confirm?
Johan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCHv2] Bluetooth: btmrvl: Do not send vendor events to bluetooth stack
2012-06-29 14:06 ` Johan Hedberg
@ 2012-06-29 14:23 ` Andrei Emeltchenko
2012-06-30 15:28 ` Gustavo Padovan
0 siblings, 1 reply; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-06-29 14:23 UTC (permalink / raw)
To: Gustavo Padovan, linux-bluetooth
Hi Johan,
On Fri, Jun 29, 2012 at 05:06:35PM +0300, Johan Hedberg wrote:
> Hi Andrei,
>
> On Thu, Jun 28, 2012, Andrei Emeltchenko wrote:
> > On Tue, Jun 19, 2012 at 12:26:30AM -0300, Gustavo Padovan wrote:
> > > Hi Andrei,
> > >
> > > * Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com> [2012-06-15 09:10:54 +0300]:
> > >
> > > > From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> > > >
> > > > Vendor-specific events shall be processed in driver and not sent
> > > > to bluetooth stack where they screw up HCI command countings.
> > > >
> > > > Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> > > > Tested-by: Bing Zhao <bzhao@marvell.com>
> > > > ---
> > > > drivers/bluetooth/btmrvl_drv.h | 2 +-
> > > > drivers/bluetooth/btmrvl_main.c | 18 +++++++++++++++---
> > > > drivers/bluetooth/btmrvl_sdio.c | 9 ++++++---
> > > > 3 files changed, 22 insertions(+), 7 deletions(-)
> > >
> > > Patch has been applied to the bluetooth tree. Thanks.
> >
> > Which version have you applied? Old one?
>
> The patch that's upstream doesn't have the Tested-by tag so it seems
> Gustavo might have applied the old version of the patch instead of v2.
> Could you confirm?
Yes, there is old version. Apart from missing Tested-by tag there is one
style issue, debug issue and variable scope change which do not affect
functionality though.
If that patch would applied to bluetooth-next first I would notice that
much earlier...
Best regards
Andrei Emeltchenko
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCHv2] Bluetooth: btmrvl: Do not send vendor events to bluetooth stack
2012-06-29 14:23 ` Andrei Emeltchenko
@ 2012-06-30 15:28 ` Gustavo Padovan
2012-07-09 10:57 ` [PATCH] Bluetooth: btmrvl: trivial style fixes Andrei Emeltchenko
0 siblings, 1 reply; 10+ messages in thread
From: Gustavo Padovan @ 2012-06-30 15:28 UTC (permalink / raw)
To: Andrei Emeltchenko, linux-bluetooth
Hi Andrei,
* Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com> [2012-06-29 17:23:32 +0300]:
> Hi Johan,
>
> On Fri, Jun 29, 2012 at 05:06:35PM +0300, Johan Hedberg wrote:
> > Hi Andrei,
> >
> > On Thu, Jun 28, 2012, Andrei Emeltchenko wrote:
> > > On Tue, Jun 19, 2012 at 12:26:30AM -0300, Gustavo Padovan wrote:
> > > > Hi Andrei,
> > > >
> > > > * Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com> [2012-06-15 09:10:54 +0300]:
> > > >
> > > > > From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> > > > >
> > > > > Vendor-specific events shall be processed in driver and not sent
> > > > > to bluetooth stack where they screw up HCI command countings.
> > > > >
> > > > > Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> > > > > Tested-by: Bing Zhao <bzhao@marvell.com>
> > > > > ---
> > > > > drivers/bluetooth/btmrvl_drv.h | 2 +-
> > > > > drivers/bluetooth/btmrvl_main.c | 18 +++++++++++++++---
> > > > > drivers/bluetooth/btmrvl_sdio.c | 9 ++++++---
> > > > > 3 files changed, 22 insertions(+), 7 deletions(-)
> > > >
> > > > Patch has been applied to the bluetooth tree. Thanks.
> > >
> > > Which version have you applied? Old one?
> >
> > The patch that's upstream doesn't have the Tested-by tag so it seems
> > Gustavo might have applied the old version of the patch instead of v2.
> > Could you confirm?
>
> Yes, there is old version. Apart from missing Tested-by tag there is one
> style issue, debug issue and variable scope change which do not affect
> functionality though.
>
> If that patch would applied to bluetooth-next first I would notice that
> much earlier...
This patch already went to wireless, so I can't change it anymore, can you
send a delta patch with the fixes that are in v2?
Gustavo
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] Bluetooth: btmrvl: trivial style fixes
2012-06-30 15:28 ` Gustavo Padovan
@ 2012-07-09 10:57 ` Andrei Emeltchenko
2012-07-09 12:48 ` Gustavo Padovan
0 siblings, 1 reply; 10+ messages in thread
From: Andrei Emeltchenko @ 2012-07-09 10:57 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Patch shortens locals scope and adds missing braces. This is a diff
between v1 which was applied and v2 of patch "Bluetooth: btmrvl: Do
not send vendor events to bluetooth stack".
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
drivers/bluetooth/btmrvl_main.c | 8 +++++---
drivers/bluetooth/btmrvl_sdio.c | 3 ++-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
index dc304de..3a4343b 100644
--- a/drivers/bluetooth/btmrvl_main.c
+++ b/drivers/bluetooth/btmrvl_main.c
@@ -47,10 +47,11 @@ EXPORT_SYMBOL_GPL(btmrvl_interrupt);
bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
{
struct hci_event_hdr *hdr = (void *) skb->data;
- struct hci_ev_cmd_complete *ec;
- u16 opcode, ocf, ogf;
if (hdr->evt == HCI_EV_CMD_COMPLETE) {
+ struct hci_ev_cmd_complete *ec;
+ u16 opcode, ocf, ogf;
+
ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE);
opcode = __le16_to_cpu(ec->opcode);
ocf = hci_opcode_ocf(opcode);
@@ -64,7 +65,8 @@ bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
}
if (ogf == OGF) {
- BT_DBG("vendor event skipped: ogf 0x%4.4x", ogf);
+ BT_DBG("vendor event skipped: ogf 0x%4.4x ocf 0x%4.4x",
+ ogf, ocf);
kfree_skb(skb);
return false;
}
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index cf7588ed..6a9e971 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -568,8 +568,9 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
if (type == HCI_EVENT_PKT) {
if (btmrvl_check_evtpkt(priv, skb))
hci_recv_frame(skb);
- } else
+ } else {
hci_recv_frame(skb);
+ }
hdev->stat.byte_rx += buf_len;
break;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] Bluetooth: btmrvl: trivial style fixes
2012-07-09 10:57 ` [PATCH] Bluetooth: btmrvl: trivial style fixes Andrei Emeltchenko
@ 2012-07-09 12:48 ` Gustavo Padovan
0 siblings, 0 replies; 10+ messages in thread
From: Gustavo Padovan @ 2012-07-09 12:48 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
Hi Andrei,
* Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com> [2012-07-09 13:57:18 +0300]:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> Patch shortens locals scope and adds missing braces. This is a diff
> between v1 which was applied and v2 of patch "Bluetooth: btmrvl: Do
> not send vendor events to bluetooth stack".
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
> drivers/bluetooth/btmrvl_main.c | 8 +++++---
> drivers/bluetooth/btmrvl_sdio.c | 3 ++-
> 2 files changed, 7 insertions(+), 4 deletions(-)
Patch has been applied to bluetooth-next, thanks.
Gustavo
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-07-09 12:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13 10:35 [RFC] Bluetooth: btmrvl: Do not send vendor events to bluetooth stack Andrei Emeltchenko
2012-06-14 18:11 ` Bing Zhao
2012-06-15 6:10 ` [PATCHv2] " Andrei Emeltchenko
2012-06-19 3:26 ` Gustavo Padovan
2012-06-28 13:48 ` Andrei Emeltchenko
2012-06-29 14:06 ` Johan Hedberg
2012-06-29 14:23 ` Andrei Emeltchenko
2012-06-30 15:28 ` Gustavo Padovan
2012-07-09 10:57 ` [PATCH] Bluetooth: btmrvl: trivial style fixes Andrei Emeltchenko
2012-07-09 12:48 ` Gustavo Padovan
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.