wireless: ieee802154: libmac: nxstyle fixes

Fixes for nxstyle errors reported by the tool.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea 2021-06-10 07:21:35 +02:00 committed by Xiang Xiao
parent 3e46b14650
commit 087b4da88f
17 changed files with 66 additions and 33 deletions

View File

@ -42,7 +42,8 @@ int ieee802154_assoc_req(int fd, FAR struct ieee802154_assoc_req_s *req)
{
int ret;
ret = ioctl(fd, MAC802154IOC_MLME_ASSOC_REQUEST, (unsigned long)((uintptr_t)req));
ret = ioctl(fd, MAC802154IOC_MLME_ASSOC_REQUEST,
(unsigned long)((uintptr_t)req));
if (ret < 0)
{
ret = -errno;

View File

@ -43,7 +43,8 @@ int ieee802154_assoc_resp(int fd, FAR struct ieee802154_assoc_resp_s *resp)
{
int ret;
ret = ioctl(fd, MAC802154IOC_MLME_ASSOC_RESPONSE, (unsigned long)((uintptr_t)resp));
ret = ioctl(fd, MAC802154IOC_MLME_ASSOC_RESPONSE,
(unsigned long)((uintptr_t)resp));
if (ret < 0)
{
ret = -errno;

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/wireless/ieee802154/libmac/ieee802154_assocreq.c
* apps/wireless/ieee802154/libmac/ieee802154_disassocreq.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -38,15 +38,18 @@
* Public Functions
****************************************************************************/
int ieee802154_disassoc_req(int fd, FAR struct ieee802154_disassoc_req_s *req)
int ieee802154_disassoc_req(int fd,
FAR struct ieee802154_disassoc_req_s *req)
{
int ret;
ret = ioctl(fd, MAC802154IOC_MLME_DISASSOC_REQUEST, (unsigned long)((uintptr_t)req));
ret = ioctl(fd, MAC802154IOC_MLME_DISASSOC_REQUEST,
(unsigned long)((uintptr_t)req));
if (ret < 0)
{
ret = -errno;
fprintf(stderr, "MAC802154IOC_MLME_DISASSOC_REQUEST failed: %d\n", ret);
fprintf(stderr,
"MAC802154IOC_MLME_DISASSOC_REQUEST failed: %d\n", ret);
}
return ret;

View File

@ -42,7 +42,8 @@ int ieee802154_get_req(int fd, FAR struct ieee802154_get_req_s *req)
{
int ret;
ret = ioctl(fd, MAC802154IOC_MLME_GET_REQUEST, (unsigned long)((uintptr_t)req));
ret = ioctl(fd, MAC802154IOC_MLME_GET_REQUEST,
(unsigned long)((uintptr_t)req));
if (ret < 0)
{
ret = -errno;

View File

@ -42,7 +42,8 @@ int ieee802154_gts_req(int fd, FAR struct ieee802154_gts_req_s *req)
{
int ret;
ret = ioctl(fd, MAC802154IOC_MLME_GTS_REQUEST, (unsigned long)((uintptr_t)req));
ret = ioctl(fd, MAC802154IOC_MLME_GTS_REQUEST,
(unsigned long)((uintptr_t)req));
if (ret < 0)
{
ret = -errno;

View File

@ -44,7 +44,8 @@ int ieee802154_orphan_resp(int fd, FAR struct ieee802154_orphan_resp_s *resp)
union ieee802154_macarg_u arg;
int ret;
ret = ioctl(fd, MAC802154IOC_MLME_ORPHAN_RESPONSE, (unsigned long)((uintptr_t)&arg));
ret = ioctl(fd, MAC802154IOC_MLME_ORPHAN_RESPONSE,
(unsigned long)((uintptr_t)&arg));
if (ret < 0)
{
ret = -errno;

View File

@ -42,7 +42,8 @@ int ieee802154_poll_req(int fd, FAR struct ieee802154_poll_req_s *req)
{
int ret;
ret = ioctl(fd, MAC802154IOC_MLME_POLL_REQUEST, (unsigned long)((uintptr_t)req));
ret = ioctl(fd, MAC802154IOC_MLME_POLL_REQUEST,
(unsigned long)((uintptr_t)req));
if (ret < 0)
{
ret = -errno;

View File

@ -45,7 +45,8 @@ int ieee802154_reset_req(int fd, bool resetattr)
req.resetattr = resetattr;
ret = ioctl(fd, MAC802154IOC_MLME_RESET_REQUEST, (unsigned long)((uintptr_t)&req));
ret = ioctl(fd, MAC802154IOC_MLME_RESET_REQUEST,
(unsigned long)((uintptr_t)&req));
if (ret < 0)
{
ret = -errno;

View File

@ -38,15 +38,18 @@
* Public Functions
****************************************************************************/
int ieee802154_rxenable_req(int fd, FAR struct ieee802154_rxenable_req_s *req)
int ieee802154_rxenable_req(int fd,
FAR struct ieee802154_rxenable_req_s *req)
{
int ret;
ret = ioctl(fd, MAC802154IOC_MLME_RXENABLE_REQUEST, (unsigned long)((uintptr_t)req));
ret = ioctl(fd, MAC802154IOC_MLME_RXENABLE_REQUEST,
(unsigned long)((uintptr_t)req));
if (ret < 0)
{
ret = -errno;
fprintf(stderr, "MAC802154IOC_MLME_RXENABLE_REQUEST failed: %d\n", ret);
fprintf(stderr,
"MAC802154IOC_MLME_RXENABLE_REQUEST failed: %d\n", ret);
}
return ret;

View File

@ -42,7 +42,8 @@ int ieee802154_scan_req(int fd, FAR struct ieee802154_scan_req_s *req)
{
int ret;
ret = ioctl(fd, MAC802154IOC_MLME_SCAN_REQUEST, (unsigned long)((uintptr_t)req));
ret = ioctl(fd, MAC802154IOC_MLME_SCAN_REQUEST,
(unsigned long)((uintptr_t)req));
if (ret < 0)
{
ret = -errno;

View File

@ -42,7 +42,8 @@ int ieee802154_set_req(int fd, FAR struct ieee802154_set_req_s *req)
{
int ret;
ret = ioctl(fd, MAC802154IOC_MLME_SET_REQUEST, (unsigned long)((uintptr_t)req));
ret = ioctl(fd, MAC802154IOC_MLME_SET_REQUEST,
(unsigned long)((uintptr_t)req));
if (ret < 0)
{
ret = -errno;

View File

@ -42,7 +42,8 @@ int ieee802154_start_req(int fd, FAR struct ieee802154_start_req_s *req)
{
int ret;
ret = ioctl(fd, MAC802154IOC_MLME_START_REQUEST, (unsigned long)((uintptr_t)req));
ret = ioctl(fd, MAC802154IOC_MLME_START_REQUEST,
(unsigned long)((uintptr_t)req));
if (ret < 0)
{
ret = -errno;

View File

@ -42,7 +42,8 @@ int ieee802154_sync_req(int fd, FAR struct ieee802154_sync_req_s *req)
{
int ret;
ret = ioctl(fd, MAC802154IOC_MLME_SYNC_REQUEST, (unsigned long)((uintptr_t)req));
ret = ioctl(fd, MAC802154IOC_MLME_SYNC_REQUEST,
(unsigned long)((uintptr_t)req));
if (ret < 0)
{
ret = -errno;

View File

@ -53,7 +53,8 @@ int sixlowpan_desassoc_req(int sock, FAR const char *ifname,
if (ret < 0)
{
ret = -errno;
fprintf(stderr, "MAC802154IOC_MLME_DISASSOC_REQUEST failed: %d\n", ret);
fprintf(stderr,
"MAC802154IOC_MLME_DISASSOC_REQUEST failed: %d\n", ret);
}
return ret;

View File

@ -66,7 +66,9 @@ int sixlowpan_get_req(int sock, FAR const char *ifname,
return ret;
}
/* Wrappers around get_req to make it even easier to get common attributes */
/* Wrappers around get_req to make it even easier to get common
* attributes
*/
int sixlowpan_getchan(int sock, FAR const char *ifname, FAR uint8_t *chan)
{
@ -120,7 +122,8 @@ int sixlowpan_getpanid(int sock, FAR const char *ifname, FAR uint8_t *panid)
return ret;
}
int sixlowpan_getcoordeaddr(int sock, FAR const char *ifname, FAR uint8_t *eaddr)
int sixlowpan_getcoordeaddr(int sock,
FAR const char *ifname, FAR uint8_t *eaddr)
{
struct ieee802154_get_req_s req;
int ret;
@ -133,7 +136,8 @@ int sixlowpan_getcoordeaddr(int sock, FAR const char *ifname, FAR uint8_t *eaddr
return ret;
}
int sixlowpan_getcoordsaddr(int sock, FAR const char *ifname, FAR uint8_t *saddr)
int sixlowpan_getcoordsaddr(int sock,
FAR const char *ifname, FAR uint8_t *saddr)
{
struct ieee802154_get_req_s req;
int ret;
@ -146,7 +150,8 @@ int sixlowpan_getcoordsaddr(int sock, FAR const char *ifname, FAR uint8_t *saddr
return ret;
}
int sixlowpan_getrxonidle(int sock, FAR const char *ifname, FAR bool *rxonidle)
int sixlowpan_getrxonidle(int sock,
FAR const char *ifname, FAR bool *rxonidle)
{
struct ieee802154_get_req_s req;
int ret;
@ -173,7 +178,8 @@ int sixlowpan_getdevmode(int sock, FAR const char *ifname,
return ret;
}
int sixlowpan_getpromisc(int sock, FAR const char *ifname, FAR bool *promisc)
int sixlowpan_getpromisc(int sock,
FAR const char *ifname, FAR bool *promisc)
{
struct ieee802154_get_req_s req;
int ret;
@ -186,7 +192,8 @@ int sixlowpan_getpromisc(int sock, FAR const char *ifname, FAR bool *promisc)
return ret;
}
int sixlowpan_gettxpwr(int sock, FAR const char *ifname, FAR int32_t *txpwr)
int sixlowpan_gettxpwr(int sock,
FAR const char *ifname, FAR int32_t *txpwr)
{
struct ieee802154_get_req_s req;
int ret;
@ -199,7 +206,8 @@ int sixlowpan_gettxpwr(int sock, FAR const char *ifname, FAR int32_t *txpwr)
return ret;
}
int sixlowpan_getmaxretries(int sock, FAR const char *ifname, FAR uint8_t *retries)
int sixlowpan_getmaxretries(int sock,
FAR const char *ifname, FAR uint8_t *retries)
{
struct ieee802154_get_req_s req;
int ret;
@ -212,7 +220,8 @@ int sixlowpan_getmaxretries(int sock, FAR const char *ifname, FAR uint8_t *retri
return ret;
}
int sixlowpan_getfcslen(int sock, FAR const char *ifname, FAR uint8_t *fcslen)
int sixlowpan_getfcslen(int sock,
FAR const char *ifname, FAR uint8_t *fcslen)
{
struct ieee802154_get_req_s req;
int ret;

View File

@ -53,7 +53,8 @@ int sixlowpan_rxenable_req(int sock, FAR const char *ifname,
if (ret < 0)
{
ret = -errno;
fprintf(stderr, "MAC802154IOC_MLME_RXENABLE_REQUEST failed: %d\n", ret);
fprintf(stderr,
"MAC802154IOC_MLME_RXENABLE_REQUEST failed: %d\n", ret);
}
return ret;

View File

@ -71,7 +71,8 @@ int sixlowpan_setchan(int sock, FAR const char *ifname, uint8_t chan)
return sixlowpan_set_req(sock, ifname, &req);
}
int sixlowpan_seteaddr(int sock, FAR const char *ifname, FAR const uint8_t *eaddr)
int sixlowpan_seteaddr(int sock,
FAR const char *ifname, FAR const uint8_t *eaddr)
{
struct ieee802154_set_req_s req;
@ -81,7 +82,8 @@ int sixlowpan_seteaddr(int sock, FAR const char *ifname, FAR const uint8_t *eadd
return sixlowpan_set_req(sock, ifname, &req);
}
int sixlowpan_setsaddr(int sock, FAR const char *ifname, FAR const uint8_t *saddr)
int sixlowpan_setsaddr(int sock,
FAR const char *ifname, FAR const uint8_t *saddr)
{
struct ieee802154_set_req_s req;
@ -91,7 +93,8 @@ int sixlowpan_setsaddr(int sock, FAR const char *ifname, FAR const uint8_t *sadd
return sixlowpan_set_req(sock, ifname, &req);
}
int sixlowpan_setpanid(int sock, FAR const char *ifname, FAR const uint8_t *panid)
int sixlowpan_setpanid(int sock,
FAR const char *ifname, FAR const uint8_t *panid)
{
struct ieee802154_set_req_s req;
@ -121,7 +124,8 @@ int sixlowpan_setpromisc(int sock, FAR const char *ifname, bool promisc)
return sixlowpan_set_req(sock, ifname, &req);
}
int sixlowpan_setassocpermit(int sock, FAR const char *ifname, bool assocpermit)
int sixlowpan_setassocpermit(int sock,
FAR const char *ifname, bool assocpermit)
{
struct ieee802154_set_req_s req;
@ -141,7 +145,8 @@ int sixlowpan_settxpwr(int sock, FAR const char *ifname, int32_t txpwr)
return sixlowpan_set_req(sock, ifname, &req);
}
int sixlowpan_setmaxretries(int sock, FAR const char *ifname, uint8_t retries)
int sixlowpan_setmaxretries(int sock,
FAR const char *ifname, uint8_t retries)
{
struct ieee802154_set_req_s req;