[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f909828f-ad8d-a7d6-0e21-7f34ee713da5@broadcom.com>
Date: Tue, 11 Jan 2022 09:50:42 +0100
From: Arend van Spriel <arend.vanspriel@...adcom.com>
To: Hector Martin <marcan@...can.st>,
Kalle Valo <kvalo@...eaurora.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>,
Arend van Spriel <aspriel@...il.com>,
Franky Lin <franky.lin@...adcom.com>,
Hante Meuleman <hante.meuleman@...adcom.com>,
Chi-hsien Lin <chi-hsien.lin@...ineon.com>,
Wright Feng <wright.feng@...ineon.com>,
Dmitry Osipenko <digetx@...il.com>
Cc: Sven Peter <sven@...npeter.dev>,
Alyssa Rosenzweig <alyssa@...enzweig.io>,
Mark Kettenis <kettenis@...nbsd.org>,
Rafał Miłecki <zajec5@...il.com>,
Pieter-Paul Giesberts <pieter-paul.giesberts@...adcom.com>,
Linus Walleij <linus.walleij@...aro.org>,
Hans de Goede <hdegoede@...hat.com>,
"John W. Linville" <linville@...driver.com>,
"brian m. carlson" <sandals@...stytoothpaste.net>,
Andy Shevchenko <andy.shevchenko@...il.com>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-acpi@...r.kernel.org, brcm80211-dev-list.pdl@...adcom.com,
SHA-cyfmac-dev-list@...ineon.com
Subject: Re: [PATCH v2 23/35] brcmfmac: cfg80211: Add support for scan params
v2
On 1/4/2022 8:26 AM, Hector Martin wrote:
> This new API version is required for at least the BCM4387 firmware. Add
> support for it, with a fallback to the v1 API.
Reviewed-by: Arend van Spriel <arend.vanspriel@...adcom.com>
> Acked-by: Linus Walleij <linus.walleij@...aro.org>
> Signed-off-by: Hector Martin <marcan@...can.st>
> ---
> .../broadcom/brcm80211/brcmfmac/cfg80211.c | 113 ++++++++++++++----
> .../broadcom/brcm80211/brcmfmac/feature.c | 1 +
> .../broadcom/brcm80211/brcmfmac/feature.h | 4 +-
> .../broadcom/brcm80211/brcmfmac/fwil_types.h | 49 +++++++-
> 4 files changed, 145 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
> index fb727778312c..71e932a8302c 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
> @@ -769,12 +769,50 @@ void brcmf_set_mpc(struct brcmf_if *ifp, int mpc)
> }
> }
>
> +static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg,
> + struct brcmf_scan_params_v2_le *params_le,
> + struct cfg80211_scan_request *request);
I am not a fan of function prototypes so if it can be avoided by simply
moving the function that would be preferred over this.
> +static void brcmf_scan_params_v2_to_v1(struct brcmf_scan_params_v2_le *params_v2_le,
> + struct brcmf_scan_params_le *params_le)
> +{
[...]
> + if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SCAN_V2)) {
Okay. So it is not really a fallback. Phew!
> + struct brcmf_escan_params_le *params_v1;
> +
> + params_size -= BRCMF_SCAN_PARAMS_V2_FIXED_SIZE;
> + params_size += BRCMF_SCAN_PARAMS_FIXED_SIZE;
> + params_v1 = kzalloc(params_size, GFP_KERNEL);
> + params_v1->version = cpu_to_le32(BRCMF_ESCAN_REQ_VERSION);
> + brcmf_scan_params_v2_to_v1(¶ms->params_v2_le, ¶ms_v1->params_le);
> + kfree(params);
> + params = params_v1;
> + }
> +
> params->action = cpu_to_le16(WL_ESCAN_ACTION_START);
> params->sync_id = cpu_to_le16(0x1234);
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4219 bytes)
Powered by blists - more mailing lists