public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "Gustavo F. Padovan" <gustavo@las.ic.unicamp.br>
To: linux-bluetooth@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] Bluetooth: create macro to hint mask on receiving config request
Date: Mon, 20 Apr 2009 01:31:07 -0300	[thread overview]
Message-ID: <1240201868-1396-4-git-send-email-gustavo@las.ic.unicamp.br> (raw)
In-Reply-To: <1240201868-1396-3-git-send-email-gustavo@las.ic.unicamp.br>

L2CAP_CONF_HINT is better to understand than 0x80. And we don't need to
go to spec to figure out what 0x80 is.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
---
 include/net/bluetooth/l2cap.h |    2 ++
 net/bluetooth/l2cap.c         |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index ed4ba91..300b63f 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -149,6 +149,8 @@ struct l2cap_conf_opt {
 } __attribute__ ((packed));
 #define L2CAP_CONF_OPT_SIZE	2
 
+#define L2CAP_CONF_HINT		0x80
+
 #define L2CAP_CONF_MTU		0x01
 #define L2CAP_CONF_FLUSH_TO	0x02
 #define L2CAP_CONF_QOS		0x03
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 85926f5..a2cc770 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -1737,7 +1737,7 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data)
 	while (len >= L2CAP_CONF_OPT_SIZE) {
 		len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
 
-		hint  = type & 0x80;
+		hint  = type & L2CAP_CONF_HINT;
 		type &= 0x7f;
 
 		switch (type) {
-- 
1.6.0.6


  reply	other threads:[~2009-04-20  4:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20  4:31 [PATCH 0/4] Bluetooth: l2cap clean ups Gustavo F. Padovan
2009-04-20  4:31 ` [PATCH 1/4] Bluetooth: create macros for channels identifiers Gustavo F. Padovan
2009-04-20  4:31   ` [PATCH 2/4] Bluetooth: remove unnecessary atribution to err var Gustavo F. Padovan
2009-04-20  4:31     ` Gustavo F. Padovan [this message]
2009-04-20  4:31       ` [PATCH 4/4] Bluetooth: fix many errors and warnings reported by checkpatch.pl Gustavo F. Padovan
2009-04-20  5:20 ` [PATCH 0/4] Bluetooth: l2cap clean ups Marcel Holtmann
  -- strict thread matches above, loose matches on Subject: below --
2009-03-28 17:47 [PATCH 0/4] Bluetooth: clean ups to l2cap Gustavo F. Padovan
2009-03-28 17:47 ` [PATCH 1/4] Bluetooth: create macros for channels identifiers Gustavo F. Padovan
2009-03-28 17:47   ` [PATCH 2/4] Bluetooth: remove unnecessary atribution to err var Gustavo F. Padovan
2009-03-28 17:47     ` [PATCH 3/4] Bluetooth: create macro to hint mask on receiving config request Gustavo F. Padovan

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=1240201868-1396-4-git-send-email-gustavo@las.ic.unicamp.br \
    --to=gustavo@las.ic.unicamp.br \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@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