mbox series

[wpan-next,v2,00/11] net: ieee802154: Support scanning/beaconing

Message ID 20220826144049.256134-1-miquel.raynal@bootlin.com (mailing list archive)
Headers show
Series net: ieee802154: Support scanning/beaconing | expand

Message

Miquel Raynal Aug. 26, 2022, 2:40 p.m. UTC
Hello,

Here are the first patches of the big scan support series. Only passive
scan is present in these patches, we must agree on this first step
before moving forward with active scans, beaconing, associations and so
on. There are many other patches to come.

All of this is based on the initial work from David Girault and Romuald
Despres, they are often credited as Co-developpers.

Thanks,
Miquèl

Changes in v2 (some of them apply to other parts of the series not sent today):
* Initially tried to create a new (empty) path for COORD packets. As the
  processing, for now, is exactly the same as for NODE packets, I
  decided to go for a switch case as well as a comment indicating that
  the filtering should be enhanced with time.
* Reworked the rx path to clarify the ongoing filtering.
* Added an enum with the different filtering levels.
* Updated hwsim to reflect the right filtering level.
* Reworked again the rx path to include more filtering, in particular I
  added a real promiscuous mode as well as a level 4 filter (frame
  fields validation) which is enabled if the xceiver does not do it
  already.
* Set all the drivers (but the ca8210) able to create coordinators
  interfaces in theory.
* Prevented drivers with no promiscuous support to create COORD
  interfaces in the first place.
* Dropped the frame type enumeration because it was actually unused.
* The code already checked if the promiscuous mode was enabled, but
  it was not clear enough apparently, so I reorganized the logic a
  little bit in order to not hide this check.
* What was missing about the promiscuous mode however, was to remember
  in which state we found the PHY to avoid disabling the promiscuous
  mode if it was not enabled when we started scanning.
* Created a second workqueue, which would not be flushed in the close
  path because it does not need to be just for the mac commands. This
  allows acquiring the rtnl within scan_lock without issues.
* Thanks to the above change, I was able to drop the two patches
  reducing the use of the rtnl (in the tx path and in
  hwsim:change_channel()) but definitely not the change in the MLME Tx
  code which is really painful.

David Girault (1):
  net: ieee802154: Trace the registration of new PANs

Miquel Raynal (10):
  net: mac802154: Introduce filtering levels
  net: mac802154: Drop IEEE802154_HW_RX_DROP_BAD_CKSUM
  net: mac802154: Allow the creation of coordinator interfaces
  net: ieee802154: Advertize coordinators discovery
  net: ieee802154: Handle coordinators discovery
  net: ieee802154: Add support for user scanning requests
  net: ieee802154: Define a beacon frame header
  net: mac802154: Prepare forcing specific symbol duration
  net: mac802154: Introduce a global device lock
  net: mac802154: Handle passive scanning

 drivers/net/ieee802154/mac802154_hwsim.c |  10 +-
 include/linux/ieee802154.h               |   7 +
 include/net/cfg802154.h                  |  74 ++++-
 include/net/ieee802154_netdev.h          |  36 +++
 include/net/mac802154.h                  |  28 +-
 include/net/nl802154.h                   |  91 +++++++
 net/ieee802154/Makefile                  |   2 +-
 net/ieee802154/core.c                    |   2 +
 net/ieee802154/nl802154.c                | 331 +++++++++++++++++++++++
 net/ieee802154/nl802154.h                |   9 +
 net/ieee802154/pan.c                     | 115 ++++++++
 net/ieee802154/rdev-ops.h                |  28 ++
 net/ieee802154/trace.h                   |  65 +++++
 net/mac802154/Makefile                   |   2 +-
 net/mac802154/cfg.c                      |  41 ++-
 net/mac802154/ieee802154_i.h             |  38 ++-
 net/mac802154/iface.c                    |  26 +-
 net/mac802154/main.c                     |  40 ++-
 net/mac802154/rx.c                       |  63 ++++-
 net/mac802154/scan.c                     | 291 ++++++++++++++++++++
 net/mac802154/tx.c                       |  12 +-
 21 files changed, 1269 insertions(+), 42 deletions(-)
 create mode 100644 net/ieee802154/pan.c
 create mode 100644 net/mac802154/scan.c