Commit Graph

4474 Commits

Author SHA1 Message Date
Andrew Zaborowski f909c6db26 doc: Generalize wsc-api method descriptions 2019-12-08 23:10:27 -06:00
Andrew Zaborowski cbbc247aa2 wsc: Declare the credentials structure in wsc.h 2019-12-08 21:48:33 -06:00
Andrew Zaborowski b715022ce6 iwmon: Update to use NL80211_ATTR_SOCKET_OWNER
NL80211_ATTR_IFACE_SOCKET_OWNER was renamed to NL80211_ATTR_SOCKET_OWNER.
2019-12-08 21:47:21 -06:00
Andrew Zaborowski 6b6e205f0f iwmon: Print WSC AuthorizedMACs extended attributes 2019-12-08 21:47:17 -06:00
Denis Kenzior ffbbfd52a0 README: Fix mailing list link 2019-12-08 21:45:53 -06:00
Denis Kenzior 738184d491 device/netdev: init scan in netdev instead of device
Commit 1057d8aa74 changed the device interface creation logic
from being unconditional inside netdev.c to instead use NETDEV_WATCH_*
events.  However, this broke the assumption that the device interface
was created before all others.  The effect is that the scan_wdev_add
might no longer be called prior to station interface being created.  Fix
this by moving scan_wdev_add/remove calls to netdev.c instead.

Fixes: 1057d8aa74 ("device: Move device creation from netdev.c to event watch")
2019-12-06 10:12:55 -06:00
Denis Kenzior d2556a48b7 scan: Fix crash when scan is triggered outside iwd
#0  0x000055555558ee5d in scan_notify (msg=0x55555560b640, user_data=0x0) at src/scan.c:1706
 #1  0x00007ffff7f2c78c in ?? () from /usr/lib/libell.so.0
 #2  0x00007ffff7f299ec in ?? () from /usr/lib/libell.so.0
 #3  0x00007ffff7f28e4a in l_main_iterate () from /usr/lib/libell.so.0
 #4  0x00007ffff7f28efc in l_main_run () from /usr/lib/libell.so.0
 #5  0x00007ffff7f290b9 in l_main_run_with_signal () from /usr/lib/libell.so.0
 #6  0x00005555555639c4 in main (argc=1, argv=0x7fffffffec18) at src/main.c:497
2019-12-02 11:02:05 -06:00
Marcel Holtmann 8901ad3927 Release 1.2 2019-11-27 23:07:44 +01:00
Marcel Holtmann 9d8e74c1bc module: Declare functions as foo(void) instead of just foo() 2019-11-24 19:44:06 +01:00
Andrew Zaborowski becba0dd09 scan: Add scan_bss_new_from_probe_req 2019-11-21 20:51:21 -06:00
Andrew Zaborowski 1d57ec0d46 scan: Parse P2P IEs according to frame type
Save the source frame type in struct scan_bss as it may affect how some
of the data in the struct will be parsed.  Also replace the P2P IE
payload data in that struct with a union containing pre-parsed p2p
attributes corresponding to the frame type.

This means users don't have to call the parsers in p2putil.c on that
data, which wouldn't have worked anyway because those parsers assume
input is the raw IE sequence rather than just the "payload".
2019-11-21 20:51:17 -06:00
Denis Kenzior 41ff1d2383 rrm: Remove unneeded casts 2019-11-21 20:34:06 -06:00
James Prestwood 32dfb6208d rrm: add packed struct for beacon reports
build_report_for_bss was refactored to use this packed structure rather
than l_put_* APIs.
2019-11-21 16:33:06 -06:00
Andrew Zaborowski 37816f6ebf unit: Update p2p_free_* function names 2019-11-21 14:02:33 -06:00
Andrew Zaborowski ce94133472 p2putil: Replace free with clear in function names
All these functions free up the resources used by the struct but don't
free the struct itself (allowing it to be static) so rename the
functions to avoid confusion.
2019-11-21 14:02:19 -06:00
James Prestwood c86f5678b2 wsc: fix use of non-ascii apostrophe 2019-11-21 14:00:35 -06:00
James Prestwood 0381361c81 eapol: fix use of non-ascii apostrophe 2019-11-21 14:00:35 -06:00
James Prestwood e1ceafde3a client: fix use of non-ascii apostrophe 2019-11-21 14:00:35 -06:00
James Prestwood ede2c11d66 test-runner: print which file failed to fchown 2019-11-21 13:59:44 -06:00
James Prestwood ccfe369766 rrm: include actual scan start time in report 2019-11-21 13:45:40 -06:00
James Prestwood 27af5b715e scan: parse the scan start time
The kernel sends NL80211_ATTR_SCAN_START_TIME_TSF with CMD_TRIGGER and
RRM requires this value for beacon measurement reports.

The start time is parsed during CMD_TRIGGER and set into the scan request.
A getter was added to obtain this time value for an already triggered
scan.

After making the change, the SCAN_ABORTED case was cleaned up a bit to
remove the local scan_request usage in favor of the one used for all the
other cases.
2019-11-21 13:45:40 -06:00
James Prestwood 002fdb5c10 rrm: fix non-ascii character in comment 2019-11-21 13:45:40 -06:00
Marcel Holtmann ee864662fe module: Add missing empty line 2019-11-21 18:03:55 +01:00
Andrew Zaborowski 59b963a121 netdev: Power P2P interfaces up like other interfaces
After all we will want to power these iftypes up on init just like
station, etc.
2019-11-20 20:29:34 -06:00
Andrew Zaborowski 81be5fbae5 rtnlutil: Move rtnl_set_powered from netdev to rtnlutil
This function fits with the other utilities in rtnlutil and netdev.c
can slim down.
2019-11-20 20:28:48 -06:00
Andrew Zaborowski 3ffb645f22 device: Make functions static, drop device.h 2019-11-20 20:26:55 -06:00
Andrew Zaborowski 1057d8aa74 device: Move device creation from netdev.c to event watch
Create and destroy the device state struct and the DBus interfaces in a
way more similar to the Station, AdHoc and AP interfaces.  Drop
netdev_get_device() and the device specific code in netdev that as far
as I can tell wasn't needed.
2019-11-20 20:24:48 -06:00
Andrew Zaborowski bc1b9ce10c anqp: Only register for frames on station interfaces
Check the iftype before registering ANQP on new interface.

Not that the check here and in rrm.c (which already checks the iftype)
may need to be extended to run on NETDEV_WATCH_EVENT_UP because a device
could be created with a different iftype and then have the iftype changed
before powering up.
2019-11-20 20:24:43 -06:00
Denis Kenzior aa754cbb4a rrm: include actual parent TSF value
If the scan results included a parent TSF value use it.
2019-11-20 20:11:47 -06:00
James Prestwood e92424611a scan: fix parent TSF parsing
The value coming from the kernel is in the same endianness as IWD, so
just parse it as a u64 rather than le64.
2019-11-20 20:04:30 -06:00
James Prestwood 05c8a1af47 monitor: print START_TIME_TSF/BSSID values 2019-11-20 20:04:27 -06:00
James Prestwood c1c2ca5e7f rrm: remove use of floating point math
The RCPI value was using floating point values as per the spec. But instead
we can just use the signal strength coming from the kernel in mili mdm and
scale the hard coded values by a factor of 100.
2019-11-18 12:52:33 -06:00
James Prestwood be4ab2826f scan: parse parent TSF value in scan results
RRM can include this in measurement reports if present in scans
2019-11-15 14:28:26 -06:00
James Prestwood 772061a7d0 monitor: print parent TSF 2019-11-15 14:17:39 -06:00
James Prestwood 40a79dc90b auto-t: add RRM test for scan duration
mac80211_hwsim does not actually support SET_SCAN_DWELL, but since we are
not setting duration mandatory the request should still be accepted.
2019-11-15 14:17:25 -06:00
James Prestwood 1b35eda3dd rrm: support scan duration and mandatory flags
Beacon requests can specify a scan duration, and set a flag which makes
this duration mandatory. The kernel supports both these values for scan
requests so we no longer need to reject requests which contain these.

Drivers which do not support EXT_FEATURE_SET_SCAN_DWELL will ignore the
duration value, but if duration mandatory is set we must reject the
request.
2019-11-15 14:12:24 -06:00
James Prestwood dca90abdc5 scan: add duration scan_parameters
The kernel allows a scan duration and duration mandatory flag to be
set in scan requests. RRM requests can contain these values so they
have been added to scan_parameters.

Scanning with drivers which do not support EXT_FEATURE_SET_SCAN_DWELL
will not include these values in scan requests.
2019-11-15 14:11:16 -06:00
James Prestwood 4cee10ec50 scan: add scan_passive_full variant
Just like active scans, add an API for passive scans which take in
the full scan_parameters structure.
2019-11-15 14:11:16 -06:00
James Prestwood 5528403d77 rrm: fix invalid IE tag when rejecting request
The rejection report actually contained a request IE, not a report IE
2019-11-15 11:03:39 -06:00
James Prestwood f2a7966897 monitor: add support for parsing RRM Reports
Only beacon reports are parsed for now
2019-11-14 17:46:35 -06:00
James Prestwood b7cccb6bcc monitor: add support for parsing RRM Requests
Only beacon requests are parsed for now
2019-11-14 17:46:35 -06:00
James Prestwood c961dafc50 auto-t: let testEAP-TTLS-MSCHAPv2 use HostapdCLI easier
This test made it past the initial refactor to use HostapdCLI with the
'config' parameter. This avoids the need to iterate the hostapd map in
the actual test.
2019-11-14 15:23:03 -06:00
James Prestwood 0c586dc8ca auto-t: give testEAP-TTLS-MSCHAPv2 a longer timeout
When logging is turned on this test consistently fails due to a
timeout. Giving it a bit more time allows it to pass.
2019-11-14 15:23:03 -06:00
James Prestwood 73f42c2db4 test-runner: move ofono/phonesim logs into test dir
These two processes are executed per-test so they can be passed the
test name and have the logs stored only in tests that actually need
them rather than at the top level.
2019-11-14 15:23:03 -06:00
James Prestwood 90fb7eff7d station: fail if trying to scan while connecting
If a scan is requested during the middle of a connection we should
return busy instead of attempting the scan. The kernel ends up coming
back with not supported in this case, which is misleading and
difficult to debug.
2019-11-14 15:23:03 -06:00
Marcel Holtmann 299337b579 Release 1.1 2019-11-14 21:02:37 +01:00
James Prestwood dcbdbac2f8 auto-t: fix intermittent failures in testEAP-MSCHAPV2
Occationally autoconnect would start which was not expected in the
test. This is fixed by disabling autoconnect in the provisioning files.
2019-11-14 12:58:18 -06:00
James Prestwood 81ac94fd01 hotspot: fix double free between hostpot and knownnetworks
The module framework was changed to call the module exit functions in
the reverse order as the init functions. This uncovered/caused known
networks to try and free the network_info structures after hotspot had
already freed them. Since known networks clean up the network_info's
anyways, we don't actually need hotspot to do any cleanup.
2019-11-13 16:37:17 -06:00
James Prestwood a3817ba015 auto-t: add ctrl_interface to testHotspot
This is now required for any test using HostapdCLI
2019-11-13 16:37:17 -06:00
James Prestwood 088ed86f3d auto-t: add ctrl_interface to testHT-VHT
This is now required for any test using HostapdCLI
2019-11-13 16:37:17 -06:00