Commit Graph

5319 Commits

Author SHA1 Message Date
James Prestwood 874b17ca56 client: add Security key to diagnostics 2021-03-29 13:18:17 -05:00
James Prestwood c2330c5332 station: add Security key to GetDiagnostics 2021-03-29 13:18:01 -05:00
James Prestwood 2c2c1e3ebf diagnostic: add diagnostic_akm_suite_to_security
Converts ie_rsn_akm_suite values (and WPA1 hint) into a more
human readable security string such as:

WPA2-Personal, WPA3-Personal, WPA2-Personal + FT etc.
2021-03-29 13:17:36 -05:00
James Prestwood c66ade2eac doc: document Security diagnostic value 2021-03-29 13:14:56 -05:00
James Prestwood 4913a4dd6e client: re-enable iwctl refresh for 'station <wlan> show'
When diagnostics got added to iwctl the refresh capabilities were
accidentally removed. This re-enables refresh.
2021-03-29 13:11:50 -05:00
Denis Kenzior e730baac4a station: Make sure to reset scanning property
When we cancel a quick scan that has already been triggered, the
Scanning property is never reset to false.  This doesn't fully reflect
the actual scanning state of the hardware since we don't (yet) abort
the scan, but at least corrects the public API behavior.

{Network} [/net/connman/iwd/0/7/73706733_psk] Connected = False
{Station} [/net/connman/iwd/0/7] Scanning = True
{Station} [/net/connman/iwd/0/7] State = connecting
{Station} [/net/connman/iwd/0/7] ConnectedNetwork =
/net/connman/iwd/0/7/73706733_psk
{Network} [/net/connman/iwd/0/7/73706733_psk] Connected = True
2021-03-29 10:44:02 -05:00
Marcel Holtmann f80189d161 Release 1.13 2021-03-29 15:04:34 +02:00
Marcel Holtmann 24cb11dfd4 build: Require at least version 0.39 when building with external ELL 2021-03-29 14:35:33 +02:00
James Prestwood b531444a7c monitor: print out extended feature name
This prints out the NL80211_* enum name for extended features
rather than a hex string.
2021-03-24 14:38:32 -05:00
Denis Kenzior 9a67a21bd2 station: Add a warning of rekey fails 2021-03-24 13:10:32 -05:00
Denis Kenzior d958239da9 eapol: Don't ignore EAPoL protocol version 2010
Some newer Cisco APs seem to send this protocol version by default
2021-03-22 17:47:53 -05:00
James Prestwood 73b247d72f netdev: prevent crash with open networks
The SAE offload changes assumed a handshake object would
exist in netdev, which is not the case for open networks.
2021-03-22 17:46:05 -05:00
James Prestwood 0b38aabde3 station: set handshake offload if required
If IWD is connecting to a SAE/WPA3 BSS and Auth/Assoc commands
are not supported the only option is SAE offload. At this point
network_connect should have verified that the extended feature
for SAE offload exists so we can simply enable offload if these
commands are not supported.
2021-03-22 14:16:31 -05:00
James Prestwood b17f27f04d netdev: add SAE offload support
SAE offload support requires some minor tweaks to CMD_CONNECT
as well as special checks once the connect event comes in. Since
at this point we are fully connected.
2021-03-22 14:15:56 -05:00
James Prestwood edad26b4be handshake: add offload flag
If true, this flag indicates the handshake is being offloaded to
the kernel/hardware.
2021-03-22 14:15:44 -05:00
James Prestwood 997c54f185 wiphy: check SAE offload in wiphy_can_connect
This allows this wiphy_can_connect to pass for an SAE BSS
if the hardware does not support user space SAE, but does
support SAE offload.
2021-03-22 14:14:16 -05:00
James Prestwood 3e3ef284de wiphy: check SAE offload in wiphy_select_akm
This allows an SAE AKM to be selected if the hardware does not
support SAE in userspace, but does support SAE offload.
2021-03-22 14:12:50 -05:00
James Prestwood af3d0d21a0 wiphy: add getter for 'supports_cmds_auth_assoc' 2021-03-22 14:12:32 -05:00
James Prestwood e7c7e7de41 client: add AverageRSSI to list of diagnostic values 2021-03-16 11:26:05 -05:00
James Prestwood 5033b5a24d netdev: parse SIGNAL_AVG when building diagnostics object 2021-03-16 11:25:53 -05:00
James Prestwood fb0a1fba2a diagnostic: include AverageRSSI in GetDiagnostics 2021-03-16 11:25:39 -05:00
James Prestwood f6801be8a3 doc: document new AverageRSSI diagnostics key 2021-03-16 11:25:28 -05:00
James Prestwood 2b5e566c9d station: use network_bss_update
This fixes a dangling pointer in network where station was
freeing the scan_bss but network still had a pointer to it
in its own bss_list.
2021-03-15 14:47:42 -05:00
James Prestwood 4577ee01f2 network: replace l_queue_get_entries loop
After adding network_bss_update, network now has a match_addr
queue function which can be used to replace an unneeded
l_queue_get_entries loop with l_queue_find.
2021-03-15 14:47:30 -05:00
James Prestwood 88d0a6a7c0 network: add network_bss_update
This will swap out a scan_bss object with a duplicate that may
exist in a networks bss_list. The duplicate will be removed by
since the object is owned by station it is assumed that it will
be freed elsewhere.
2021-03-15 14:47:07 -05:00
James Prestwood 97de24e694 station: disable roaming logic for auto-roaming cards
If the hardware roams automatically we want to be sure to not
react to CQM events and attempt to roam/disconnect on our own.

Note: this is only important for very new kernels where CQM
events were recently added to brcmfmac.
2021-03-15 13:32:35 -05:00
James Prestwood 2a46ab3042 wiphy: parse NL80211_ATTR_ROAM_SUPPORT flag
This tells us if the hardware is going to automatically
roam. We need this to know if station roaming logic should
be disabled.
2021-03-15 13:32:08 -05:00
James Prestwood 133347440e netdev: station: support full mac roaming
Roaming on a full mac card is quite different than soft mac
and needs to be specially handled. The process starts with
the CMD_ROAM event, which tells us the driver is already
roamed and associated with a new AP. After this it expects
the 4-way handshake to be initiated. This in itself is quite
simple, the complexity comes with how this is piped into IWD.

After CMD_ROAM fires its assumed that a scan result is
available in the kernel, which is obtained using a newly
added scan API scan_get_firmware_scan. The only special
bit of this is that it does not 'schedule' a scan but simply
calls GET_SCAN. This is treated special and will not be
queued behind any other pending scan requests. This lets us
reuse some parsing code paths in scan and initialize a
scan_bss object which ultimately gets handed to station so
it can update connected_bss/bss_list.

For consistency station must also transition to a roaming state.
Since this roam is all handled by netdev two new events were
added, NETDEV_EVENT_ROAMING and NETDEV_EVENT_ROAMED. Both allow
station to transition between roaming/connected states, and ROAMED
provides station with the new scan_bss to replace connected_bss.
2021-03-15 13:14:39 -05:00
James Prestwood e8c87c8b42 scan: add scan_get_firmware_scan
Adds support for getting firmware scan results from the kernel.
This is intended to be used after the firmware roamed automatically
and the scan result is require for handshake initialization.

The scan 'request' is competely separate from the normal scan
queue, though scan_results, scan_request, and the scan_context
are all used for consistency and code reuse.
2021-03-15 13:14:16 -05:00
Denis Kenzior 0c0d9e5696 iwd: Use test_bit from ell 2021-03-12 13:49:23 -06:00
Denis Kenzior ea3dedffd9 monitor: Use test_bit from ell 2021-03-12 13:46:04 -06:00
Denis Kenzior f51025e143 util: Remove unused util_bit_field 2021-03-11 22:35:13 -06:00
Denis Kenzior 74ec6530cb eap-pwd: Use bit_field from ell 2021-03-11 22:35:03 -06:00
Denis Kenzior 113c1086e2 fils: Use bit_field from ell 2021-03-11 22:34:26 -06:00
Denis Kenzior d60c58f595 ie: Use bit_field from ell 2021-03-11 22:33:21 -06:00
Denis Kenzior 3dae0592b0 eapol: Use bit_field from ell 2021-03-11 22:33:06 -06:00
Denis Kenzior e467566866 monitor: Use bit_field from ell 2021-03-11 22:31:50 -06:00
Denis Kenzior a941d4169f util: Remove unused util_set_bit 2021-03-11 22:24:05 -06:00
Denis Kenzior 666402870e wiphy: Use ell's set_bit 2021-03-11 22:23:52 -06:00
Denis Kenzior 17cf4da726 build: Add useful.h to files that use minsize
Now that minsize has been moved out of ell/util.h to ell/minsize.h
2021-03-11 21:55:57 -06:00
Andrew Zaborowski 926ab2accf p2p: Build P2P and WFD IEs for group's management frames
Register P2P group's vendor IE writers using the new API to build and
attach the necessary P2P IE and WFD IEs to the (Re)Association Response,
Probe Response and Beacon frames sent by the GO.
2021-03-11 21:49:23 -06:00
Andrew Zaborowski a6b7624033 p2p: Parse P2P IEs and WFD IEs in Association Requests
Roughly validate the IEs and save some information for use in our own
IEs. p2p_extract_wfd_properties and p2p_device_validate_conn_wfd are
being moved unchanged to be usable in p2p_group_event without forward
declarations and to be next to p2p_build_wfd_ie.
2021-03-11 21:48:43 -06:00
Andrew Zaborowski f868c2989c ap: Handle most WSC IEs using ap_write_extra_ies
Make the WSC IE processing and writing more self-contained (i.e. so that
it can be more easily moved to a separate file if desired) by using the
new ap_write_extra_ies() mechanism.
2021-03-11 21:47:05 -06:00
Andrew Zaborowski 18a63f91fd ap: Write extra frame IEs from the user
Add an API for the ap.h users to add extra IEs to outgoing management
frames: beacons, etc.
2021-03-11 21:46:49 -06:00
Denis Kenzior f7b5bd4a79 treewide: Use ell's useful.h header 2021-03-11 21:46:09 -06:00
Marcel Holtmann ed05585063 build: Always link in the ell/useful.h header file 2021-03-11 21:52:12 +01:00
Andrew Zaborowski c19fd0ee78 ap: Pass frame IEs from clients to the ap_state user
Pass the string IEs from the incoming STA association frames to
the user in the AP event data.  I drop
ap_event_station_added_data.rsn_ie because that probably wasn't
going to ever be useful and the RSN IE is included in the .assoc_ies
array in any case.
2021-03-10 16:42:03 -06:00
Andrew Zaborowski 71ba94121d ap: Make ap_update_beacon public
Let users call ap_update_beacon when a value has changed which should be
reflected in the beacon IEs.
2021-03-10 16:42:01 -06:00
James Prestwood bc3d285c5e netdev: use NL80211_STA_INFO_SIGNAL rather than average
Since GET_STATION (and in turn GetDiagnostics) gets the most
current station info this attribute serves as a better indication
of the current signal strength. In addition full mac cards don't
appear to always have the average attribute.
2021-03-10 15:10:41 -06:00
James Prestwood f89270325f nl80211util: add WIPHY_FREQ to parse_attrs support 2021-03-10 15:08:19 -06:00