From nobody Mon Jun 20 15:12:51 2022 X-Original-To: dev-commits-ports-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 DDA7F86833D; Mon, 20 Jun 2022 15:12:52 +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 4LRY6r0RVCz4hC2; Mon, 20 Jun 2022 15:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655737972; 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=6bOk0L3+Ng7c7+uUwHqPWzfwC3nE7k6ImZavTGmFa+0=; b=XFHNoK0++OnDjIEqejDplLAqogPe/UCjZUyPhZIkhv9sxKWOaVDy61RzliYfipPXWzJADT Rg52R9aru1M7spndUHXonUx9xIZvYUgdv0x4BzWRFm+VL7o5qHRzDOLBvDiSNgOVvNZ9ya QBVVRoKVuThHs9GZPIu2boPhtVVMfXmobyOm4F1+A+dFmI8ZU8hNaVCFiNrGCZdw+urQFs bx6f0eqF6KFLdfEvpqNKiE2lEb33tYeiCMyU3mQOa7JgC1hkg7afXHF4hv/2arHF6ScubA VIRnl4c1P7Nd8DvlWyR4XWuk7QaSwcZ1Jkt44x5zCVrYaKqNfYNx2gi3+2t4Ng== 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 8D4511F9A5; Mon, 20 Jun 2022 15:12:51 +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 25KFCp78003951; Mon, 20 Jun 2022 15:12:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25KFCp3R003950; Mon, 20 Jun 2022 15:12:51 GMT (envelope-from git) Date: Mon, 20 Jun 2022 15:12:51 GMT Message-Id: <202206201512.25KFCp3R003950@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Cy Schubert Subject: git: 52efc7630680 - 2022Q2 - */*: Restore a missing wpa BSD driver patch List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-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: ports X-Git-Refname: refs/heads/2022Q2 X-Git-Reftype: branch X-Git-Commit: 52efc7630680ad1445bf062b25d1f868e26e4d0d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655737972; 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=6bOk0L3+Ng7c7+uUwHqPWzfwC3nE7k6ImZavTGmFa+0=; b=qUsgk/GKHpo3vrJX/Y8FWfEQCsyg0MOT7E0kK67Tdl0d0XwMjHTN68mwj+PIVQCrFSbXAz dZEIOjUoIMUIX16+Rkj35OGIhVJ50ZaRLlWREJgRlFu1OWbLfMohXEbBFvF8o1Zoqrft/t 7N/kjo6Q5ytCiCV0bb5Yr8OMrPW2MKpq0HK3fGpdNdtaGpCHFvREddJpN0uKsfKmBqhAe9 j2Hd2zVyLcGtP3J990SQEXAVXTWBpEIQFlWdFFNcwNx/hpneMEznE7OMDXE1YGR7Et87Xe XIf/c7x1WucpZaVR8TAlTQ+95F9Mu2iQ0fR2nG4Lt6MsvDUGz0q6i4pZlfizPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655737972; a=rsa-sha256; cv=none; b=Zym416jaq0+RAy9gS0qiC8zhMbom8wk76vRkJiHm2AHNljhFe+CukIWmmYPjzoFvR97WBG VwPOAxLJ8/1x1OZgS1H8pz5DxjsJDDNYkXecm6qWs8GqfjFz+cyZehzeQkUF1Mbk6Ypsqb WBp9MhAgxp0dh/Hkd+qpxBJGF8LIbxY2MqndG92OG/eZccAPEfs+omx+RCGcJHWgx82Fz8 3kLyoeYN/zgLNJ2vePO1UebMYZ/3eQmB/ypf3qKIUbKWbGZbBnM9584nyE/MAjkq74YjcM f75Qmp1UKPkNbSpajxKyMtzBWuSyiH+Mxy7/fhOzXUqt3pqdsqKiQcq+8ccfGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch 2022Q2 has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=52efc7630680ad1445bf062b25d1f868e26e4d0d commit 52efc7630680ad1445bf062b25d1f868e26e4d0d Author: Cy Schubert AuthorDate: 2022-06-20 14:25:42 +0000 Commit: Cy Schubert CommitDate: 2022-06-20 15:12:01 +0000 */*: Restore a missing wpa BSD driver patch These patches were removed to sync with base where in fact base was missing these patches and base should have been synced with the ports. PR: 264238 Fixes: b8477825c2dc42f6c595697a36f593c71f39fbad c86f32d652eb9dd023049122d8ca37cb13ed07b6 MFH: 2022Q2 (cherry picked from commit 05a849eec9d949b3de32e464570cefbabcd64702) --- net/hostapd-devel/Makefile | 2 +- .../files/patch-src_drivers_driver__bsd.c | 65 +++++++++++++++++++++- net/hostapd/Makefile | 2 +- net/hostapd/files/patch-src_drivers_driver__bsd.c | 65 +++++++++++++++++++++- security/wpa_supplicant-devel/Makefile | 2 +- .../files/patch-src_drivers_driver__bsd.c | 65 +++++++++++++++++++++- security/wpa_supplicant/Makefile | 2 +- .../files/patch-src_drivers_driver__bsd.c | 65 +++++++++++++++++++++- 8 files changed, 256 insertions(+), 12 deletions(-) diff --git a/net/hostapd-devel/Makefile b/net/hostapd-devel/Makefile index e3e48c5dc457..907873af49a0 100644 --- a/net/hostapd-devel/Makefile +++ b/net/hostapd-devel/Makefile @@ -2,7 +2,7 @@ PORTNAME= hostapd PORTVERSION= ${COMMIT_DATE} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= net PKGNAMESUFFIX= -devel diff --git a/net/hostapd-devel/files/patch-src_drivers_driver__bsd.c b/net/hostapd-devel/files/patch-src_drivers_driver__bsd.c index f56c30c30ad3..dda055f26664 100644 --- a/net/hostapd-devel/files/patch-src_drivers_driver__bsd.c +++ b/net/hostapd-devel/files/patch-src_drivers_driver__bsd.c @@ -1,5 +1,5 @@ ---- src/drivers/driver_bsd.c.orig 2021-06-02 14:11:18.000000000 -0700 -+++ src/drivers/driver_bsd.c 2021-06-13 23:11:15.089256000 -0700 +--- src/drivers/driver_bsd.c.orig 2022-05-24 13:30:39.000000000 -0700 ++++ src/drivers/driver_bsd.c 2022-06-20 07:18:14.191871000 -0700 @@ -853,14 +853,18 @@ drv = bsd_get_drvindex(global, ifm->ifm_index); if (drv == NULL) @@ -21,3 +21,64 @@ + (drv->flags & IFF_RUNNING) == 0)) { wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' UP", drv->ifname); + wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_ENABLED, +@@ -1220,7 +1224,10 @@ + 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; +@@ -1267,6 +1274,13 @@ + 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) +@@ -1485,6 +1499,17 @@ + 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 | +@@ -1493,6 +1518,7 @@ + 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; +@@ -1545,6 +1571,8 @@ + } + 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 diff --git a/net/hostapd/Makefile b/net/hostapd/Makefile index 5cd5d4fea22f..114041a960bb 100644 --- a/net/hostapd/Makefile +++ b/net/hostapd/Makefile @@ -2,7 +2,7 @@ PORTNAME= hostapd PORTVERSION= 2.10 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net MASTER_SITES= https://w1.fi/releases/ diff --git a/net/hostapd/files/patch-src_drivers_driver__bsd.c b/net/hostapd/files/patch-src_drivers_driver__bsd.c index f56c30c30ad3..2c49538712af 100644 --- a/net/hostapd/files/patch-src_drivers_driver__bsd.c +++ b/net/hostapd/files/patch-src_drivers_driver__bsd.c @@ -1,5 +1,5 @@ ---- src/drivers/driver_bsd.c.orig 2021-06-02 14:11:18.000000000 -0700 -+++ src/drivers/driver_bsd.c 2021-06-13 23:11:15.089256000 -0700 +--- src/drivers/driver_bsd.c.orig 2022-01-16 12:51:29.000000000 -0800 ++++ src/drivers/driver_bsd.c 2022-06-20 07:14:50.617305000 -0700 @@ -853,14 +853,18 @@ drv = bsd_get_drvindex(global, ifm->ifm_index); if (drv == NULL) @@ -21,3 +21,64 @@ + (drv->flags & IFF_RUNNING) == 0)) { wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' UP", drv->ifname); + wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_ENABLED, +@@ -1220,7 +1224,10 @@ + 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; +@@ -1267,6 +1274,13 @@ + 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) +@@ -1485,6 +1499,17 @@ + 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 | +@@ -1493,6 +1518,7 @@ + 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; +@@ -1545,6 +1571,8 @@ + } + 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 diff --git a/security/wpa_supplicant-devel/Makefile b/security/wpa_supplicant-devel/Makefile index 6d83310e50da..d972b2c5c512 100644 --- a/security/wpa_supplicant-devel/Makefile +++ b/security/wpa_supplicant-devel/Makefile @@ -1,6 +1,6 @@ PORTNAME= wpa_supplicant PORTVERSION= ${COMMIT_DATE} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= security net PKGNAMESUFFIX= -devel diff --git a/security/wpa_supplicant-devel/files/patch-src_drivers_driver__bsd.c b/security/wpa_supplicant-devel/files/patch-src_drivers_driver__bsd.c index decf9a3aebdc..6a400fd174c2 100644 --- a/security/wpa_supplicant-devel/files/patch-src_drivers_driver__bsd.c +++ b/security/wpa_supplicant-devel/files/patch-src_drivers_driver__bsd.c @@ -1,5 +1,5 @@ ---- src/drivers/driver_bsd.c.orig 2021-06-02 14:11:18.000000000 -0700 -+++ src/drivers/driver_bsd.c 2021-06-13 23:08:54.275496000 -0700 +--- src/drivers/driver_bsd.c.orig 2022-05-24 13:30:39.000000000 -0700 ++++ src/drivers/driver_bsd.c 2022-06-20 07:13:36.571991000 -0700 @@ -853,14 +853,18 @@ drv = bsd_get_drvindex(global, ifm->ifm_index); if (drv == NULL) @@ -21,3 +21,64 @@ + (drv->flags & IFF_RUNNING) == 0)) { wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' UP", drv->ifname); + wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_ENABLED, +@@ -1220,7 +1224,10 @@ + 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; +@@ -1267,6 +1274,13 @@ + 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) +@@ -1485,6 +1499,17 @@ + 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 | +@@ -1493,6 +1518,7 @@ + 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; +@@ -1545,6 +1571,8 @@ + } + 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 diff --git a/security/wpa_supplicant/Makefile b/security/wpa_supplicant/Makefile index 0248141d32b2..1b3e5889d2c6 100644 --- a/security/wpa_supplicant/Makefile +++ b/security/wpa_supplicant/Makefile @@ -1,6 +1,6 @@ PORTNAME= wpa_supplicant PORTVERSION= 2.10 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= security net MASTER_SITES= https://w1.fi/releases/ diff --git a/security/wpa_supplicant/files/patch-src_drivers_driver__bsd.c b/security/wpa_supplicant/files/patch-src_drivers_driver__bsd.c index decf9a3aebdc..440233164126 100644 --- a/security/wpa_supplicant/files/patch-src_drivers_driver__bsd.c +++ b/security/wpa_supplicant/files/patch-src_drivers_driver__bsd.c @@ -1,5 +1,5 @@ ---- src/drivers/driver_bsd.c.orig 2021-06-02 14:11:18.000000000 -0700 -+++ src/drivers/driver_bsd.c 2021-06-13 23:08:54.275496000 -0700 +--- src/drivers/driver_bsd.c.orig 2022-01-16 12:51:29.000000000 -0800 ++++ src/drivers/driver_bsd.c 2022-06-20 07:11:44.629814000 -0700 @@ -853,14 +853,18 @@ drv = bsd_get_drvindex(global, ifm->ifm_index); if (drv == NULL) @@ -21,3 +21,64 @@ + (drv->flags & IFF_RUNNING) == 0)) { wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' UP", drv->ifname); + wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_ENABLED, +@@ -1220,7 +1224,10 @@ + 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; +@@ -1267,6 +1274,13 @@ + 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) +@@ -1485,6 +1499,17 @@ + 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 | +@@ -1493,6 +1518,7 @@ + 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; +@@ -1545,6 +1571,8 @@ + } + 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