Initial commit
This commit is contained in:
72
package/network/utils/iw/Makefile
Normal file
72
package/network/utils/iw/Makefile
Normal file
@@ -0,0 +1,72 @@
|
||||
#
|
||||
# Copyright (C) 2007-2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=iw
|
||||
PKG_VERSION:=5.0.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/software/network/iw
|
||||
PKG_HASH:=1e38ea794a223525b2ea7fe78fd14f2a56121e62e21ba5f9dbe8c494b35b5c0d
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/iw
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=cfg80211 interface configuration utility
|
||||
URL:=http://wireless.kernel.org/en/users/Documentation/iw
|
||||
DEPENDS:= +libnl-tiny
|
||||
VARIANT:=tiny
|
||||
endef
|
||||
|
||||
define Package/iw-full
|
||||
$(Package/iw)
|
||||
TITLE += (full version)
|
||||
VARIANT:=full
|
||||
PROVIDES:=iw
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
echo "const char iw_version[] = \"$(PKG_VERSION)\";" > $(PKG_BUILD_DIR)/version.c
|
||||
echo "#!/bin/sh" > $(PKG_BUILD_DIR)/version.sh
|
||||
chmod +x $(PKG_BUILD_DIR)/version.sh
|
||||
endef
|
||||
|
||||
TARGET_CPPFLAGS:= \
|
||||
-I$(STAGING_DIR)/usr/include/libnl-tiny \
|
||||
$(TARGET_CPPFLAGS) \
|
||||
-DCONFIG_LIBNL20 \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
ifeq ($(BUILD_VARIANT),full)
|
||||
TARGET_CPPFLAGS += -DIW_FULL
|
||||
MAKE_FLAGS += IW_FULL=1
|
||||
endif
|
||||
|
||||
MAKE_FLAGS += \
|
||||
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffunction-sections -fdata-sections" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS) -Wl,--gc-sections" \
|
||||
NL1FOUND="" NL2FOUND=Y \
|
||||
NLLIBNAME="libnl-tiny" \
|
||||
LIBS="-lm -lnl-tiny" \
|
||||
V=1
|
||||
|
||||
define Package/iw/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/iw $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
Package/iw-full/install=$(Package/iw/install)
|
||||
|
||||
$(eval $(call BuildPackage,iw))
|
||||
$(eval $(call BuildPackage,iw-full))
|
||||
45
package/network/utils/iw/patches/001-nl80211_h_sync.patch
Normal file
45
package/network/utils/iw/patches/001-nl80211_h_sync.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
--- a/nl80211.h
|
||||
+++ b/nl80211.h
|
||||
@@ -2299,6 +2299,12 @@ enum nl80211_commands {
|
||||
* This is also used for capability advertisement in the wiphy information,
|
||||
* with the appropriate sub-attributes.
|
||||
*
|
||||
+ * @NL80211_ATTR_AIRTIME_WEIGHT: Station's weight when scheduled by the airtime
|
||||
+ * scheduler.
|
||||
+ *
|
||||
+ * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
|
||||
+ * transmit power to stay within regulatory limits. u32, dBi.
|
||||
+ *
|
||||
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
|
||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||
@@ -2748,6 +2754,10 @@ enum nl80211_attrs {
|
||||
|
||||
NL80211_ATTR_PEER_MEASUREMENTS,
|
||||
|
||||
+ NL80211_ATTR_AIRTIME_WEIGHT,
|
||||
+
|
||||
+ NL80211_ATTR_WIPHY_ANTENNA_GAIN,
|
||||
+
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
@@ -3125,6 +3135,9 @@ enum nl80211_sta_bss_param {
|
||||
* might not be fully accurate.
|
||||
* @NL80211_STA_INFO_CONNECTED_TO_GATE: set to true if STA has a path to a
|
||||
* mesh gate (u8, 0 or 1)
|
||||
+ * @NL80211_STA_INFO_TX_DURATION: aggregate PPDU duration for all frames
|
||||
+ * sent to the station (u64, usec)
|
||||
+ * @NL80211_STA_INFO_AIRTIME_WEIGHT: current airtime weight for station (u16)
|
||||
* @__NL80211_STA_INFO_AFTER_LAST: internal
|
||||
* @NL80211_STA_INFO_MAX: highest possible station info attribute
|
||||
*/
|
||||
@@ -3168,6 +3181,8 @@ enum nl80211_sta_info {
|
||||
NL80211_STA_INFO_RX_MPDUS,
|
||||
NL80211_STA_INFO_FCS_ERROR_COUNT,
|
||||
NL80211_STA_INFO_CONNECTED_TO_GATE,
|
||||
+ NL80211_STA_INFO_TX_DURATION,
|
||||
+ NL80211_STA_INFO_AIRTIME_WEIGHT,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_STA_INFO_AFTER_LAST,
|
||||
33
package/network/utils/iw/patches/120-antenna_gain.patch
Normal file
33
package/network/utils/iw/patches/120-antenna_gain.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
--- a/phy.c
|
||||
+++ b/phy.c
|
||||
@@ -843,3 +843,30 @@ static int handle_get_txq(struct nl80211
|
||||
COMMAND(get, txq, "",
|
||||
NL80211_CMD_GET_WIPHY, 0, CIB_PHY, handle_get_txq,
|
||||
"Get TXQ parameters.");
|
||||
+
|
||||
+static int handle_antenna_gain(struct nl80211_state *state,
|
||||
+ struct nl_msg *msg,
|
||||
+ int argc, char **argv,
|
||||
+ enum id_input id)
|
||||
+{
|
||||
+ char *endptr;
|
||||
+ int dbm;
|
||||
+
|
||||
+ /* get the required args */
|
||||
+ if (argc != 1)
|
||||
+ return 1;
|
||||
+
|
||||
+ dbm = strtol(argv[0], &endptr, 10);
|
||||
+ if (*endptr)
|
||||
+ return 2;
|
||||
+
|
||||
+ NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_ANTENNA_GAIN, dbm);
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+ nla_put_failure:
|
||||
+ return -ENOBUFS;
|
||||
+}
|
||||
+COMMAND(set, antenna_gain, "<antenna gain in dBm>",
|
||||
+ NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_antenna_gain,
|
||||
+ "Specify antenna gain.");
|
||||
357
package/network/utils/iw/patches/200-reduce_size.patch
Normal file
357
package/network/utils/iw/patches/200-reduce_size.patch
Normal file
@@ -0,0 +1,357 @@
|
||||
--- a/event.c
|
||||
+++ b/event.c
|
||||
@@ -699,6 +699,7 @@ static int print_event(struct nl_msg *ms
|
||||
}
|
||||
|
||||
switch (gnlh->cmd) {
|
||||
+#ifdef IW_FULL
|
||||
case NL80211_CMD_NEW_WIPHY:
|
||||
printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME]));
|
||||
break;
|
||||
@@ -734,6 +735,7 @@ static int print_event(struct nl_msg *ms
|
||||
case NL80211_CMD_SCHED_SCAN_RESULTS:
|
||||
printf("got scheduled scan results\n");
|
||||
break;
|
||||
+#endif
|
||||
case NL80211_CMD_REG_CHANGE:
|
||||
printf("regulatory domain change: ");
|
||||
|
||||
@@ -812,6 +814,7 @@ static int print_event(struct nl_msg *ms
|
||||
mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
|
||||
printf("del station %s\n", macbuf);
|
||||
break;
|
||||
+#ifdef IW_FULL
|
||||
case NL80211_CMD_JOIN_IBSS:
|
||||
mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
|
||||
printf("IBSS %s joined\n", macbuf);
|
||||
@@ -989,9 +992,9 @@ static int print_event(struct nl_msg *ms
|
||||
parse_nan_match(tb);
|
||||
break;
|
||||
}
|
||||
+#endif
|
||||
default:
|
||||
- printf("unknown event %d (%s)\n",
|
||||
- gnlh->cmd, command_name(gnlh->cmd));
|
||||
+ printf("unknown event %d\n", gnlh->cmd);
|
||||
break;
|
||||
}
|
||||
|
||||
--- a/info.c
|
||||
+++ b/info.c
|
||||
@@ -205,6 +205,7 @@ next:
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef IW_FULL
|
||||
if (tb_band[NL80211_BAND_ATTR_RATES]) {
|
||||
printf("\t\tBitrates (non-HT):\n");
|
||||
nla_for_each_nested(nl_rate, tb_band[NL80211_BAND_ATTR_RATES], rem_rate) {
|
||||
@@ -221,6 +222,7 @@ next:
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,6 +288,7 @@ next:
|
||||
printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage);
|
||||
}
|
||||
|
||||
+#ifdef IW_FULL
|
||||
if (tb_msg[NL80211_ATTR_CIPHER_SUITES]) {
|
||||
int num = nla_len(tb_msg[NL80211_ATTR_CIPHER_SUITES]) / sizeof(__u32);
|
||||
int i;
|
||||
@@ -297,6 +300,7 @@ next:
|
||||
cipher_name(ciphers[i]));
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX] &&
|
||||
tb_msg[NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX])
|
||||
@@ -316,11 +320,13 @@ next:
|
||||
printf("\t\t * %s\n", iftype_name(nla_type(nl_mode)));
|
||||
}
|
||||
|
||||
+#ifdef IW_FULL
|
||||
if (tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES]) {
|
||||
printf("\tsoftware interface modes (can always be added):\n");
|
||||
nla_for_each_nested(nl_mode, tb_msg[NL80211_ATTR_SOFTWARE_IFTYPES], rem_mode)
|
||||
printf("\t\t * %s\n", iftype_name(nla_type(nl_mode)));
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (tb_msg[NL80211_ATTR_INTERFACE_COMBINATIONS]) {
|
||||
struct nlattr *nl_combi;
|
||||
@@ -417,6 +423,7 @@ broken_combination:
|
||||
printf("\tinterface combinations are not supported\n");
|
||||
}
|
||||
|
||||
+#ifdef IW_FULL
|
||||
if (tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS]) {
|
||||
printf("\tSupported commands:\n");
|
||||
nla_for_each_nested(nl_cmd, tb_msg[NL80211_ATTR_SUPPORTED_COMMANDS], rem_cmd)
|
||||
@@ -514,6 +521,7 @@ broken_combination:
|
||||
printf("\t\t * wake up on TCP connection\n");
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (tb_msg[NL80211_ATTR_ROAM_SUPPORT])
|
||||
printf("\tDevice supports roaming.\n");
|
||||
@@ -552,6 +560,7 @@ broken_combination:
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef IW_FULL
|
||||
if (tb_msg[NL80211_ATTR_FEATURE_FLAGS]) {
|
||||
unsigned int features = nla_get_u32(tb_msg[NL80211_ATTR_FEATURE_FLAGS]);
|
||||
|
||||
@@ -616,6 +625,7 @@ broken_combination:
|
||||
if (features & NL80211_FEATURE_ND_RANDOM_MAC_ADDR)
|
||||
printf("\tDevice supports randomizing MAC-addr in net-detect scans.\n");
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (tb_msg[NL80211_ATTR_TDLS_SUPPORT])
|
||||
printf("\tDevice supports T-DLS.\n");
|
||||
@@ -740,6 +750,7 @@ TOPLEVEL(list, NULL, NL80211_CMD_GET_WIP
|
||||
"List all wireless devices and their capabilities.");
|
||||
TOPLEVEL(phy, NULL, NL80211_CMD_GET_WIPHY, NLM_F_DUMP, CIB_NONE, handle_info, NULL);
|
||||
|
||||
+#ifdef IW_FULL
|
||||
static int handle_commands(struct nl80211_state *state, struct nl_msg *msg,
|
||||
int argc, char **argv, enum id_input id)
|
||||
{
|
||||
@@ -751,6 +762,7 @@ static int handle_commands(struct nl8021
|
||||
}
|
||||
TOPLEVEL(commands, NULL, NL80211_CMD_GET_WIPHY, 0, CIB_NONE, handle_commands,
|
||||
"list all known commands and their decimal & hex value");
|
||||
+#endif
|
||||
|
||||
static int print_feature_handler(struct nl_msg *msg, void *arg)
|
||||
{
|
||||
--- a/scan.c
|
||||
+++ b/scan.c
|
||||
@@ -1197,6 +1197,9 @@ static void print_ht_op(const uint8_t ty
|
||||
printf("\t\t * secondary channel offset: %s\n",
|
||||
ht_secondary_offset[data[1] & 0x3]);
|
||||
printf("\t\t * STA channel width: %s\n", sta_chan_width[(data[1] & 0x4)>>2]);
|
||||
+#ifndef IW_FULL
|
||||
+ return;
|
||||
+#endif
|
||||
printf("\t\t * RIFS: %d\n", (data[1] & 0x8)>>3);
|
||||
printf("\t\t * HT protection: %s\n", protection[data[2] & 0x3]);
|
||||
printf("\t\t * non-GF present: %d\n", (data[2] & 0x4) >> 2);
|
||||
@@ -1524,6 +1527,14 @@ static void print_ie(const struct ie_pri
|
||||
|
||||
static const struct ie_print ieprinters[] = {
|
||||
[0] = { "SSID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
|
||||
+ [45] = { "HT capabilities", print_ht_capa, 26, 26, BIT(PRINT_SCAN), },
|
||||
+ [48] = { "RSN", print_rsn, 2, 255, BIT(PRINT_SCAN), },
|
||||
+ [61] = { "HT operation", print_ht_op, 22, 22, BIT(PRINT_SCAN), },
|
||||
+ [62] = { "Secondary Channel Offset", print_secchan_offs, 1, 1, BIT(PRINT_SCAN), },
|
||||
+ [114] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
|
||||
+ [191] = { "VHT capabilities", print_vht_capa, 12, 255, BIT(PRINT_SCAN), },
|
||||
+ [192] = { "VHT operation", print_vht_oper, 5, 255, BIT(PRINT_SCAN), },
|
||||
+#ifdef IW_FULL
|
||||
[1] = { "Supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), },
|
||||
[3] = { "DS Parameter set", print_ds, 1, 1, BIT(PRINT_SCAN), },
|
||||
[5] = { "TIM", print_tim, 4, 255, BIT(PRINT_SCAN), },
|
||||
@@ -1533,21 +1544,15 @@ static const struct ie_print ieprinters[
|
||||
[32] = { "Power constraint", print_powerconstraint, 1, 1, BIT(PRINT_SCAN), },
|
||||
[35] = { "TPC report", print_tpcreport, 2, 2, BIT(PRINT_SCAN), },
|
||||
[42] = { "ERP", print_erp, 1, 255, BIT(PRINT_SCAN), },
|
||||
- [45] = { "HT capabilities", print_ht_capa, 26, 26, BIT(PRINT_SCAN), },
|
||||
[47] = { "ERP D4.0", print_erp, 1, 255, BIT(PRINT_SCAN), },
|
||||
[74] = { "Overlapping BSS scan params", print_obss_scan_params, 14, 255, BIT(PRINT_SCAN), },
|
||||
- [61] = { "HT operation", print_ht_op, 22, 22, BIT(PRINT_SCAN), },
|
||||
- [62] = { "Secondary Channel Offset", print_secchan_offs, 1, 1, BIT(PRINT_SCAN), },
|
||||
- [191] = { "VHT capabilities", print_vht_capa, 12, 255, BIT(PRINT_SCAN), },
|
||||
- [192] = { "VHT operation", print_vht_oper, 5, 255, BIT(PRINT_SCAN), },
|
||||
- [48] = { "RSN", print_rsn, 2, 255, BIT(PRINT_SCAN), },
|
||||
[50] = { "Extended supported rates", print_supprates, 0, 255, BIT(PRINT_SCAN), },
|
||||
[113] = { "MESH Configuration", print_mesh_conf, 7, 7, BIT(PRINT_SCAN), },
|
||||
- [114] = { "MESH ID", print_ssid, 0, 32, BIT(PRINT_SCAN) | BIT(PRINT_LINK), },
|
||||
[127] = { "Extended capabilities", print_capabilities, 0, 255, BIT(PRINT_SCAN), },
|
||||
[107] = { "802.11u Interworking", print_interworking, 0, 255, BIT(PRINT_SCAN), },
|
||||
[108] = { "802.11u Advertisement", print_11u_advert, 0, 255, BIT(PRINT_SCAN), },
|
||||
[111] = { "802.11u Roaming Consortium", print_11u_rcon, 0, 255, BIT(PRINT_SCAN), },
|
||||
+#endif
|
||||
};
|
||||
|
||||
static void print_wifi_wpa(const uint8_t type, uint8_t len, const uint8_t *data,
|
||||
@@ -2026,6 +2031,7 @@ void print_ies(unsigned char *ie, int ie
|
||||
ieprinters[ie[0]].flags & BIT(ptype)) {
|
||||
print_ie(&ieprinters[ie[0]],
|
||||
ie[0], ie[1], ie + 2, &ie_buffer);
|
||||
+#ifdef IW_FULL
|
||||
} else if (ie[0] == 221 /* vendor */) {
|
||||
print_vendor(ie[1], ie + 2, unknown, ptype);
|
||||
} else if (unknown) {
|
||||
@@ -2035,6 +2041,7 @@ void print_ies(unsigned char *ie, int ie
|
||||
for (i=0; i<ie[1]; i++)
|
||||
printf(" %.2x", ie[2+i]);
|
||||
printf("\n");
|
||||
+#endif
|
||||
}
|
||||
ielen -= ie[1] + 2;
|
||||
ie += ie[1] + 2;
|
||||
@@ -2075,6 +2082,7 @@ static void print_capa_non_dmg(__u16 cap
|
||||
printf(" ESS");
|
||||
if (capa & WLAN_CAPABILITY_IBSS)
|
||||
printf(" IBSS");
|
||||
+#ifdef IW_FULL
|
||||
if (capa & WLAN_CAPABILITY_CF_POLLABLE)
|
||||
printf(" CfPollable");
|
||||
if (capa & WLAN_CAPABILITY_CF_POLL_REQUEST)
|
||||
@@ -2103,6 +2111,7 @@ static void print_capa_non_dmg(__u16 cap
|
||||
printf(" DelayedBACK");
|
||||
if (capa & WLAN_CAPABILITY_IMM_BACK)
|
||||
printf(" ImmediateBACK");
|
||||
+#endif
|
||||
}
|
||||
|
||||
static int print_bss_handler(struct nl_msg *msg, void *arg)
|
||||
@@ -2187,8 +2196,10 @@ static int print_bss_handler(struct nl_m
|
||||
if (bss[NL80211_BSS_FREQUENCY]) {
|
||||
int freq = nla_get_u32(bss[NL80211_BSS_FREQUENCY]);
|
||||
printf("\tfreq: %d\n", freq);
|
||||
+#ifdef IW_FULL
|
||||
if (freq > 45000)
|
||||
is_dmg = true;
|
||||
+#endif
|
||||
}
|
||||
if (bss[NL80211_BSS_BEACON_INTERVAL])
|
||||
printf("\tbeacon interval: %d TUs\n",
|
||||
@@ -2382,6 +2393,7 @@ static int handle_stop_sched_scan(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#ifdef IW_FULL
|
||||
COMMAND(scan, sched_start,
|
||||
SCHED_SCAN_OPTIONS,
|
||||
NL80211_CMD_START_SCHED_SCAN, 0, CIB_NETDEV, handle_start_sched_scan,
|
||||
@@ -2392,3 +2404,4 @@ COMMAND(scan, sched_start,
|
||||
COMMAND(scan, sched_stop, "",
|
||||
NL80211_CMD_STOP_SCHED_SCAN, 0, CIB_NETDEV, handle_stop_sched_scan,
|
||||
"Stop an ongoing scheduled scan.");
|
||||
+#endif
|
||||
--- a/util.c
|
||||
+++ b/util.c
|
||||
@@ -289,6 +289,7 @@ static const char *commands[NL80211_CMD_
|
||||
|
||||
static char cmdbuf[100];
|
||||
|
||||
+#ifdef IW_FULL
|
||||
const char *command_name(enum nl80211_commands cmd)
|
||||
{
|
||||
if (cmd <= NL80211_CMD_MAX && commands[cmd])
|
||||
@@ -296,6 +297,7 @@ const char *command_name(enum nl80211_co
|
||||
sprintf(cmdbuf, "Unknown command (%d)", cmd);
|
||||
return cmdbuf;
|
||||
}
|
||||
+#endif
|
||||
|
||||
int ieee80211_channel_to_frequency(int chan, enum nl80211_band band)
|
||||
{
|
||||
@@ -434,6 +436,9 @@ int parse_keys(struct nl_msg *msg, char
|
||||
char keybuf[13];
|
||||
int pos = 0;
|
||||
|
||||
+#ifndef IW_FULL
|
||||
+ return 1;
|
||||
+#endif
|
||||
if (!*argc)
|
||||
return 1;
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -31,6 +31,12 @@ OBJS-$(HWSIM) += hwsim.o
|
||||
|
||||
OBJS += $(OBJS-y) $(OBJS-Y)
|
||||
|
||||
+OBJS_FULL = ocb offch cqm wowlan coalesce roc p2p vendor mgmt ap sha256 nan bloom measurements ftm
|
||||
+ifdef IW_FULL
|
||||
+ CFLAGS += -DIW_FULL
|
||||
+else
|
||||
+ OBJS:=$(filter-out $(patsubst %,%.o,$(OBJS_FULL)),$(OBJS))
|
||||
+endif
|
||||
ALL = iw
|
||||
|
||||
ifeq ($(NO_PKG_CONFIG),)
|
||||
--- a/station.c
|
||||
+++ b/station.c
|
||||
@@ -709,10 +709,12 @@ static int handle_station_set_plink(stru
|
||||
nla_put_failure:
|
||||
return -ENOBUFS;
|
||||
}
|
||||
+#ifdef IW_FULL
|
||||
COMMAND_ALIAS(station, set, "<MAC address> plink_action <open|block>",
|
||||
NL80211_CMD_SET_STATION, 0, CIB_NETDEV, handle_station_set_plink,
|
||||
"Set mesh peer link action for this station (peer).",
|
||||
select_station_cmd, station_set_plink);
|
||||
+#endif
|
||||
|
||||
static int handle_station_set_vlan(struct nl80211_state *state,
|
||||
struct nl_msg *msg,
|
||||
@@ -807,11 +809,13 @@ static int handle_station_set_mesh_power
|
||||
nla_put_failure:
|
||||
return -ENOBUFS;
|
||||
}
|
||||
+#ifdef IW_FULL
|
||||
COMMAND_ALIAS(station, set, "<MAC address> mesh_power_mode "
|
||||
"<active|light|deep>", NL80211_CMD_SET_STATION, 0, CIB_NETDEV,
|
||||
handle_station_set_mesh_power_mode,
|
||||
"Set link-specific mesh power mode for this station",
|
||||
select_station_cmd, station_set_mesh_power_mode);
|
||||
+#endif
|
||||
|
||||
static int handle_station_dump(struct nl80211_state *state,
|
||||
struct nl_msg *msg,
|
||||
--- a/interface.c
|
||||
+++ b/interface.c
|
||||
@@ -621,9 +621,11 @@ static int handle_interface_wds_peer(str
|
||||
nla_put_failure:
|
||||
return -ENOBUFS;
|
||||
}
|
||||
+#ifdef IW_FULL
|
||||
COMMAND(set, peer, "<MAC address>",
|
||||
NL80211_CMD_SET_WDS_PEER, 0, CIB_NETDEV, handle_interface_wds_peer,
|
||||
"Set interface WDS peer.");
|
||||
+#endif
|
||||
|
||||
static int set_mcast_rate(struct nl80211_state *state,
|
||||
struct nl_msg *msg,
|
||||
@@ -713,6 +715,7 @@ static int handle_chan(struct nl80211_st
|
||||
return handle_chanfreq(state, msg, true, argc, argv, id);
|
||||
}
|
||||
|
||||
+#ifdef IW_FULL
|
||||
SECTION(switch);
|
||||
COMMAND(switch, freq,
|
||||
"<freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]\n"
|
||||
@@ -721,3 +724,4 @@ COMMAND(switch, freq,
|
||||
"Switch the operating channel by sending a channel switch announcement (CSA).");
|
||||
COMMAND(switch, channel, "<channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons <count>] [block-tx]",
|
||||
NL80211_CMD_CHANNEL_SWITCH, 0, CIB_NETDEV, handle_chan, NULL);
|
||||
+#endif
|
||||
--- a/phy.c
|
||||
+++ b/phy.c
|
||||
@@ -359,6 +359,7 @@ static int handle_cac(struct nl80211_sta
|
||||
|
||||
return 0;
|
||||
}
|
||||
+#ifdef IW_FULL
|
||||
TOPLEVEL(cac, "channel <channel> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]\n"
|
||||
"freq <freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz]\n"
|
||||
"freq <control freq> [5|10|20|40|80|80+80|160] [<center1_freq> [<center2_freq>]]",
|
||||
@@ -370,6 +371,7 @@ COMMAND(cac, trigger,
|
||||
NL80211_CMD_RADAR_DETECT, 0, CIB_NETDEV, handle_cac_trigger,
|
||||
"Start or trigger a channel availability check (CAC) looking to look for\n"
|
||||
"radars on the given channel.");
|
||||
+#endif
|
||||
|
||||
static int handle_fragmentation(struct nl80211_state *state,
|
||||
struct nl_msg *msg,
|
||||
Reference in New Issue
Block a user