25 #include <linux/kernel.h>
26 #include <linux/slab.h>
27 #include <linux/if_arp.h>
38 static int ieee802154_nl_fill_phy(
struct sk_buff *
msg,
u32 portid,
60 for (i = 0; i < 32; i++) {
70 return genlmsg_end(msg, hdr);
74 genlmsg_cancel(msg, hdr);
80 static int ieee802154_list_phy(
struct sk_buff *
skb,
115 return genlmsg_reply(msg, info);
130 static int ieee802154_dump_phy_iter(
struct wpan_phy *phy,
void *_data)
140 rc = ieee802154_nl_fill_phy(data->
skb,
142 data->
cb->nlh->nlmsg_seq,
154 static int ieee802154_dump_phy(
struct sk_buff *skb,
160 .s_idx = cb->
args[0],
173 static int ieee802154_add_iface(
struct sk_buff *skb,
215 goto nla_put_failure;
222 goto nla_put_failure;
231 dev = phy->
add_iface(phy, devname, type);
234 goto nla_put_failure;
257 goto nla_put_failure;
276 static int ieee802154_del_iface(
struct sk_buff *skb,
331 goto nla_put_failure;
345 goto nla_put_failure;
360 static struct genl_ops ieee802154_phy_ops[] = {
362 ieee802154_dump_phy),
375 for (i = 0; i <
ARRAY_SIZE(ieee802154_phy_ops); i++) {
377 &ieee802154_phy_ops[i]);