Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1019011lqb; Sat, 25 May 2024 02:15:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUWrhcMkvi4TKeAxqm5SGJEHn9i/Q8dY1+esoSIHozVQo4gygwG3pID42Hxy/j2Zuvt8JFbtiP33g9GnQ39IchA7zCjmuflxnjM7WNnlg== X-Google-Smtp-Source: AGHT+IFZxaZJ1yazo3k6HqjppVwivHSBhCOv4utmsLqoOCwNazofmlSu/gFcGwh10GERsGI0KYpz X-Received: by 2002:a05:6214:4404:b0:6ab:99f5:d4cf with SMTP id 6a1803df08f44-6abcd14fbf8mr38502746d6.61.1716628529645; Sat, 25 May 2024 02:15:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716628529; cv=pass; d=google.com; s=arc-20160816; b=Yz3VU/NiXZSleY2z57FP5EZJz+UGCHMQ0Tc1+4gcDa6Y8KwLD6fk0tSzU/pDCFCe0P 7J28q69SgObuE/EOvt9WYyyd7smiHUtdp+LgzoyZx8UbHpeNfsid/Vz7a8e3fTxRd3cd DqfnpGxvxeoBTSqRZB8I+bvmSvTZiQ55pieR6U55feb+nnZrrqEW6co1GUphAuYj1b/g CW7r2WjWbLU3v/qRnNlWXqATv3YplxLDkXeRBwv4v8yVyCSFdEpLqNLQWRnVky8tG3DS RDjMycHYudvVHnodEURVH0uRYArFRGMIH50Cnoh6xEs0sOnslM7qdXffbTQ/SMegzTRO ATJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=VgDVa44+6la57T3sfpueQljVNmI7NT70O9vIG9PMJNg=; fh=BwrnE+Fon8r+/PFX1oh9EIJSWrMIys5vWXfuIW2E+Vo=; b=Hxd4G5sZSPXJch5usgWBkXRoSNE6ZPZuKyytJiKINe1DXw8RXjLjjKx1CYMemBmaEY vrrBfZzT+XRODkeJTdvfwMRQOcOMQLKOan+FjTbzY3esOGcKUuTaSZzxwSu+vst1i48I PJPbvjwz6wmIoYQhiDTj4zlxxaE//KjqmIJHmQeTWAlqQMvQtkLIBtfFH8MuY9IzLNVo yz9TkaNa/CTxYe0H2/GWKAP7hJpzxGsyKdGiPQvPs+z+WavVwCYzkeuHvhINeKKVPCTY DnvM2IdzuNXNoyuDo+D+8KNnTNJzARFMCPYSnDT35gc+CvoRg6ffdULyJCOoLz+zs55r X6ZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Wwvbsh3k; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-8059-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8059-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac06f50908si35713886d6.80.2024.05.25.02.15.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 02:15:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8059-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Wwvbsh3k; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-8059-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8059-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 436D41C20AEB for ; Sat, 25 May 2024 09:15:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 781E3171CC; Sat, 25 May 2024 09:15:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Wwvbsh3k" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4D38D11182; Sat, 25 May 2024 09:15:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716628526; cv=none; b=CjbYjMijeA+Srllp6gUyFK42ioXhw9LKDD0MxBV6Td3pfYdk+8f2nYl8m85W1ltkOC08S3pJInD6E8D13c3IPp25NZYsmGev9c2tmxPZwH7X8yklgB5Ymp3vbDCsxd5WaCnCwA5U4W5g9/fjzCKIizxs3joiuYOsNgBxDDiyi5E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716628526; c=relaxed/simple; bh=5O/2NC0ZC7GcRUeBdQJ7keatQdN3MPSj+yKACm9w/bY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=nvsDSXtpGGucQPkebvpdYyvJGxsTpBBcosSu/M2fO605ztLhSsvzx8q9ID04IWU57KHi4lFbjpAfReATEMcD70elI+B5gIG/O0aT0AvWi18/pphzDGZWp6kIUZo/o8DaH47AA9Ol3t3wMexXfXW+h/14cKDIpyiYbUGhccPznR8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Wwvbsh3k; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 862B3C3277B; Sat, 25 May 2024 09:15:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716628525; bh=5O/2NC0ZC7GcRUeBdQJ7keatQdN3MPSj+yKACm9w/bY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Wwvbsh3knDF/5OUwzPLF5qmCgGV8DcWpLnoh5yOkOB/PxO30EL+7YAnlzbjbL9ZHc noWzpExjaTkoMH94gFrccXbHliuBEQ1BdLJyJX9LGktBTeF/SPFcWUSbR1pYodHPbz mp0YsrNHdzgdQuROQSBtHhtIW93uovkNBQhocPepWR1Uh1Ouo9kcYOd7eiQ+fegUvI ulWO/+GLe2VdGm3zXvvBHZXBzimTi84PRgRFUqWzC97fCEto03amo1qRCX8QTrR+QO deb9U82753rQekX13nonWqvnQ3k9iQPS6dHlgWAl5nZnNIJPYr+86maWnX2/7tZAmW 6kXPSXVrWdkQA== From: Kalle Valo To: Sascha Hauer 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 References: <20240523081428.2852276-1-s.hauer@pengutronix.de> Date: Sat, 25 May 2024 12:15:22 +0300 In-Reply-To: <20240523081428.2852276-1-s.hauer@pengutronix.de> (Sascha Hauer's message of "Thu, 23 May 2024 10:14:28 +0200") Message-ID: <878qzyntg5.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain 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. > --- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c > +++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c > @@ -9,6 +9,112 @@ > #include "11ac.h" > #include "11n.h" > > +struct wpa_suite_ucast { > + /* count */ > + u16 count; > + /** wpa_suite list */ > + __be32 suite[1]; > +} __packed; The comments here are not adding any extra information, please remove. In general having a some kind of prefix in the struct name would be nice. I don't know what mwifiex uses (if any) but, for example, in ath12k we use 'ath12k_'. > +struct IEEEtypes_Rsn_t { Lower case, no '_t' and also improve the naming. > + /** Rsn : version */ > + u16 version; > + /** Rsn : group cipher */ > + __be32 group_cipher; > + /** Rsn : pairwise cipher */ > + struct wpa_suite_ucast pairwise_cipher; > +} __packed; Useless comments. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches