John Crispin [Tue, 4 Feb 2020 15:45:34 +0000 (16:45 +0100)]
iw: print ru-alloc values when dumping stations
In commit 2f74c59cf11e ("iw: add HE support to station dump call") we added
most of the HE values when parsing tx bitrates/dumping stations. The
ru-alloc value was missing. This patch adds that value.
Johannes Berg [Fri, 26 Jul 2019 07:18:11 +0000 (09:18 +0200)]
iw: scan: add missing newline
There was a missing newline after the ATIM window print, add it.
Change-Id: I3fba9d1bcd0015a622379c4f9f6c43df225877a6 Reported-by: Bill Unruh <unruh@physics.ubc.ca> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 2 May 2019 08:34:37 +0000 (10:34 +0200)]
iw: include all C files into the binary
There's really no reason to have a separate configuration
for HWSIM, so we can also always compile that. Then, we
no longer need to spell out the list of files and can just
include all the files.
Change-Id: I2a9141b9924bbc217015fce1076ea01017b88cae Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 2 May 2019 08:05:47 +0000 (10:05 +0200)]
iw: change __cmd section scheme to fit gcc/clang
There are some behaviour differences in how gcc and clang
fill a special section like the one we use for __cmd here.
In both compilers, obviously all variables declared like
this end up in the special __cmd section.
However, alignment and padding is applied differently by
different compilers and linkers, and as such it is hard to
really rely on being able to treat this like an array.
To avoid all these issues, put just *pointers* to the
structures into the special section, which makes it easy
to skip NULL pointers (resulting from padding) and has no
issues with alignment as they're always smaller than the
alignment applied.
Change-Id: I35e2c66e541758e60363883d26b31d2040ce8aa9 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
iw: add command to inject a frame via direct mesh link to mesh peer
Add mpath command to inject ethernet frame over direct mesh link to
given peer, bypassing the mpath table lookup. This helps to send data
frames over unexcersized direct mesh path, which is not selected as
next_hop node. This can be helpful in measuring link metrics.
Print the value of the 4ADDR attribute when dumping the interface
status.
Signed-off-by: Antonio Quartulli <a@unstable.cc>
[print only when enabled] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Change-Id: Ieaa5de972638e9c0a9b74fe1daf4aa86dba2c7fd
Johannes Berg [Thu, 28 Feb 2019 20:34:03 +0000 (21:34 +0100)]
iw: fix cmd_size determination with LTO
Use a separate section to determine the cmd_size as in LTO
the entries in __cmd get freely rearranged, leading to a
(usually) very large cmd_size, and thus to the whole thing
not working.
Change-Id: I3437ad34de1d927961a3e98f109794d7a884327f Signed-off-by: Johannes Berg <johannes.berg@intel.com>
iw: Add printing of station tx duration and airtime weight
This adds printing of the station TX duration (along with the existing RX
duration), and the airtime weight, both of which were added as part of the
airtime fairness patches that were recently merged into mac80211.
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 1 Feb 2019 22:00:40 +0000 (23:00 +0100)]
iw: add FTM responder commands
Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Beni Lev <beni.lev@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 22 Nov 2018 12:59:03 +0000 (13:59 +0100)]
iw: separate wait/print when waiting for an event
We usually only wanted to print the event that we waited
for, but with measurements that's changing, we want to
wait for the complete event and print the results.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 19 Nov 2018 10:22:55 +0000 (11:22 +0100)]
iw: make parse_random_mac_addr() more generally available
The parse_random_mac_addr() function is useful in contexts
other than scanning, so make it more generally available and
make it set the attributes to randomise all when no arguments
are given.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Wed, 10 Oct 2018 20:47:47 +0000 (22:47 +0200)]
iw: scan: parse OWE Transition Mode element
This adds code to parse the Opportunistic Wireless Encryption Transition
Mode element.
Without this patch the output looks like this:
WFA 0x1c, data: 00 37 b7 36 dc 0c 08 4f 70 65 6e 57 72 74 34
With this patch it looks like this:
OWE Transition Mode:
BSSID: 00:37:b7:36:dc:0c
SSID: OpenWrt4
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Brian Norris [Mon, 8 Oct 2018 17:51:26 +0000 (10:51 -0700)]
iw: fix enum warnings
clang warns about the misuse of enums:
reg.c:246:26: warning: implicit conversion from enumeration type 'enum command_identify_by' to different enumeration type 'enum id_input' [-Wenum-conversion]
err = handle_cmd(state, CIB_NONE, 2, dump_args);
~~~~~~~~~~ ^~~~~~~~
info.c:645:26: warning: implicit conversion from enumeration type 'enum command_identify_by' to different enumeration type 'enum id_input' [-Wenum-conversion]
err = handle_cmd(state, CIB_NONE, 2, feat_args);
~~~~~~~~~~ ^~~~~~~~
Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
scan: fix crash when driver doesn't report frame type
If driver does not know what kind of frame has been received from BSS,
then it is possible to specify CFG80211_BSS_FTYPE_UNKNOWN
in cfg80211_inform_bss[_width].
In this case neither NL80211_BSS_BEACON_IES nor NL80211_BSS_PRESP_DATA
will be reported to userspace.
Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
iw: 'idby' might be used uninitialized in main function
During static-analysis of the code, a message appeared stating that
'idby' enum might be used un-initialized.
It described a case in which the 'goto detect' statment occurred and
that means that the enum initialization will be skipped.
Johannes: just move the initialization after the label, instead
of moving the variable as Omer's patch had it since we always
just want it to be II_NONE to start with and don't need it in
any other scope.
Signed-off-by: Omer Dagan <omer.dagan@tandemg.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 22 May 2018 20:15:32 +0000 (22:15 +0200)]
scan: print out "Information elements from Probe Response frame" only if certain
If we can't be sure that the IEs were really from a probe
response, avoid printing out that they were, since that's
just confusing to the user.
After kernel commit 0e227084aee3 ("cfg80211: clarify BSS
probe response vs. beacon data") in 3.18 it will set the
NL80211_BSS_PRESP_DATA attribute, so we know for sure; we
can also know if the content is different from the beacon
content.
Reported-by: Denis Kenzior <denkenz@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This adds commands to get and set the per-phy TXQ parameters for drivers
that use the intermediate TXQs. These are the settings and statistics that
are also available through /sys/kernel/debug/ieee80211/phyX/aqm.
iw: Print TXQ statistics for stations and interfaces
This adds printing of TXQ statistics for stations and interfaces when
supplied by the kernel. For stations, another section is added when verbose
mode is enabled; for interfaces, the multicast queue information is always
printed when available.
This is the information also available through debugfs in
/sys/kernel/debug/ieee80211/phyX/netdev:Y/aqm and
/sys/kernel/debug/ieee80211/phyX/netdev:Y/stations/*/aqm.
Johannes Berg [Thu, 4 Jan 2018 15:20:05 +0000 (16:20 +0100)]
bump version to 4.14
This is a bit of a superset of 4.14, but maybe I want to
release 4.15 with the new things still WIP, and I need to
get a release out the door due to signature issues.