aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
31 hoursbump version to 6.9HEADv6.9mastermainJohannes Berg2-2/+2
This matches the kernel nl80211 as of 6.9. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
31 hourschannel: report punctured subchannel bitmapJohannes Berg1-0/+7
If the used channel is punctured, display the bitmap of subchannels that are punctured. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
31 hourswowlan: add a wake eventJohannes Berg1-0/+2
Print the wake event unprotected deauth/disassoc info. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
32 hoursupdate nl80211.hJohannes Berg2-24/+48
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21update nl80211.hJohannes Berg2-0/+30
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21bump version to 6.7v6.7Johannes Berg1-1/+1
This already has some "will be 6.8" content, but that's not entirely closed yet. Change-Id: I16beefdf8b5e37fc72948d8a874772dc8c97e7b2 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21update nl80211.hJohannes Berg2-52/+149
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-12-21iw: allow extra cflagsJohannes Berg1-0/+1
We can override the entirety of CFLAGS from the make command line, but not add e.g. -Werror. Append a new EXTRA_CFLAGS to make that possible. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-11-24iw: S1G: add 802.11ah support for link command displayBassem Dawood2-2/+17
Amending the link command which depends on kernal changes for 802.11ah bandwidths/MCS/NSS NL80211_RATE_INFO_ attributes. S1G frequency offset being used as well for the MHz units print. Signed-off-by: Bassem Dawood <bassem@morsemicro.com> Link: https://lore.kernel.org/r/20231019074019.2246629-1-bassem@morsemicro.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-08-24update nl80211.hJohannes Berg1-1/+29
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-08-24iw: connect: Fix segfault during open authenticationChaitanya Tata1-0/+3
The check for remaining arguments is done after decrement effectively bypassing the non-zero check and causes a segfault with below command: "connect <SSID> auth open/shared". Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no> Link: https://lore.kernel.org/r/20230726192245.100897-1-Chaitanya.Tata@nordicsemi.no Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-08-24iw: fix attribute size mismatchKoen Vandeputte1-1/+1
NL80211_ATTR_MAX_AP_ASSOC_STA gets packed as u32 in the kernel. Change the receiving side to match this, or it will be wrong on big-endian. Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com> Link: https://lore.kernel.org/r/20230707144826.3043151-1-koen.vandeputte@citymesh.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-08-24iw: add more extended capa bitsEmmanuel Grumbach1-1/+5
Those were missing While at it, fix a bug in the default case, we want to print the actual bit offset which is bit + base. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-08-24iw: Fix EHT rates printing.Ben Greear1-25/+21
The 20Mhz rates thing is a union with the others, so print one or the other. This appears to fix the output of the mcs/bw printout. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-04-14iw: S1G: add list command support for 802.11ahGilad Itzkovitch2-1/+14
In this changeset S1G frequencies are displayed for any S1G band with their relevant properties. Signed-off-by: Gilad Itzkovitch <gilad.itzkovitch@morsemicro.com> Link: https://lore.kernel.org/r/20230227231124.711053-1-gilad.itzkovitch@virscient.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-04-14iw: S1G: add parsing for 802.11ah scan IE'sGilad Itzkovitch3-2/+330
In order to support scan display for 802.11ah, this change adds parsing for S1G capabilities, operation, and short beacon interval information elements. Signed-off-by: Gilad Itzkovitch <gilad.itzkovitch@morsemicro.com> Link: https://lore.kernel.org/r/20230227230127.709496-1-gilad.itzkovitch@virscient.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-04-14iw: S1G: add frequency set in kHz and offset optionsGilad Itzkovitch8-18/+106
This change adds support to specify the set frequency in kHz for the set frequency command which include an offset whenever needed. Also, it adds S1G bandwidth options to the selected chandef. Signed-off-by: Gilad Itzkovitch <gilad.itzkovitch@morsemicro.com> Link: https://lore.kernel.org/r/20230227020529.504934-1-gilad.itzkovitch@virscient.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-04-14util: don't print EHT info if not presentJohannes Berg1-1/+2
That's just confusing, don't print it if the EHT MAC capabilities attribute isn't there (the kernel puts all the attrs together.) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-04-14interface: print linksJohannes Berg1-21/+53
Print link information in 'iw dev' and 'iw ... info'. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-04-14link: update for MLOJohannes Berg3-12/+55
In MLO we need to use the MLD address to get the station statistics (which still need work for per-link stats), adjust the code. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-04-14link: fix some formattingJohannes Berg1-3/+3
The bss flags has a spurious newline, and we don't use a tab for indentation after the colon in other places, fix that here. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-04-14iw: scan: set NL80211_SCAN_FLAG_COLOCATED_6GHZ in case of full sched scanAyala Beker1-0/+2
Same as in regular scan, in case of full sched scan need to set NL80211_SCAN_FLAG_COLOCATED_6GHZ flag, to scan for collocated APs by default. Signed-off-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-04-14util: add support for 320MHz bandwidth without cf1Mordechay Goodstein2-3/+17
Based on user input for control central freq and 320 BW find the data central freq (cf1). Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-04-14util: add support for 320Mhz bandwidthMordechay Goodstein1-0/+1
In the new standard 11be we can set up to 320Mhz bandwidth so add it in parsing params. Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-04-14update nl80211.hJohannes Berg2-10/+224
Bring in nl80211.h from 6.4-rc. Change-Id: I96b818a987d243b5cf97e2cc9c62d57637e17165 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-02-14iw: event: fix printf format errorStefan Weil1-1/+1
tv_usec can be a 64 bit integer which causes a compiler warning: event.c: In function 'print_event': event.c:930:41: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'suseconds_t' {aka 'long long int'} [-Wformat=] 930 | printf("[%s.%06lu]: ", buf, args->ts.tv_usec); | ~~~~^ ~~~~~~~~~~~~~~~~ | | | | long unsigned int suseconds_t {aka long long int} | %06llu Signed-off-by: Stefan Weil <sw@weilnetz.de> Link: https://lore.kernel.org/r/20230121193637.347109-1-sw@weilnetz.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-01-18iw: add support for retrieving keysRaphaël Mélotte1-0/+83
For debugging purposes, it can be useful to be able to retrieve keys. Add a "iw key get" command, to be able to retrieve keys when the key index is known. A new "key" section is also introduced, in preparation for future key-related commands. Example retrieving a pairwise key: iw dev wlan0 key get 0 02:02:03:04:05:06 Example retrieving a group key: iw dev wlan0 key get 1 Note that only the outer ATTR_KEY_DATA (and seq) is reported, the nested KEY_DATA (and seq) within ATTR_KEY is not. Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be> Link: https://lore.kernel.org/r/20230112122525.2257298-1-raphael.melotte@mind.be Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-01-12iw: info: fix bug reading preambles and bandwidthsJaewan Kim1-2/+2
Preambles and bandwidths values are considered as bit shifts when they're are used for capabilities. Signed-off-by: Jaewan Kim <jaewan@google.com> Link: https://lore.kernel.org/r/20230109151455.325793-1-jaewan@google.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-12-01iw: add cac background commandJanusz Dziedzic1-0/+17
Add command that request background CAC radar scan. Tested on mt7915. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com> Link: https://lore.kernel.org/r/20220825095111.1026649-1-janusz.dziedzic@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-12-01iw: info: print PMSR capabilitiesJaewan Kim1-0/+121
Print PMSR and FTM capabilities if any. Signed-off-by: Jaewan Kim <jaewan@google.com> Link: https://lore.kernel.org/r/20221011053405.332375-1-jaewan@google.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-05-27bump version to 5.19v5.19Johannes Berg1-1/+1
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-05-27info: refactor extended featuresJohannes Berg1-95/+103
Refactor the printing here to use a switch statement, so we get a warning for unhandled features. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-05-27info: add missing extended featuresJohannes Berg1-4/+13
Add missing extended features and sort them for easier comparison. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-05-27update nl80211.hJohannes Berg1-0/+2
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-05-27iw: handle VHT extended NSSMaxime Bizon1-5/+179
No change in "Supported Channel Width" output format when extended NSS is not supported. Sample output for a PHY with 1/2 NSS ratio: VHT Capabilities (0xb39b79f2): Max MPDU length: 11454 Supported Channel Width: 160Mhz (1/2 NSS) 80+80Mhz (1/2 NSS) [...] VHT extended NSS: supported Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Link: https://lore.kernel.org/r/405f5ed2c434846f8ab2730b34288c5f649b8915.camel@freebox.fr Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-05-04iw: fix 'upto' -> 'up to'Diederik de Haas1-1/+1
As reported by Debian's lintian tool. Signed-off-by: Diederik de Haas <didi.debian@cknow.org> Link: https://lore.kernel.org/r/20220423175451.27215-1-didi.debian@cknow.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-05-04iw: fix double tab in mesh path headerDiederik de Haas1-1/+1
As reported in https://bugs.debian.org/974833, the double tab char causes a mismatch of the header and contents after 'EXPTIME'. Signed-off-by: Diederik de Haas <didi.debian@cknow.org> Link: https://lore.kernel.org/r/20220423160922.14952-1-didi.debian@cknow.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-04-26station: print EHT rate informationJohannes Berg1-2/+14
Print the EHT rate information if present. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-04-26iw: Print local EHT capabilitiesIlan Peer6-2/+226
Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-04-11iw: support 160MHz frequency command for 6GHz bandDeren Wu1-5/+6
Add support to configure 160MHz in 6G band by direct channel/frequency command. Example: iw dev <interface> set freq 6195 160MHz Signed-off-by: Deren Wu <deren.wu@mediatek.com> Link: https://lore.kernel.org/r/4366b069d41f469c36554c8dcfc857b5aedf3e1d.1647075278.git.deren.wu@mediatek.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-04-11iw: print out assoc comeback eventBen Greear1-0/+18
Looks like this was added in 5.17 kernel. We see this event when trying (and failing) to do .11r roaming). Signed-off-by: Ben Greear <greearb@candelatech.com> Link: https://lore.kernel.org/r/20220407235826.2690-1-greearb@candelatech.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-03-11iw: print Radar background capability if supportedLorenzo Bianconi1-0/+1
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/1661d4de358d5ff8f6f8350eb165acf08f870951.1646909094.git.lorenzo@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2022-03-11update nl80211.hJohannes Berg2-11/+150
Change-Id: I7888629f670e585c3b04b7e9ca4ca63cbf5746cb Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-11-26iw: survey: add support for radio statsJohannes Berg1-1/+11
Add a --radio argument to "survey dump" to support the global radio statistics. Change-Id: I16e615434607d982e9cf690f03148738eca25cde Tested-by: Sven Eckelmann <sven@narfation.org> Link: https://lore.kernel.org/r/20211029072939.15767-1-johannes@sipsolutions.net Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-11-26iw: event: report missing radar eventsLorenzo Bianconi1-0/+6
Properly report the two following radar events: - NL80211_RADAR_PRE_CAC_EXPIRED - NL80211_RADAR_CAC_STARTED Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/6a7cd7bd2179578335cc95b158faf21ba3f7876a.1636730634.git.lorenzo@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-11-08bump version to 5.16v5.16Johannes Berg1-1/+1
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-11-08info: add FILS_CRYPTO_OFFLOAD extended featureJohannes Berg1-0/+1
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-11-08update nl80211.hJohannes Berg1-1/+114
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-10-21iw: print BSS coloring capability if supportedLorenzo Bianconi1-0/+1
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/a935a11cabe630100385005b0c2bee9110fb9572.1634811514.git.lorenzo@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-10-21iw: add set sar_specs commandZong-Zhe Yang1-0/+71
Add set sar_specs command usage: iw <phy> set sar_specs <sar type> <range index:sar power>* e.g. iw phy0 set sar_specs 0 0:100 1:90 2:80... where sar type should correspond to wiphy's sar_capa, and range index should be valid in wiphy's sar_capa. For now, kernel sar type supports only 0 (NL80211_SAR_TYPE_POWER) which means that the sar power limitation is specified in 0.25dBm unit. Cc: Carl Huang <cjhuang@codeaurora.org> Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://lore.kernel.org/r/20211007085615.40399-1-pkshih@realtek.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-09-24iw: nl80211: add NLA_F_NESTED to nla_nest_start() with older libnl versionsGokul Sivakumar1-0/+5
It is noticed in Kernel version 5.14.0-rc4+, that when sending the NL cmd NL80211_CMD_SET_TID_CONFIG with nested attrs under NL80211_ATTR_TID_CONFIG, kernel returnes a response with the error "NLA_F_NESTED is missing". $ sudo ./iw dev wlan0 set tidconf tids 0x1 ampdu on kernel reports: NLA_F_NESTED is missing command failed: Invalid argument (-22)) Fix this by setting NLA_F_NESTED flag everytime when using nla_nest_start() library function. This is needed to make cfg80211 allow the nl80211 command NL80211_ATTR_TID_CONFIG in the new kernel versions that enforce netlink attribute policy validation. Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com> Link: https://lore.kernel.org/r/20210910141618.1594617-1-gokulkumar792@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-09-23iw: mesh: add comments in the mesh confguration parameter printing sectionsGokul Sivakumar1-1/+2
Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com> Link: https://lore.kernel.org/r/20210910141618.1594617-4-gokulkumar792@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-09-23iw: event: add the missing time display format in the "iw event" help menuGokul Sivakumar1-1/+1
The option used to print the events with timestamp in Human readable format is not listed in the "$ iw event -h" output. $ ./iw event -h Usage: ./iw [options] event [-t|-r] [-f] [-n] ... So add "-T" option to the help menu. $ ./iw event -h Usage: ./iw [options] event [-t|-T|-r] [-f] [-n] ... Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com> Link: https://lore.kernel.org/r/20210910141618.1594617-3-gokulkumar792@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-09-23iw: link: mention the need for MAC addr arg in link get_sta cmd usage menuGokul Sivakumar1-1/+1
The usage menu shown when running the hidden "link get_sta" command is not mentioning the need for the MAC address argument. Without this, the cmd is always failing with the output shown below. $ ./iw dev wlan0 link get_sta Usage: ./iw [options] dev <devname> link get_sta ... To avoid this, let the user know about the mandatory "MAC address" argument like below. $ ./iw dev wlan0 link get_sta Usage: ./iw [options] dev <devname> link get_sta <mac-addr> ... Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com> Link: https://lore.kernel.org/r/20210910141618.1594617-2-gokulkumar792@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-09-08iw: fix vendor event static warningsJohannes Berg1-1/+1
The vendor event section/descriptors can all be static, adjust the macro accordingly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-09-08iw: fix various sparse static warningsJohannes Berg1-4/+45
The section macro must be non-static, but many of them are not used outside a single file. Still declare all of the sections so that the warnings go away. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-09-08iw: make parse_he_gi staticJohannes Berg1-1/+1
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-09-08iw: add support for configuring the bss color for ranging measurementsAvraham Stern1-0/+11
NDP ranging requires the BSS color as a parameter. Add it to the measurement request config file parameters. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-09-08iw: update nl80211.hJohannes Berg1-1/+68
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-09-08iw: use cipher suite defines in util.cJohannes Berg1-7/+9
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-09-08iw: add cipher suites definitionsAvraham Stern1-0/+17
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2021-08-20iw: unify interface type list printingJohannes Berg3-35/+38
Add two new functions print_iftype_list() and print_iftype_line() to print interface lists, and use them where applicable. Link: https://lore.kernel.org/r/20210818142256.3325c72c65e4.I844f8e382b0ecee00c21886342d0bfd70e246a9f@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-08-13iw: mesh: add new cmd to dump all the supported mesh config params at onceGokul Sivakumar1-0/+14
The function print_mesh_param_handler() already supports printing all the mesh config params when not passing one specific parameter, so add a new "mesh_param dump" command to help the user see all the parameters at once. $ iw dev mesh0 mesh_param dump mesh_retry_timeout = 100 milliseconds mesh_confirm_timeout = 100 milliseconds mesh_holding_timeout = 100 milliseconds mesh_max_peer_links = 99 mesh_max_retries = 3 mesh_ttl = 31 mesh_element_ttl = 31 mesh_auto_open_plinks = 0 mesh_hwmp_max_preq_retries = 4 mesh_path_refresh_time = 1000 milliseconds mesh_min_discovery_timeout = 100 milliseconds mesh_hwmp_active_path_timeout = 5000 TUs mesh_hwmp_preq_min_interval = 10 TUs mesh_hwmp_net_diameter_traversal_time = 50 TUs mesh_hwmp_rootmode = 0 mesh_hwmp_rann_interval = 5000 TUs mesh_gate_announcements = 0 mesh_fwding = 1 mesh_sync_offset_max_neighor = 50 mesh_rssi_threshold = 0 dBm mesh_hwmp_active_path_to_root_timeout = 6000 TUs mesh_hwmp_root_interval = 5000 TUs mesh_hwmp_confirmation_interval = 2000 TUs mesh_power_mode = active mesh_awake_window = 10 TUs mesh_plink_timeout = 0 seconds mesh_connected_to_gate = 0 Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com> Link: https://lore.kernel.org/r/20210805153807.645106-2-gokulkumar792@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-08-13iw: mesh: fix crash when attempting to print the conf param "mesh_nolearn"Gokul Sivakumar1-5/+9
Even if iw did not receive some of the meshconf attributes in response to NL80211_CMD_GET_MESH_PARAMS, it tries to print that param and gets crashed. Fix this by adding a condition check before trying to access each of the mesh conf params. $ iw dev mesh0 get mesh_param mesh_nolearn Segmentation fault (core dumped) (gdb) bt #0 0x00007f21f54660e9 in nla_get_u8 () from /lib/x86_64-linux-gnu/libnl-3.so.200 #1 0x0000562ba2f5d70d in _print_u8 (a=<optimized out>) at mesh.c:131 #2 0x0000562ba2f5d7ce in print_mesh_param_handler (msg=<optimized out>, arg=0x562ba2f85758 <_mesh_param_descrs+1080>) at mesh.c:412 #3 0x00007f21f546db9c in nl_recvmsgs_report () from /lib/x86_64-linux-gnu/libnl-3.so.200 #4 0x00007f21f546e059 in nl_recvmsgs () from /lib/x86_64-linux-gnu/libnl-3.so.200 #5 0x0000562ba2f5bb3b in __handle_cmd (state=0x7ffe677bc510, idby=II_NETDEV, argc=<optimized out>, argv=<optimized out>, cmdout=0x7ffe677bc508) at iw.c:541 #6 0x0000562ba2f4fe0c in __handle_cmd (cmdout=0x7ffe677bc508, argv=0x7ffe677bc658, argc=4, idby=II_NETDEV, state=0x7ffe677bc510) at iw.c:613 #7 main (argc=4, argv=0x7ffe677bc658) at iw.c:613 (gdb) up 2 #2 0x0000562ba2f5d7ce in print_mesh_param_handler (msg=<optimized out>, arg=0x562ba2f85758 <_mesh_param_descrs+1080>) at mesh.c:412 412 mdescr->nla_print_fn(mesh_params[mdescr->mesh_param_num]); (gdb) i local mdescr = 0x562ba2f85758 <_mesh_param_descrs+1080> attrs = {0x0 <repeats 35 times>, 0x562ba4002a14, 0x0 <repeats 266 times>} parent_attr = <optimized out> mesh_params = {0x0, 0x562ba4002a20, 0x562ba4002a28, 0x562ba4002a30, 0x562ba4002a38, 0x562ba4002a40, 0x562ba4002a48, 0x562ba4002a58, 0x562ba4002a68, 0x562ba4002a70, 0x562ba4002a78, 0x562ba4002a80, 0x562ba4002a88, 0x562ba4002a98, 0x562ba4002aa0, 0x562ba4002a50, 0x562ba4002aa8, 0x562ba4002ab0, 0x562ba4002a90, 0x562ba4002ab8, 0x562ba4002ac0, 0x562ba4002a60, 0x562ba4002ac8, 0x562ba4002ad0, 0x562ba4002ad8, 0x562ba4002ae0, 0x562ba4002ae8, 0x562ba4002af0, 0x562ba4002af8, 0x562ba4002b00, 0x0, 0x0} gnlh = 0x562ba4002a10 (gdb) (gdb) p mesh_params[30] $7 = (struct nlattr *) 0x0 (gdb) Signed-off-by: Gokul Sivakumar <gokulkumar792@gmail.com> Link: https://lore.kernel.org/r/20210805153807.645106-1-gokulkumar792@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-07-23iw: ps: fix "get power_save" documentationJohannes Berg1-1/+1
This doesn't take any arguments, remove the "<param>" string from the help. Link: https://lore.kernel.org/r/20210701180945.45abdb0d4f52.Ifdc6ce8fdbf252019c080f609b6d95cec23d84ee@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-06-18iw: add option to set auth type for connectJianhui Zhao1-2/+28
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com> Link: https://lore.kernel.org/r/20210530112552.577329-1-zhaojh329@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-04-16update nl80211.hJohannes Berg1-6/+164
Change-Id: Iff1e25d95a61a35fabd68fd94260e65909b14bd6 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-04-16iw: allow specifying CFLAGS/LIBS externallyJohannes Berg1-10/+10
If CFLAGS or LIBS are specified on the make command line, then the += doesn't do anything. Add "override" directives to still add the necessary libnl flags/libs. Change-Id: Icdc3d14ae3a6f01b827c76e753c93fe8eb8fcec2 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-04-16iw: fix ftm_request missing arguments segfaultBenjamin Aschenbrenner1-0/+3
When expected argument <config-file> is not passed to arguemts iw segfaults. Example: iw wlp2s0 measurement ftm_request This fixes it. Signed-off-by: Benjamin Aschenbrenner <benjamin.aschenbrenner@gmail.com> Link: https://lore.kernel.org/r/20210410111937.32813-2-benjamin.aschenbrenner@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-04-16iw: fix mgmt dump missing arguments segfaultBenjamin Aschenbrenner1-12/+29
When expected arguments for mgmt command dump are left out iw segfaults. Example: iw dev wlp2s0 mgmt dump frame e0 This fixes it. Signed-off-by: Benjamin Aschenbrenner <benjamin.aschenbrenner@gmail.com> Link: https://lore.kernel.org/r/20210410111937.32813-1-benjamin.aschenbrenner@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-03-19iw: Fix timestamp output on 32-bit architecturesToke Høiland-Jørgensen1-2/+2
On 32-bit architectures, time_t is 32-bit which causes overflows in the arithmetic involving tv_sec, leading to invalid output. Fix this by explicitly adding ULL suffixes to the constants used in those calculations. Fixes: 3708f614dfdd ("iw: Print current time in station info dump") Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> Link: https://lore.kernel.org/r/20210318224655.143489-1-toke@toke.dk Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-03-02iw: fix pointer arithmetic in __print_he_capaMarkus Theil1-1/+1
Found by fuzzing with clang fuzzer. Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de> Link: https://lore.kernel.org/r/20210213114853.17276-1-markus.theil@tu-ilmenau.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-02-12iw: add option to print human readable event timeMarkus Theil2-7/+26
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de> Link: https://lore.kernel.org/r/20210206150432.10456-1-markus.theil@tu-ilmenau.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-12-11iw: print ctrl port tx status eventMarkus Theil1-0/+5
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>
2020-12-11iw: use correct type in policy check for meshMarkus Theil1-2/+2
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>
2020-11-30iw: scan: fixup HE caps whitespaceBrian Norris1-10/+13
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>
2020-11-30iw: scan: parse HE capabilitiesBrian Norris3-0/+39
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>
2020-11-30iw: util: factor out HE capability parserBrian Norris1-64/+80
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>
2020-11-30iw: scan: add extension tag parsingBrian Norris1-0/+32
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>
2020-11-30man: update wikipage URL, reformat SEE ALSO sectionivan tkachenko1-4/+8
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>
2020-11-06iw: enable 80MHz support for 6GHz band 11s meshPradeep Kumar Chitrapu1-5/+8
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>
2020-11-06iw: handle positive error codes gracefullyBrian Norris1-1/+13
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>
2020-11-06iw: scan: add flag for scanning colocated apTova Mussai1-1/+6
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>
2020-11-06iw: Add 'coloc' and 'flush' options to sched_scanIlan Peer2-1/+5
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>
2020-10-27iw: update wikipage URLLuca Coelho1-1/+1
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>
2020-10-08iw: Add support for specifying the 160MHz bandwidth when setting the ↵Ttttabcd2-6/+23
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>
2020-10-02bump version to 5.9v5.9Johannes Berg1-1/+1
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-10-02iw: support HE rate configuration in 6 GHz bandRajkumar Manoharan1-2/+38
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>
2020-10-02iw: add HE rate/gi/ltf supportMiles Hu1-15/+163
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>
2020-10-02iw: update nl80211.hJohannes Berg1-22/+174
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-09-18iw: add TID specific Tx bitrate configurationTamizh Chelvam3-8/+58
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>
2020-09-18iw: fix tid config help entriesTamizh Chelvam1-4/+4
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>
2020-08-27bump version to 5.8v5.8Johannes Berg1-1/+1
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-08-27iw: print hop_count and path_change info of mpathTamizh Chelvam1-1/+9
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>
2020-08-27iw: handle more mesh station infoMarkus Theil1-0/+15
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>
2020-08-27iw: handle all mesh config parametersMarkus Theil1-0/+4
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>
2020-08-27iw: print current ext feature setMarkus Theil1-0/+2
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>
2020-08-27update nl80211.h to 5.8-rc1Johannes Berg1-13/+28
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-08-27iw: add support for vendor eventsJohannes Berg2-7/+62
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>
2020-08-27iw: add support for NDP ranging - trigger based and non trigger basedAvraham Stern1-1/+13
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>
2020-08-27reg: Fix getting PHY specific regulatory informationIlan Peer1-0/+10
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>
2020-08-27iw: update freq to chan mappings for 6GHz band per IEEE P802.11ax/D6.1Pradeep Kumar Chitrapu1-6/+11
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>
2020-07-30iw: mesh: add mesh_param "mesh_nolearn" to skip path discoveryLinus Lüssing1-0/+2
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>
2020-07-30update nl80211.hJohannes Berg3-10/+66
Change-Id: I1d8448ce41d0f65dcd557f09698405b541ce39fd Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-05-28iw: print current ext feature setMarkus Theil1-0/+4
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>
2020-05-28update nl80211.hJohannes Berg1-17/+77
Change-Id: Ic04c3bc6e4a74b687ffcf7c1ca54f14050601bd2 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-05-28iw: sync frequency to channel mapping with kernel for 6GHz bandPradeep Kumar Chitrapu1-2/+10
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>
2020-05-26iw: add TID specific configuration commandSergey Matyukevich1-0/+229
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>
2020-05-26update nl80211.hJohannes Berg1-9/+34
Change-Id: I1c181bc11420eced5c41a5efe30702149fef575e Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-05-25iw: Print limit for maximum associated stations in AP modePali Rohár1-0/+4
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>
2020-04-24iw: 'phy <name> reg get' shouldn't dump all domainsBrian Norris1-1/+1
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>
2020-04-24iw: tiny code style fixesJohannes Berg3-6/+6
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-04-24iw: event: log rssi value for cqmMarkus Theil1-2/+5
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>
2020-03-25iw: event: also handle reg change on wiphyMarkus Theil1-1/+5
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>
2020-03-25iw: update extended features in infoMarkus Theil1-0/+4
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>
2020-03-25iw: Complete Extended Key ID detectionAlexander Wetzel2-1/+3
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>
2020-03-25iw: update nl80211.hJohannes Berg1-2/+175
Change-Id: Icfad99c15bcd7d56478a550fab7ac83289ed3765 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-03-20iw: phy: dump wiphy indexBrian Norris1-0/+3
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>
2020-03-04scan: Fix printing of unknown WPS vendor extensionIlan Peer1-0/+3
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>
2020-03-04iw: correctly print signed TX power levelJohannes Berg1-1/+1
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>
2020-02-24resync nl80211.hJohannes Berg1-15/+1
Change-Id: I2b9c65ee9816b59d72b7485cfe8ae482fafce8bc Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-02-13scan: wps: remove useless string length checksJohannes Berg1-25/+0
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>
2020-02-13scan: wps: fix some misplaced codeJohannes Berg1-1/+2
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>
2020-02-13iw: scan: parse AP Channel ReportMarkus Theil1-0/+16
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>
2020-02-13iw: scan: parse wps version2Markus Theil1-0/+12
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>
2020-02-13scan: wps: add more bounds checksJohannes Berg1-1/+38
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-02-13iw: scan: better length checks in print_wifi_wps()Markus Theil1-9/+43
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>
2020-02-13iw: scan: fix some format string warnings found by clangMarkus Theil1-5/+5
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>
2020-02-13iw: scan: fix undefined behaviour in print_vht_capa()Markus Theil1-2/+2
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>
2020-02-13iw: scan: fix undefined behaviour in rm capa printMarkus Theil1-4/+4
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>
2020-02-13iw: scan: fix buffer over-read in print_p2pMarkus Theil1-1/+1
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>
2020-02-13iw: scan: fix buffer over-read in print_wifi_wpsMarkus Theil1-1/+1
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>
2020-02-13iw: scan: fix buffer over-read in parsing roaming consortiumMarkus Theil1-1/+1
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>
2020-02-13iw: scan: fix buffer over-read in print_ies()Markus Theil1-1/+4
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>
2020-02-13build: add -Wdeclaration-after-statementJohannes Berg1-3/+4
Change-Id: Id4f25cf70c39543ae0ff250b3ab3bf7cc17f0811 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-02-13iw: scan: parse measurement pilot elementMarkus Theil1-0/+50
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>
2020-02-13iw: scan: parse tx power envelopeMarkus Theil1-0/+31
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>
2020-02-13iw: scan: parse 'supported Operating Classes element'Markus Theil1-0/+35
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>
2020-02-13iw: scan: add missing word for rm capabilitiesMarkus Theil1-1/+1
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>
2020-02-13iw: reg: parse the NO_HE regulatory flagBrian Norris1-0/+1
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>
2020-02-13iw: print ru-alloc values when dumping stationsJohn Crispin1-0/+3
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>
2020-02-13update nl80211.hJohannes Berg1-1/+79
Change-Id: Ia0e95e0cc90a2dfc6caec71f1c1052588411b6bf Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-01-28iw: scan: print radio measurement capabilitiesMarkus Theil1-0/+56
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>
2020-01-15iw: event: parse channel switchMarkus Theil1-0/+81
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>
2020-01-15iw: info: add missing extended flags for 5.5Markus Theil1-2/+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>
2020-01-15iw: event: parse stop ap and frame wait cancel eventsMarkus Theil1-0/+8
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>
2020-01-15iw: event: handle interface add/delMarkus Theil1-5/+23
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>
2020-01-15iw: update nl80211.hJohannes Berg1-0/+39
Change-Id: I3b5b124f7d2985b9dc6f9481408bd412e50c0b5b Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-01-02iw: info: print missing extended feature flag informationMarkus Theil1-0/+10
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>
2019-12-13event: remove unnecessary bracesJohannes Berg1-2/+1
Change-Id: I7fd064aac349859c000961fa7560a968a6552fc8 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-12-13iw: event: add sta opmode changed commandMarkus Theil1-0/+26
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>
2019-12-13iw: event: add set interface commandMarkus Theil1-0/+66
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>
2019-12-13iw: event: add new peer candidate commandMarkus Theil1-0/+21
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>
2019-12-05iw: bump version to 5.4v5.4Johannes Berg1-1/+1
Change-Id: I1f1df568c37b3f163d7d365bb6f259e75b6b9f17 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-12-05iw: generate command list at build timeJohannes Berg3-141/+8
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>
2019-11-22iw: scan: fix double-free in error pathsBrian Norris1-2/+0
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>
2019-10-28iw: Fix typo in iw --helpRyan Adolf1-1/+1
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>
2019-09-11iw: Print current time in station info dumpBen Greear1-2/+19
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>
2019-09-11iw: Support associated-at station statistic.Ben Greear1-0/+6
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>
2019-09-11update nl80211.hJohannes Berg1-0/+32
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-08-05bump version to 5.3v5.3Johannes Berg1-1/+1
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-08-05info: update extended feature listJohannes Berg1-0/+7
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-08-05info: macro-ify ext_feat_print()Johannes Berg1-61/+38
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-08-05util: update command listJohannes Berg1-0/+2
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-08-05update nl80211.hJohannes Berg1-3/+56
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-07-26iw: scan: add missing newlineJohannes Berg1-1/+1
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>
2019-05-24iw: print HE capabilitiesJohn Crispin3-0/+238
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>
2019-05-24iw: really fix buildJohannes Berg1-3/+3
Now after the previous fix, version.o was linked twice... Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-05-24iw: add HE support to station dump callJohn Crispin1-0/+12
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>
2019-05-24cac: fix error handling in channel parsingJohannes Berg1-1/+2
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-05-24nan: fix memory leakJohannes Berg1-1/+6
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-05-24mesh: initialize err in set_interface_meshparam()Johannes Berg1-1/+1
Change-Id: I72f4fc551e5a6ab30c1056d5a8978175506870aa Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-05-24iw: fix fp handling inside handle_vendorJohn Crispin1-1/+4
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>
2019-05-24iw: fix memory leaks inside handle_scanJohn Crispin1-16/+15
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-05-24iw: fix memory leak inside parse_sched_scanJohn Crispin1-1/+2
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-05-24iw: fix fd leak inside handle_netnsJohn Crispin1-1/+4
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-05-24iw: fix memory leak inside handle_cacJohn Crispin1-6/+14
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-05-24iw: fix endless loop inside handle_mgmt_dumpJohn Crispin1-0/+2
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>
2019-05-24iw: fix memory leak inside register_mgmt_frameJohn Crispin1-0/+2
Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-05-24iw: add version.o to objectsJohannes Berg1-1/+1
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>
2019-05-02iw: include all C files into the binaryJohannes Berg1-12/+1
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>
2019-05-02iw: change __cmd section scheme to fit gcc/clangJohannes Berg2-22/+25
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>
2019-04-26iw: Add support for controlling tx power for per stationAshok Raj Nagarajan1-0/+69
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>
2019-04-26iw: add command to inject a frame via direct mesh link to mesh peerPradeep Kumar Chitrapu1-0/+39
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>
2019-04-26update nl80211.hJohannes Berg1-2/+84
Change-Id: I9e09f7951c782f86775809c2a38a988d921bfcf9 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-03-29iw: print 4ADDR attribute when dumping interfaceAntonio Quartulli1-0/+6
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
2019-02-28iw: small cleanup for the sizer codeJohannes Berg1-3/+3
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>
2019-02-28iw: fix cmd_size determination with LTOJohannes Berg1-1/+20
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>
2019-02-28update nl80211.hJohannes Berg1-5/+39
This also fixes compilation of the previous commit. Change-Id: Iaabb7986393411454a2e72ce5a3342f941201fe1 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-02-22iw: Print airtime fairness featureToke Høiland-Jørgensen1-0/+2
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>
2019-02-22iw: Add command to set airtime weightToke Høiland-Jørgensen1-0/+51
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>
2019-02-22iw: Add printing of station tx duration and airtime weightToke Høiland-Jørgensen1-0/+9
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>
2019-02-04iw: bump version to 5.0.1v5.0.1Johannes Berg1-1/+1
This just fixes build on older compilers. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-02-04iw: make it build with older compilers againJohannes Berg1-1/+5
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>
2019-02-01iw: bump version to 5.0v5.0Johannes Berg1-1/+1
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>
2019-02-01iw: add FTM responder commandsJohannes Berg2-1/+159
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>
2019-02-01iw: add FTM initiator supportJohannes Berg3-1/+526
Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-02-01iw: separate wait/print when waiting for an eventJohannes Berg3-8/+20
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>
2019-02-01iw: make parse_random_mac_addr() more generally availableJohannes Berg3-35/+43
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>
2019-02-01update nl80211.h and command listJohannes Berg2-6/+560
Update nl80211.h to what should be in kernel 5.0. Signed-off-by: Johannes Berg <johannes.berg@intel.com>