* [PATCH wpan-tools 1/3] phy: fix cca ed level parameter parsing
@ 2015-05-27 10:25 Alexander Aring
2015-05-27 10:25 ` [PATCH wpan-tools 2/3] info: fix tx power printout Alexander Aring
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Alexander Aring @ 2015-05-27 10:25 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
This patch fix the parsing of cca ed level parameter which is now an
floating point dbm value.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
src/phy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/phy.c b/src/phy.c
index 285801c..8adffcc 100644
--- a/src/phy.c
+++ b/src/phy.c
@@ -121,14 +121,14 @@ static int handle_cca_ed_level(struct nl802154_state *state,
int argc, char **argv,
enum id_input id)
{
- long level;
+ float level;
char *end;
if (argc < 1)
return 1;
/* CCA_ED_LEVEL */
- level = strtol(argv[0], &end, 10);
+ level = strtof(argv[0], &end);
if (*end != '\0')
return 1;
--
2.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH wpan-tools 2/3] info: fix tx power printout
2015-05-27 10:25 [PATCH wpan-tools 1/3] phy: fix cca ed level parameter parsing Alexander Aring
@ 2015-05-27 10:25 ` Alexander Aring
2015-05-27 10:33 ` Varka Bhadram
2015-05-27 10:25 ` [PATCH wpan-tools 3/3] info: add support for cca ed level info Alexander Aring
2015-05-27 10:33 ` [PATCH wpan-tools 1/3] phy: fix cca ed level parameter parsing Varka Bhadram
2 siblings, 1 reply; 6+ messages in thread
From: Alexander Aring @ 2015-05-27 10:25 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
This patch uses the format string "%.3g" instead "%.2g" for current
tx power value. This is the same format string like we use to printout
all supported tx power values.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
src/info.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/info.c b/src/info.c
index b74442d..79b101e 100644
--- a/src/info.c
+++ b/src/info.c
@@ -95,7 +95,7 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
}
if (tb_msg[NL802154_ATTR_TX_POWER])
- printf("tx_power: %.2g\n", MBM_TO_DBM(nla_get_s32(tb_msg[NL802154_ATTR_TX_POWER])));
+ printf("tx_power: %.3g\n", MBM_TO_DBM(nla_get_s32(tb_msg[NL802154_ATTR_TX_POWER])));
if (tb_msg[NL802154_ATTR_WPAN_PHY_CAPS]) {
struct nlattr *tb_caps[NL802154_CAP_ATTR_MAX + 1];
--
2.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH wpan-tools 3/3] info: add support for cca ed level info
2015-05-27 10:25 [PATCH wpan-tools 1/3] phy: fix cca ed level parameter parsing Alexander Aring
2015-05-27 10:25 ` [PATCH wpan-tools 2/3] info: fix tx power printout Alexander Aring
@ 2015-05-27 10:25 ` Alexander Aring
2015-05-27 10:35 ` Varka Bhadram
2015-05-27 10:33 ` [PATCH wpan-tools 1/3] phy: fix cca ed level parameter parsing Varka Bhadram
2 siblings, 1 reply; 6+ messages in thread
From: Alexander Aring @ 2015-05-27 10:25 UTC (permalink / raw)
To: linux-wpan; +Cc: kernel, Alexander Aring
This patch adds support for dumping the current cca ed level value.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
src/info.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/info.c b/src/info.c
index 79b101e..e8f5dda 100644
--- a/src/info.c
+++ b/src/info.c
@@ -94,6 +94,9 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
printf("\n");
}
+ if (tb_msg[NL802154_ATTR_CCA_ED_LEVEL])
+ printf("cca_ed_level: %.3g\n", MBM_TO_DBM(nla_get_s32(tb_msg[NL802154_ATTR_CCA_ED_LEVEL])));
+
if (tb_msg[NL802154_ATTR_TX_POWER])
printf("tx_power: %.3g\n", MBM_TO_DBM(nla_get_s32(tb_msg[NL802154_ATTR_TX_POWER])));
--
2.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH wpan-tools 1/3] phy: fix cca ed level parameter parsing
2015-05-27 10:25 [PATCH wpan-tools 1/3] phy: fix cca ed level parameter parsing Alexander Aring
2015-05-27 10:25 ` [PATCH wpan-tools 2/3] info: fix tx power printout Alexander Aring
2015-05-27 10:25 ` [PATCH wpan-tools 3/3] info: add support for cca ed level info Alexander Aring
@ 2015-05-27 10:33 ` Varka Bhadram
2 siblings, 0 replies; 6+ messages in thread
From: Varka Bhadram @ 2015-05-27 10:33 UTC (permalink / raw)
To: Alexander Aring, linux-wpan; +Cc: kernel
On 05/27/2015 03:55 PM, Alexander Aring wrote:
> This patch fix the parsing of cca ed level parameter which is now an
> floating point dbm value.
>
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Varka Bhadram <varkabhadram@gmail.com>
--
Varka Bhadram
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH wpan-tools 2/3] info: fix tx power printout
2015-05-27 10:25 ` [PATCH wpan-tools 2/3] info: fix tx power printout Alexander Aring
@ 2015-05-27 10:33 ` Varka Bhadram
0 siblings, 0 replies; 6+ messages in thread
From: Varka Bhadram @ 2015-05-27 10:33 UTC (permalink / raw)
To: Alexander Aring, linux-wpan; +Cc: kernel
On 05/27/2015 03:55 PM, Alexander Aring wrote:
> This patch uses the format string "%.3g" instead "%.2g" for current
> tx power value. This is the same format string like we use to printout
> all supported tx power values.
>
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Varka Bhadram <varkabhadram@gmail.com>
--
Varka Bhadram
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH wpan-tools 3/3] info: add support for cca ed level info
2015-05-27 10:25 ` [PATCH wpan-tools 3/3] info: add support for cca ed level info Alexander Aring
@ 2015-05-27 10:35 ` Varka Bhadram
0 siblings, 0 replies; 6+ messages in thread
From: Varka Bhadram @ 2015-05-27 10:35 UTC (permalink / raw)
To: Alexander Aring, linux-wpan; +Cc: kernel
On 05/27/2015 03:55 PM, Alexander Aring wrote:
> This patch adds support for dumping the current cca ed level value.
>
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-by: Varka Bhadram <varkabhadram@gmail.com>
--
Varka Bhadram
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-05-27 10:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27 10:25 [PATCH wpan-tools 1/3] phy: fix cca ed level parameter parsing Alexander Aring
2015-05-27 10:25 ` [PATCH wpan-tools 2/3] info: fix tx power printout Alexander Aring
2015-05-27 10:33 ` Varka Bhadram
2015-05-27 10:25 ` [PATCH wpan-tools 3/3] info: add support for cca ed level info Alexander Aring
2015-05-27 10:35 ` Varka Bhadram
2015-05-27 10:33 ` [PATCH wpan-tools 1/3] phy: fix cca ed level parameter parsing Varka Bhadram
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox