]>
git.ipfire.org Git - thirdparty/iw.git/log
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
John Crispin [Fri, 17 May 2019 19:29:55 +0000 (21:29 +0200)]
iw: fix memory leaks inside handle_scan
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
John Crispin [Fri, 17 May 2019 19:29:54 +0000 (21:29 +0200)]
iw: fix memory leak inside parse_sched_scan
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
John Crispin [Fri, 17 May 2019 19:29:53 +0000 (21:29 +0200)]
iw: fix fd leak inside handle_netns
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
John Crispin [Fri, 17 May 2019 19:29:52 +0000 (21:29 +0200)]
iw: fix memory leak inside handle_cac
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
John Crispin [Fri, 17 May 2019 19:29:51 +0000 (21:29 +0200)]
iw: fix endless loop inside handle_mgmt_dump
passing -1 will break the while loop further down in the code.
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
John Crispin [Fri, 17 May 2019 19:29:50 +0000 (21:29 +0200)]
iw: fix memory leak inside register_mgmt_frame
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 24 May 2019 08:36:20 +0000 (10:36 +0200)]
iw: add version.o to objects
Oops. This needs to be included manually since there's no
C file for it, it's generated.
Change-Id: I5b81caf3e2decf3a44f6470f8900e1774fc585d8
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>
Ashok Raj Nagarajan [Fri, 29 Mar 2019 11:23:15 +0000 (16:53 +0530)]
iw: Add support for controlling tx power for per station
This patch allows userspace to set transmit power,
in dBm units, to a station associated to the AP.
To set a limit tx power of 20 dBm:
iw wlan0 station set <mac-addr> txpwr limit 20
To revert the user defined tx power for a station:
iw wlan0 station set <mac-addr> txpwr auto
Co-developed-by: Balaji Pothunoori <bpothuno@codeaurora.org>
Signed-off-by: Ashok Raj Nagarajan <arnagara@codeaurora.org>
Signed-off-by: Balaji Pothunoori <bpothuno@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Pradeep Kumar Chitrapu [Mon, 8 Apr 2019 23:29:23 +0000 (04:59 +0530)]
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.
Format:
$ iw dev <devname> mpath probe <Peer MAC> frame <pattern>
Example:
$ iw wlan0 mpath probe aa:bb:cc:dd:ee:ff frame aa:bb:cc:dd:ee:ff:kk:ll:mm:nn:oo:pp:yy:zz
Frame pattern is supplied as hex pattern of the form aa:bb:cc without
leading 0x. Frame type and length are expected to be of ethernet frame
type.
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 26 Apr 2019 09:54:08 +0000 (11:54 +0200)]
update nl80211.h
Change-Id: I9e09f7951c782f86775809c2a38a988d921bfcf9
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Antonio Quartulli [Sat, 23 Mar 2019 09:39:14 +0000 (10:39 +0100)]
iw: print 4ADDR attribute when dumping interface
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 21:28:19 +0000 (22:28 +0100)]
iw: small cleanup for the sizer code
We should use a signed variable if we subtract and potentially
end up with a negative value.
Additionally, we directly reference these variables so don't
need __attribute__((used)).
Change-Id: I78c2a5706dce9c90595284cf5e1d9d6f6fa1879e
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
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>
Johannes Berg [Thu, 28 Feb 2019 20:03:06 +0000 (21:03 +0100)]
update nl80211.h
This also fixes compilation of the previous commit.
Change-Id: Iaabb7986393411454a2e72ce5a3342f941201fe1
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Toke Høiland-Jørgensen [Mon, 11 Feb 2019 17:04:34 +0000 (18:04 +0100)]
iw: Print airtime fairness feature
This adds printing of the newly introduced airtime fairness EXT_FEATURE
flag to iw.
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Toke Høiland-Jørgensen [Mon, 11 Feb 2019 17:04:34 +0000 (18:04 +0100)]
iw: Add command to set airtime weight
This adds a new iw command to set the airtime weight for a station, support
for which was recently introduced into mac80211.
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Toke Høiland-Jørgensen [Mon, 11 Feb 2019 17:04:34 +0000 (18:04 +0100)]
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 [Mon, 4 Feb 2019 13:37:08 +0000 (14:37 +0100)]
iw: bump version to 5.0.1
This just fixes build on older compilers.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 4 Feb 2019 13:32:36 +0000 (14:32 +0100)]
iw: make it build with older compilers again
There's no reason to require a newer compiler that understands
-Wstringop-overflow=4, make that optional.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 1 Feb 2019 22:07:56 +0000 (23:07 +0100)]
iw: bump version to 5.0
The nl80211.h matches what's going to be in 5.0, so
use the version number here to match.
Change-Id: I5ea22f2efd3bcf6145de85b0b47dd43f1c95bfed
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 [Wed, 5 Dec 2018 10:36:31 +0000 (11:36 +0100)]
iw: add FTM initiator support
Signed-off-by: Avraham Stern <avraham.stern@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>
Johannes Berg [Fri, 1 Feb 2019 21:55:13 +0000 (22:55 +0100)]
update nl80211.h and command list
Update nl80211.h to what should be in kernel 5.0.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 8 Jan 2019 11:42:42 +0000 (12:42 +0100)]
iw: make all code files non-executable
Change-Id: I19eafb95c718cc1632530aef2670581e9e958808
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Brian Norris [Wed, 14 Nov 2018 23:11:29 +0000 (15:11 -0800)]
iw: add FEATURE support for scan randomization
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Brian Norris [Thu, 29 Nov 2018 02:38:48 +0000 (18:38 -0800)]
iw: dump 'rx bitrate' in link stats
We include it in 'station dump' but not 'link'.
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 21 Nov 2018 08:13:54 +0000 (09:13 +0100)]
iw: use -Wstringop-overflow=4
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Paride Legovini [Thu, 8 Nov 2018 20:36:59 +0000 (21:36 +0100)]
iw: honor CPPFLAGS when compiling
Pass CPPFLAGS to the compiler as done with CFLAGS.
Change-Id: Ic91d26125e8314b32596e9fefa0dd9393cf0cda1
Signed-off-by: Paride Legovini <pl@ninthfloor.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Andrei Otcheretianski [Sun, 7 May 2017 15:20:30 +0000 (18:20 +0300)]
iw: Fix NAN match event formatting
Handle new lines and commas correctly.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Zamir, Roee [Thu, 23 Mar 2017 10:13:11 +0000 (12:13 +0200)]
iw: nan: fix warning of uninitialized variable
Signed-off-by: Zamir, Roee <roee.zamir@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 7 Mar 2017 08:29:56 +0000 (09:29 +0100)]
remove stray evp.h include
Signed-off-by: Johannes Berg <johannes.berg@intel.com>