From: Wright Feng <Wright.Feng@cypress.com>
To: Arend Van Spriel <arend.vanspriel@broadcom.com>,
Kalle Valo <kvalo@codeaurora.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"brcm80211-dev-list@broadcom.com"
<brcm80211-dev-list@broadcom.com>,
brcm80211-dev-list <brcm80211-dev-list@cypress.com>,
Franky Lin <franky.lin@broadcom.com>,
Hante Meuleman <hante.meuleman@broadcom.com>,
Chi-Hsien Lin <Chi-Hsien.Lin@cypress.com>
Subject: Re: [PATCH 1/4] brcmfmac: add change_bss to support AP isolation
Date: Tue, 8 Sep 2020 02:13:20 +0000 [thread overview]
Message-ID: <6cc3759f-9dc5-f505-4878-33700e41fb73@cypress.com> (raw)
In-Reply-To: <1746948ecc8.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com>
Arend Van Spriel 於 9/7/2020 11:57 PM 寫道:
> On September 7, 2020 5:29:14 PM Kalle Valo <kvalo@codeaurora.org> wrote:
>
>> Wright Feng <Wright.Feng@cypress.com> writes:
>>
>>>>>>> +brcmf_cfg80211_change_bss(struct wiphy *wiphy, struct net_device
>>>>>>> *dev,
>>>>>>> + struct bss_parameters *params)
>>>>>>> +{
>>>>>>> + struct brcmf_if *ifp;
>>>>>>> + int ret = 0;
>>>>>>> + u32 ap_isolate;
>>>>>>> +
>>>>>>> + brcmf_dbg(TRACE, "Enter\n");
>>>>>>> + ifp = netdev_priv(dev);
>>>>>>> + if (params->ap_isolate >= 0) {
>>>>>>> + ap_isolate = (u32)params->ap_isolate;
>>>>>>> + ret = brcmf_fil_iovar_int_set(ifp, "ap_isolate", ap_isolate);
>>>>>>
>>>>>> Is the cast to u32 really necessary? Please avoid casts as much as
>>>>>> possible.
>>>>>
>>>>> It seems to me. struct bss_parameters::ap_isolate is typed as int. It
>>>>> is passed to brcmf_fil_iovar_int_set() which requires a u32 (maybe
>>>>> function name is causing the confusion).
>>>>
>>>> What extra value does this explicit type casting bring here? I don't
>>>> see
>>>> it. Implicit type casting would work the same, no?
>>>
>>> The value will be -1, 0 or 1.
>>> I will submit v2 patch that ignores doing iovar if getting
>>> params->ap_isolate -1 and removes explicit type casting. Thanks for the
>>> comment.
>>
>> Oh, I didn't realise ap_isolate can be -1 as struct bss_parameters
>> didn't document that. Can someone submit a patch to fix that?
>>
>> * @ap_isolate: do not forward packets between connected stations
>
> Me too. I assumed it was a boolean reading that description.
>
> Regards,
> Arend
>
The ap_isolate -1 value in nl80211_set_bss means not to changed.I intend
to add a check of "params->ap_isolate >= 0" like
ath/wil6210/cfg80211.c does in brcmf_cfg80211_change_bss.
And I will submit another patch to revise the comment in cfg80211.h as
below. Let me know
if you concern about it.
---
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index fc7e8807838d..f60281c866dc 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1764,6 +1764,7 @@ struct mpath_info {
* (or NULL for no change)
* @basic_rates_len: number of basic rates
* @ap_isolate: do not forward packets between connected stations
+ * (0 = no, 1 = yes, -1 = do not change)
* @ht_opmode: HT Operation mode
* (u16 = opmode, -1 = do not change)
* @p2p_ctwindow: P2P CT Window (-1 = no change)
---
Regards,
Wright
next prev parent reply other threads:[~2020-09-08 2:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 6:32 [PATCH 0/4] brcmfmac: Add few features in AP mode Wright Feng
2020-09-01 6:32 ` [PATCH 1/4] brcmfmac: add change_bss to support AP isolation Wright Feng
2020-09-07 9:04 ` Kalle Valo
2020-09-07 9:21 ` Arend Van Spriel
2020-09-07 9:49 ` Kalle Valo
2020-09-07 10:09 ` Wright Feng
2020-09-07 15:29 ` Kalle Valo
[not found] ` <01010174692f7c3f-4b7369b2-0665-4324-b1c8-57bd22ac9ce7-000000@us-west-2.amazonses.com>
2020-09-07 15:57 ` Arend Van Spriel
2020-09-08 2:13 ` Wright Feng [this message]
2020-09-08 4:29 ` Kalle Valo
2020-09-01 6:32 ` [PATCH 2/4] brcmfmac: don't allow arp/nd offload to be enabled if ap mode exists Wright Feng
2020-09-01 6:32 ` [PATCH 3/4] brcmfmac: support the forwarding packet Wright Feng
2020-09-01 9:39 ` Arend Van Spriel
2020-09-03 3:30 ` kernel test robot
2020-09-03 3:30 ` [RFC PATCH] brcmfmac: brcmf_add_sta can be static kernel test robot
2020-09-01 6:32 ` [PATCH 4/4] brcmfmac: add a variable for packet forwarding condition Wright Feng
2020-09-07 9:21 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6cc3759f-9dc5-f505-4878-33700e41fb73@cypress.com \
--to=wright.feng@cypress.com \
--cc=Chi-Hsien.Lin@cypress.com \
--cc=arend.vanspriel@broadcom.com \
--cc=brcm80211-dev-list@broadcom.com \
--cc=brcm80211-dev-list@cypress.com \
--cc=franky.lin@broadcom.com \
--cc=hante.meuleman@broadcom.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).