Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1242852lqb; Thu, 30 May 2024 05:02:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV22YSULv6jax9E3jNm9O+mKMAidMHPnfB6fXlJz/0QDEYi1ZjfEysOyC3Iimfeh9RCireLTKprzd0WYStTEE2X06BGMPDu3zqKInA0VA== X-Google-Smtp-Source: AGHT+IHcM+Dw+XRKNmFtio+4W2KIxGIvIdRoYX8At1Wc2yB9XmImxs111V8wfG6jzosNkgY932sB X-Received: by 2002:a25:ad13:0:b0:dee:7c5c:e353 with SMTP id 3f1490d57ef6-dfa5a69344fmr2031378276.40.1717070520277; Thu, 30 May 2024 05:02:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717070520; cv=pass; d=google.com; s=arc-20160816; b=aF55M/MkmTTcp7Yrb8XrjFrCJjpGcGwwsw4DIwOETYVNJQrE8hSWZSe38et0zsbT37 hfFwpEFbA7fa9xfbRhHBNEW6lauxzpf1v/JTRUL2IHcDZrQ8r6PObF0S2qP+Q4iwF0Dw bJmVfTrmJm7iiedefLgIsW6yYfrYRu/cKNcGbyX4KT8tNh81MKGSUIXKoc4X4qP6BlyG uELqNftBoRxHyYB8qG6CDeI4I7q7PLZw7G/uekn3NhIJprMKPV0j53h3SvZ8Koplv0eu S9hMC9YQowe1e9FD9IY7ssrBqvMOZIcyjR4NaqdYYJdqcE4Hf2CB4BBpMMJ0qbgdUMnz QUHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=j9y8pvUCZzxr6iKORpxH2eSYitlIug4M3RUMAOV4Nz0=; fh=KxJoiqMuyOFCYstnPJsuszFPGHi2dO62PlGL0vpdDxE=; b=id/aJbyVmJcRu9O6Fm2/SC7Cr6LMHg1aaA1OzW2lQuUSW0NrQjpioLQmOGEYtw4peM ZGMnc4OAGX7haqsxrsjEBTJmdkD9YpjpZkDi1X6spQf0TuSgwI6e/llkHuytyMXP6gzl nPLMlUvkrFM6wl4Rk0AZHTcn6A6OO/cOCWXnuCOGHD/yRLRlJSMI9SRLhdP6QSSp7PhB VvujUuO4Ac6+0SiVbovq49lFtv6uzZMqeIybQHXhfBLyhVecUXVrvRtoBWtfri6715OJ tjPuSUtqe6wVkT76v/c8O/6hJwIl5oIi/1gKwIxt4gHZ20ewE5/FxbGv3P0twtyDv+RW BeVQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-wireless+bounces-8311-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8311-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 3f1490d57ef6-df774754e89si7189149276.436.2024.05.30.05.02.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 05:02:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8311-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-wireless+bounces-8311-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8311-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E3BD21C20B74 for ; Thu, 30 May 2024 12:01:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4EAE517D371; Thu, 30 May 2024 12:01:28 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4FC317C7B8 for ; Thu, 30 May 2024 12:01:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717070488; cv=none; b=QZ3JHBnMpPAIHw7xG6N1sDJyaJe04Qi/PDlxEmCsCwPQTqaW0t15ZfwY+lWL5hKURVDwOsXgNv/o+LBfb940Id948CRmT1kHfiLWYyv4QJQrjlIdZjCSpJRBFovcDWZolp5klna19HATbOQOBG8Co8MdRkn1PDZakz94PK5nnnk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717070488; c=relaxed/simple; bh=6agvjoYknHYxKRL+NaQ2AzP9Mpqe70cIuvhtkCdwR8w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=m/q5f9dOyU3nx7fFWes54VC6PrsyLXinnxw726JAg0amca1+IjHGg7GQ8OF/jut6Qjl55OUryIm10C2CCxjp54cp2N3TWVpGwv2jxmbqrnHHnqdnWtnmJ9syQJvrS9XcguxUrIok/eyzKbt5E6VlcY2Xck2062QhA9fi8VgHDcU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sCeTC-0001jR-Ok; Thu, 30 May 2024 14:01:22 +0200 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sCeTB-003adJ-PO; Thu, 30 May 2024 14:01:21 +0200 Received: from sha by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1sCeTB-0005pq-2F; Thu, 30 May 2024 14:01:21 +0200 Date: Thu, 30 May 2024 14:01:21 +0200 From: Sascha Hauer To: Kalle Valo Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Norris , Francesco Dolcini , David Lin Subject: Re: [PATCH] wifi: mwifiex: fix parsing of more than two AKM suites Message-ID: References: <20240523081428.2852276-1-s.hauer@pengutronix.de> <878qzyntg5.fsf@kernel.org> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878qzyntg5.fsf@kernel.org> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-wireless@vger.kernel.org On Sat, May 25, 2024 at 12:15:22PM +0300, Kalle Valo wrote: > Sascha Hauer writes: > > > params->crypto.n_akm_suites seems to be limited to two AKM suites. Once > > there are more they will be passed as extra elements of type WLAN_EID_RSN > > or WLAN_EID_VENDOR_SPECIFIC. > > > > This takes some snippets from the downstream vendor driver to parse > > these elements and to set the correct protocol and key_mgmt bits to > > enable the desired key managements algorithms in the hardware. > > > > This patch is not a request for inclusion, more a heads up that there's > > something missing and the question if the approach taken is the right > > one or if there are other preferred ways to fix this issue. > > Please mark patches like this as "[PATCH RFC]", that way we maintainers > know to drop them automatically. Yes, will do. I should have known that. The question I had with this patch is more like whether the approach is fine. I wonder why I have to parse the WLAN_EID_RSN element in driver specific code and why I do not find similar code in other drivers which should suffer from the same problem. Looking deeper at it the Kernel by default only supports two AKM suites. wiphy->max_num_akm_suites is initialized to NL80211_MAX_NR_AKM_SUITES (which is 2). Whenever wpa_supplicant/hostapd specify more AKM suites the suites exceeding 2 are encoded in the WLAN_EID_RSN element and I would expect other drivers to handle this as well. I realized that the Kernel can handle up to 10 AKM suites by setting wiphy->max_num_akm_suites to CFG80211_MAX_NUM_AKM_SUITES and that seems to do the trick as well, at least when I patch wpa_supplicant to actually use this increased number. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |