linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@codecoup.pl>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] monitor: Fix LE Set Extended Advertising Parameters TX power decoding
Date: Fri, 08 Mar 2019 16:20:36 +0100	[thread overview]
Message-ID: <141098209.CQRiSTOYlq@ix> (raw)
In-Reply-To: <20190226125629.30277-1-szymon.janc@codecoup.pl>

On Tuesday, 26 February 2019 13:56:29 CET Szymon Janc wrote:
> TX power of 127 has special meaning for this command.
> ---
>  monitor/packet.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/monitor/packet.c b/monitor/packet.c
> index 96cacddd5..7f4d6b1ea 100644
> --- a/monitor/packet.c
> +++ b/monitor/packet.c
> @@ -1115,7 +1115,7 @@ static void print_power_level(int8_t level, const char
> *type) {
>  	print_field("TX power%s%s%s: %d dbm (0x%2.2x)",
>  		type ? " (" : "", type ? type : "", type ? ")" : "",
> -								
level, level);
> +							level, 
(uint8_t) level);
>  }
> 
>  static void print_host_flow_control(uint8_t enable)
> @@ -6944,7 +6944,10 @@ static void le_set_ext_adv_params_cmd(const void
> *data, uint8_t size) print_peer_addr_type("Peer address type",
> cmd->peer_addr_type);
>  	print_addr("Peer address", cmd->peer_addr, cmd->peer_addr_type);
>  	print_adv_filter_policy("Filter policy", cmd->filter_policy);
> -	print_power_level(cmd->tx_power, NULL);
> +	if (cmd->tx_power == 0xff)
> +		print_field("TX power: Host has no preference (0xff)");
> +	else
> +		print_power_level(cmd->tx_power, NULL);
> 
>  	switch (cmd->primary_phy) {
>  	case 0x01:

Applied.

-- 
pozdrawiam
Szymon Janc



      reply	other threads:[~2019-03-08 15:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 12:56 [PATCH] monitor: Fix LE Set Extended Advertising Parameters TX power decoding Szymon Janc
2019-03-08 15:20 ` Szymon Janc [this message]

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=141098209.CQRiSTOYlq@ix \
    --to=szymon.janc@codecoup.pl \
    --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).