git: if_mtw - Port from FreeBSD, with bugfixes, and parts re-ported from OpenBSD.

Imre Vadasz ivadasz at crater.dragonflybsd.org
Wed Dec 17 15:16:51 PST 2025


commit dab0b7bab8be2472eb2cf3ca7befe933c6950264
Author: Imre Vadász <imre at vdsz.com>
Date:   Sat Dec 13 23:28:07 2025 +0100

    if_mtw - Port from FreeBSD, with bugfixes, and parts re-ported from OpenBSD.
    
    * Reverted some recent changes in FreeBSD for 80211 API changes on their side:
       * reverted ratectl API use in ieee80211_ratectl_tx_update()
       * crypto API change (git 5431dafdb9659fb578f)
       * seqno offload (git cce278510a820785d88)
       * ni->ni_txrate references use (git 7067450010931479f8)
    
    * Re-ported the firmware loading code from OpenBSD. Unfortunately firmware
      loading still is not reliable. Sometimes it appears to be consistentl
      working, and then after a reboot it repeatedly fails with the same code.
    
    * Added some error return-codes back that OpenBSD's code has, but got removed
      in the FreeBSD code. This makes it behave a bit better when it fails.
    
    * Fixed the aggregated RX buffer handling, to split up the mbuf correctly,
      using the m_copym method, based on the corresponding code in if_iwm(4).
    
    * Remove the small pieces of #ifdef IEEE80211_SUPPORT_SUPERG code.
      The driver is not in a shape to worry about extra features like this,
      that may not be in working state anyways.
    
    Tested-with: Allnet ALL-WA0150N
    Taken-from: FreeBSD, OpenBSD

Summary of changes:
 etc/devd.conf                                      |    2 +-
 etc/devd/usb.conf                                  |   24 +
 share/man/man4/Makefile                            |    1 +
 share/man/man4/{ums.4 => mtw.4}                    |  141 +-
 sys/bus/u4b/usbdevs                                |    6 +
 sys/bus/u4b/wlan/Makefile                          |    4 +-
 sys/bus/u4b/wlan/if_mtw.c                          | 4758 ++++++++++++++++++++
 sys/bus/u4b/wlan/if_mtwreg.h                       | 1434 ++++++
 sys/bus/u4b/wlan/if_mtwvar.h                       |  391 ++
 sys/bus/u4b/wlan/mtw/Makefile                      |    7 +
 .../ath/ath_dfs => bus/u4b/wlan/mtwfw}/Makefile    |    4 +-
 .../iwm/fw => bus/u4b/wlan/mtwfw}/Makefile.inc     |    4 +-
 sys/bus/u4b/wlan/mtwfw/mtw7601u/Makefile           |    7 +
 sys/conf/files                                     |   15 +
 sys/config/LINT64                                  |    4 +
 sys/contrib/dev/mtw/LICENSE                        |    9 +
 sys/contrib/dev/mtw/mtw-mt7601u.fw.uu              | 1013 +++++
 17 files changed, 7754 insertions(+), 70 deletions(-)
 copy share/man/man4/{ums.4 => mtw.4} (50%)
 create mode 100644 sys/bus/u4b/wlan/if_mtw.c
 create mode 100644 sys/bus/u4b/wlan/if_mtwreg.h
 create mode 100644 sys/bus/u4b/wlan/if_mtwvar.h
 create mode 100644 sys/bus/u4b/wlan/mtw/Makefile
 copy sys/{dev/netif/ath/ath_dfs => bus/u4b/wlan/mtwfw}/Makefile (61%)
 copy sys/{dev/netif/iwm/fw => bus/u4b/wlan/mtwfw}/Makefile.inc (53%)
 create mode 100644 sys/bus/u4b/wlan/mtwfw/mtw7601u/Makefile
 create mode 100644 sys/contrib/dev/mtw/LICENSE
 create mode 100644 sys/contrib/dev/mtw/mtw-mt7601u.fw.uu

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/dab0b7bab8be2472eb2cf3ca7befe933c6950264


-- 
DragonFly BSD source repository


More information about the Commits mailing list