]> git.ipfire.org Git - thirdparty/iw.git/log
thirdparty/iw.git
3 years agoiw: print ctrl port tx status event
Markus Theil [Sun, 6 Dec 2020 10:16:42 +0000 (11:16 +0100)] 
iw: print ctrl port tx status event

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20201206101642.3606-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: use correct type in policy check for mesh
Markus Theil [Sat, 5 Dec 2020 09:26:15 +0000 (10:26 +0100)] 
iw: use correct type in policy check for mesh

NL80211_STA_INFO_CONNECTED_TO_AS and NL80211_STA_INFO_CONNECTED_TO_GATE
are defined as u8 in kernel, but were checked against NLA_FLAG.

This fixes:

root@openwrt:~# iw dev wlan0-mesh station
failed to parse nested attributes!
failed to parse nested attributes!
failed to parse nested attributes!

Reported-by: Marc Rantanen <marc@eciceron.se>
Tested-by: Marc Rantanen <marc@eciceron.se>
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20201205092615.131561-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: scan: fixup HE caps whitespace
Brian Norris [Wed, 18 Nov 2020 03:39:36 +0000 (19:39 -0800)] 
iw: scan: fixup HE caps whitespace

For scans, it's nicer to drop an indentation level, because we don't
have the "interface type" section that we do in the phy-info version.

The NSS print also had an extra level of indentation, and a spare
leading space, which made it a bit inconsistent with other sections.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20201118033936.3667788-5-briannorris@chromium.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: scan: parse HE capabilities
Brian Norris [Wed, 18 Nov 2020 03:39:35 +0000 (19:39 -0800)] 
iw: scan: parse HE capabilities

Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20201118033936.3667788-4-briannorris@chromium.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: util: factor out HE capability parser
Brian Norris [Wed, 18 Nov 2020 03:39:34 +0000 (19:39 -0800)] 
iw: util: factor out HE capability parser

We're going to use this for scan parsing.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20201118033936.3667788-3-briannorris@chromium.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: scan: add extension tag parsing
Brian Norris [Wed, 18 Nov 2020 03:39:33 +0000 (19:39 -0800)] 
iw: scan: add extension tag parsing

HE IEs are part of the extension tag (ID 255).

Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20201118033936.3667788-2-briannorris@chromium.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoman: update wikipage URL, reformat SEE ALSO section
ivan tkachenko [Wed, 25 Nov 2020 01:50:48 +0000 (04:50 +0300)] 
man: update wikipage URL, reformat SEE ALSO section

groff_man(7) provides plenty of useful requests/macros, and one of
them is .UR/.UE for URL formatting.

Man pages should be formatted with paragraphs (.P or .PP) requests,
and source text should not contain empty lines -- use empty request
instead (literally, single dot on its own line).

Signed-off-by: ivan tkachenko <me@ratijas.tk>
Link: https://lore.kernel.org/r/20201125015048.197683-1-me@ratijas.tk
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: enable 80MHz support for 6GHz band 11s mesh
Pradeep Kumar Chitrapu [Fri, 9 Oct 2020 22:49:30 +0000 (15:49 -0700)] 
iw: enable 80MHz support for 6GHz band 11s mesh

without this 11s mesh could not be configured with bandwidth 80MHz
in 6G band using iw. Also, this will be required to set frequency
for 6GHz band in 80MHz.

example:
iw <interface> mesh join <meshname> freq 6195 80MHz

Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Link: https://lore.kernel.org/r/1602283770-8026-2-git-send-email-pradeepc@codeaurora.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: handle positive error codes gracefully
Brian Norris [Tue, 3 Nov 2020 23:56:31 +0000 (15:56 -0800)] 
iw: handle positive error codes gracefully

netlink(7) requires error codes to be negative, but since when does a
man page stop anyone? At a minimum, we shouldn't allow a non-conforming
vendor command to put us into an infinite loop in the below snippets
from __handle_cmd():

err = 1;

nl_cb_err(cb, NL_CB_CUSTOM, error_handler, &err);
...
while (err > 0)
nl_recvmsgs(state->nl_sock, cb);

Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20201103235631.2936594-1-briannorris@chromium.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: scan: add flag for scanning colocated ap
Tova Mussai [Thu, 10 Oct 2019 06:54:41 +0000 (09:54 +0300)] 
iw: scan: add flag for scanning colocated ap

1. For full scan set the flag to scan for collocated ap by default.
2. In any other case, user need to add it to the command line (optional).

Signed-off-by: Tova Mussai <tova.mussai@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: Add 'coloc' and 'flush' options to sched_scan
Ilan Peer [Thu, 26 Mar 2020 07:17:21 +0000 (09:17 +0200)] 
iw: Add 'coloc' and 'flush' options to sched_scan

Add new 'coloc' (from 6 GHz scanning) and 'flush' options
to the scan command.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: update wikipage URL
Luca Coelho [Tue, 27 Oct 2020 07:50:53 +0000 (09:50 +0200)] 
iw: update wikipage URL

The URL in the README file was still the old one, which leads to
non-existing page.  Update it with the new one.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/20201027075053.2717839-1-luca@coelho.fi
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: Add support for specifying the 160MHz bandwidth when setting the channel/frequency
Ttttabcd [Tue, 6 Oct 2020 04:22:18 +0000 (04:22 +0000)] 
iw: Add support for specifying the 160MHz bandwidth when setting the channel/frequency

The current iw tool only supports the direct setting of
[NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] bandwidth
when setting the channel/frequency.

If we want to set the 160MHz bandwidth,
we need to calculate the center frequency ourselves,
which is inconvenient.

E.g:
iw phy phy0 set freq 5220 160 5250

From now on we can:
iw phy phy0 set channel 44 160MHz
iw phy phy0 set freq 5220 160MHz

This is much more convenient.

Signed-off-by: AK Deng <ttttabcd@protonmail.com>
Link: https://lore.kernel.org/r/cIf-30s-5axo5iDqyzwY9VTVB_JLKCXbxlXdODMSK61q-yFzR6rtAk8URRAPavRlllrwXr1Q-jtem_upoCNKd_fba8qmM0DpJn0O7MIkq6o=@protonmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agobump version to 5.9 v5.9
Johannes Berg [Fri, 2 Oct 2020 10:18:41 +0000 (12:18 +0200)] 
bump version to 5.9

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: support HE rate configuration in 6 GHz band
Rajkumar Manoharan [Wed, 30 Sep 2020 02:05:38 +0000 (19:05 -0700)] 
iw: support HE rate configuration in 6 GHz band

Allow HE-MCS, HE-GI, HE-LTF in 6 GHz band as well and allow only
MCS rates in 6 GHz.

Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
Link: https://lore.kernel.org/r/1601431538-6621-2-git-send-email-rmanohar@codeaurora.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: add HE rate/gi/ltf support
Miles Hu [Wed, 30 Sep 2020 02:05:37 +0000 (19:05 -0700)] 
iw: add HE rate/gi/ltf support

This patch adds support for setting fied HE rates/gi/ltf

Tested-by: John Crispin <john@phrozen.org>
Signed-off-by: Miles Hu <milehu@codeaurora.org>
Link: https://lore.kernel.org/r/1601431538-6621-1-git-send-email-rmanohar@codeaurora.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: update nl80211.h
Johannes Berg [Fri, 2 Oct 2020 10:15:38 +0000 (12:15 +0200)] 
iw: update nl80211.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: add TID specific Tx bitrate configuration
Tamizh Chelvam [Mon, 7 Sep 2020 06:41:55 +0000 (06:41 +0000)] 
iw: add TID specific Tx bitrate configuration

Add TID specific Tx bitrate configuration by using
handle_bitrates already APIs.

Examples:
$ iw dev wlan0 set tidconf peer xx:xx:xx:xx:xx:xx tids 0x2 bitrates auto
$ iw dev wlan0 set tidconf peer xx:xx:xx:xx:xx:xx tids 0x2 bitrates limit vht-mcs-5 4:9

Signed-off-by: Tamizh Chelvam <tamizhr@codeaurora.org>
Link: https://lore.kernel.org/r/01010174674cba3e-ae0b7501-76dd-4bbd-870f-a799e0558e1e-000000@us-west-2.amazonses.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: fix tid config help entries
Tamizh Chelvam [Mon, 7 Sep 2020 06:35:34 +0000 (06:35 +0000)] 
iw: fix tid config help entries

Fix help entries for TID config command by adding
"set tidconf" command info in that.

Signed-off-by: Tamizh Chelvam <tamizhr@codeaurora.org>
Link: https://lore.kernel.org/r/010101746746e7dc-fddbd674-90f6-42f7-9bb7-d41d524c6477-000000@us-west-2.amazonses.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agobump version to 5.8 v5.8
Johannes Berg [Thu, 27 Aug 2020 11:38:47 +0000 (13:38 +0200)] 
bump version to 5.8

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: print hop_count and path_change info of mpath
Tamizh Chelvam [Thu, 20 Aug 2020 05:14:45 +0000 (10:44 +0530)] 
iw: print hop_count and path_change info of mpath

Print hop_count and path_change info which is already providing
by Driver for all mpath through mpath dump command.

Signed-off-by: Tamizh Chelvam <tamizhr@codeaurora.org>
Link: https://lore.kernel.org/r/1597900485-673-1-git-send-email-tamizhr@codeaurora.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: handle more mesh station info
Markus Theil [Mon, 3 Aug 2020 15:33:36 +0000 (17:33 +0200)] 
iw: handle more mesh station info

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200803153336.319773-4-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: handle all mesh config parameters
Markus Theil [Mon, 3 Aug 2020 15:33:35 +0000 (17:33 +0200)] 
iw: handle all mesh config parameters

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200803153336.319773-3-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: print current ext feature set
Markus Theil [Mon, 3 Aug 2020 15:33:33 +0000 (17:33 +0200)] 
iw: print current ext feature set

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200803153336.319773-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoupdate nl80211.h to 5.8-rc1
Johannes Berg [Thu, 27 Aug 2020 11:33:32 +0000 (13:33 +0200)] 
update nl80211.h to 5.8-rc1

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: add support for vendor events
Johannes Berg [Thu, 27 Aug 2020 11:07:31 +0000 (13:07 +0200)] 
iw: add support for vendor events

We can already drop in arbitrary files for vendor commands
as the build system picks those up, also add support for
vendor specific events in a similar fashion.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: add support for NDP ranging - trigger based and non trigger based
Avraham Stern [Wed, 13 May 2020 09:07:18 +0000 (05:07 -0400)] 
iw: add support for NDP ranging - trigger based and non trigger based

Add support for requesting NDP ranging by specifying the requested
NDP ranging type (trigger based / non trigger based).

Change-Id: I0bebcde19a5615a1261a23168a21b099570e83a0
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoreg: Fix getting PHY specific regulatory information
Ilan Peer [Sun, 19 Jul 2020 07:44:24 +0000 (10:44 +0300)] 
reg: Fix getting PHY specific regulatory information

Commit 14ad75d3b4c3 ("iw: support multiple regdom print") added
support for dumping multiple regulatory domain, with the intent
that if a specific phy is given, only its regulatory information
would be fetched. However, the phy specific handling was ignored.
Fix it.

Change-Id: I647ef420741e528a4d6568a7d4518c9a561bd199
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: update freq to chan mappings for 6GHz band per IEEE P802.11ax/D6.1
Pradeep Kumar Chitrapu [Mon, 22 Jun 2020 06:39:06 +0000 (23:39 -0700)] 
iw: update freq to chan mappings for 6GHz band per IEEE P802.11ax/D6.1

This fixes dfferences in 6GHz frequencies which were updated in
IEEE P802.11ax/D6.1.

Also sync 60GHz band channel to freq mapping with kernel.

Fixes: 43789196 ("iw: sync frequency to channel mapping with kernel for 6GHz band")
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Link: https://lore.kernel.org/r/20200622063906.24957-1-pradeepc@codeaurora.org
[remove MHZ_TO_KHZ conversion???]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: mesh: add mesh_param "mesh_nolearn" to skip path discovery
Linus Lüssing [Wed, 17 Jun 2020 07:30:34 +0000 (09:30 +0200)] 
iw: mesh: add mesh_param "mesh_nolearn" to skip path discovery

Currently, before being able to forward a packet between two 802.11s
nodes, both a PLINK handshake is performed upon receiving a beacon and
then later a PREQ/PREP exchange for path discovery is performed on
demand upon receiving a data frame to forward.

When running a mesh protocol on top of an 802.11s interface, like
batman-adv, we do not need the multi-hop mesh routing capabilities of
802.11s and usually set mesh_fwding=0. However, even with mesh_fwding=0
the PREQ/PREP path discovery is still performed on demand. Even though
in this scenario the next hop PREQ/PREP will determine is always the
direct 11s neighbor node.

The new mesh_nolearn parameter allows to skip the PREQ/PREP exchange in
this scenario, leading to a reduced delay, reduced packet buffering and
simplifies HWMP in general.

mesh_nolearn is still rather conservative in that if the packet destination
is not a direct 11s neighbor, it will fall back to PREQ/PREP path
discovery.

For normal, multi-hop 802.11s mesh routing it is usually not advisable
to enable mesh_nolearn as a transmission to a direct but distant neighbor
might be worse than reaching that same node via a more robust /
higher throughput etc. multi-hop path.

Cc: Sven Eckelmann <sven@narfation.org>
Cc: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Linus Lüssing <ll@simonwunderlich.de>
Link: https://lore.kernel.org/r/20200617073034.26149-2-linus.luessing@c0d3.blue
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoupdate nl80211.h
Johannes Berg [Thu, 30 Jul 2020 11:33:23 +0000 (13:33 +0200)] 
update nl80211.h

Change-Id: I1d8448ce41d0f65dcd557f09698405b541ce39fd
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: print current ext feature set
Markus Theil [Thu, 28 May 2020 09:01:39 +0000 (11:01 +0200)] 
iw: print current ext feature set

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200528090139.9879-2-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoupdate nl80211.h
Johannes Berg [Thu, 28 May 2020 09:28:29 +0000 (11:28 +0200)] 
update nl80211.h

Change-Id: Ic04c3bc6e4a74b687ffcf7c1ca54f14050601bd2
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: sync frequency to channel mapping with kernel for 6GHz band
Pradeep Kumar Chitrapu [Fri, 15 May 2020 17:51:45 +0000 (10:51 -0700)] 
iw: sync frequency to channel mapping with kernel for 6GHz band

This enables support for channel to frequency conversion and vice versa
for 6GHz channels and frequencies. Channel numbers of 6GHz band might
overlap with those of 5G and 2G bands.

Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Link: https://lore.kernel.org/r/20200515175145.30080-1-pradeepc@codeaurora.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: add TID specific configuration command
Sergey Matyukevich [Fri, 24 Apr 2020 11:29:05 +0000 (14:29 +0300)] 
iw: add TID specific configuration command

Use command NL80211_CMD_SET_TID_CONFIG to perform per-node TID specific
configuration. If peer is not specified, then configuration is applied
to all the peers. Currently kernel supports configuration of the
following parameters:
- short/long retry
- mpdu/msdu aggregation on/off
- rts/cts on/off
- noack on/off

Examples:
Apply configuration for specific peer and TIDs:
$ iw dev wlan0 set tidconf peer 1:2:3:4:5:6 tids 0x3 ampdu off tids 0x2 sretry 10 lretry 100
$ iw dev wlan0 set tidconf peer 1:2:3:4:5:6 tids 0x1 override ampdu off amsdu off

Apply configuration for all peers and all TIDs:
$ iw dev wlan0 set tidconf tids 0xff ampdu off amsdu off sretry 10 lretry 100 noack off

Apply configuration for all peers and specific TIDs:
$ iw dev wlan0 set tidconf peer 0xff:0xff:0xff:0xff:0xff:0xff tids 0x1 ampdu off amsdu off

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Link: https://lore.kernel.org/r/20200424112905.26770-6-sergey.matyukevich.os@quantenna.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoupdate nl80211.h
Johannes Berg [Tue, 26 May 2020 12:46:02 +0000 (14:46 +0200)] 
update nl80211.h

Change-Id: I1c181bc11420eced5c41a5efe30702149fef575e
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
3 years agoiw: Print limit for maximum associated stations in AP mode
Pali Rohár [Wed, 20 May 2020 09:47:01 +0000 (11:47 +0200)] 
iw: Print limit for maximum associated stations in AP mode

Signed-off-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20200520094701.10791-1-pali@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: 'phy <name> reg get' shouldn't dump all domains
Brian Norris [Tue, 31 Mar 2020 23:28:33 +0000 (16:28 -0700)] 
iw: 'phy <name> reg get' shouldn't dump all domains

Right now, 'iw phy ... reg get' gets translated to NLM_F_DUMP, which
dumps all domains. But this command really is looking for non-DUMP
semantics -- it only wants the domain for the specified wiphy, or (per
the kernel's choice) the global, if the wiphy doesn't have its own.

We can achieve this by skipping the handle_reg_get() -> "reg dump"
indirection.

[ with a wiphy-specific domain ]
Before:
  # iw phy phy0 reg get
  global
  country XX: DFS-YYY
  [...]
  phy#0
  country AA: DFS-BBB
  [...]

After:
  # iw phy phy0 reg get
  phy#0
  country AA: DFS-BBB
  [...]

[ without a wiphy-specific domain ]
Before and after (unchanged):
  # iw phy phy0 reg get
  global
  country XX: DFS-YYY
  [...]

Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20200331232833.142026-1-briannorris@chromium.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: tiny code style fixes
Johannes Berg [Fri, 24 Apr 2020 09:53:03 +0000 (11:53 +0200)] 
iw: tiny code style fixes

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: event: log rssi value for cqm
Markus Theil [Mon, 30 Mar 2020 11:00:27 +0000 (13:00 +0200)] 
iw: event: log rssi value for cqm

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200330110027.21541-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: event: also handle reg change on wiphy
Markus Theil [Tue, 24 Mar 2020 16:21:49 +0000 (17:21 +0100)] 
iw: event: also handle reg change on wiphy

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200324162149.3178-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: update extended features in info
Markus Theil [Mon, 23 Mar 2020 12:09:59 +0000 (13:09 +0100)] 
iw: update extended features in info

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200323120959.12019-2-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: Complete Extended Key ID detection
Alexander Wetzel [Sun, 22 Mar 2020 16:35:24 +0000 (17:35 +0100)] 
iw: Complete Extended Key ID detection

info: update text to have a unified spelling
scan: flag Extended Key ID in scans

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
Link: https://lore.kernel.org/r/20200322163524.1338224-1-alexander@wetzel-home.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: update nl80211.h
Johannes Berg [Wed, 25 Mar 2020 09:04:45 +0000 (10:04 +0100)] 
iw: update nl80211.h

Change-Id: Icfad99c15bcd7d56478a550fab7ac83289ed3765
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: phy: dump wiphy index
Brian Norris [Thu, 12 Mar 2020 01:05:15 +0000 (18:05 -0700)] 
iw: phy: dump wiphy index

We support getting wiphy info by index (e.g., 'iw phy#0 info') but we
don't actually dump that info anywhere. Let's fix that.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20200312010515.21095-1-briannorris@chromium.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoscan: Fix printing of unknown WPS vendor extension
Ilan Peer [Wed, 26 Feb 2020 11:31:48 +0000 (13:31 +0200)] 
scan: Fix printing of unknown WPS vendor extension

When an unknown WPS vendor extension is encountered a '\t' was
inserted without a matching message with '\n'. This would impact
the output of following data. Fix it

Change-Id: I86c40c088592ecc7713b0793e0ac56e41d3607a3
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: correctly print signed TX power level
Johannes Berg [Wed, 4 Mar 2020 14:54:22 +0000 (15:54 +0100)] 
iw: correctly print signed TX power level

This should be signed (per nl80211.h), but we put it
into a uint32_t, fix that.

Change-Id: I1ca8d3d74e2927c7fb38d5981b0628ea6da94298
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoresync nl80211.h
Johannes Berg [Mon, 24 Feb 2020 09:22:32 +0000 (10:22 +0100)] 
resync nl80211.h

Change-Id: I2b9c65ee9816b59d72b7485cfe8ae482fafce8bc
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoscan: wps: remove useless string length checks
Johannes Berg [Thu, 13 Feb 2020 20:42:16 +0000 (21:42 +0100)] 
scan: wps: remove useless string length checks

If we're going to print using %*s, then there's no need
to check the length first - zero is fine and results in
no memory access.

Change-Id: I68a4ebd0be8e5c03670d475fe664597b6046df39
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoscan: wps: fix some misplaced code
Johannes Berg [Thu, 13 Feb 2020 20:28:04 +0000 (21:28 +0100)] 
scan: wps: fix some misplaced code

I added a length check, but neglected to move the actual
data access after that ... fix that!

Change-Id: I6cf3f396ce86c70df0d1f917b6a028de657ff2a7
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: parse AP Channel Report
Markus Theil [Tue, 11 Feb 2020 01:22:27 +0000 (02:22 +0100)] 
iw: scan: parse AP Channel Report

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200211012227.6907-2-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: parse wps version2
Markus Theil [Tue, 11 Feb 2020 01:22:26 +0000 (02:22 +0100)] 
iw: scan: parse wps version2

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200211012227.6907-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoscan: wps: add more bounds checks
Johannes Berg [Thu, 13 Feb 2020 18:23:13 +0000 (19:23 +0100)] 
scan: wps: add more bounds checks

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: better length checks in print_wifi_wps()
Markus Theil [Mon, 10 Feb 2020 09:46:19 +0000 (10:46 +0100)] 
iw: scan: better length checks in print_wifi_wps()

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200210094619.14416-2-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: fix some format string warnings found by clang
Markus Theil [Mon, 10 Feb 2020 08:13:54 +0000 (09:13 +0100)] 
iw: scan: fix some format string warnings found by clang

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200210081354.10390-2-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: fix undefined behaviour in print_vht_capa()
Markus Theil [Sun, 9 Feb 2020 16:59:02 +0000 (17:59 +0100)] 
iw: scan: fix undefined behaviour in print_vht_capa()

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200209165902.44110-9-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: fix undefined behaviour in rm capa print
Markus Theil [Sun, 9 Feb 2020 16:59:01 +0000 (17:59 +0100)] 
iw: scan: fix undefined behaviour in rm capa print

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200209165902.44110-8-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: fix buffer over-read in print_p2p
Markus Theil [Sun, 9 Feb 2020 16:59:00 +0000 (17:59 +0100)] 
iw: scan: fix buffer over-read in print_p2p

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200209165902.44110-7-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: fix buffer over-read in print_wifi_wps
Markus Theil [Sun, 9 Feb 2020 16:58:59 +0000 (17:58 +0100)] 
iw: scan: fix buffer over-read in print_wifi_wps

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200209165902.44110-6-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: fix buffer over-read in parsing roaming consortium
Markus Theil [Sun, 9 Feb 2020 16:58:58 +0000 (17:58 +0100)] 
iw: scan: fix buffer over-read in parsing roaming consortium

ANQP and OI length are always present, increase min. length by 2.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200209165902.44110-5-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: fix buffer over-read in print_ies()
Markus Theil [Sun, 9 Feb 2020 16:58:56 +0000 (17:58 +0100)] 
iw: scan: fix buffer over-read in print_ies()

This patch correctly checks, if enough data bytes for parsing IEs are
present (-2 in check for type and length). Furthermore, it adds a
nullptr and length check to ease future fuzzing.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200209165902.44110-3-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agobuild: add -Wdeclaration-after-statement
Johannes Berg [Thu, 13 Feb 2020 18:13:33 +0000 (19:13 +0100)] 
build: add -Wdeclaration-after-statement

Change-Id: Id4f25cf70c39543ae0ff250b3ab3bf7cc17f0811
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: parse measurement pilot element
Markus Theil [Sun, 9 Feb 2020 16:58:55 +0000 (17:58 +0100)] 
iw: scan: parse measurement pilot element

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200209165902.44110-2-markus.theil@tu-ilmenau.de
[squash later fixes]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: parse tx power envelope
Markus Theil [Fri, 7 Feb 2020 15:54:06 +0000 (16:54 +0100)] 
iw: scan: parse tx power envelope

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200207155406.8985-3-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: parse 'supported Operating Classes element'
Markus Theil [Fri, 7 Feb 2020 15:54:05 +0000 (16:54 +0100)] 
iw: scan: parse 'supported Operating Classes element'

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200207155406.8985-2-markus.theil@tu-ilmenau.de
[squashed later bugfix, fix typo]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: add missing word for rm capabilities
Markus Theil [Fri, 7 Feb 2020 15:54:04 +0000 (16:54 +0100)] 
iw: scan: add missing word for rm capabilities

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200207155406.8985-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: reg: parse the NO_HE regulatory flag
Brian Norris [Wed, 5 Feb 2020 23:10:01 +0000 (15:10 -0800)] 
iw: reg: parse the NO_HE regulatory flag

This isn't supported in wireless-regdb yet, but self-managed drivers are
preparing to report it:

https://patchwork.kernel.org/patch/11343173/
https://lkml.kernel.org/linux-wireless/20200121081213.733757-1-luca@coelho.fi

Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20200205231001.132595-3-briannorris@chromium.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: print ru-alloc values when dumping stations
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.

Signed-off-by: John Crispin <john@phrozen.org>
Link: https://lore.kernel.org/r/20200204154534.5177-1-john@phrozen.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoupdate nl80211.h
Johannes Berg [Thu, 13 Feb 2020 18:07:44 +0000 (19:07 +0100)] 
update nl80211.h

Change-Id: Ia0e95e0cc90a2dfc6caec71f1c1052588411b6bf
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: print radio measurement capabilities
Markus Theil [Wed, 22 Jan 2020 20:06:16 +0000 (21:06 +0100)] 
iw: scan: print radio measurement capabilities

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200122200616.7897-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: event: parse channel switch
Markus Theil [Wed, 8 Jan 2020 13:11:07 +0000 (14:11 +0100)] 
iw: event: parse channel switch

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200108131107.27653-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: info: add missing extended flags for 5.5
Markus Theil [Mon, 6 Jan 2020 15:10:24 +0000 (16:10 +0100)] 
iw: info: add missing extended flags for 5.5

Add missing flags and reorder TXQ and airtime related flags
next to each other again. (Thanks Toke for the hint).
Link: https://lore.kernel.org/r/20200106151024.124315-5-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: event: parse stop ap and frame wait cancel events
Markus Theil [Mon, 6 Jan 2020 15:10:22 +0000 (16:10 +0100)] 
iw: event: parse stop ap and frame wait cancel events

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200106151024.124315-3-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: event: handle interface add/del
Markus Theil [Mon, 6 Jan 2020 15:10:21 +0000 (16:10 +0100)] 
iw: event: handle interface add/del

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200106151024.124315-2-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: update nl80211.h
Johannes Berg [Wed, 15 Jan 2020 10:05:10 +0000 (11:05 +0100)] 
iw: update nl80211.h

Change-Id: I3b5b124f7d2985b9dc6f9481408bd412e50c0b5b
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: info: print missing extended feature flag information
Markus Theil [Wed, 1 Jan 2020 17:48:36 +0000 (18:48 +0100)] 
iw: info: print missing extended feature flag information

Some extended feature flags were not considered before.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200101174836.5513-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoevent: remove unnecessary braces
Johannes Berg [Fri, 13 Dec 2019 09:43:50 +0000 (10:43 +0100)] 
event: remove unnecessary braces

Change-Id: I7fd064aac349859c000961fa7560a968a6552fc8
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: event: add sta opmode changed command
Markus Theil [Tue, 10 Dec 2019 14:43:56 +0000 (15:43 +0100)] 
iw: event: add sta opmode changed command

Parsing this command helps tracking num spatial stream
and bandwidth changes.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20191210144356.15377-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: event: add set interface command
Markus Theil [Tue, 10 Dec 2019 14:22:45 +0000 (15:22 +0100)] 
iw: event: add set interface command

This patch adds support for CMD_SET_INTERFACE which is called
when switching to mesh or ap mode.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20191210142245.13972-2-markus.theil@tu-ilmenau.de
[fill all device types]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: event: add new peer candidate command
Markus Theil [Tue, 10 Dec 2019 14:22:44 +0000 (15:22 +0100)] 
iw: event: add new peer candidate command

This patch prints information about mesh peering candidates.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20191210142245.13972-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: bump version to 5.4 v5.4
Johannes Berg [Thu, 5 Dec 2019 12:13:54 +0000 (13:13 +0100)] 
iw: bump version to 5.4

Change-Id: I1f1df568c37b3f163d7d365bb6f259e75b6b9f17
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: generate command list at build time
Johannes Berg [Thu, 5 Dec 2019 11:43:52 +0000 (12:43 +0100)] 
iw: generate command list at build time

There's no reason for me to do this manually every
time I do a release, just generate it directly at
build time.

Change-Id: Icd9c2bbc0ccfb183e054ababdd09d9443855ae12
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: fix double-free in error paths
Brian Norris [Thu, 21 Nov 2019 22:41:39 +0000 (14:41 -0800)] 
iw: scan: fix double-free in error paths

Hit when, for instance, I'm stupid enough to type an invalid scan
command:

  # iw wlan0 scan -h
  BUG at file position lib/msg.c:572:void nlmsg_free(struct nl_msg *)
  iw: lib/msg.c:572: void nlmsg_free(struct nl_msg *): Assertion `0' failed.
  Aborted (core dumped)

Fixes: 2f74c59cf11e ("iw: fix memory leaks inside handle_scan")
Cc: John Crispin <john@phrozen.org>
Signed-off-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20191121224139.58281-1-briannorris@chromium.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: Fix typo in iw --help
Ryan Adolf [Tue, 22 Oct 2019 08:07:09 +0000 (01:07 -0700)] 
iw: Fix typo in iw --help

Signed-off-by: Ryan Adolf <ryanadolf123@gmail.com>
Link: https://lore.kernel.org/r/79e3b9aba5159d1e7fbf908af6621e9d0fdb57fd.camel@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: Print current time in station info dump
Ben Greear [Mon, 9 Sep 2019 20:13:57 +0000 (13:13 -0700)] 
iw: Print current time in station info dump

This lets us more precisely calculate the absolute timestamp
of last-rix (ie, now - idle).

Signed-off-by: Ben Greear <greearb@candelatech.com>
Link: https://lore.kernel.org/r/1568060037-7481-2-git-send-email-greearb@candelatech.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: Support associated-at station statistic.
Ben Greear [Mon, 9 Sep 2019 20:13:56 +0000 (13:13 -0700)] 
iw: Support associated-at station statistic.

This can be helpful for calculating roaming time and other
higher precision stats.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Link: https://lore.kernel.org/r/1568060037-7481-1-git-send-email-greearb@candelatech.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoupdate nl80211.h
Johannes Berg [Wed, 11 Sep 2019 07:35:14 +0000 (09:35 +0200)] 
update nl80211.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agobump version to 5.3 v5.3
Johannes Berg [Mon, 5 Aug 2019 20:33:56 +0000 (22:33 +0200)] 
bump version to 5.3

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoinfo: update extended feature list
Johannes Berg [Mon, 5 Aug 2019 20:31:47 +0000 (22:31 +0200)] 
info: update extended feature list

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoinfo: macro-ify ext_feat_print()
Johannes Berg [Mon, 5 Aug 2019 20:28:51 +0000 (22:28 +0200)] 
info: macro-ify ext_feat_print()

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoutil: update command list
Johannes Berg [Mon, 5 Aug 2019 20:27:21 +0000 (22:27 +0200)] 
util: update command list

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoupdate nl80211.h
Johannes Berg [Mon, 5 Aug 2019 20:22:23 +0000 (22:22 +0200)] 
update nl80211.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: scan: add missing newline
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>
4 years agoiw: print HE capabilities
John Crispin [Mon, 20 May 2019 10:54:16 +0000 (12:54 +0200)] 
iw: print HE capabilities

Print the HE MAC/PHY capabilities and MCS/NSS sets.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: really fix build
Johannes Berg [Fri, 24 May 2019 09:17:54 +0000 (11:17 +0200)] 
iw: really fix build

Now after the previous fix, version.o was linked twice...

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: add HE support to station dump call
John Crispin [Thu, 23 May 2019 10:50:50 +0000 (12:50 +0200)] 
iw: add HE support to station dump call

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agocac: fix error handling in channel parsing
Johannes Berg [Fri, 24 May 2019 08:50:00 +0000 (10:50 +0200)] 
cac: fix error handling in channel parsing

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agonan: fix memory leak
Johannes Berg [Fri, 24 May 2019 08:48:46 +0000 (10:48 +0200)] 
nan: fix memory leak

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agomesh: initialize err in set_interface_meshparam()
Johannes Berg [Fri, 24 May 2019 08:44:02 +0000 (10:44 +0200)] 
mesh: initialize err in set_interface_meshparam()

Change-Id: I72f4fc551e5a6ab30c1056d5a8978175506870aa
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years agoiw: fix fp handling inside handle_vendor
John Crispin [Fri, 17 May 2019 19:29:56 +0000 (21:29 +0200)] 
iw: fix fp handling inside handle_vendor

The fp can leak and should not be closed if we do i/o redirection.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>