eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit c146490567830c01fde0f82d847c51adb3259448
parent 3d549e457dc4ca8a6aeb79d2c6ac84a4a40be30c
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Thu, 15 Nov 2018 11:29:13 -0600

network: Introduce __bss_is_sae

This takes an rsn_info pointer directly so that some calls to
scan_bss_get_rsn_info can be optimized

Diffstat:
Msrc/network.c | 16+++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/network.c b/src/network.c @@ -488,17 +488,23 @@ void network_sync_psk(struct network *network) network->settings); } -static bool bss_is_sae(struct scan_bss *bss) +static inline bool __bss_is_sae(const struct scan_bss *bss, + const struct ie_rsn_info *rsn) +{ + if (rsn->akm_suites & IE_RSN_AKM_SUITE_SAE_SHA256) + return true; + + return false; +} + +static bool bss_is_sae(const struct scan_bss *bss) { struct ie_rsn_info rsn; memset(&rsn, 0, sizeof(rsn)); scan_bss_get_rsn_info(bss, &rsn); - if (rsn.akm_suites & IE_RSN_AKM_SUITE_SAE_SHA256) - return true; - - return false; + return __bss_is_sae(bss, &rsn); } int network_autoconnect(struct network *network, struct scan_bss *bss)