Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757429AbZC1RvP (ORCPT ); Sat, 28 Mar 2009 13:51:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755014AbZC1RuA (ORCPT ); Sat, 28 Mar 2009 13:50:00 -0400 Received: from everest.las.ic.unicamp.br ([143.106.60.118]:59266 "EHLO mail.las.ic.unicamp.br" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755087AbZC1Rt7 (ORCPT ); Sat, 28 Mar 2009 13:49:59 -0400 From: "Gustavo F. Padovan" 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: Sat, 28 Mar 2009 14:47:28 -0300 Message-Id: <1238262449-3321-4-git-send-email-gustavo@las.ic.unicamp.br> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1238262449-3321-3-git-send-email-gustavo@las.ic.unicamp.br> References: <1238262449-3321-1-git-send-email-gustavo@las.ic.unicamp.br> <1238262449-3321-2-git-send-email-gustavo@las.ic.unicamp.br> <1238262449-3321-3-git-send-email-gustavo@las.ic.unicamp.br> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1401 Lines: 43 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/