summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/l2ping.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/l2ping.c b/tools/l2ping.c
index 85d12eee..af056bc6 100644
--- a/tools/l2ping.c
+++ b/tools/l2ping.c
@@ -51,9 +51,6 @@
#include <resolv.h>
#include <netdb.h>
-#include <asm/types.h>
-#include <asm/byteorder.h>
-
#include <bluetooth/bluetooth.h>
#include <bluetooth/l2cap.h>
@@ -134,7 +131,7 @@ static void ping(char *svr)
/* Build command header */
cmd->code = L2CAP_ECHO_REQ;
cmd->ident = id;
- cmd->len = __cpu_to_le16(size);
+ cmd->len = htobs(size);
gettimeofday(&tv_send, NULL);
@@ -171,7 +168,7 @@ static void ping(char *svr)
exit(1);
}
- cmd->len = __le16_to_cpu(cmd->len);
+ cmd->len = btohs(cmd->len);
/* Check for our id */
if( cmd->ident != id )