]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Merge tag 'ieee802154-for-net-next-2022-10-25' of git://git.kernel.org/pub/scm/linux...
authorDavid S. Miller <davem@davemloft.net>
Wed, 26 Oct 2022 14:24:36 +0000 (15:24 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Oct 2022 14:24:36 +0000 (15:24 +0100)
Stefan Schmidt says:

====================

==
One of the biggest cycles for ieee802154 in a long time. We are landing the
first pieces of a big enhancements in managing PAN's. We might have another pull
request ready for this cycle later on, but I want to get this one out first.

Miquel Raynal added support for sending frames synchronously as a dependency
to handle MLME commands. Also introducing more filtering levels to match with
the needs of a device when scanning or operating as a pan coordinator.
To support development and testing the hwsim driver for ieee802154 was also
enhanced for the new filtering levels and to update the PIB attributes.

Alexander Aring fixed quite a few bugs spotted during reviewing changes. He
also added support for TRAC in the atusb driver to have better failure
handling if the firmware provides the needed information.

Jilin Yuan fixed a comment with a repeated word in it.
==================

Signed-off-by: David S. Miller <davem@davemloft.net>
1  2 
drivers/net/ieee802154/mac802154_hwsim.c
include/net/ieee802154_netdev.h
net/mac802154/rx.c

Simple merge
index c439125ef2b91353eee3e978bea337bdebbd6394,dc9ca2c0ea84fe4938d714a10833ae639fd0d159..2ae23a2f4a094962e8e1607d8ff12ee5ff039d03
@@@ -42,9 -43,20 +43,20 @@@ ieee802154_subif_frame(struct ieee80215
        span = wpan_dev->pan_id;
        sshort = wpan_dev->short_addr;
  
+       /* Level 3 filtering: Only beacons are accepted during scans */
+       if (sdata->required_filtering == IEEE802154_FILTERING_3_SCAN &&
+           sdata->required_filtering > wpan_phy->filtering) {
+               if (mac_cb(skb)->type != IEEE802154_FC_TYPE_BEACON) {
+                       dev_dbg(&sdata->dev->dev,
+                               "drop non-beacon frame (0x%x) during scan\n",
+                               mac_cb(skb)->type);
+                       goto fail;
+               }
+       }
        switch (mac_cb(skb)->dest.mode) {
        case IEEE802154_ADDR_NONE:
 -              if (mac_cb(skb)->dest.mode != IEEE802154_ADDR_NONE)
 +              if (hdr->source.mode != IEEE802154_ADDR_NONE)
                        /* FIXME: check if we are PAN coordinator */
                        skb->pkt_type = PACKET_OTHERHOST;
                else