3 @@ -196,7 +196,7 @@ COMMAND(station, del, "<MAC address>",
4 NL80211_CMD_DEL_STATION, 0, CIB_NETDEV, handle_station_get,
5 "Remove the given station entry (use with caution!)");
7 -static int handle_station_set(struct nl80211_state *state,
8 +static int handle_station_set_plink(struct nl80211_state *state,
11 int argc, char **argv)
12 @@ -241,9 +241,56 @@ static int handle_station_set(struct nl8
15 COMMAND(station, set, "<MAC address> plink_action <open|block>",
16 - NL80211_CMD_SET_STATION, 0, CIB_NETDEV, handle_station_set,
17 + NL80211_CMD_SET_STATION, 0, CIB_NETDEV, handle_station_set_plink,
18 "Set mesh peer link action for this station (peer).");
20 +static int handle_station_set_vlan(struct nl80211_state *state,
23 + int argc, char **argv)
25 + unsigned char mac_addr[ETH_ALEN];
26 + unsigned long sta_vlan = 0;
32 + if (mac_addr_a2n(mac_addr, argv[0])) {
33 + fprintf(stderr, "invalid mac address\n");
39 + if (strcmp("vlan", argv[0]) != 0)
44 + sta_vlan = strtoul(argv[0], &err, 0);
46 + fprintf(stderr, "invalid vlan id\n");
55 + NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr);
56 + NLA_PUT_U32(msg, NL80211_ATTR_STA_VLAN, sta_vlan);
62 +COMMAND(station, set, "<MAC address> vlan <ifindex>",
63 + NL80211_CMD_SET_STATION, 0, CIB_NETDEV, handle_station_set_vlan,
64 + "Set an AP VLAN for this station.");
67 static int handle_station_dump(struct nl80211_state *state,