* [PATCH BlueZ] tools/mesh: Fix check condition for model ID
@ 2020-01-09 17:44 Inga Stotland
2020-01-14 14:42 ` Gix, Brian
0 siblings, 1 reply; 2+ messages in thread
From: Inga Stotland @ 2020-01-09 17:44 UTC (permalink / raw)
To: linux-bluetooth; +Cc: brian.gix, Inga Stotland
Use the value of VENDOR_ID_MASK to set/check vendor model
and SIG model IDs
---
tools/mesh/cfgcli.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/mesh/cfgcli.c b/tools/mesh/cfgcli.c
index 1fcf82035..2403c9293 100644
--- a/tools/mesh/cfgcli.c
+++ b/tools/mesh/cfgcli.c
@@ -247,7 +247,7 @@ static uint32_t print_mod_id(uint8_t *data, bool vid, const char *offset)
if (!vid) {
mod_id = get_le16(data);
bt_shell_printf("%sModel Id\t%4.4x\n", offset, mod_id);
- mod_id = 0xffff0000 | mod_id;
+ mod_id = VENDOR_ID_MASK | mod_id;
} else {
mod_id = get_le16(data + 2);
bt_shell_printf("%sModel Id\t%4.4x %4.4x\n", offset,
@@ -327,7 +327,7 @@ static void print_pub(uint16_t ele_addr, uint32_t mod_id,
bt_shell_printf("\tElement: %4.4x\n", ele_addr);
bt_shell_printf("\tPub Addr: %4.4x\n", pub->u.addr16);
- if (mod_id > 0xffff0000)
+ if (mod_id < VENDOR_ID_MASK)
bt_shell_printf("\tModel: %8.8x\n", mod_id);
else
bt_shell_printf("\tModel: %4.4x\n",
--
2.21.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH BlueZ] tools/mesh: Fix check condition for model ID
2020-01-09 17:44 [PATCH BlueZ] tools/mesh: Fix check condition for model ID Inga Stotland
@ 2020-01-14 14:42 ` Gix, Brian
0 siblings, 0 replies; 2+ messages in thread
From: Gix, Brian @ 2020-01-14 14:42 UTC (permalink / raw)
To: linux-bluetooth, Stotland, Inga
Applied
On Thu, 2020-01-09 at 09:44 -0800, Inga Stotland wrote:
> Use the value of VENDOR_ID_MASK to set/check vendor model
> and SIG model IDs
> ---
> tools/mesh/cfgcli.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/mesh/cfgcli.c b/tools/mesh/cfgcli.c
> index 1fcf82035..2403c9293 100644
> --- a/tools/mesh/cfgcli.c
> +++ b/tools/mesh/cfgcli.c
> @@ -247,7 +247,7 @@ static uint32_t print_mod_id(uint8_t *data, bool vid, const char *offset)
> if (!vid) {
> mod_id = get_le16(data);
> bt_shell_printf("%sModel Id\t%4.4x\n", offset, mod_id);
> - mod_id = 0xffff0000 | mod_id;
> + mod_id = VENDOR_ID_MASK | mod_id;
> } else {
> mod_id = get_le16(data + 2);
> bt_shell_printf("%sModel Id\t%4.4x %4.4x\n", offset,
> @@ -327,7 +327,7 @@ static void print_pub(uint16_t ele_addr, uint32_t mod_id,
> bt_shell_printf("\tElement: %4.4x\n", ele_addr);
> bt_shell_printf("\tPub Addr: %4.4x\n", pub->u.addr16);
>
> - if (mod_id > 0xffff0000)
> + if (mod_id < VENDOR_ID_MASK)
> bt_shell_printf("\tModel: %8.8x\n", mod_id);
> else
> bt_shell_printf("\tModel: %4.4x\n",
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-14 14:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 17:44 [PATCH BlueZ] tools/mesh: Fix check condition for model ID Inga Stotland
2020-01-14 14:42 ` Gix, Brian
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.