linux-wpan.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <aahringo@redhat.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Alexander Aring <alex.aring@gmail.com>,
	Stefan Schmidt <stefan@datenfreihafen.org>,
	linux-wpan - ML <linux-wpan@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	Network Development <netdev@vger.kernel.org>,
	David Girault <david.girault@qorvo.com>,
	Romuald Despres <romuald.despres@qorvo.com>,
	Frederic Blain <frederic.blain@qorvo.com>,
	Nicolas Schodet <nico@ni.fr.eu.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH wpan-next v2 02/11] net: mac802154: Drop IEEE802154_HW_RX_DROP_BAD_CKSUM
Date: Sun, 4 Sep 2022 21:34:32 -0400	[thread overview]
Message-ID: <CAK-6q+gYTPOiGO5kmqdPUOySwtrL_vaWLav7ehbOWihvKhYevA@mail.gmail.com> (raw)
In-Reply-To: <20220826144049.256134-3-miquel.raynal@bootlin.com>

Hi,

On Fri, Aug 26, 2022 at 10:41 AM Miquel Raynal
<miquel.raynal@bootlin.com> wrote:
>
> This IEEE802154_HW_RX_DROP_BAD_CKSUM flag was only used by hwsim to
> reflect the fact that it would not validate the checksum (FCS). In other
> words, the filtering level of hwsim is always "NONE" while the core
> expects it to be higher.
>
> Now that we have access to real filtering levels, we can actually use
> them and always enforce the "NONE" level in hwsim. Handling this case
> correctly in the receive path permits to drop the above mentioned flag.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  drivers/net/ieee802154/mac802154_hwsim.c | 10 +++++++++-
>  include/net/mac802154.h                  |  4 ----
>  net/mac802154/rx.c                       |  6 ++----
>  3 files changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/ieee802154/mac802154_hwsim.c b/drivers/net/ieee802154/mac802154_hwsim.c
> index 38c217bd7c82..d7e4048e8743 100644
> --- a/drivers/net/ieee802154/mac802154_hwsim.c
> +++ b/drivers/net/ieee802154/mac802154_hwsim.c
> @@ -148,6 +148,8 @@ static int hwsim_hw_start(struct ieee802154_hw *hw)
>         struct hwsim_phy *phy = hw->priv;
>
>         phy->suspended = false;
> +       hw->phy->filtering = IEEE802154_FILTERING_NONE;
> +
>         return 0;
>  }
>
> @@ -161,6 +163,9 @@ static void hwsim_hw_stop(struct ieee802154_hw *hw)
>  static int
>  hwsim_set_promiscuous_mode(struct ieee802154_hw *hw, const bool on)
>  {
> +       /* hwsim does not filter anything, so enforce the NONE level */
> +       hw->phy->filtering = IEEE802154_FILTERING_NONE;
> +
>         return 0;
>  }
>
> @@ -791,7 +796,10 @@ static int hwsim_add_one(struct genl_info *info, struct device *dev,
>         phy->idx = idx;
>         INIT_LIST_HEAD(&phy->edges);
>
> -       hw->flags = IEEE802154_HW_PROMISCUOUS | IEEE802154_HW_RX_DROP_BAD_CKSUM;
> +       /* This is a lie, hwsim does not even filter bad FCS, but we need to
> +        * advertize a PROMISCUOUS to be able to create COORD interfaces.
> +        */

I think this is now different because PROMISCUOUS/any disable address
filtering will disable AACK and this is not what we want, or? This
comment was made with the assumption to deal with acks which we can't?

I did not look further into this patch series yet.

- Alex


  reply	other threads:[~2022-09-05  1:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26 14:40 [PATCH wpan-next v2 00/11] net: ieee802154: Support scanning/beaconing Miquel Raynal
2022-08-26 14:40 ` [PATCH wpan-next v2 01/11] net: mac802154: Introduce filtering levels Miquel Raynal
2022-09-04 17:13   ` Alexander Aring
2022-08-26 14:40 ` [PATCH wpan-next v2 02/11] net: mac802154: Drop IEEE802154_HW_RX_DROP_BAD_CKSUM Miquel Raynal
2022-09-05  1:34   ` Alexander Aring [this message]
2022-08-26 14:40 ` [PATCH wpan-next v2 03/11] net: mac802154: Allow the creation of coordinator interfaces Miquel Raynal
2022-08-26 14:40 ` [PATCH wpan-next v2 04/11] net: ieee802154: Advertize coordinators discovery Miquel Raynal
2022-08-26 14:40 ` [PATCH wpan-next v2 05/11] net: ieee802154: Handle " Miquel Raynal
2022-08-26 14:40 ` [PATCH wpan-next v2 06/11] net: ieee802154: Trace the registration of new PANs Miquel Raynal
2022-08-26 14:40 ` [PATCH wpan-next v2 07/11] net: ieee802154: Add support for user scanning requests Miquel Raynal
2022-08-26 14:40 ` [PATCH wpan-next v2 08/11] net: ieee802154: Define a beacon frame header Miquel Raynal
2022-08-26 14:40 ` [PATCH wpan-next v2 09/11] net: mac802154: Prepare forcing specific symbol duration Miquel Raynal
2022-08-26 14:40 ` [PATCH wpan-next v2 10/11] net: mac802154: Introduce a global device lock Miquel Raynal
2022-08-26 14:40 ` [PATCH wpan-next v2 11/11] net: mac802154: Handle passive scanning Miquel Raynal

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=CAK-6q+gYTPOiGO5kmqdPUOySwtrL_vaWLav7ehbOWihvKhYevA@mail.gmail.com \
    --to=aahringo@redhat.com \
    --cc=alex.aring@gmail.com \
    --cc=davem@davemloft.net \
    --cc=david.girault@qorvo.com \
    --cc=edumazet@google.com \
    --cc=frederic.blain@qorvo.com \
    --cc=kuba@kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=nico@ni.fr.eu.org \
    --cc=pabeni@redhat.com \
    --cc=romuald.despres@qorvo.com \
    --cc=stefan@datenfreihafen.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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).