[PATCH wpan-tools 1/3] phy: fix cca ed level parameter parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux