]> git.ipfire.org Git - thirdparty/iw.git/blob - phy.c
ship nl80211.h
[thirdparty/iw.git] / phy.c
1 #include <errno.h>
2 #include <net/if.h>
3
4 #include <netlink/genl/genl.h>
5 #include <netlink/genl/family.h>
6 #include <netlink/genl/ctrl.h>
7 #include <netlink/msg.h>
8 #include <netlink/attr.h>
9
10 #include "nl80211.h"
11 #include "iw.h"
12
13 static int handle_name(struct nl_cb *cb,
14 struct nl_msg *msg,
15 int argc, char **argv)
16 {
17 if (argc != 1)
18 return 1;
19
20 NLA_PUT_STRING(msg, NL80211_ATTR_WIPHY_NAME, *argv);
21
22 return 0;
23 nla_put_failure:
24 return -ENOBUFS;
25 }
26 COMMAND(set, name, "<new name>", NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_name);