From: Marcel Holtmann <marcel@holtmann.org>
To: Emeltchenko Andrei <Andrei.Emeltchenko.news@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCHv2 2/2] Bluetooth: Remove magic bluetooth version numbers
Date: Fri, 25 Nov 2011 13:03:41 +0100 [thread overview]
Message-ID: <1322222621.29909.21.camel@aeonflux> (raw)
In-Reply-To: <1322138190-21593-2-git-send-email-Andrei.Emeltchenko.news@gmail.com>
Hi Andrei,
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> Acked-by: Marcel Holtmann <marcel@holtmann.org>
> ---
> include/net/bluetooth/bluetooth.h | 5 +++++
> net/bluetooth/hci_conn.c | 2 +-
> net/bluetooth/hci_event.c | 6 +++---
> 3 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
> index 38cd3da..97264fc 100644
> --- a/include/net/bluetooth/bluetooth.h
> +++ b/include/net/bluetooth/bluetooth.h
> @@ -36,6 +36,11 @@
> #define PF_BLUETOOTH AF_BLUETOOTH
> #endif
>
> +/* Bluetooth versions */
> +#define BLUETOOTH_VER_1_1 1
> +#define BLUETOOTH_VER_1_2 2
> +#define BLUETOOTH_VER_2_0 3
> +
> /* Reserv for core and drivers use */
> #define BT_SKB_RESERVE 8
>
> diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
> index de0b93e..b328ac6 100644
> --- a/net/bluetooth/hci_conn.c
> +++ b/net/bluetooth/hci_conn.c
> @@ -123,7 +123,7 @@ static void hci_acl_connect_cancel(struct hci_conn *conn)
>
> BT_DBG("%p", conn);
>
> - if (conn->hdev->hci_ver < 2)
> + if (conn->hdev->hci_ver < BLUETOOTH_VER_1_2)
> return;
>
> bacpy(&cp.bdaddr, &conn->dst);
> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> index 7da7ef6..60651fa 100644
> --- a/net/bluetooth/hci_event.c
> +++ b/net/bluetooth/hci_event.c
> @@ -498,7 +498,7 @@ static void hci_setup_event_mask(struct hci_dev *hdev)
>
> /* CSR 1.1 dongles does not accept any bitfield so don't try to set
> * any event mask for pre 1.2 devices */
> - if (hdev->lmp_ver <= 1)
> + if (hdev->lmp_ver <= BLUETOOTH_VER_1_1)
> return;
maybe in an extra patch we change this to < BLUETOOTH_VER_1_2 to match
it exactly what the comment says about pre 1.2.
Regards
Marcel
next prev parent reply other threads:[~2011-11-25 12:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-24 12:36 [PATCHv2 1/2] Bluetooth: Correct version check in hci_setup Emeltchenko Andrei
2011-11-24 12:36 ` [PATCHv2 2/2] Bluetooth: Remove magic bluetooth version numbers Emeltchenko Andrei
2011-11-25 12:03 ` Marcel Holtmann [this message]
2011-11-25 19:53 ` Andrei Emeltchenko
2011-11-28 16:09 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1322222621.29909.21.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=Andrei.Emeltchenko.news@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).