]> git.ipfire.org Git - thirdparty/iw.git/log
thirdparty/iw.git
7 years agoiw: version.sh: update to get version with git correctly
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>
7 years agoiw: Fix -Wabsolute-value compiler warning in iw.c
Aurimas Liutikas [Thu, 12 May 2016 16:16:30 +0000 (09:16 -0700)] 
iw: Fix -Wabsolute-value compiler warning in iw.c

Signed-off-by: Aurimas Liutikas <aurimas@google.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agoiw: support setting frame subtype and reason code when deleting station
Rafał Miłecki [Wed, 4 May 2016 15:38:57 +0000 (17:38 +0200)] 
iw: support setting frame subtype and reason code when deleting station

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agoiw: add vendor command response support
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>
7 years agoiw: Add support for NL80211_STA_INFO_RX_DURATION netlink attribute
Mohammed Shafi Shajakhan [Thu, 7 Apr 2016 14:30:20 +0000 (20:00 +0530)] 
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>
7 years agoiw: Change socket configuration to avoid buffer allocation error
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>
8 years agoupdate nl80211.h
Johannes Berg [Thu, 14 Apr 2016 09:12:38 +0000 (11:12 +0200)] 
update nl80211.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: add scheduled scan plans configuration
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>
8 years agoiw: add missing station statistics
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>
8 years agoiw: document handler return value 1 as HANDLER_RET_USAGE
Johannes Berg [Wed, 13 Apr 2016 11:47:19 +0000 (13:47 +0200)] 
iw: document handler return value 1 as HANDLER_RET_USAGE

This value is used to mean "print out usage info", so make
a define for it. Still not used, but new code can and should
use it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: fix "iw reg get" double output
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>
8 years agoprint BSS boottime if received
Johannes Berg [Thu, 14 Jan 2016 10:46:56 +0000 (11:46 +0100)] 
print BSS boottime if received

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoupdate nl80211.h
Johannes Berg [Thu, 14 Jan 2016 10:14:59 +0000 (11:14 +0100)] 
update nl80211.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: print NOHT always as first in usage texts
Sven Eckelmann [Wed, 25 Nov 2015 13:59:18 +0000 (14:59 +0100)] 
iw: print NOHT always as first in usage texts

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: use get_cf1 and struct chanmode for ocb
Sven Eckelmann [Wed, 25 Nov 2015 13:59:17 +0000 (14:59 +0100)] 
iw: use get_cf1 and struct chanmode for ocb

The struct chanmode and the function get_cf1 is already used by ibss and
mesh. Also use it for ocb to make it consistent for for all join functions.

Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: add VHT80 support for 802.11s
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>
8 years agoiw: prepare get_cf1 for use in join_* functions
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>
8 years agoiw: don't use NULL pointer in nla_nest_end()
Amit Khatri [Thu, 26 Nov 2015 09:10:19 +0000 (14:40 +0530)] 
iw: don't use NULL pointer in nla_nest_end()

Fix a crash if nla_nest_start() fails here.

Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: Fix memory leak if nla_put fails
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>
8 years agomesh: show mesh parameters when no args are given
Ola Olsson [Wed, 21 Oct 2015 12:13:19 +0000 (14:13 +0200)] 
mesh: show mesh parameters when no args are given

The help text in "<get|set> mesh_param" says that
available parameters will be shown if no args are given
but that is not the case - fix that.

Also, add help text if a parameter is given but not found.

Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: remove superfluous includes
Ola Olsson [Wed, 21 Oct 2015 12:04:37 +0000 (14:04 +0200)] 
iw: remove superfluous includes

Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: Fix segfault when no args are given to offchannel
Ola Olsson [Wed, 21 Oct 2015 12:02:24 +0000 (14:02 +0200)] 
iw: Fix segfault when no args are given to offchannel

The offchannel command assumes that frequency and duration
are given as arguments, otherwise iw segfaults - fix that
by printing help text instead.

Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
[remove braces]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: add and fix -Wsign-compare
Johannes Berg [Wed, 14 Oct 2015 06:49:14 +0000 (08:49 +0200)] 
iw: add and fix -Wsign-compare

Ola Olsson pointed out that -Wsign-compare was getting a lot
of warnings, those seem reasonable to fix.

Reported-by: Ola Olsson <ola1olsson@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: fix help text for event command
Ola Olsson [Mon, 12 Oct 2015 20:37:08 +0000 (22:37 +0200)] 
iw: fix help text for event command

According to the source, the -t and -r options are
mutually exclusive. Fix the help text accordingly.

Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: add helpful hints for vendor cmd
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>
8 years agoocb: use correct "MHz" instead of "MHZ"
Ola Olsson [Mon, 12 Oct 2015 07:35:56 +0000 (09:35 +0200)] 
ocb: use correct "MHz" instead of "MHZ"

Fixes the last typos of MHZ to MHz

Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: Fix return values when parameters are wrong
Ola Olsson [Mon, 12 Oct 2015 07:34:54 +0000 (09:34 +0200)] 
iw: Fix return values when parameters are wrong

According to header file, wrong parameters
yield 1 as return value.
Also tried to fix the comments since one part
of it was unreadable.

Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: Fix memory leak in error path
Ola Olsson [Fri, 9 Oct 2015 14:52:42 +0000 (16:52 +0200)] 
iw: Fix memory leak in error path

The leak is present if malloc fails after requesting
a scan with ies or meshid as input.

Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: remove superfluous includes
Ola Olsson [Sun, 4 Oct 2015 21:08:39 +0000 (23:08 +0200)] 
iw: remove superfluous includes

if.h only contains if_nametoindex and the reverse.
Lets remove the inclusion in the source files where
these functions are not called.

Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoibss: use correct "MHz" instead of "MHZ"
Johannes Berg [Fri, 18 Sep 2015 09:11:38 +0000 (11:11 +0200)] 
ibss: use correct "MHz" instead of "MHZ"

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoibss: add VHT80 support for IBSS
Janusz.Dziedzic@tieto.com [Thu, 10 Sep 2015 10:04:13 +0000 (12:04 +0200)] 
ibss: add VHT80 support for IBSS

Add VHT80 support for IBSS.

eg. iw wlan0 ibss join 5180 80MHZ
    iw wlan0 ibbs join 5220 80MHZ

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
[fix formatting]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoscan: Add FTM info to scan results
Assaf Krauss [Thu, 10 Sep 2015 12:53:03 +0000 (15:53 +0300)] 
scan: Add FTM info to scan results

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>
8 years agoiw: display interface TX power if available
Rafał Miłecki [Tue, 1 Sep 2015 07:55:52 +0000 (09:55 +0200)] 
iw: display interface TX power if available

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
[print dBm]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agobump version to 4.3 v4.3
Johannes Berg [Fri, 18 Sep 2015 08:54:53 +0000 (10:54 +0200)] 
bump version to 4.3

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: fix off-by-one
Johannes Berg [Fri, 18 Sep 2015 08:54:17 +0000 (10:54 +0200)] 
iw: fix off-by-one

An off-by-one prevented printing the very last command, fix it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoadd a few new commands/events
Johannes Berg [Fri, 18 Sep 2015 08:52:26 +0000 (10:52 +0200)] 
add a few new commands/events

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoprint IR-concurrent instead of GO-concurrent
Johannes Berg [Fri, 18 Sep 2015 08:50:50 +0000 (10:50 +0200)] 
print IR-concurrent instead of GO-concurrent

Since this flag is now also used for other IR indications,
e.g. TDLS.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoupdate nl80211.h to kernel 4.3
Johannes Berg [Fri, 18 Sep 2015 08:50:29 +0000 (10:50 +0200)] 
update nl80211.h to kernel 4.3

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: don't mix declaration into code
Johannes Berg [Fri, 18 Sep 2015 08:47:42 +0000 (10:47 +0200)] 
iw: don't mix declaration into code

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: make netns_get_fd static
Johannes Berg [Fri, 18 Sep 2015 08:46:57 +0000 (10:46 +0200)] 
iw: make netns_get_fd static

This can be static since it's only used right there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: fix s_cb leak
Johannes Berg [Fri, 18 Sep 2015 08:44:44 +0000 (10:44 +0200)] 
iw: fix s_cb leak

Reported-by: Amit Khatri <amit.khatri@samsung.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: avoid passing NULL to nla_data()
Amit Khatri [Thu, 13 Aug 2015 10:26:59 +0000 (10:26 +0000)] 
iw: avoid passing NULL to nla_data()

The attr pointer is checked for NULL but the function
doesn't handle it appropriately - fix that.

Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: cqm: check nlmsg_alloc() return
Amit Khatri [Thu, 13 Aug 2015 10:20:48 +0000 (10:20 +0000)] 
iw: cqm: check nlmsg_alloc() return

If nlmsg_alloc() fails, don't crash but return an error.

Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: remove android-nl.c with unneeded workaround
Filipe Brandenburger [Thu, 30 Jul 2015 21:35:15 +0000 (14:35 -0700)] 
iw: remove android-nl.c with unneeded workaround

The workaround might have been necessary in the past, however now it
produces the following error:

  .../libnl.a(attr.o): multiple definition of 'nla_put_flag'
  .../android-nl.o: previous definition here
  collect2: error: ld returned 1 exit status

TEST=Built AOSP tree with this patchset, tested the generated iw binary.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: fix references to libnl in Android.mk
Filipe Brandenburger [Thu, 30 Jul 2015 21:47:08 +0000 (14:47 -0700)] 
iw: fix references to libnl in Android.mk

The latest AOSP refers to that library as libnl and not libnl_2.

TEST=Built AOSP tree with this patchset, tested the generated iw binary.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: free memory on scan parse errors
Amit Khatri [Fri, 26 Jun 2015 09:02:36 +0000 (09:02 +0000)] 
iw: free memory on scan parse errors

Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: remove cb from arguments and simplify valid handler
Johannes Berg [Fri, 26 Jun 2015 09:42:28 +0000 (11:42 +0200)] 
iw: remove cb from arguments and simplify valid handler

Just provide our own valid handler and let the command
functions assign it without going through the cb.

(With the event handling fixed by Eliad Peller)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: add connected time to station info
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:

[ "${descr%%-*}" = "v$VERSION" ] || exit 2

8 years agoiw: print beacon-loss and wiphy delete events
Ben Greear [Thu, 11 Jun 2015 19:54:11 +0000 (15:54 -0400)] 
iw: print beacon-loss and wiphy delete events

This is nicer than messages about unknown events.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: only use tags matching "v*"
Johannes Berg [Mon, 8 Jun 2015 08:51:10 +0000 (10:51 +0200)] 
iw: only use tags matching "v*"

Some people/build systems may add additional tags, so use only
tags matching "v*" for the version creation.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agobump version to 4.1 v4.1
Johannes Berg [Tue, 5 May 2015 12:15:14 +0000 (14:15 +0200)] 
bump version to 4.1

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: handle NL80211_ATTR_EXT_FEATURES attribute
Janusz.Dziedzic@tieto.com [Mon, 30 Mar 2015 10:56:31 +0000 (12:56 +0200)] 
iw: handle NL80211_ATTR_EXT_FEATURES attribute

Print if VHT-IBSS is supported.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoupdate nl80211.h
Johannes Berg [Tue, 5 May 2015 12:14:11 +0000 (14:14 +0200)] 
update nl80211.h

(To 4.1-rc2)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoiw: trivial spelling fix (initial)
Stefan Lippers-Hollmann [Tue, 28 Apr 2015 02:45:09 +0000 (04:45 +0200)] 
iw: trivial spelling fix (initial)

Introduced in 29af20194aedd2f1c26205bb70a395d394845708, "iw: add a
delay option to net-detect".

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: Print OSEN element for HotSpot 2.0 IE.
Ben Greear [Tue, 17 Mar 2015 22:02:33 +0000 (15:02 -0700)] 
iw: Print OSEN element for HotSpot 2.0 IE.

Re-uses most of the print-rsn logic since only the header
differs.

Example output:
...
HotSpot 2.0 OSEN:
 * Group cipher: NO-GROUP
 * Pairwise ciphers: CCMP
 * Authentication suites: OSEN
 * Capabilities: 16-PTKSA-RC 1-GTKSA-RC (0x000c)

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: add randomise option for sched_scan
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>
9 years agoiw: add support for active scheduled scan
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>
9 years agoiw: implement scheduled scan
Luciano Coelho [Tue, 17 Mar 2015 14:11:48 +0000 (16:11 +0200)] 
iw: implement scheduled scan

Add sched_start, sched_stop and events parsing for scheduled scan.
For now, only passive scans are supported.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: move generic sched scan parsing code out of net detect
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>
9 years agoversion 4.0 v4.0
Johannes Berg [Tue, 17 Mar 2015 13:18:24 +0000 (14:18 +0100)] 
version 4.0

9 years agoiw: add a delay option to net-detect
Luciano Coelho [Fri, 13 Mar 2015 12:17:07 +0000 (14:17 +0200)] 
iw: add a delay option to net-detect

Add an option that allows the initial net-detect scan to be delayed by
the specified number of seconds.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
[add missing closing brace]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agophy: Allow set netns by fd
Vadim Kochan [Sat, 14 Feb 2015 07:33:12 +0000 (09:33 +0200)] 
phy: Allow set netns by fd

Added possibility to change network namespace
for phy device by network namespace name from
/var/run/netns or by absolute file path:

iw phy XXX set netns name <nsname>

iw tries to open fd of given nsname from /var/run/netns
or by absoute path if nsname contains "/".

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoupdate nl80211.h
Johannes Berg [Tue, 3 Mar 2015 08:47:36 +0000 (09:47 +0100)] 
update nl80211.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: print human readable radar events
Helmut Schaa [Fri, 30 Jan 2015 09:42:44 +0000 (10:42 +0100)] 
iw: print human readable radar events

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoRead number of supported net-detect matches
Luciano Coelho [Tue, 13 Jan 2015 14:19:15 +0000 (16:19 +0200)] 
Read number of supported net-detect matches

Instead of just printing whether netdetect is supported, parse the
attribute and report the maximum number of matchsets the driver
supports.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: Add OCB mode handling
Rostislav Lisovy [Mon, 12 Jan 2015 12:49:57 +0000 (13:49 +0100)] 
iw: Add OCB mode handling

Since the commit 6e0bd6c35b021dc73a81ebd1ef79761233c48b50
("cfg80211: 802.11p OCB mode handling") and
239281f803e2efdb77d906ef296086b6917e5d71
("mac80211: 802.11p OCB mode support")
does the Linux kernel support OCB mode. This commit adds
proper OCB mode handling.

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>
9 years agoiw: fix android build
Arik Nemtsov [Tue, 6 Jan 2015 10:48:45 +0000 (12:48 +0200)] 
iw: fix android build

Don't define "iw" build target in the regular Makefile which gets
included. This confuses the Android build system (coincides with module
name).

Also correct libnl_2 to a be static library, as compiled on Android.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: support multiple regdom print
Arik Nemtsov [Mon, 15 Dec 2014 16:44:23 +0000 (18:44 +0200)] 
iw: support multiple regdom print

When a phy is given, print only its regdomain. Otherwise, use the newly
implement dump functionality to print all regdomains in the system.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoupdate nl80211.h
Johannes Berg [Wed, 17 Dec 2014 14:16:26 +0000 (15:16 +0100)] 
update nl80211.h

9 years agoiw: fix attr max for reg_rule
Arik Nemtsov [Mon, 1 Dec 2014 15:53:43 +0000 (17:53 +0200)] 
iw: fix attr max for reg_rule

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: print new RRF_ regulatory flags
Arik Nemtsov [Mon, 1 Dec 2014 15:53:42 +0000 (17:53 +0200)] 
iw: print new RRF_ regulatory flags

These were added to cfg80211 recently

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: print phy TDLS ch-switch support
Arik Nemtsov [Mon, 1 Dec 2014 16:00:22 +0000 (18:00 +0200)] 
iw: print phy TDLS ch-switch support

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoparse net detect wowlan configuration information
Luciano Coelho [Fri, 28 Nov 2014 21:05:56 +0000 (23:05 +0200)] 
parse net detect wowlan configuration information

Parse the net detect information when it is reported.  This includes
the scan interval, SSIDs to match and frequencies to scan.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoadd WoWLAN net-detect trigger
Luciano Coelho [Fri, 28 Nov 2014 21:05:55 +0000 (23:05 +0200)] 
add WoWLAN net-detect trigger

Adds a netdetect option to the wowlan triggers that allows the user to
request network detection to be started when the device goes to
suspend mode.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agosupport random scan request
Johannes Berg [Wed, 19 Nov 2014 12:44:43 +0000 (13:44 +0100)] 
support random scan request

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoupdate nl80211.h
Johannes Berg [Fri, 12 Dec 2014 12:52:06 +0000 (13:52 +0100)] 
update nl80211.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: Fix calculation of maximum supported 802.11n data rate
Henning Rogge [Wed, 10 Dec 2014 09:23:20 +0000 (10:23 +0100)] 
iw: Fix calculation of maximum supported 802.11n data rate

Fix typo in calculation, binary AND combination of low byte
and high byte is always zero.

Signed-off-by: Henning Rogge <henning.rogge@fkie.fraunhofer.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoupdate nl80211.h and command IDs
Johannes Berg [Thu, 13 Nov 2014 12:59:57 +0000 (13:59 +0100)] 
update nl80211.h and command IDs

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoadd WMM tspec capability
Johannes Berg [Wed, 29 Oct 2014 16:10:39 +0000 (17:10 +0100)] 
add WMM tspec capability

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: support setting vif MAC during creation
Ben Greear [Fri, 24 Oct 2014 15:35:42 +0000 (08:35 -0700)] 
iw: support setting vif MAC during creation

This saves an extra call to change it later, and will
also keep udev from potentially messing with a vif
it should not be messing with.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoupdate nl80211.h
Johannes Berg [Wed, 29 Oct 2014 16:10:13 +0000 (17:10 +0100)] 
update nl80211.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoadd vendor command to Makefile
Johannes Berg [Wed, 29 Oct 2014 16:08:35 +0000 (17:08 +0100)] 
add vendor command to Makefile

Apparently I forgot this when applying the previous commit.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: add vendor send command
Janusz Dziedzic [Mon, 15 Sep 2014 10:47:58 +0000 (12:47 +0200)] 
iw: add vendor send command

This allow to send vendor data to the driver.
This command required OUI and SUBCMD parameters.

Also optional DATA parameter could be used:

cat data.bin | iw wlan0 send oui subcmd -
iw wlan0 send oui subcmd file.bin
iw wlan0 vendor send oui subcmd 0x00 0x00 0x00 0x1f
echo EOF | iw wlan0 vendor send oui subcmd -

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoAdd mpp get/dump commands
Henning Rogge [Fri, 12 Sep 2014 06:59:43 +0000 (08:59 +0200)] 
Add mpp get/dump commands

Add the "mpp get" and "mpp dump" command to query to mac80211s mesh
proxy path table through nl80211.

Signed-off-by: Henning Rogge <henning.rogge@fkie.fraunhofer.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoupdate nl80211.h
Johannes Berg [Thu, 9 Oct 2014 14:34:46 +0000 (16:34 +0200)] 
update nl80211.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoupdate to version 3.17 v3.17
Johannes Berg [Thu, 9 Oct 2014 14:21:35 +0000 (16:21 +0200)] 
update to version 3.17

This means I forgot and am skipping 3.16, too bad.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoupdate nl80211 feature list in the code
Johannes Berg [Thu, 9 Oct 2014 14:30:38 +0000 (16:30 +0200)] 
update nl80211 feature list in the code

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: add auto parameter to set distance command
Lorenzo Bianconi [Sun, 7 Sep 2014 17:32:20 +0000 (19:32 +0200)] 
iw: add auto parameter to set distance command

Add auto parameter to set distance command in order to enable ACK timeout
estimation algorithm (dynack). Dynack is automatically disabled setting valid
value for coverage class. Currently dynack is supported just by ath9k

This patch is based on "configure dynack through mac80211/cfg80211 stack"
patchset sent on linux-wireless

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: fix memory leak
Yegor Yefremov [Sat, 20 Sep 2014 18:25:25 +0000 (20:25 +0200)] 
iw: fix memory leak

Close f, when returning before while loop.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: remove double break
Yegor Yefremov [Sat, 20 Sep 2014 18:25:24 +0000 (20:25 +0200)] 
iw: remove double break

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: Allow basic rates to be configured when joining mesh
Chun-Yeow Yeoh [Tue, 23 Sep 2014 01:14:49 +0000 (09:14 +0800)] 
iw: Allow basic rates to be configured when joining mesh

This patch adds option to configure basic rates during mesh join.

Signed-off-by: Ashok Nagarajan <ashok.dragon@gmail.com>
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
v2: minor change for upstream
v3: fix typo error (Colleen)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: Allow user to provide freq during mesh join
Chun-Yeow Yeoh [Tue, 23 Sep 2014 01:14:48 +0000 (09:14 +0800)] 
iw: Allow user to provide freq during mesh join

Allow user to configure frequency and channel type during
mesh join command.

Signed-off-by: Ashok Nagarajan <ashok.dragon@gmail.com>
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
v2: use chandef similar to IBSS (Johannes)
v4: make the mesh join command more self-explanatory (Bob Copeland)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoupdate nl80211.h
Johannes Berg [Thu, 9 Oct 2014 14:16:27 +0000 (16:16 +0200)] 
update nl80211.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: print hexdump when vendor event
Janusz Dziedzic [Wed, 27 Aug 2014 07:58:28 +0000 (09:58 +0200)] 
iw: print hexdump when vendor event

print hexdump when vendor event and -f requested

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: print expected throughput when dumping station
Antonio Quartulli [Sat, 17 May 2014 18:17:12 +0000 (20:17 +0200)] 
iw: print expected throughput when dumping station

Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoupdate nl80211.h
Johannes Berg [Tue, 3 Jun 2014 19:45:06 +0000 (21:45 +0200)] 
update nl80211.h

The file is a merge of upstream mac80211 and mac80211-next trees as
otherwise iw fails to compile on NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoversion 3.15 v3.15
Johannes Berg [Tue, 20 May 2014 14:19:25 +0000 (16:19 +0200)] 
version 3.15

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoiw: handle DFS CAC time param
Janusz Dziedzic [Fri, 9 May 2014 08:19:55 +0000 (10:19 +0200)] 
iw: handle DFS CAC time param

Handle DFS CAC time param for
iw list/info, iw reg get

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agoupdate nl80211.h to 3.15 version
Johannes Berg [Tue, 13 May 2014 13:47:52 +0000 (15:47 +0200)] 
update nl80211.h to 3.15 version

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agowowlan: don't require pattern offset
Johannes Berg [Thu, 10 Apr 2014 07:42:30 +0000 (09:42 +0200)] 
wowlan: don't require pattern offset

Not all kernels have offset support, so don't treat it
being absent as an error.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>