From nobody Mon Jun 20 14:29:12 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 B354F862C01; Mon, 20 Jun 2022 14:29:12 +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 4LRX8S4dTQz4c0P; Mon, 20 Jun 2022 14:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655735352; 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=N+UPIBmjPtm7vBs6w4K9vwKo2T+pLqDcP7r3vcsPJO4=; b=dHyGS+4uutfF0JNCgrJrK0FgCyvefAzVHEkaB7c+wr1/4lue7mRqqT2g1le1P243nSTtxi 2Z76Pf9hU/gFfYZ/QtbI+2+s6jT57pEY90X7zknJV3AaK4Qs09GwyaM7NbdIpYNd9YKdlL Xzfp4wnh4V9RQ4xdjI+jl0+M6i0QTJXeDQrQEWxEAhX/pnLfeSJ10sDOCFFUPAvnjmy+Jm EdGxSS0EMqz6nigf3az5W8JxIbcQGzbduacIDfhg0llJro4wqHlWbqTOUHxRQZ51IIdXb7 l+TE2/lWWbIk7Sm4rQFyTga8/xDlFy1LOd/LWzncnXZGya37Zdq5hIxezsHDog== 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 7B4B21EE23; Mon, 20 Jun 2022 14:29:12 +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 25KETCqh036277; Mon, 20 Jun 2022 14:29:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25KETC3m036276; Mon, 20 Jun 2022 14:29:12 GMT (envelope-from git) Date: Mon, 20 Jun 2022 14:29:12 GMT Message-Id: <202206201429.25KETC3m036276@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 3b2956781048 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 3b2956781048f300c081952150d515573a274620 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655735352; 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=N+UPIBmjPtm7vBs6w4K9vwKo2T+pLqDcP7r3vcsPJO4=; b=hS//e+cR1YKwfVGWIdqZg+NYkZk1YV7C+/iRC+X/4e2As3HaetZfYsp+sctgFg2I3Tb8Zf 5CCxTtIe/6JKIfvcuMwjMMyB/K9GI3QkXnTOEIF8/pvFjeu7pcq1M9s+Y/YPJH8ve9hs80 tHYFJJbz0BJ2n+98NlHj9nQkUMSEm3aPmFUrkbxdWlAC4Hj+jzyCmpV4gWO7aQmEmB4CBK 7/XofqnMs+F58QMJ3Q8/6RlxfZxE2CeIH7Uh3KuVh0Soln+utLH3G2JjXqeMElVojit2Kd B/mmKPI0nNXeOQ18xplVjaRqK9Ys5QKIWRo+VuCvnZxYbQldxolD4er9cBZCWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655735352; a=rsa-sha256; cv=none; b=UqMFlM38qHlLeddVUE7CMzqyMYyb5qAwv6487x2V3CkR2UBAZyMlkV9hvIYS3C14Uslg49 8mqJJlngtimuUCnjVlgBWGPkB0i0tsHujD+cevqx8MJ8CW0WjjPhPBYM1Dhs3CsmQAQw4S ZIuA3qOjOMQVhVrMTEkoeG30wG3DMSwhveJ6trKC3Fg7bDIMUMeWg/AyfYoxo7taGoqRMR QrFlwY/vWCwUCom7ibN2glIJX2NdAGWL0EWRRwG6zOcEIwMCAXRkpRL7NnS6ylTyUEAVs0 Bq3QcKyyXKuSwdSZmnf+cp/diYgO8McBJPjxP7/3Da9o1XPL+bB/qGkD3CtY+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=3b2956781048f300c081952150d515573a274620 commit 3b2956781048f300c081952150d515573a274620 Author: Cy Schubert AuthorDate: 2022-06-20 14:21:55 +0000 Commit: Cy Schubert CommitDate: 2022-06-20 14:25:35 +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 MFC after: 1 week --- 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