Merged ieee802154 into master
This commit is contained in:
commit
8229a8b986
@ -61,7 +61,7 @@ int ieee802154_getchan(int fd, FAR uint8_t *chan)
|
||||
req.pib_attr = IEEE802154_PIB_PHY_CURRENT_CHANNEL;
|
||||
ret = ieee802154_get_req(fd, &req);
|
||||
|
||||
*chan = req.attr_value.phy.channel;
|
||||
*chan = req.attrval.phy.channel;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ int ieee802154_geteaddr(int fd, FAR uint8_t *eaddr)
|
||||
req.pib_attr = IEEE802154_PIB_MAC_EXTENDED_ADDR;
|
||||
ret = ieee802154_get_req(fd, &req);
|
||||
|
||||
memcpy(eaddr, &req.attr_value.mac.eaddr[0], 8);
|
||||
memcpy(eaddr, &req.attrval.mac.eaddr[0], 8);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -57,10 +57,10 @@ int ieee802154_getpanid(int fd, FAR uint16_t *panid)
|
||||
struct ieee802154_get_req_s req;
|
||||
int ret;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_MAC_PAN_ID;
|
||||
req.pib_attr = IEEE802154_PIB_MAC_PANID;
|
||||
ret = ieee802154_get_req(fd, &req);
|
||||
|
||||
*panid = req.attr_value.mac.panid;
|
||||
*panid = req.attrval.mac.panid;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ int ieee802154_getpromisc(int fd, FAR bool *promisc)
|
||||
req.pib_attr = IEEE802154_PIB_MAC_PROMISCUOUS_MODE;
|
||||
ret = ieee802154_get_req(fd, &req);
|
||||
|
||||
*promisc = req.attr_value.mac.promisc_mode;
|
||||
*promisc = req.attrval.mac.promisc_mode;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ int ieee802154_getrxonidle(int fd, FAR bool *rxonidle)
|
||||
req.pib_attr = IEEE802154_PIB_MAC_RX_ON_WHEN_IDLE;
|
||||
ret = ieee802154_get_req(fd, &req);
|
||||
|
||||
*rxonidle = req.attr_value.mac.rxonidle;
|
||||
*rxonidle = req.attrval.mac.rxonidle;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ int ieee802154_getsaddr(int fd, FAR uint16_t *saddr)
|
||||
req.pib_attr = IEEE802154_PIB_MAC_SHORT_ADDRESS;
|
||||
ret = ieee802154_get_req(fd, &req);
|
||||
|
||||
*saddr = req.attr_value.mac.saddr;
|
||||
*saddr = req.attrval.mac.saddr;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ int ieee802154_gettxpwr(int fd, FAR int32_t *txpwr)
|
||||
req.pib_attr = IEEE802154_PIB_PHY_TX_POWER;
|
||||
ret = ieee802154_get_req(fd, &req);
|
||||
|
||||
*txpwr = req.attr_value.phy.txpwr;
|
||||
*txpwr = req.attrval.phy.txpwr;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ int ieee802154_setchan(int fd, uint8_t chan)
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_PHY_CURRENT_CHANNEL;
|
||||
req.attr_value.phy.channel = chan;
|
||||
req.attrval.phy.channel = chan;
|
||||
|
||||
return ieee802154_set_req(fd, &req);
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ int ieee802154_seteaddr(int fd, FAR const uint8_t *eaddr)
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_MAC_EXTENDED_ADDR;
|
||||
memcpy(&req.attr_value.mac.eaddr[0], eaddr, 8);
|
||||
memcpy(&req.attrval.mac.eaddr[0], eaddr, 8);
|
||||
|
||||
return ieee802154_set_req(fd, &req);
|
||||
}
|
||||
|
@ -57,8 +57,8 @@ int ieee802154_setpanid(int fd, uint16_t panid)
|
||||
{
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_MAC_PAN_ID;
|
||||
req.attr_value.mac.panid = panid;
|
||||
req.pib_attr = IEEE802154_PIB_MAC_PANID;
|
||||
req.attrval.mac.panid = panid;
|
||||
|
||||
return ieee802154_set_req(fd, &req);
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ int ieee802154_setpromisc(int fd, bool promisc)
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_MAC_PROMISCUOUS_MODE;
|
||||
req.attr_value.mac.promisc_mode = promisc;
|
||||
req.attrval.mac.promisc_mode = promisc;
|
||||
|
||||
return ieee802154_set_req(fd, &req);
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ int ieee802154_setrxonidle(int fd, bool rxonidle)
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_MAC_RX_ON_WHEN_IDLE;
|
||||
req.attr_value.mac.rxonidle = rxonidle;
|
||||
req.attrval.mac.rxonidle = rxonidle;
|
||||
|
||||
return ieee802154_set_req(fd, &req);
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ int ieee802154_setsaddr(int fd, uint16_t saddr)
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_MAC_SHORT_ADDRESS;
|
||||
req.attr_value.mac.saddr = saddr;
|
||||
req.attrval.mac.saddr = saddr;
|
||||
|
||||
return ieee802154_set_req(fd, &req);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ int ieee802154_settxpwr(int fd, int32_t txpwr)
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_PHY_TX_POWER;
|
||||
req.attr_value.phy.txpwr = txpwr;
|
||||
req.attrval.phy.txpwr = txpwr;
|
||||
|
||||
return ieee802154_set_req(fd, &req);
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ int sixlowpan_getchan(int sock, FAR const char *ifname, FAR uint8_t *chan)
|
||||
req.pib_attr = IEEE802154_PIB_PHY_CURRENT_CHANNEL;
|
||||
ret = sixlowpan_get_req(sock, ifname, &req);
|
||||
|
||||
*chan = req.attr_value.phy.channel;
|
||||
*chan = req.attrval.phy.channel;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ int sixlowpan_geteaddr(int sock, FAR const char *ifname, FAR uint8_t *eaddr)
|
||||
req.pib_attr = IEEE802154_PIB_MAC_EXTENDED_ADDR;
|
||||
ret = sixlowpan_get_req(sock, ifname, &req);
|
||||
|
||||
memcpy(eaddr, &req.attr_value.mac.eaddr[0], 8);
|
||||
memcpy(eaddr, &req.attrval.mac.eaddr[0], 8);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -58,10 +58,10 @@ int sixlowpan_getpanid(int sock, FAR const char *ifname, FAR uint16_t *panid)
|
||||
struct ieee802154_get_req_s req;
|
||||
int ret;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_MAC_PAN_ID;
|
||||
req.pib_attr = IEEE802154_PIB_MAC_PANID;
|
||||
ret = sixlowpan_get_req(sock, ifname, &req);
|
||||
|
||||
*panid = req.attr_value.mac.panid;
|
||||
*panid = req.attrval.mac.panid;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ int sixlowpan_getpromisc(int sock, FAR const char *ifname, FAR bool *promisc)
|
||||
req.pib_attr = IEEE802154_PIB_MAC_PROMISCUOUS_MODE;
|
||||
ret = sixlowpan_get_req(sock, ifname, &req);
|
||||
|
||||
*promisc = req.attr_value.mac.promisc_mode;
|
||||
*promisc = req.attrval.mac.promisc_mode;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ int sixlowpan_getrxonidle(int sock, FAR const char *ifname, FAR bool *rxonidle)
|
||||
req.pib_attr = IEEE802154_PIB_MAC_RX_ON_WHEN_IDLE;
|
||||
ret = sixlowpan_get_req(sock, ifname, &req);
|
||||
|
||||
*rxonidle = req.attr_value.mac.rxonidle;
|
||||
*rxonidle = req.attrval.mac.rxonidle;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ int sixlowpan_getsaddr(int sock, FAR const char *ifname, FAR uint16_t *saddr)
|
||||
req.pib_attr = IEEE802154_PIB_MAC_SHORT_ADDRESS;
|
||||
ret = sixlowpan_get_req(sock, ifname, &req);
|
||||
|
||||
*saddr = req.attr_value.mac.saddr;
|
||||
*saddr = req.attrval.mac.saddr;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ int sixlowpan_gettxpwr(int sock, FAR const char *ifname, FAR int32_t *txpwr)
|
||||
req.pib_attr = IEEE802154_PIB_PHY_TX_POWER;
|
||||
ret = sixlowpan_get_req(sock, ifname, &req);
|
||||
|
||||
*txpwr = req.attr_value.phy.txpwr;
|
||||
*txpwr = req.attrval.phy.txpwr;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ int sixlowpan_setchan(int sock, FAR const char *ifname, uint8_t chan)
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_PHY_CURRENT_CHANNEL;
|
||||
req.attr_value.phy.channel = chan;
|
||||
req.attrval.phy.channel = chan;
|
||||
|
||||
return sixlowpan_set_req(sock, ifname, &req);
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ int sixlowpan_seteaddr(int sock, FAR const char *ifname, FAR const uint8_t *eadd
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_MAC_EXTENDED_ADDR;
|
||||
memcpy(&req.attr_value.mac.eaddr[0], eaddr, 8);
|
||||
memcpy(&req.attrval.mac.eaddr[0], eaddr, 8);
|
||||
|
||||
return sixlowpan_set_req(sock, ifname, &req);
|
||||
}
|
||||
|
@ -57,8 +57,8 @@ int sixlowpan_setpanid(int sock, FAR const char *ifname, uint16_t panid)
|
||||
{
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_MAC_PAN_ID;
|
||||
req.attr_value.mac.panid = panid;
|
||||
req.pib_attr = IEEE802154_PIB_MAC_PANID;
|
||||
req.attrval.mac.panid = panid;
|
||||
|
||||
return sixlowpan_set_req(sock, ifname, &req);
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ int sixlowpan_setpromisc(int sock, FAR const char *ifname, bool promisc)
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_MAC_PROMISCUOUS_MODE;
|
||||
req.attr_value.mac.promisc_mode = promisc;
|
||||
req.attrval.mac.promisc_mode = promisc;
|
||||
|
||||
return sixlowpan_set_req(sock, ifname, &req);
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ int sixlowpan_setrxonidle(int sock, FAR const char *ifname, bool rxonidle)
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_MAC_RX_ON_WHEN_IDLE;
|
||||
req.attr_value.mac.rxonidle = rxonidle;
|
||||
req.attrval.mac.rxonidle = rxonidle;
|
||||
|
||||
return sixlowpan_set_req(sock, ifname, &req);
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ int sixlowpan_setsaddr(int sock, FAR const char *ifname, uint16_t saddr)
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_MAC_SHORT_ADDRESS;
|
||||
req.attr_value.mac.saddr = saddr;
|
||||
req.attrval.mac.saddr = saddr;
|
||||
|
||||
return sixlowpan_set_req(sock, ifname, &req);
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ int sixlowpan_settxpwr(int sock, FAR const char *ifname, int32_t txpwr)
|
||||
struct ieee802154_set_req_s req;
|
||||
|
||||
req.pib_attr = IEEE802154_PIB_PHY_TX_POWER;
|
||||
req.attr_value.phy.txpwr = txpwr;
|
||||
req.attrval.phy.txpwr = txpwr;
|
||||
|
||||
return sixlowpan_set_req(sock, ifname, &req);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user