Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2077295rbb; Tue, 27 Feb 2024 09:53:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX+Xy0nHQEIomSezq3kM0la2OEMTuqRGsttChM1Z/x5uQZ+UIo430B0ZpIoCQZQBCmGGrnl77Mn24lykINDM2G6mPrUNHH+fU0Prb/JfQ== X-Google-Smtp-Source: AGHT+IFgg1UMiB+JZUEoVRO31GwljVrxrs0oLvFcYHlIx5w5ZN47wRuyVvzkZLLGnQrPDq7qK+qc X-Received: by 2002:a05:6402:686:b0:566:414d:d70e with SMTP id f6-20020a056402068600b00566414dd70emr1643851edy.39.1709056425221; Tue, 27 Feb 2024 09:53:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709056425; cv=pass; d=google.com; s=arc-20160816; b=FLamFL2WDpH1h8pF+yGUGZ3LBCU1bRRNGjGyzuBgERUTV6JGNoADtxzRBx7jZiJ8OR IMztW5f38pZEPSagoasd3iNt0CBXNih6TEUdn49YMK7A/eaCnMGJZ6thppvHsQbVC7B/ rPaRF2tvg16YZd9kFWKeCv+ltqXov8Hpk8eNV9+f6/BXHIMs6P0SFduZkHiiVVZpXpOV eBH9ZOSRxyY0D37ln9kjriZKaHdJ3P9760+9o6g/m4SncXkWziXFavbGHMArf8lbzd2M w5+BgCxMdEvCnzh8RydXjPpTkCSnI0KPwqxjwjPndTf0j/U9f9Qs5WJzUcIN0YiHsVS+ ZmCw== 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:dkim-signature; bh=LKeDRUHtoiqOMYcLDtZAVbnU3PdygZ0zlrtrdsKagF8=; fh=2GZY/U2AYZSRm52+t8rjg0AVUvtkiHh4KhGZiS9fuqU=; b=T2RTXQ3qVrc7q1zvweXLe1lSpNL2qe+S/eCMLzLuforn8lxA3GrU2Lu58eRs9WnT/R GYNO8eiPPR+6N/ybwn2ho1+Bzly58oOTAN24TQkOmXYIOAtzSZmWX6CEXZAvYrohSW3o zcuocncLUTqI8HGOUHxUHFVwZB3gsvRdJg2RFT2z35jrmwj134dVPEY5L/Rg8gaSfefq +GuwhQrrSe5R+bCMFpvpHzAkbObkFWELXOXtMLsEy0N0g6Ns3BBzPtHdP/B6BiNN/0CY 2sWvcbbZ8CwyD+tMwAY69O5xtfWUeRfV75orDCKLO9UPRUd9DRb8koMr6k28uqcbT1Ox 2j0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@dolcini.it header.s=default header.b=yzdzyNvt; arc=pass (i=1 spf=pass spfdomain=dolcini.it dkim=pass dkdomain=dolcini.it dmarc=pass fromdomain=dolcini.it); spf=pass (google.com: domain of linux-wireless+bounces-4111-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4111-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dolcini.it Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m15-20020aa7c2cf000000b005640ae1a532si890075edp.359.2024.02.27.09.53.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 09:53:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4111-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@dolcini.it header.s=default header.b=yzdzyNvt; arc=pass (i=1 spf=pass spfdomain=dolcini.it dkim=pass dkdomain=dolcini.it dmarc=pass fromdomain=dolcini.it); spf=pass (google.com: domain of linux-wireless+bounces-4111-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4111-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dolcini.it 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 am.mirrors.kernel.org (Postfix) with ESMTPS id F12461F269A8 for ; Tue, 27 Feb 2024 17:53:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C15814EB45; Tue, 27 Feb 2024 17:53:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b="yzdzyNvt" X-Original-To: linux-wireless@vger.kernel.org Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72A281487E0; Tue, 27 Feb 2024 17:53:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.194.8.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709056412; cv=none; b=tnSKZlU5ZVXDuK42SYD2kmsr3WGYgDwRfrHV2D+yy1pdl8zllWfEBZmUyIVo20/piaEEHkSNRDClpl+06yE9P7X0ADxGZKMUspwT2QaHMNsdHzWmoNXat1CrQ805eFxFbTfARgGyqg6SEBWVycjTr2D/AHCcPndzN7L16rY7XKM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709056412; c=relaxed/simple; bh=c90nDEyQ9o6pvTcW0BOnwG8XDipWFoGcy4Cc229zvz8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GMAsOENv+30lO4g7bYikhl4uptc0+MLh63GUYxqlL9A0E5wkYJbe7jYrRWVr0UlXWtzgiuXuYgJaJdozThMI47W08LEfbDYr4EOh0cEsnUsbGmax15Se6SAoPY7zop1rYrdi6MlYJqvRxuMJElZLdVE+drIkuWHbseaqsvSoNFQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it; spf=pass smtp.mailfrom=dolcini.it; dkim=pass (2048-bit key) header.d=dolcini.it header.i=@dolcini.it header.b=yzdzyNvt; arc=none smtp.client-ip=217.194.8.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=dolcini.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dolcini.it Received: from francesco-nb (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id 5B7D2214FB; Tue, 27 Feb 2024 18:53:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dolcini.it; s=default; t=1709056408; bh=LKeDRUHtoiqOMYcLDtZAVbnU3PdygZ0zlrtrdsKagF8=; h=From:To:Subject; b=yzdzyNvtTXl/zNpCf8cFRsrGrhKsr+qrQJMpET+wKzJxNODHCVvFnWamw2cqROZDT m3dEuR3JvCGetiJpfTmcmG0MOFms/Rvgc9XX4IjCCha5pAGZ8rNd9z8tA7U10Nh+/9 nC662E2VpOtsMRyEWD51yPkEod+AYG7K8+kyI/F173CrIZlqpPMe3bf3AhyJmgM5jH eTorhaYYewY4JY1S6PuvPgWjFaCtv/GroVQiay58E7c5oP4ud/Rs57f7tqDf3/r5UK kV1U9gk2koCaEt0lCVtlqFX5+iK9qE+tSZwxEREOFgZnUCJ6zsrjeOSvhBh3dKUtDh nH3OK+4xKBqpg== Date: Tue, 27 Feb 2024 18:53:26 +0100 From: Francesco Dolcini To: David Lin Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, briannorris@chromium.org, kvalo@kernel.org, francesco@dolcini.it, tsung-hsien.hsieh@nxp.com Subject: Re: [PATCH v8 2/2] wifi: mwifiex: add host mlme for AP mode Message-ID: <20240227175326.GC11034@francesco-nb> References: <20231222032123.1036277-1-yu-hao.lin@nxp.com> <20231222032123.1036277-3-yu-hao.lin@nxp.com> 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: <20231222032123.1036277-3-yu-hao.lin@nxp.com> On Fri, Dec 22, 2023 at 11:21:23AM +0800, David Lin wrote: > Add host based MLME to enable WPA3 functionalities in AP mode. > This feature required a firmware with the corresponding V2 Key API > support. The feature (WPA3) is currently enabled and verified only > on IW416. Also, verified no regression with change when host MLME > is disabled. > > Signed-off-by: David Lin Reviewed-by: Francesco Dolcini with the same disclaimer from patch 1/2, I'm not a wireless driver expert. > --- > > v8: > - first full and complete patch to support host based MLME for AP > mode. > > --- > .../net/wireless/marvell/mwifiex/cfg80211.c | 79 +++++++- > drivers/net/wireless/marvell/mwifiex/cmdevt.c | 2 + > drivers/net/wireless/marvell/mwifiex/fw.h | 21 +++ > drivers/net/wireless/marvell/mwifiex/ioctl.h | 5 + > .../wireless/marvell/mwifiex/sta_cmdresp.c | 2 + > .../net/wireless/marvell/mwifiex/uap_cmd.c | 171 ++++++++++++++++++ > drivers/net/wireless/marvell/mwifiex/util.c | 24 +++ > 7 files changed, 301 insertions(+), 3 deletions(-) > ... > diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c > index e78a201cd150..1e7f4afe9960 100644 > --- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c > +++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c > @@ -760,6 +786,144 @@ static int mwifiex_cmd_uap_sta_deauth(struct mwifiex_private *priv, > return 0; > } > > +/* This function prepares AP specific add station command. > + */ > +static int mwifiex_cmd_uap_add_station(struct mwifiex_private *priv, > + struct host_cmd_ds_command *cmd, > + u16 cmd_action, void *data_buf) > +{ > + struct host_cmd_ds_add_station *new_sta = &cmd->params.sta_info; > + struct mwifiex_sta_info *add_sta = (struct mwifiex_sta_info *)data_buf; > + struct station_parameters *params = add_sta->params; > + struct mwifiex_sta_node *sta_ptr; > + u8 *pos; > + u8 qos_capa; > + u16 header_len = sizeof(struct mwifiex_ie_types_header); > + u16 tlv_len; > + int size; > + struct mwifiex_ie_types_data *tlv; > + struct mwifiex_ie_types_sta_flag *sta_flag; > + int i; > + > + cmd->command = cpu_to_le16(HostCmd_CMD_ADD_NEW_STATION); > + new_sta->action = cpu_to_le16(cmd_action); > + size = sizeof(struct host_cmd_ds_add_station) + S_DS_GEN; > + > + if (cmd_action == HostCmd_ACT_ADD_STA) > + sta_ptr = mwifiex_add_sta_entry(priv, add_sta->peer_mac); > + else > + sta_ptr = mwifiex_get_sta_entry(priv, add_sta->peer_mac); > + > + if (!sta_ptr) > + return -1; > + > + memcpy(new_sta->peer_mac, add_sta->peer_mac, ETH_ALEN); > + > + if (cmd_action == HostCmd_ACT_REMOVE_STA) > + goto done; This goto here, skipping lot of code, just to do cmd->size = cpu_to_le16(size); return 0; is not really nice for my personal taste, but fine like that. Francesco