Search Linux Wireless

Re: [BUG?] b43: can't connect to WPA3 network (nohwcrypt=1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/21/20 11:17 AM, Rui Salvaterra wrote:
Hi, guys,

On Thu, 21 May 2020 at 15:52, Rui Salvaterra <rsalvaterra@xxxxxxxxx> wrote:

It's not exactly a modern Wi-Fi card either, and being 802.11g might
actually help limiting the CPU overhead.

Yeah, as I expected, it's neither great nor terrible. I fired up iperf
to do some quick and dirty testing: with WPA2 (hardware crypto) I get
around 13 % CPU, with WPA3 (software crypto), around 34 %. The
throughput is pretty much the same.

I did only a rough test, but turning off hardware encryption increased the b43 interrupt routine from a maximum of 10% of a cpu to about 20%. Even on a fast cpu, it seems that hw encryption should be used if possible.

I have one additional test for you. With the attached patch, do you get the message that software crypto is required? It should appear only once.


Larry

diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
index 39da1a4c30ac..c5322f52040c 100644
--- a/drivers/net/wireless/broadcom/b43/main.c
+++ b/drivers/net/wireless/broadcom/b43/main.c
@@ -4161,6 +4161,7 @@ static int b43_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 	u8 index;
 	int err;
 	static const u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+	static int encrypt_warn;
 
 	if (modparam_nohwcrypt)
 		return -ENOSPC; /* User disabled HW-crypto */
@@ -4189,6 +4190,10 @@ static int b43_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 	if (dev->fw.pcm_request_failed || !dev->hwcrypto_enabled) {
 		/* We don't have firmware for the crypto engine.
 		 * Must use software-crypto. */
+		if (encrypt_warn++) {
+			b43info(wl, "***** A cipher used by this connection requires using software encryption\n");
+			b43info(wl, "***** Reload b43 with modules option 'nohwcrypt=1'\n");
+		}
 		err = -EOPNOTSUPP;
 		goto out_unlock;
 	}
@@ -5569,7 +5574,9 @@ static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)
 	/* fill hw info */
 	ieee80211_hw_set(hw, RX_INCLUDES_FCS);
 	ieee80211_hw_set(hw, SIGNAL_DBM);
-
+	/* if hardware encryption is disabled, enable MFP (and WPA3) */
+	if (modparam_nohwcrypt)
+		ieee80211_hw_set(hw, MFP_CAPABLE);
 	hw->wiphy->interface_modes =
 		BIT(NL80211_IFTYPE_AP) |
 		BIT(NL80211_IFTYPE_MESH_POINT) |

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux