Commit 589d2746 authored by Gustavo F. Padovan's avatar Gustavo F. Padovan Committed by Marcel Holtmann

Bluetooth: Use macro for L2CAP hint mask on receiving config request

Using the L2CAP_CONF_HINT macro is easier to understand than using a
hardcoded 0x80 value.
Signed-off-by: default avatarGustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 8db4dc46
...@@ -149,6 +149,8 @@ struct l2cap_conf_opt { ...@@ -149,6 +149,8 @@ struct l2cap_conf_opt {
} __attribute__ ((packed)); } __attribute__ ((packed));
#define L2CAP_CONF_OPT_SIZE 2 #define L2CAP_CONF_OPT_SIZE 2
#define L2CAP_CONF_HINT 0x80
#define L2CAP_CONF_MTU 0x01 #define L2CAP_CONF_MTU 0x01
#define L2CAP_CONF_FLUSH_TO 0x02 #define L2CAP_CONF_FLUSH_TO 0x02
#define L2CAP_CONF_QOS 0x03 #define L2CAP_CONF_QOS 0x03
......
...@@ -1739,7 +1739,7 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data) ...@@ -1739,7 +1739,7 @@ static int l2cap_parse_conf_req(struct sock *sk, void *data)
while (len >= L2CAP_CONF_OPT_SIZE) { while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &olen, &val); len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
hint = type & 0x80; hint = type & L2CAP_CONF_HINT;
type &= 0x7f; type &= 0x7f;
switch (type) { switch (type) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment