From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Alexander Aring <alex.aring@gmail.com>,
Stefan Schmidt <stefan@datenfreihafen.org>,
linux-wpan@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
Xue Liu <liuxuenetmail@gmail.com>,
Marcel Holtmann <marcel@holtmann.org>,
Harry Morris <harrymorris12@gmail.com>,
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>,
Miquel Raynal <miquel.raynal@bootlin.com>
Subject: [wpan-next 2/9] net: ieee802154: hwsim: Ensure frame checksum are valid
Date: Thu, 20 Jan 2022 01:36:38 +0100 [thread overview]
Message-ID: <20220120003645.308498-3-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <20220120003645.308498-1-miquel.raynal@bootlin.com>
There is no point in accepting frames with a wrong or missing checksum,
at least not outside of a promiscuous setting. Set the right flag by
default in the hwsim driver to ensure checksums are not ignored.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
drivers/net/ieee802154/mac802154_hwsim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ieee802154/mac802154_hwsim.c b/drivers/net/ieee802154/mac802154_hwsim.c
index 795f8eb5387b..5324d0eda223 100644
--- a/drivers/net/ieee802154/mac802154_hwsim.c
+++ b/drivers/net/ieee802154/mac802154_hwsim.c
@@ -784,7 +784,7 @@ 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;
+ hw->flags = IEEE802154_HW_PROMISCUOUS | IEEE802154_HW_RX_DROP_BAD_CKSUM;
hw->parent = dev;
err = ieee802154_register_hw(hw);
--
2.27.0
next prev parent reply other threads:[~2022-01-20 0:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 0:36 [wpan-next 0/9] ieee802154: A bunch of fixes Miquel Raynal
2022-01-20 0:36 ` [wpan-next 1/9] net: ieee802154: hwsim: Ensure proper channel selection at probe time Miquel Raynal
2022-01-20 0:36 ` Miquel Raynal [this message]
2022-01-20 0:36 ` [wpan-next 3/9] net: ieee802154: mcr20a: Fix lifs/sifs periods Miquel Raynal
2022-01-20 0:36 ` [wpan-next 4/9] net: ieee802154: at86rf230: Stop leaking skb's Miquel Raynal
2022-01-20 0:36 ` [wpan-next 5/9] net: ieee802154: ca8210: " Miquel Raynal
2022-01-20 7:31 ` kernel test robot
2022-01-20 9:25 ` Miquel Raynal
2022-01-20 0:36 ` [wpan-next 6/9] net: ieee802154: Use the IEEE802154_MAX_PAGE define when relevant Miquel Raynal
2022-01-20 0:36 ` [wpan-next 7/9] net: ieee802154: Return meaningful error codes from the netlink helpers Miquel Raynal
2022-01-20 0:36 ` [wpan-next 8/9] net: mac802154: Explain the use of ieee802154_wake/stop_queue() Miquel Raynal
2022-01-20 0:36 ` [wpan-next 9/9] MAINTAINERS: Remove Harry Morris bouncing address 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=20220120003645.308498-3-miquel.raynal@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=alex.aring@gmail.com \
--cc=davem@davemloft.net \
--cc=david.girault@qorvo.com \
--cc=frederic.blain@qorvo.com \
--cc=harrymorris12@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=liuxuenetmail@gmail.com \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
--cc=nico@ni.fr.eu.org \
--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).