Benjamin Berg [Mon, 7 Nov 2016 14:59:43 +0000 (15:59 +0100)]
Print frequency of radar events.
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Benjamin Berg [Mon, 7 Nov 2016 14:59:41 +0000 (15:59 +0100)]
Add commands to send CSA
Add a new set of commands to send a CSA. Both the number of beacons and the
flag to block TX can be given optionally.
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Benjamin Berg [Mon, 7 Nov 2016 14:59:40 +0000 (15:59 +0100)]
Add cac command to allow clearing channels
Allow the user to start a CAC for clearing DFS channels.
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Benjamin Berg [Mon, 7 Nov 2016 14:59:36 +0000 (15:59 +0100)]
util: Add generic frequency/channel command line handler
The ability to parse channel definitions is required in a lot of places
inside iw. However, right now each of these duplicates a lot of code to
handle it.
So add a new helper which can be used everywhere.
Signed-off-by: Benjamin Berg <benjamin.berg@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Rafał Miłecki [Wed, 1 Jun 2016 05:51:14 +0000 (07:51 +0200)]
add "channels" PHY command listing frequencies with more details
Channels (frequencies) are getting more details that users may want to
know about. E.g. it's important to know which frequencies allow using
40/80/160 MHz channels to setup AP properly.
We list channels in "info" command output but it's already quite big and
it was agreed to introduce new command rather than expand the old one.
This patch adds "channels" command printing what was already available
in the "info" plus details about supported channel widths. It also
removes DFS info from the "info" output.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Yongqin Liu [Tue, 3 May 2016 05:48:48 +0000 (13:48 +0800)]
iw: version.sh: update to get version with git correctly
update to get the version information from the
git repository where this file is located instead of the
the current directory where it is executed, otherwise if
there is .git directory in the current directory, it will
get the wrong version information.
And improved the version check since the tag information
may not be mirrored like what AOSP does now.
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Erik Stromdahl [Mon, 2 May 2016 19:55:30 +0000 (21:55 +0200)]
iw: add vendor command response support
Introduced two new commands for reading vendor command responses:
recv and recvbin
Both will send a vendor command (typically some kind of GET request)
in the same way as the current send command and print the received
response in ASCII or binary.
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
iw: Add support for NL80211_STA_INFO_RX_DURATION netlink attribute
Add support for new netlink attribute 'NL80211_STA_INFO_RX_DURATION'.
'NL80211_STA_INFO_RX_DURATION' accounts for aggregate PPDU duration
in microseconds for all the frames from a peer. Drivers can fill
'rx_duration' field and set the flag 'NL80211_STA_INFO_RX_DURATION'.
'rx_duration' will give an idea about the total time spent by our peer
with each of its connected peers.
This will get dumped as part of 'iw dev wlan#N station dump'
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tribush, Gil [Wed, 18 May 2016 11:22:10 +0000 (11:22 +0000)]
iw: Change socket configuration to avoid buffer allocation error
Move nl_socket_set_buffer_size() to be called after genl_connect(),
otherwise nl_socket_set_buffer_size() always returns an NLE_BAD_SOCK
error because sk->s_fd is equal to -1 at that stage.
Signed-off-by: Gil Treibush <gil.tribush@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Avraham Stern [Sun, 8 Nov 2015 08:09:14 +0000 (10:09 +0200)]
iw: add scheduled scan plans configuration
Scheduled scan now supports configuring multiple 'scan plans'.
Each scan plan specifies the interval between scans and the number
of iterations to scan. So add an option to configure scan plans
for scheduled scan
At least one scan plan must be configured. Note that all scan plans
but the last one must specify the scan interval and the number of
iterations. The last scan plan must specify only the interval and
will be run infinitely.
The option to set only an interval is kept for backwards
compatibility. However, the new scan plans option and the old interval
optoin are mutually exclusive.
Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Aviya Erenfeld [Mon, 29 Jun 2015 16:02:55 +0000 (19:02 +0300)]
iw: add missing station statistics
add prints of statistics, flags and data to iw dump command.
the prints added are:
TID statistics
bss parameters
beacon rx
beacon loss
rx drop misc
beacon signal avg
associated flag
the TID statistics is a big table and therefore only printed
when adding -v parameter to the dump command.
in addition change rx bytes and tx bytes to u64 instead of u32
Signed-off-by: Aviya Erenfeld <aviya.erenfeld@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 13 Apr 2016 11:45:24 +0000 (13:45 +0200)]
iw: fix "iw reg get" double output
Axel reports that running "iw reg get" results in the (global)
output being printed twice. The reason for this is that we try
to use the dump facility, and if that succeeds we also do the
get command.
To prevent this, allow handlers to return HANDLER_RET_DONE, in
which case the command will be treated as successful but will
not actually execute another netlink command.
Reported-by: Axel Köllhofer <AxelKoellhofer@web.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Sven Eckelmann [Wed, 25 Nov 2015 13:59:16 +0000 (14:59 +0100)]
iw: add VHT80 support for 802.11s
iw mesh supports non-HT and HT channel widths like HT20 or NOHT. But the
Linux 802.11s implementation also supports VHT80 which can be specified
during the mesh join.
iw dev mesh0 mesh join "meshnet" freq 5180 80MHz
Signed-off-by: Sven Eckelmann <sven@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Sven Eckelmann [Wed, 25 Nov 2015 13:59:15 +0000 (14:59 +0100)]
iw: prepare get_cf1 for use in join_* functions
The chanmode structure and the function get_cf1 to calculate the center
frequency one can be used by not only the ibss join code but also by the
mesh and ocb join code.
Signed-off-by: Sven Eckelmann <sven@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Ola Olsson [Fri, 23 Oct 2015 22:33:12 +0000 (00:33 +0200)]
iw: Fix memory leak if nla_put fails
The NLA_PUT macro will automatically goto nla_put_failure if
the underlying nla_put fails. This will in turn leak our malloced
memory in both the scan and wowlan commands.
Fix that by not using the macro in the cases where we have
allocated heap mem.
Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Ola Olsson [Mon, 12 Oct 2015 20:32:10 +0000 (22:32 +0200)]
iw: add helpful hints for vendor cmd
Without having access to the source, it was
hard to know the format of vendor oui and sub
cmd. This commit fixes that by returning the
right error code to print the help text.
Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
In each scan result, check station capabilities and report whether it
is capable of acting as an FTM initiator, and whether it is capable
if acting as an FTM responder.
Signed-off-by: Assaf Krauss <assaf.krauss@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Arik Nemtsov [Wed, 3 Jun 2015 08:32:23 +0000 (11:32 +0300)]
iw: add connected time to station info
Useful for long testing scenarios
Signed-off-by: Arik Nemtsov <arik@wizery.com>
--
As a side note, I had to change version.sh to make this compile in the
intel git. The "4.1" tag is missing here, so this line fails in
version.sh:
Luciano Coelho [Tue, 17 Mar 2015 14:11:50 +0000 (16:11 +0200)]
iw: add randomise option for sched_scan
Like with normal scans, we can randomise the MAC address sent out in
active scheduled scans. Add the randomise option to sched_scan (and
net-detect) parsing code.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luciano Coelho [Tue, 17 Mar 2015 14:11:49 +0000 (16:11 +0200)]
iw: add support for active scheduled scan
Add options to explicitly use active or passive scans on schedule
scans (and net-detect). If neither active nor passive parameters are
passed, the default is to do active scans with the wildcard SSID.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luciano Coelho [Tue, 17 Mar 2015 14:11:47 +0000 (16:11 +0200)]
iw: move generic sched scan parsing code out of net detect
The scheduled scan structure is pretty much the same as the net-detect
WoWLAN trigger's. Move the bulk of the command line parsing code to
a generic function so we can reuse it for sched_scan.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Modify the command for device type setting to support OCB mode.
Add commands for "joining" and "leaving" the OCB mode network.
When joining two arguments are mandatory -- frequency and
channel bandwidth (5 or 10 MHz).
Signed-off-by: Rostislav Lisovy <rostislav.lisovy@fel.cvut.cz> Signed-off-by: Johannes Berg <johannes.berg@intel.com>