]> git.ipfire.org Git - thirdparty/iw.git/blame - phy.c
update nl80211.h from current wireless-testing kernel
[thirdparty/iw.git] / phy.c
CommitLineData
0f55e0b8 1#include <errno.h>
0f55e0b8
JB
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
f408e01b 10#include "nl80211.h"
0f55e0b8
JB
11#include "iw.h"
12
70391ccf 13static int handle_name(struct nl_cb *cb,
0f55e0b8
JB
14 struct nl_msg *msg,
15 int argc, char **argv)
16{
0f55e0b8 17 if (argc != 1)
5e75fd04 18 return 1;
0f55e0b8
JB
19
20 NLA_PUT_STRING(msg, NL80211_ATTR_WIPHY_NAME, *argv);
21
70391ccf 22 return 0;
0f55e0b8 23 nla_put_failure:
70391ccf 24 return -ENOBUFS;
0f55e0b8
JB
25}
26COMMAND(set, name, "<new name>", NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_name);