From nobody Sun Jun 26 00:45:21 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F32D3876FED; Sun, 26 Jun 2022 00:45:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LVsb566wCz4r9B; Sun, 26 Jun 2022 00:45:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656204321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kmzdtB9sIpru/V6q6HaXhkunt2ZVkiO9NjlE9QGhFgI=; b=d7SLSnsub9ln5or4mvcj/FKYzeG1jpGuqvVedWDfNAlzLaIVj9nGyHzohxl4eBkk3N0x3I eQjyyvKGiu4VSMVyuFt8ozEHKMgfgBoh0ZRfv1Szv0Kni8kSFrfDuLbhF6Rx0LgFCrl9RD h8KdaO8K5wAxsgMGy9yqZR8/9Ryqg9TxmsTlMFP19X6j28El8M7J/BFiPmgRYCLmvvlhW5 PlakCMv8wxQC4RdEkkEa+SFibu0iUvsqxhMC9lAbQoHaxTdUOZ2bb/m7zzLj87MAabZVXC Wup1aT4nyM2s5QOLY6kY95Efxrb9TMBDN3Br9/B1csfuxPNJmKYyM3cDZ+ieQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3FB0709D; Sun, 26 Jun 2022 00:45:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25Q0jLTA066079; Sun, 26 Jun 2022 00:45:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25Q0jLeQ066078; Sun, 26 Jun 2022 00:45:21 GMT (envelope-from git) Date: Sun, 26 Jun 2022 00:45:21 GMT Message-Id: <202206260045.25Q0jLeQ066078@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 1ecfe31e4272 - stable/13 - wpa: Restore missing patch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1ecfe31e4272aad957eca983b48c783658a5e608 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656204321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kmzdtB9sIpru/V6q6HaXhkunt2ZVkiO9NjlE9QGhFgI=; b=Z9Lbo5XGkzWqfHfdxmIRcX5TGzsMpKbPPNWmB8wfrEzzxaYHdR7Sk1N2jqnIdadC7Jo3PK Z5Md98ApJ4VrG8qOmAfn3R31iQEZXWJyKcAWLlGtRVKh7O4AtOsErRyublOE3CGCeh6MAC ufoUqBu1GKuModlW549HnNZc1qI/zN589raiMdHzAKAjKNjDLK0sSE3CsBlBHNs/g+TODx qU55NzAx4J1JPZkkOZPondJnWEJpGo2n1DEtAoiCSDfTNdPopsR3qs8QLJioYqqCg8KoTg f+jS5tZxtWIoFQ9AOjb/Y/Lrn37cNWKoBmEhrn9PHhipbB6GPXFB2DlrUJkLmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656204321; a=rsa-sha256; cv=none; b=JV4ESi5t27sa7yqNpI/uGy/Nzu+e4DmqJLhImCUuxhoaYi7e46lj4/j6xOxkEEY80aG2b8 +xMK1DxBuxG9TZxM2Hymj2LZ3goY5i97QjyzaRK9uyft9EQmMp5RIBZlUyXAqSLczqwKaz zAxW0W4j+FnEmi3UaoOO+UDg/V4cgU/YNaGa720x9s3Zgbi+CX0NnQsdDtG5j7Rzd9TNU8 pwymGmU3D3N4i1t+EUfnsDTdqmxrPrwsXeUOA7cACrXUAEWH5m4mpGwroWix3AoFgGDkuh 8xHjOcq8CTDr83btJpBzE5f5V4xOsZxp4Mjf3BBMwRjVCr655dpcVAnPeAPJfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=1ecfe31e4272aad957eca983b48c783658a5e608 commit 1ecfe31e4272aad957eca983b48c783658a5e608 Author: Cy Schubert AuthorDate: 2022-06-20 14:21:55 +0000 Commit: Cy Schubert CommitDate: 2022-06-26 00:44:37 +0000 wpa: Restore missing patch In December after a failed MFV due to a now understood issue I had with git -- git aborts with extremely large MFV -- this patch was removed during the revert. Restore this patch. PR: 264238 Fixes: 4b72b91a7132df1f77bbae194e1071ac621f1edb (cherry picked from commit 3b2956781048f300c081952150d515573a274620) --- contrib/wpa/src/drivers/driver_bsd.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c index 16502b945212..c455bc931036 100644 --- a/contrib/wpa/src/drivers/driver_bsd.c +++ b/contrib/wpa/src/drivers/driver_bsd.c @@ -1224,7 +1224,10 @@ wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params) mode = 0 /* STA */; break; case IEEE80211_MODE_IBSS: +#if 0 mode = IFM_IEEE80211_IBSS; +#endif + mode = IFM_IEEE80211_ADHOC; break; case IEEE80211_MODE_AP: mode = IFM_IEEE80211_HOSTAP; @@ -1271,6 +1274,13 @@ wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params) params->wpa_ie[0] == WLAN_EID_RSN ? 2 : 1) < 0) return -1; + /* + * NB: interface must be marked UP for association + * or scanning (ap_scan=2) + */ + if (bsd_get_iface_flags(drv) < 0) + return -1; + os_memset(&mlme, 0, sizeof(mlme)); mlme.im_op = IEEE80211_MLME_ASSOC; if (params->ssid != NULL) @@ -1489,6 +1499,17 @@ static int wpa_driver_bsd_capa(struct bsd_driver_data *drv) if (devcaps.dc_drivercaps & IEEE80211_C_WPA2) drv->capa.key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA2 | WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK; +#ifdef __FreeBSD__ + drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 | + WPA_DRIVER_CAPA_ENC_WEP104 | + WPA_DRIVER_CAPA_ENC_TKIP | + WPA_DRIVER_CAPA_ENC_CCMP; +#else + /* + * XXX + * FreeBSD exports hardware cryptocaps. These have no meaning for wpa + * since net80211 performs software crypto. + */ if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_WEP) drv->capa.enc |= WPA_DRIVER_CAPA_ENC_WEP40 | @@ -1497,6 +1518,7 @@ static int wpa_driver_bsd_capa(struct bsd_driver_data *drv) drv->capa.enc |= WPA_DRIVER_CAPA_ENC_TKIP; if (devcaps.dc_cryptocaps & IEEE80211_CRYPTO_AES_CCM) drv->capa.enc |= WPA_DRIVER_CAPA_ENC_CCMP; +#endif if (devcaps.dc_drivercaps & IEEE80211_C_HOSTAP) drv->capa.flags |= WPA_DRIVER_FLAGS_AP; @@ -1549,6 +1571,8 @@ get80211opmode(struct bsd_driver_data *drv) } if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP) return IEEE80211_M_HOSTAP; + if (ifmr.ifm_current & IFM_IEEE80211_IBSS) + return IEEE80211_M_IBSS; if (ifmr.ifm_current & IFM_IEEE80211_MONITOR) return IEEE80211_M_MONITOR; #ifdef IEEE80211_M_MBSS