From patchwork Fri Oct 7 08:53:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 13000909 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 916F2C433F5 for ; Fri, 7 Oct 2022 08:53:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229495AbiJGIx1 (ORCPT ); Fri, 7 Oct 2022 04:53:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229797AbiJGIxV (ORCPT ); Fri, 7 Oct 2022 04:53:21 -0400 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A1C7FDB41; Fri, 7 Oct 2022 01:53:17 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 6AA591BF208; Fri, 7 Oct 2022 08:53:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1665132796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uh+P3R5zCB33IwZ4os0qwmtcfWBN2fhAjbxw11nSeYA=; b=WiP7T7dC4Li9EAOgPEiduB+4pmb1KeQ00SJxPGSqLbpJ2zn/aGGBGC//B7SbmK9jo/X89u Ul7f/MorqhFR+eLl7HMv0wsv69CEALwIO+o5pK4daSA9pg6YcLV/9LNgbsSMWc9NUNcAp5 1ahZplu1KSoFiHIKf+Z6n4u7G1xMhQXdR7oc3rQ/2SD3kruHlfnt3gmI0ms6Bem6IeWszr njvxXufbHasfpvoEJVDj4Z9PVc5ZwZBKdeDIUqQhHLRY0XtCS40xMOI7reyZ6rtIs0oNTq hDMkgqMz1GdG9UPbQ/smWFTRdi+17pL5g2EZxcJJrzv+xoonVGJMILctmHFyVg== From: Miquel Raynal To: Alexander Aring , Stefan Schmidt , linux-wpan@vger.kernel.org Cc: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet , netdev@vger.kernel.org, David Girault , Romuald Despres , Frederic Blain , Nicolas Schodet , Thomas Petazzoni , Miquel Raynal Subject: [PATCH wpan/next v4 0/8] net: ieee802154: Improve filtering support Date: Fri, 7 Oct 2022 10:53:02 +0200 Message-Id: <20221007085310.503366-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org Hello, A fourth version of this series, where we try to improve filtering support to ease scan integration. Will then come a short series about the coordinator interfaces and then the proper scan series. Thanks, Miquèl Changes in v4: * Added a condition upon which the packets for a given interface would be dropped: in case AACK and/or address filtering was expected, but another interface has disabled it on the PHY. * Changed the way Alexander's patch behaves regarding the handling of the different filtering levels. I added a third variable which shows the default filtering level for the interface. There is a second (per-interface) field giving the expected filtering level for this interface and finally we keep the per-PHY actual filtering level information. With this we can safely go back to the right level after a scan and also we can detect any wrong situation where ACKs would not be sent while expected and drop the frames if in this situation. * Moved all the additional filtering logic out of the core and put it into hwsim's in-driver receive path, so that it can act like any other transceiver depending on the filtering level requested. * Dropped the addition of the support for the ieee802154 promiscuous filtering mode which is anyway not usable yet. * Dropped the "net:" prefixes in many patches to fit what Alexander does. Changes in v3: * Full rework of the way the promiscuous mode is handled, with new filtering levels, one per-phy and the actual one on the device. * Dropped all the manual acking, everything is happenging on hardware. * Better handling of the Acks in atusb to report the trac status. Alexander Aring (2): mac802154: move receive parameters above start mac802154: set filter at drv_start() Miquel Raynal (6): mac802154: Introduce filtering levels ieee802154: hwsim: Record the address filter values ieee802154: hwsim: Implement address filtering mac802154: Drop IEEE802154_HW_RX_DROP_BAD_CKSUM mac802154: Avoid delivering frames received in a non satisfying filtering mode mac802154: Ensure proper scan-level filtering drivers/net/ieee802154/mac802154_hwsim.c | 150 +++++++++++- include/linux/ieee802154.h | 24 ++ include/net/cfg802154.h | 7 +- include/net/ieee802154_netdev.h | 8 + include/net/mac802154.h | 4 - net/mac802154/cfg.c | 2 +- net/mac802154/driver-ops.h | 281 ++++++++++++++--------- net/mac802154/ieee802154_i.h | 12 + net/mac802154/iface.c | 44 ++-- net/mac802154/rx.c | 25 +- 10 files changed, 409 insertions(+), 148 deletions(-) Acked-by: Alexander Aring