From nobody Mon Jun 10 02:55:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyGdR00xlz5Njn4; Mon, 10 Jun 2024 02:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyGdQ5NkMz4XVW; Mon, 10 Jun 2024 02:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717988138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kE/GgNl7pkaniEdQ0kcC+b2AXfRhbLSDGOx/m0yC5gg=; b=Q934o4QoU8S+FT9+A6ahravc5TjpXOHtt36HPYiMjFrXkdOcQqfjonyVYrUy1h5CScgod+ Vw1Y3vVcNbakcCdUYD43vbSYvxNwEaoRV2QWnpkXuvxDC7o7VK6YwjwVs7ggdRhojFDae/ VlpZxBQGeTwO1rT4wn5B0r5sUnh6IvhiTzc/wLAkcBsjO+6+7rPW274sjYhcR9pUpBNnsL JRQBQJwZgfVUU8BhiTFlmfeH4oJqeG8yRXAf+i01+VDg7I1EXVP6wWy/QWOiH/L2cZMbLf Mp0pDCm+CCnh/Ron3BQBXlOXERbfxtmTwRc0hQLiXUwO9BtKjNloModHXxulgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717988138; a=rsa-sha256; cv=none; b=X7ZWqkPAThHchz29Qz9t3795Znc5M3nwNkjCcsiadGewyXKQAM58eipjMmR/kcQwuPdzkn zSK/NeBsni/G8AwK07+ehIYOa50HGIH9+NSiYkais7YqUnhI2n8rAj3yyWhnlwpSE+Rrks UHM/Mzd4NX00JGk8e1C/K8dMVTTEhVZhUzLU6g2b17y08VDjBD6aP/MsmDywzTQbLYiDkH vMAS4s9VLxEqbzorRUpg0myIM5CxodLWt6BnZVeaPxivdSWES3a8ctqhWug7E2CxBvU3PG WUx1Jxv8u3YH5Cs2yEDXb8VGqwTfYV377+am0pte9ENL0r7YuVgsAj1t1hmMiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717988138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kE/GgNl7pkaniEdQ0kcC+b2AXfRhbLSDGOx/m0yC5gg=; b=O/JyDXNZedPwsKnVE/p9/bKUBdCNNXpEZf0/YCJ9yLPQRpSJwA1V3FFrtneDxnDc2pJPd9 GKlaPAmf5rY0U1iDeZRQLAp0G+YeVNevW/ge4+rA4r/ET+aGcKmrE/D/G26uZmY1ZLOnz8 CAeOLaCo0tRt6g+TEB0umI7ZmaXkdClROsPaUnyNfUtb3wvxzBbzYBn+OpMrARcdUp+Md2 chN2/xSlC+lHzEl9BPASeHfVcjav+5zShhb6pE+teZw2YEB3uJJX5pcVWIdFD5VyZ3XEov NEFNHRcfrcALFHBBx13h/1opv1Aus6umLd6oUB8/Km+eeXnWUKJ1IQonYtc4nQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyGdQ4sT7z16nw; Mon, 10 Jun 2024 02:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A2tcGN068681; Mon, 10 Jun 2024 02:55:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A2tckZ068678; Mon, 10 Jun 2024 02:55:38 GMT (envelope-from git) Date: Mon, 10 Jun 2024 02:55:38 GMT Message-Id: <202406100255.45A2tckZ068678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 3562d64e794b - stable/14 - sqlite3: Vendor import of sqlite3 3.46.0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3562d64e794b2614f15728c8b7e3a6dff0b644a7 Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=3562d64e794b2614f15728c8b7e3a6dff0b644a7 commit 3562d64e794b2614f15728c8b7e3a6dff0b644a7 Author: Cy Schubert AuthorDate: 2024-06-03 01:40:14 +0000 Commit: Cy Schubert CommitDate: 2024-06-10 02:55:18 +0000 sqlite3: Vendor import of sqlite3 3.46.0 Release notes at https://www.sqlite.org/releaselog/3_46_0.html. Obtained from: https://www.sqlite.org/2024/sqlite-autoconf-3460000.tar.gz Merge commit '259d29fd8c012d4392fa59ff803b691ead5b304d' into main (cherry picked from commit 0f996f45418e82dae151e5d1da478da38d70049f) --- contrib/sqlite3/Makefile.msc | 7 + contrib/sqlite3/configure | 20 +- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 1943 +++++++-- contrib/sqlite3/sqlite3.c | 8935 +++++++++++++++++++++++--------------- contrib/sqlite3/sqlite3.h | 116 +- contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 18 +- contrib/sqlite3/tea/configure.ac | 2 +- 9 files changed, 7287 insertions(+), 3758 deletions(-) diff --git a/contrib/sqlite3/Makefile.msc b/contrib/sqlite3/Makefile.msc index 45a07a9f317c..a4270fb2ae71 100644 --- a/contrib/sqlite3/Makefile.msc +++ b/contrib/sqlite3/Makefile.msc @@ -18,6 +18,13 @@ TOP = . +# Optionally set EXTRA_SRC to a list of C files to append to +# the generated sqlite3.c. +# +!IFNDEF EXTRA_SRC +EXTRA_SRC = +!ENDIF + # Set this non-0 to enable full warnings (-W4, etc) when compiling. # !IFNDEF USE_FULLWARN diff --git a/contrib/sqlite3/configure b/contrib/sqlite3/configure index 472e8acd0097..f2f70b5ae802 100755 --- a/contrib/sqlite3/configure +++ b/contrib/sqlite3/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.45.1. +# Generated by GNU Autoconf 2.71 for sqlite 3.46.0. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.45.1' -PACKAGE_STRING='sqlite 3.45.1' +PACKAGE_VERSION='3.46.0' +PACKAGE_STRING='sqlite 3.46.0' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1367,7 +1367,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.45.1 to adapt to many kinds of systems. +\`configure' configures sqlite 3.46.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1438,7 +1438,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.45.1:";; + short | recursive ) echo "Configuration of sqlite 3.46.0:";; esac cat <<\_ACEOF @@ -1563,7 +1563,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.45.1 +sqlite configure 3.46.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1833,7 +1833,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.45.1, which was +It was created by sqlite $as_me 3.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3106,7 +3106,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.45.1' + VERSION='3.46.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15314,7 +15314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.45.1, which was +This file was extended by sqlite $as_me 3.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15373,7 +15373,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.45.1 +sqlite config.status 3.46.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/sqlite3/configure.ac b/contrib/sqlite3/configure.ac index 3ce8855cc762..c83f381d90b1 100644 --- a/contrib/sqlite3/configure.ac +++ b/contrib/sqlite3/configure.ac @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.45.1, http://www.sqlite.org) +AC_INIT(sqlite, 3.46.0, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) diff --git a/contrib/sqlite3/shell.c b/contrib/sqlite3/shell.c index 1e02a12fbc2f..7d46e4acac57 100644 --- a/contrib/sqlite3/shell.c +++ b/contrib/sqlite3/shell.c @@ -580,6 +580,9 @@ zSkipValidUtf8(const char *z, int nAccept, long ccm); #ifndef HAVE_CONSOLE_IO_H # include "console_io.h" #endif +#if defined(_MSC_VER) +# pragma warning(disable : 4204) +#endif #ifndef SQLITE_CIO_NO_TRANSLATE # if (defined(_WIN32) || defined(WIN32)) && !SQLITE_OS_WINRT @@ -678,6 +681,10 @@ static short streamOfConsole(FILE *pf, /* out */ PerStreamTags *ppst){ # endif } +# ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING +# define ENABLE_VIRTUAL_TERMINAL_PROCESSING (0x4) +# endif + # if CIO_WIN_WC_XLATE /* Define console modes for use with the Windows Console API. */ # define SHELL_CONI_MODE \ @@ -1228,6 +1235,10 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ } #endif /* !defined(SQLITE_CIO_NO_TRANSLATE) */ +#if defined(_MSC_VER) +# pragma warning(default : 4204) +#endif + #undef SHELL_INVALID_FILE_PTR /************************* End ../ext/consio/console_io.c ********************/ @@ -1250,6 +1261,9 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ * setOutputStream(FILE *pf) * This is normally the stream that CLI normal output goes to. * For the stand-alone CLI, it is stdout with no .output redirect. + * + * The ?putz(z) forms are required for the Fiddle builds for string literal + * output, in aid of enforcing format string to argument correspondence. */ # define sputz(s,z) fPutsUtf8(z,s) # define sputf fPrintfUtf8 @@ -1261,12 +1275,18 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ #else /* For Fiddle, all console handling and emit redirection is omitted. */ -# define sputz(fp,z) fputs(z,fp) +/* These next 3 macros are for emitting formatted output. When complaints + * from the WASM build are issued for non-formatted output, (when a mere + * string literal is to be emitted, the ?putz(z) forms should be used. + * (This permits compile-time checking of format string / argument mismatch.) + */ +# define oputf(fmt, ...) printf(fmt,__VA_ARGS__) +# define eputf(fmt, ...) fprintf(stderr,fmt,__VA_ARGS__) # define sputf(fp,fmt, ...) fprintf(fp,fmt,__VA_ARGS__) +/* These next 3 macros are for emitting simple string literals. */ # define oputz(z) fputs(z,stdout) -# define oputf(fmt, ...) printf(fmt,__VA_ARGS__) # define eputz(z) fputs(z,stderr) -# define eputf(fmt, ...) fprintf(stderr,fmt,__VA_ARGS__) +# define sputz(fp,z) fputs(z,fp) # define oputb(buf,na) fwrite(buf,1,na,stdout) #endif @@ -5711,16 +5731,20 @@ SQLITE_EXTENSION_INIT1 ** index is ix. The 0th member is given by smBase. The sequence members ** progress per ix increment by smStep. */ -static sqlite3_int64 genSeqMember(sqlite3_int64 smBase, - sqlite3_int64 smStep, - sqlite3_uint64 ix){ - if( ix>=(sqlite3_uint64)LLONG_MAX ){ +static sqlite3_int64 genSeqMember( + sqlite3_int64 smBase, + sqlite3_int64 smStep, + sqlite3_uint64 ix +){ + static const sqlite3_uint64 mxI64 = + ((sqlite3_uint64)0x7fffffff)<<32 | 0xffffffff; + if( ix>=mxI64 ){ /* Get ix into signed i64 range. */ - ix -= (sqlite3_uint64)LLONG_MAX; + ix -= mxI64; /* With 2's complement ALU, this next can be 1 step, but is split into * 2 for UBSAN's satisfaction (and hypothetical 1's complement ALUs.) */ - smBase += (LLONG_MAX/2) * smStep; - smBase += (LLONG_MAX - LLONG_MAX/2) * smStep; + smBase += (mxI64/2) * smStep; + smBase += (mxI64 - mxI64/2) * smStep; } /* Under UBSAN (or on 1's complement machines), must do this last term * in steps to avoid the dreaded (and harmless) signed multiply overlow. */ @@ -5980,13 +6004,13 @@ static int seriesEof(sqlite3_vtab_cursor *cur){ ** parameter. (idxStr is not used in this implementation.) idxNum ** is a bitmask showing which constraints are available: ** -** 1: start=VALUE -** 2: stop=VALUE -** 4: step=VALUE -** -** Also, if bit 8 is set, that means that the series should be output -** in descending order rather than in ascending order. If bit 16 is -** set, then output must appear in ascending order. +** 0x01: start=VALUE +** 0x02: stop=VALUE +** 0x04: step=VALUE +** 0x08: descending order +** 0x10: ascending order +** 0x20: LIMIT VALUE +** 0x40: OFFSET VALUE ** ** This routine should initialize the cursor and position it so that it ** is pointing at the first row, or pointing off the end of the table @@ -6000,26 +6024,44 @@ static int seriesFilter( series_cursor *pCur = (series_cursor *)pVtabCursor; int i = 0; (void)idxStrUnused; - if( idxNum & 1 ){ + if( idxNum & 0x01 ){ pCur->ss.iBase = sqlite3_value_int64(argv[i++]); }else{ pCur->ss.iBase = 0; } - if( idxNum & 2 ){ + if( idxNum & 0x02 ){ pCur->ss.iTerm = sqlite3_value_int64(argv[i++]); }else{ pCur->ss.iTerm = 0xffffffff; } - if( idxNum & 4 ){ + if( idxNum & 0x04 ){ pCur->ss.iStep = sqlite3_value_int64(argv[i++]); if( pCur->ss.iStep==0 ){ pCur->ss.iStep = 1; }else if( pCur->ss.iStep<0 ){ - if( (idxNum & 16)==0 ) idxNum |= 8; + if( (idxNum & 0x10)==0 ) idxNum |= 0x08; } }else{ pCur->ss.iStep = 1; } + if( idxNum & 0x20 ){ + sqlite3_int64 iLimit = sqlite3_value_int64(argv[i++]); + sqlite3_int64 iTerm; + if( idxNum & 0x40 ){ + sqlite3_int64 iOffset = sqlite3_value_int64(argv[i++]); + if( iOffset>0 ){ + pCur->ss.iBase += pCur->ss.iStep*iOffset; + } + } + if( iLimit>=0 ){ + iTerm = pCur->ss.iBase + (iLimit - 1)*pCur->ss.iStep; + if( pCur->ss.iStep<0 ){ + if( iTerm>pCur->ss.iTerm ) pCur->ss.iTerm = iTerm; + }else{ + if( iTermss.iTerm ) pCur->ss.iTerm = iTerm; + } + } + } for(i=0; iss.isReversing = pCur->ss.iStep > 0; }else{ pCur->ss.isReversing = pCur->ss.iStep < 0; @@ -6050,10 +6092,13 @@ static int seriesFilter( ** ** The query plan is represented by bits in idxNum: ** -** (1) start = $value -- constraint exists -** (2) stop = $value -- constraint exists -** (4) step = $value -- constraint exists -** (8) output in descending order +** 0x01 start = $value -- constraint exists +** 0x02 stop = $value -- constraint exists +** 0x04 step = $value -- constraint exists +** 0x08 output is in descending order +** 0x10 output is in ascending order +** 0x20 LIMIT $value -- constraint exists +** 0x40 OFFSET $value -- constraint exists */ static int seriesBestIndex( sqlite3_vtab *pVTab, @@ -6061,10 +6106,12 @@ static int seriesBestIndex( ){ int i, j; /* Loop over constraints */ int idxNum = 0; /* The query plan bitmask */ +#ifndef ZERO_ARGUMENT_GENERATE_SERIES int bStartSeen = 0; /* EQ constraint seen on the START column */ +#endif int unusableMask = 0; /* Mask of unusable constraints */ int nArg = 0; /* Number of arguments that seriesFilter() expects */ - int aIdx[3]; /* Constraints on start, stop, and step */ + int aIdx[5]; /* Constraints on start, stop, step, LIMIT, OFFSET */ const struct sqlite3_index_constraint *pConstraint; /* This implementation assumes that the start, stop, and step columns @@ -6072,28 +6119,54 @@ static int seriesBestIndex( assert( SERIES_COLUMN_STOP == SERIES_COLUMN_START+1 ); assert( SERIES_COLUMN_STEP == SERIES_COLUMN_START+2 ); - aIdx[0] = aIdx[1] = aIdx[2] = -1; + aIdx[0] = aIdx[1] = aIdx[2] = aIdx[3] = aIdx[4] = -1; pConstraint = pIdxInfo->aConstraint; for(i=0; inConstraint; i++, pConstraint++){ int iCol; /* 0 for start, 1 for stop, 2 for step */ int iMask; /* bitmask for those column */ + int op = pConstraint->op; + if( op>=SQLITE_INDEX_CONSTRAINT_LIMIT + && op<=SQLITE_INDEX_CONSTRAINT_OFFSET + ){ + if( pConstraint->usable==0 ){ + /* do nothing */ + }else if( op==SQLITE_INDEX_CONSTRAINT_LIMIT ){ + aIdx[3] = i; + idxNum |= 0x20; + }else{ + assert( op==SQLITE_INDEX_CONSTRAINT_OFFSET ); + aIdx[4] = i; + idxNum |= 0x40; + } + continue; + } if( pConstraint->iColumniColumn - SERIES_COLUMN_START; assert( iCol>=0 && iCol<=2 ); iMask = 1 << iCol; - if( iCol==0 ) bStartSeen = 1; +#ifndef ZERO_ARGUMENT_GENERATE_SERIES + if( iCol==0 && op==SQLITE_INDEX_CONSTRAINT_EQ ){ + bStartSeen = 1; + } +#endif if( pConstraint->usable==0 ){ unusableMask |= iMask; continue; - }else if( pConstraint->op==SQLITE_INDEX_CONSTRAINT_EQ ){ + }else if( op==SQLITE_INDEX_CONSTRAINT_EQ ){ idxNum |= iMask; aIdx[iCol] = i; } } - for(i=0; i<3; i++){ + if( aIdx[3]==0 ){ + /* Ignore OFFSET if LIMIT is omitted */ + idxNum &= ~0x60; + aIdx[4] = 0; + } + for(i=0; i<5; i++){ if( (j = aIdx[i])>=0 ){ pIdxInfo->aConstraintUsage[j].argvIndex = ++nArg; - pIdxInfo->aConstraintUsage[j].omit = !SQLITE_SERIES_CONSTRAINT_VERIFY; + pIdxInfo->aConstraintUsage[j].omit = + !SQLITE_SERIES_CONSTRAINT_VERIFY || i>=3; } } /* The current generate_column() implementation requires at least one @@ -6114,19 +6187,22 @@ static int seriesBestIndex( ** this plan is unusable */ return SQLITE_CONSTRAINT; } - if( (idxNum & 3)==3 ){ + if( (idxNum & 0x03)==0x03 ){ /* Both start= and stop= boundaries are available. This is the ** the preferred case */ pIdxInfo->estimatedCost = (double)(2 - ((idxNum&4)!=0)); pIdxInfo->estimatedRows = 1000; if( pIdxInfo->nOrderBy>=1 && pIdxInfo->aOrderBy[0].iColumn==0 ){ if( pIdxInfo->aOrderBy[0].desc ){ - idxNum |= 8; + idxNum |= 0x08; }else{ - idxNum |= 16; + idxNum |= 0x10; } pIdxInfo->orderByConsumed = 1; } + }else if( (idxNum & 0x21)==0x21 ){ + /* We have start= and LIMIT */ + pIdxInfo->estimatedRows = 2500; }else{ /* If either boundary is missing, we have to generate a huge span ** of numbers. Make this case very expensive so that the query @@ -7453,7 +7529,9 @@ static int writeFile( #if !defined(_WIN32) && !defined(WIN32) if( S_ISLNK(mode) ){ const char *zTo = (const char*)sqlite3_value_text(pData); - if( zTo==0 || symlink(zTo, zFile)<0 ) return 1; + if( zTo==0 ) return 1; + unlink(zFile); + if( symlink(zTo, zFile)<0 ) return 1; }else #endif { @@ -7539,13 +7617,19 @@ static int writeFile( return 1; } #else - /* Legacy unix */ - struct timeval times[2]; - times[0].tv_usec = times[1].tv_usec = 0; - times[0].tv_sec = time(0); - times[1].tv_sec = mtime; - if( utimes(zFile, times) ){ - return 1; + /* Legacy unix. + ** + ** Do not use utimes() on a symbolic link - it sees through the link and + ** modifies the timestamps on the target. Or fails if the target does + ** not exist. */ + if( 0==S_ISLNK(mode) ){ + struct timeval times[2]; + times[0].tv_usec = times[1].tv_usec = 0; + times[0].tv_sec = time(0); + times[1].tv_sec = mtime; + if( utimes(zFile, times) ){ + return 1; + } } #endif } @@ -11617,7 +11701,7 @@ static void sqlarUncompressFunc( sqlite3_value **argv ){ uLong nData; - uLongf sz; + sqlite3_int64 sz; assert( argc==2 ); sz = sqlite3_value_int(argv[1]); @@ -11625,14 +11709,15 @@ static void sqlarUncompressFunc( if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){ sqlite3_result_value(context, argv[0]); }else{ + uLongf szf = sz; const Bytef *pData= sqlite3_value_blob(argv[0]); Bytef *pOut = sqlite3_malloc(sz); if( pOut==0 ){ sqlite3_result_error_nomem(context); - }else if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){ + }else if( Z_OK!=uncompress(pOut, &szf, pData, nData) ){ sqlite3_result_error(context, "error in uncompress()", -1); }else{ - sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT); + sqlite3_result_blob(context, pOut, szf, SQLITE_TRANSIENT); } sqlite3_free(pOut); } @@ -13784,7 +13869,7 @@ sqlite3expert *sqlite3_expert_new(sqlite3 *db, char **pzErrmsg){ sqlite3_stmt *pSql = 0; rc = idxPrintfPrepareStmt(pNew->db, &pSql, pzErrmsg, "SELECT sql FROM sqlite_schema WHERE name NOT LIKE 'sqlite_%%'" - " AND sql NOT LIKE 'CREATE VIRTUAL %%'" + " AND sql NOT LIKE 'CREATE VIRTUAL %%' ORDER BY rowid" ); while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pSql) ){ const char *zSql = (const char*)sqlite3_column_text(pSql, 0); @@ -13888,103 +13973,1221 @@ int sqlite3_expert_sql( return rc; } -int sqlite3_expert_analyze(sqlite3expert *p, char **pzErr){ - int rc; - IdxHashEntry *pEntry; +int sqlite3_expert_analyze(sqlite3expert *p, char **pzErr){ + int rc; + IdxHashEntry *pEntry; + + /* Do trigger processing to collect any extra IdxScan structures */ + rc = idxProcessTriggers(p, pzErr); + + /* Create candidate indexes within the in-memory database file */ + if( rc==SQLITE_OK ){ + rc = idxCreateCandidates(p); + }else if ( rc==SQLITE_BUSY_TIMEOUT ){ + if( pzErr ) + *pzErr = sqlite3_mprintf("Cannot find a unique index name to propose."); + return rc; + } + + /* Generate the stat1 data */ + if( rc==SQLITE_OK ){ + rc = idxPopulateStat1(p, pzErr); + } + + /* Formulate the EXPERT_REPORT_CANDIDATES text */ + for(pEntry=p->hIdx.pFirst; pEntry; pEntry=pEntry->pNext){ + p->zCandidates = idxAppendText(&rc, p->zCandidates, + "%s;%s%s\n", pEntry->zVal, + pEntry->zVal2 ? " -- stat1: " : "", pEntry->zVal2 + ); + } + + /* Figure out which of the candidate indexes are preferred by the query + ** planner and report the results to the user. */ + if( rc==SQLITE_OK ){ + rc = idxFindIndexes(p, pzErr); + } + + if( rc==SQLITE_OK ){ + p->bRun = 1; + } + return rc; +} + +/* +** Return the total number of statements that have been added to this +** sqlite3expert using sqlite3_expert_sql(). +*/ +int sqlite3_expert_count(sqlite3expert *p){ + int nRet = 0; + if( p->pStatement ) nRet = p->pStatement->iId+1; + return nRet; +} + +/* +** Return a component of the report. +*/ +const char *sqlite3_expert_report(sqlite3expert *p, int iStmt, int eReport){ + const char *zRet = 0; + IdxStatement *pStmt; + + if( p->bRun==0 ) return 0; + for(pStmt=p->pStatement; pStmt && pStmt->iId!=iStmt; pStmt=pStmt->pNext); + switch( eReport ){ + case EXPERT_REPORT_SQL: + if( pStmt ) zRet = pStmt->zSql; + break; + case EXPERT_REPORT_INDEXES: + if( pStmt ) zRet = pStmt->zIdx; + break; + case EXPERT_REPORT_PLAN: + if( pStmt ) zRet = pStmt->zEQP; + break; + case EXPERT_REPORT_CANDIDATES: + zRet = p->zCandidates; + break; + } + return zRet; +} + +/* +** Free an sqlite3expert object. +*/ +void sqlite3_expert_destroy(sqlite3expert *p){ + if( p ){ + sqlite3_close(p->dbm); + sqlite3_close(p->dbv); + idxScanFree(p->pScan, 0); + idxStatementFree(p->pStatement, 0); + idxTableFree(p->pTable); + idxWriteFree(p->pWrite); + idxHashClear(&p->hIdx); + sqlite3_free(p->zCandidates); + sqlite3_free(p); + } +} + +#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ + +/************************* End ../ext/expert/sqlite3expert.c ********************/ + +/************************* Begin ../ext/intck/sqlite3intck.h ******************/ +/* +** 2024-02-08 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +*/ + +/* +** Incremental Integrity-Check Extension +** ------------------------------------- +** +** This module contains code to check whether or not an SQLite database +** is well-formed or corrupt. This is the same task as performed by SQLite's +** built-in "PRAGMA integrity_check" command. This module differs from +** "PRAGMA integrity_check" in that: +** +** + It is less thorough - this module does not detect certain types +** of corruption that are detected by the PRAGMA command. However, +** it does detect all kinds of corruption that are likely to cause +** errors in SQLite applications. +** +** + It is slower. Sometimes up to three times slower. +** +** + It allows integrity-check operations to be split into multiple +** transactions, so that the database does not need to be read-locked +** for the duration of the integrity-check. +** +** One way to use the API to run integrity-check on the "main" database +** of handle db is: +** +** int rc = SQLITE_OK; +** sqlite3_intck *p = 0; +** +** sqlite3_intck_open(db, "main", &p); +** while( SQLITE_OK==sqlite3_intck_step(p) ){ +** const char *zMsg = sqlite3_intck_message(p); +** if( zMsg ) printf("corruption: %s\n", zMsg); +** } +** rc = sqlite3_intck_error(p, &zErr); +** if( rc!=SQLITE_OK ){ +** printf("error occured (rc=%d), (errmsg=%s)\n", rc, zErr); +** } +** sqlite3_intck_close(p); +** +** Usually, the sqlite3_intck object opens a read transaction within the +** first call to sqlite3_intck_step() and holds it open until the +** integrity-check is complete. However, if sqlite3_intck_unlock() is +** called, the read transaction is ended and a new read transaction opened +** by the subsequent call to sqlite3_intck_step(). +*/ + +#ifndef _SQLITE_INTCK_H +#define _SQLITE_INTCK_H + +/* #include "sqlite3.h" */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** An ongoing incremental integrity-check operation is represented by an +** opaque pointer of the following type. +*/ +typedef struct sqlite3_intck sqlite3_intck; + +/* +** Open a new incremental integrity-check object. If successful, populate +** output variable (*ppOut) with the new object handle and return SQLITE_OK. +** Or, if an error occurs, set (*ppOut) to NULL and return an SQLite error +** code (e.g. SQLITE_NOMEM). +** +** The integrity-check will be conducted on database zDb (which must be "main", +** "temp", or the name of an attached database) of database handle db. Once +** this function has been called successfully, the caller should not use +** database handle db until the integrity-check object has been destroyed +** using sqlite3_intck_close(). +*/ +int sqlite3_intck_open( + sqlite3 *db, /* Database handle */ + const char *zDb, /* Database name ("main", "temp" etc.) */ + sqlite3_intck **ppOut /* OUT: New sqlite3_intck handle */ +); + +/* +** Close and release all resources associated with a handle opened by an +** earlier call to sqlite3_intck_open(). The results of using an +** integrity-check handle after it has been passed to this function are +** undefined. +*/ +void sqlite3_intck_close(sqlite3_intck *pCk); + +/* +** Do the next step of the integrity-check operation specified by the handle +** passed as the only argument. This function returns SQLITE_DONE if the +** integrity-check operation is finished, or an SQLite error code if +** an error occurs, or SQLITE_OK if no error occurs but the integrity-check +** is not finished. It is not considered an error if database corruption +** is encountered. +** +** Following a successful call to sqlite3_intck_step() (one that returns +** SQLITE_OK), sqlite3_intck_message() returns a non-NULL value if +** corruption was detected in the db. +** +** If an error occurs and a value other than SQLITE_OK or SQLITE_DONE is +** returned, then the integrity-check handle is placed in an error state. +** In this state all subsequent calls to sqlite3_intck_step() or +** sqlite3_intck_unlock() will immediately return the same error. The +** sqlite3_intck_error() method may be used to obtain an English language +** error message in this case. +*/ +int sqlite3_intck_step(sqlite3_intck *pCk); + +/* +** If the previous call to sqlite3_intck_step() encountered corruption +** within the database, then this function returns a pointer to a buffer +** containing a nul-terminated string describing the corruption in +** English. If the previous call to sqlite3_intck_step() did not encounter +** corruption, or if there was no previous call, this function returns +** NULL. +*/ +const char *sqlite3_intck_message(sqlite3_intck *pCk); + +/* +** Close any read-transaction opened by an earlier call to +** sqlite3_intck_step(). Any subsequent call to sqlite3_intck_step() will +** open a new transaction. Return SQLITE_OK if successful, or an SQLite error +** code otherwise. +** +** If an error occurs, then the integrity-check handle is placed in an error +** state. In this state all subsequent calls to sqlite3_intck_step() or +** sqlite3_intck_unlock() will immediately return the same error. The +** sqlite3_intck_error() method may be used to obtain an English language +** error message in this case. +*/ +int sqlite3_intck_unlock(sqlite3_intck *pCk); + +/* +** If an error has occurred in an earlier call to sqlite3_intck_step() +** or sqlite3_intck_unlock(), then this method returns the associated +** SQLite error code. Additionally, if pzErr is not NULL, then (*pzErr) +** may be set to point to a nul-terminated string containing an English +** language error message. Or, if no error message is available, to +** NULL. +** +** If no error has occurred within sqlite3_intck_step() or +** sqlite_intck_unlock() calls on the handle passed as the first argument, +** then SQLITE_OK is returned and (*pzErr) set to NULL. +*/ +int sqlite3_intck_error(sqlite3_intck *pCk, const char **pzErr); + +/* +** This API is used for testing only. It returns the full-text of an SQL +** statement used to test object zObj, which may be a table or index. +** The returned buffer is valid until the next call to either this function +** or sqlite3_intck_close() on the same sqlite3_intck handle. +*/ +const char *sqlite3_intck_test_sql(sqlite3_intck *pCk, const char *zObj); + + +#ifdef __cplusplus +} /* end of the 'extern "C"' block */ +#endif + +#endif /* ifndef _SQLITE_INTCK_H */ + +/************************* End ../ext/intck/sqlite3intck.h ********************/ +/************************* Begin ../ext/intck/sqlite3intck.c ******************/ +/* +** 2024-02-08 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +*/ + +/* #include "sqlite3intck.h" */ +#include +#include + +#include +#include + +/* +** nKeyVal: +** The number of values that make up the 'key' for the current pCheck +** statement. +** +** rc: +** Error code returned by most recent sqlite3_intck_step() or +** sqlite3_intck_unlock() call. This is set to SQLITE_DONE when +** the integrity-check operation is finished. +** +** zErr: +** If the object has entered the error state, this is the error message. +** Is freed using sqlite3_free() when the object is deleted. +** +** zTestSql: +** The value returned by the most recent call to sqlite3_intck_testsql(). +** Each call to testsql() frees the previous zTestSql value (using +** sqlite3_free()) and replaces it with the new value it will return. +*/ +struct sqlite3_intck { + sqlite3 *db; + const char *zDb; /* Copy of zDb parameter to _open() */ + char *zObj; /* Current object. Or NULL. */ + + sqlite3_stmt *pCheck; /* Current check statement */ + char *zKey; + int nKeyVal; + + char *zMessage; + int bCorruptSchema; + + int rc; /* Error code */ + char *zErr; /* Error message */ + char *zTestSql; /* Returned by sqlite3_intck_test_sql() */ +}; + + +/* +** Some error has occurred while using database p->db. Save the error message +** and error code currently held by the database handle in p->rc and p->zErr. +*/ +static void intckSaveErrmsg(sqlite3_intck *p){ + p->rc = sqlite3_errcode(p->db); + sqlite3_free(p->zErr); + p->zErr = sqlite3_mprintf("%s", sqlite3_errmsg(p->db)); +} + +/* +** If the handle passed as the first argument is already in the error state, +** then this function is a no-op (returns NULL immediately). Otherwise, if an +** error occurs within this function, it leaves an error in said handle. +** +** Otherwise, this function attempts to prepare SQL statement zSql and +** return the resulting statement handle to the user. +*/ +static sqlite3_stmt *intckPrepare(sqlite3_intck *p, const char *zSql){ + sqlite3_stmt *pRet = 0; + if( p->rc==SQLITE_OK ){ + p->rc = sqlite3_prepare_v2(p->db, zSql, -1, &pRet, 0); + if( p->rc!=SQLITE_OK ){ + intckSaveErrmsg(p); + assert( pRet==0 ); + } + } + return pRet; +} + +/* +** If the handle passed as the first argument is already in the error state, +** then this function is a no-op (returns NULL immediately). Otherwise, if an +** error occurs within this function, it leaves an error in said handle. +** +** Otherwise, this function treats argument zFmt as a printf() style format +** string. It formats it according to the trailing arguments and then +** attempts to prepare the results and return the resulting prepared +** statement. +*/ +static sqlite3_stmt *intckPrepareFmt(sqlite3_intck *p, const char *zFmt, ...){ + sqlite3_stmt *pRet = 0; + va_list ap; + char *zSql = 0; + va_start(ap, zFmt); + zSql = sqlite3_vmprintf(zFmt, ap); + if( p->rc==SQLITE_OK && zSql==0 ){ + p->rc = SQLITE_NOMEM; + } + pRet = intckPrepare(p, zSql); + sqlite3_free(zSql); + va_end(ap); + return pRet; +} + +/* +** Finalize SQL statement pStmt. If an error occurs and the handle passed +** as the first argument does not already contain an error, store the +** error in the handle. +*/ +static void intckFinalize(sqlite3_intck *p, sqlite3_stmt *pStmt){ + int rc = sqlite3_finalize(pStmt); + if( p->rc==SQLITE_OK && rc!=SQLITE_OK ){ + intckSaveErrmsg(p); + } +} + +/* +** If there is already an error in handle p, return it. Otherwise, call +** sqlite3_step() on the statement handle and return that value. +*/ +static int intckStep(sqlite3_intck *p, sqlite3_stmt *pStmt){ + if( p->rc ) return p->rc; + return sqlite3_step(pStmt); +} + +/* +** Execute SQL statement zSql. There is no way to obtain any results +** returned by the statement. This function uses the sqlite3_intck error +** code convention. +*/ +static void intckExec(sqlite3_intck *p, const char *zSql){ + sqlite3_stmt *pStmt = 0; + pStmt = intckPrepare(p, zSql); + intckStep(p, pStmt); + intckFinalize(p, pStmt); +} + +/* +** A wrapper around sqlite3_mprintf() that uses the sqlite3_intck error +** code convention. +*/ +static char *intckMprintf(sqlite3_intck *p, const char *zFmt, ...){ + va_list ap; + char *zRet = 0; + va_start(ap, zFmt); + zRet = sqlite3_vmprintf(zFmt, ap); + if( p->rc==SQLITE_OK ){ + if( zRet==0 ){ + p->rc = SQLITE_NOMEM; + } + }else{ + sqlite3_free(zRet); + zRet = 0; + } + return zRet; +} + +/* +** This is used by sqlite3_intck_unlock() to save the vector key value +** required to restart the current pCheck query as a nul-terminated string +** in p->zKey. +*/ +static void intckSaveKey(sqlite3_intck *p){ + int ii; + char *zSql = 0; + sqlite3_stmt *pStmt = 0; + sqlite3_stmt *pXinfo = 0; + const char *zDir = 0; + + assert( p->pCheck ); + assert( p->zKey==0 ); + + pXinfo = intckPrepareFmt(p, + "SELECT group_concat(desc, '') FROM %Q.sqlite_schema s, " + "pragma_index_xinfo(%Q, %Q) " + "WHERE s.type='index' AND s.name=%Q", + p->zDb, p->zObj, p->zDb, p->zObj + ); + if( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXinfo) ){ + zDir = (const char*)sqlite3_column_text(pXinfo, 0); + } + + if( zDir==0 ){ *** 15215 LINES SKIPPED *** From nobody Mon Jun 10 02:56:14 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyGf733x6z5NkJD; Mon, 10 Jun 2024 02:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyGf72Wk0z4Xvj; Mon, 10 Jun 2024 02:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717988175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qv04UIoxo8bEFmCzuphP0aj88EFOyrKztqc9uwtovnw=; b=e4OLbAR+pWPoCaN8Vki+UFON1zmoF+y3EvuFvTpns3o728j7gX5qCttIQkl2loQy8tzK8v SE1rDzXxzLD0UsPu/S4hMWNZ4Y33ABPzu8QiFfTAKyYdwTKvAtfsvnHedXrhB1BC2fsfBt QtIIA6ECR24RWFCfVrDNE58R+4VVsdPjbboN6N6WaxGMS5YQje6d3rEAs85kpXecJ/zL4d J8q0r9aKM5lf63/g7P/Eh4RLq0XGfKoVxnx7oQWxyMqAkY9P2KdoGCU9qvUft3w0gAWtVf uURbP3QmV4TF3PxSNqREKHNNGpIpjLWdj7uPX5Butr+kZnuSih44iZ9YQP0rsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717988175; a=rsa-sha256; cv=none; b=Tsf1W+vQ5SkXZaQBQmFikQdboSAthA4BkE5E8R8AcbOynAJh+tw2qLMQdTs4iQwgDicp7H 2lyWroGvsTA0cheBGhWwJp6f15CZSaGKSUGOi0rCF2SReu7DJUvTNQKEQtRm/4Vj2BRjoq Pl7Nj5bVQ8Z9l99AodiwAbs3J+R6sNLTFV/05l5/qe8Y6Gf4fCQcgliSKDRj/bqpzx3zb9 7KzXE+y9We+gq9E3wkuVArBCuyWi1GGQtVroyZ0VhwN0A0BtJ+MAOMUzdqrLG9DlRz4+Wn T5oK675uOxxYwHvHNO4iiXHQlI5dnK933gaDfbY7lKcNkqL6ePrVAJf/mhHWZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717988175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qv04UIoxo8bEFmCzuphP0aj88EFOyrKztqc9uwtovnw=; b=oa08bR1RqhVZD1r1BZbrLkpllxrPwi3KNNFUKh5ZgrLC4YXPWQAnXbiKGDr1AMVQZuT67+ 3B9gUNyiPZdjqZgPDKvkZUvBRqUJxwhhj7fJYN6OAXv88mFveQ0LGPEcVfrjqzd5KxH4KA Gv9EwPmp+D7i03B2ufXQPr/sb89pTZX5CVDqZQtiNzTM3/qmJsn832I7qOm1utT4ODG5cS s6tocnee6RsSoSqD4nswvnUUxFFU805wmvs1nzm9uBFgj2ZYfAR09mNHV7bFy1J6wED1K3 H+IcyC8wGCGhyXhZJpkkdD7jKi7jXSSYRsX3ENjlIg5lb4fCHAEdTPFRe8GURA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyGf7271Rz17bf; Mon, 10 Jun 2024 02:56:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A2uFAO068898; Mon, 10 Jun 2024 02:56:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A2uENQ068895; Mon, 10 Jun 2024 02:56:14 GMT (envelope-from git) Date: Mon, 10 Jun 2024 02:56:14 GMT Message-Id: <202406100256.45A2uENQ068895@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 960554869b20 - stable/13 - sqlite3: Vendor import of sqlite3 3.46.0 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 960554869b2059f852155c9e15c16def9fab2f1c Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=960554869b2059f852155c9e15c16def9fab2f1c commit 960554869b2059f852155c9e15c16def9fab2f1c Author: Cy Schubert AuthorDate: 2024-06-03 01:40:14 +0000 Commit: Cy Schubert CommitDate: 2024-06-10 02:56:07 +0000 sqlite3: Vendor import of sqlite3 3.46.0 Release notes at https://www.sqlite.org/releaselog/3_46_0.html. Obtained from: https://www.sqlite.org/2024/sqlite-autoconf-3460000.tar.gz Merge commit '259d29fd8c012d4392fa59ff803b691ead5b304d' into main (cherry picked from commit 0f996f45418e82dae151e5d1da478da38d70049f) --- contrib/sqlite3/Makefile.msc | 7 + contrib/sqlite3/configure | 20 +- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 1943 +++++++-- contrib/sqlite3/sqlite3.c | 8935 +++++++++++++++++++++++--------------- contrib/sqlite3/sqlite3.h | 116 +- contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 18 +- contrib/sqlite3/tea/configure.ac | 2 +- 9 files changed, 7287 insertions(+), 3758 deletions(-) diff --git a/contrib/sqlite3/Makefile.msc b/contrib/sqlite3/Makefile.msc index 45a07a9f317c..a4270fb2ae71 100644 --- a/contrib/sqlite3/Makefile.msc +++ b/contrib/sqlite3/Makefile.msc @@ -18,6 +18,13 @@ TOP = . +# Optionally set EXTRA_SRC to a list of C files to append to +# the generated sqlite3.c. +# +!IFNDEF EXTRA_SRC +EXTRA_SRC = +!ENDIF + # Set this non-0 to enable full warnings (-W4, etc) when compiling. # !IFNDEF USE_FULLWARN diff --git a/contrib/sqlite3/configure b/contrib/sqlite3/configure index 472e8acd0097..f2f70b5ae802 100755 --- a/contrib/sqlite3/configure +++ b/contrib/sqlite3/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.45.1. +# Generated by GNU Autoconf 2.71 for sqlite 3.46.0. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.45.1' -PACKAGE_STRING='sqlite 3.45.1' +PACKAGE_VERSION='3.46.0' +PACKAGE_STRING='sqlite 3.46.0' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1367,7 +1367,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.45.1 to adapt to many kinds of systems. +\`configure' configures sqlite 3.46.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1438,7 +1438,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.45.1:";; + short | recursive ) echo "Configuration of sqlite 3.46.0:";; esac cat <<\_ACEOF @@ -1563,7 +1563,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.45.1 +sqlite configure 3.46.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1833,7 +1833,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.45.1, which was +It was created by sqlite $as_me 3.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3106,7 +3106,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.45.1' + VERSION='3.46.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15314,7 +15314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.45.1, which was +This file was extended by sqlite $as_me 3.46.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15373,7 +15373,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.45.1 +sqlite config.status 3.46.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/sqlite3/configure.ac b/contrib/sqlite3/configure.ac index 3ce8855cc762..c83f381d90b1 100644 --- a/contrib/sqlite3/configure.ac +++ b/contrib/sqlite3/configure.ac @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.45.1, http://www.sqlite.org) +AC_INIT(sqlite, 3.46.0, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) diff --git a/contrib/sqlite3/shell.c b/contrib/sqlite3/shell.c index 1e02a12fbc2f..7d46e4acac57 100644 --- a/contrib/sqlite3/shell.c +++ b/contrib/sqlite3/shell.c @@ -580,6 +580,9 @@ zSkipValidUtf8(const char *z, int nAccept, long ccm); #ifndef HAVE_CONSOLE_IO_H # include "console_io.h" #endif +#if defined(_MSC_VER) +# pragma warning(disable : 4204) +#endif #ifndef SQLITE_CIO_NO_TRANSLATE # if (defined(_WIN32) || defined(WIN32)) && !SQLITE_OS_WINRT @@ -678,6 +681,10 @@ static short streamOfConsole(FILE *pf, /* out */ PerStreamTags *ppst){ # endif } +# ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING +# define ENABLE_VIRTUAL_TERMINAL_PROCESSING (0x4) +# endif + # if CIO_WIN_WC_XLATE /* Define console modes for use with the Windows Console API. */ # define SHELL_CONI_MODE \ @@ -1228,6 +1235,10 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ } #endif /* !defined(SQLITE_CIO_NO_TRANSLATE) */ +#if defined(_MSC_VER) +# pragma warning(default : 4204) +#endif + #undef SHELL_INVALID_FILE_PTR /************************* End ../ext/consio/console_io.c ********************/ @@ -1250,6 +1261,9 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ * setOutputStream(FILE *pf) * This is normally the stream that CLI normal output goes to. * For the stand-alone CLI, it is stdout with no .output redirect. + * + * The ?putz(z) forms are required for the Fiddle builds for string literal + * output, in aid of enforcing format string to argument correspondence. */ # define sputz(s,z) fPutsUtf8(z,s) # define sputf fPrintfUtf8 @@ -1261,12 +1275,18 @@ SQLITE_INTERNAL_LINKAGE char* fGetsUtf8(char *cBuf, int ncMax, FILE *pfIn){ #else /* For Fiddle, all console handling and emit redirection is omitted. */ -# define sputz(fp,z) fputs(z,fp) +/* These next 3 macros are for emitting formatted output. When complaints + * from the WASM build are issued for non-formatted output, (when a mere + * string literal is to be emitted, the ?putz(z) forms should be used. + * (This permits compile-time checking of format string / argument mismatch.) + */ +# define oputf(fmt, ...) printf(fmt,__VA_ARGS__) +# define eputf(fmt, ...) fprintf(stderr,fmt,__VA_ARGS__) # define sputf(fp,fmt, ...) fprintf(fp,fmt,__VA_ARGS__) +/* These next 3 macros are for emitting simple string literals. */ # define oputz(z) fputs(z,stdout) -# define oputf(fmt, ...) printf(fmt,__VA_ARGS__) # define eputz(z) fputs(z,stderr) -# define eputf(fmt, ...) fprintf(stderr,fmt,__VA_ARGS__) +# define sputz(fp,z) fputs(z,fp) # define oputb(buf,na) fwrite(buf,1,na,stdout) #endif @@ -5711,16 +5731,20 @@ SQLITE_EXTENSION_INIT1 ** index is ix. The 0th member is given by smBase. The sequence members ** progress per ix increment by smStep. */ -static sqlite3_int64 genSeqMember(sqlite3_int64 smBase, - sqlite3_int64 smStep, - sqlite3_uint64 ix){ - if( ix>=(sqlite3_uint64)LLONG_MAX ){ +static sqlite3_int64 genSeqMember( + sqlite3_int64 smBase, + sqlite3_int64 smStep, + sqlite3_uint64 ix +){ + static const sqlite3_uint64 mxI64 = + ((sqlite3_uint64)0x7fffffff)<<32 | 0xffffffff; + if( ix>=mxI64 ){ /* Get ix into signed i64 range. */ - ix -= (sqlite3_uint64)LLONG_MAX; + ix -= mxI64; /* With 2's complement ALU, this next can be 1 step, but is split into * 2 for UBSAN's satisfaction (and hypothetical 1's complement ALUs.) */ - smBase += (LLONG_MAX/2) * smStep; - smBase += (LLONG_MAX - LLONG_MAX/2) * smStep; + smBase += (mxI64/2) * smStep; + smBase += (mxI64 - mxI64/2) * smStep; } /* Under UBSAN (or on 1's complement machines), must do this last term * in steps to avoid the dreaded (and harmless) signed multiply overlow. */ @@ -5980,13 +6004,13 @@ static int seriesEof(sqlite3_vtab_cursor *cur){ ** parameter. (idxStr is not used in this implementation.) idxNum ** is a bitmask showing which constraints are available: ** -** 1: start=VALUE -** 2: stop=VALUE -** 4: step=VALUE -** -** Also, if bit 8 is set, that means that the series should be output -** in descending order rather than in ascending order. If bit 16 is -** set, then output must appear in ascending order. +** 0x01: start=VALUE +** 0x02: stop=VALUE +** 0x04: step=VALUE +** 0x08: descending order +** 0x10: ascending order +** 0x20: LIMIT VALUE +** 0x40: OFFSET VALUE ** ** This routine should initialize the cursor and position it so that it ** is pointing at the first row, or pointing off the end of the table @@ -6000,26 +6024,44 @@ static int seriesFilter( series_cursor *pCur = (series_cursor *)pVtabCursor; int i = 0; (void)idxStrUnused; - if( idxNum & 1 ){ + if( idxNum & 0x01 ){ pCur->ss.iBase = sqlite3_value_int64(argv[i++]); }else{ pCur->ss.iBase = 0; } - if( idxNum & 2 ){ + if( idxNum & 0x02 ){ pCur->ss.iTerm = sqlite3_value_int64(argv[i++]); }else{ pCur->ss.iTerm = 0xffffffff; } - if( idxNum & 4 ){ + if( idxNum & 0x04 ){ pCur->ss.iStep = sqlite3_value_int64(argv[i++]); if( pCur->ss.iStep==0 ){ pCur->ss.iStep = 1; }else if( pCur->ss.iStep<0 ){ - if( (idxNum & 16)==0 ) idxNum |= 8; + if( (idxNum & 0x10)==0 ) idxNum |= 0x08; } }else{ pCur->ss.iStep = 1; } + if( idxNum & 0x20 ){ + sqlite3_int64 iLimit = sqlite3_value_int64(argv[i++]); + sqlite3_int64 iTerm; + if( idxNum & 0x40 ){ + sqlite3_int64 iOffset = sqlite3_value_int64(argv[i++]); + if( iOffset>0 ){ + pCur->ss.iBase += pCur->ss.iStep*iOffset; + } + } + if( iLimit>=0 ){ + iTerm = pCur->ss.iBase + (iLimit - 1)*pCur->ss.iStep; + if( pCur->ss.iStep<0 ){ + if( iTerm>pCur->ss.iTerm ) pCur->ss.iTerm = iTerm; + }else{ + if( iTermss.iTerm ) pCur->ss.iTerm = iTerm; + } + } + } for(i=0; iss.isReversing = pCur->ss.iStep > 0; }else{ pCur->ss.isReversing = pCur->ss.iStep < 0; @@ -6050,10 +6092,13 @@ static int seriesFilter( ** ** The query plan is represented by bits in idxNum: ** -** (1) start = $value -- constraint exists -** (2) stop = $value -- constraint exists -** (4) step = $value -- constraint exists -** (8) output in descending order +** 0x01 start = $value -- constraint exists +** 0x02 stop = $value -- constraint exists +** 0x04 step = $value -- constraint exists +** 0x08 output is in descending order +** 0x10 output is in ascending order +** 0x20 LIMIT $value -- constraint exists +** 0x40 OFFSET $value -- constraint exists */ static int seriesBestIndex( sqlite3_vtab *pVTab, @@ -6061,10 +6106,12 @@ static int seriesBestIndex( ){ int i, j; /* Loop over constraints */ int idxNum = 0; /* The query plan bitmask */ +#ifndef ZERO_ARGUMENT_GENERATE_SERIES int bStartSeen = 0; /* EQ constraint seen on the START column */ +#endif int unusableMask = 0; /* Mask of unusable constraints */ int nArg = 0; /* Number of arguments that seriesFilter() expects */ - int aIdx[3]; /* Constraints on start, stop, and step */ + int aIdx[5]; /* Constraints on start, stop, step, LIMIT, OFFSET */ const struct sqlite3_index_constraint *pConstraint; /* This implementation assumes that the start, stop, and step columns @@ -6072,28 +6119,54 @@ static int seriesBestIndex( assert( SERIES_COLUMN_STOP == SERIES_COLUMN_START+1 ); assert( SERIES_COLUMN_STEP == SERIES_COLUMN_START+2 ); - aIdx[0] = aIdx[1] = aIdx[2] = -1; + aIdx[0] = aIdx[1] = aIdx[2] = aIdx[3] = aIdx[4] = -1; pConstraint = pIdxInfo->aConstraint; for(i=0; inConstraint; i++, pConstraint++){ int iCol; /* 0 for start, 1 for stop, 2 for step */ int iMask; /* bitmask for those column */ + int op = pConstraint->op; + if( op>=SQLITE_INDEX_CONSTRAINT_LIMIT + && op<=SQLITE_INDEX_CONSTRAINT_OFFSET + ){ + if( pConstraint->usable==0 ){ + /* do nothing */ + }else if( op==SQLITE_INDEX_CONSTRAINT_LIMIT ){ + aIdx[3] = i; + idxNum |= 0x20; + }else{ + assert( op==SQLITE_INDEX_CONSTRAINT_OFFSET ); + aIdx[4] = i; + idxNum |= 0x40; + } + continue; + } if( pConstraint->iColumniColumn - SERIES_COLUMN_START; assert( iCol>=0 && iCol<=2 ); iMask = 1 << iCol; - if( iCol==0 ) bStartSeen = 1; +#ifndef ZERO_ARGUMENT_GENERATE_SERIES + if( iCol==0 && op==SQLITE_INDEX_CONSTRAINT_EQ ){ + bStartSeen = 1; + } +#endif if( pConstraint->usable==0 ){ unusableMask |= iMask; continue; - }else if( pConstraint->op==SQLITE_INDEX_CONSTRAINT_EQ ){ + }else if( op==SQLITE_INDEX_CONSTRAINT_EQ ){ idxNum |= iMask; aIdx[iCol] = i; } } - for(i=0; i<3; i++){ + if( aIdx[3]==0 ){ + /* Ignore OFFSET if LIMIT is omitted */ + idxNum &= ~0x60; + aIdx[4] = 0; + } + for(i=0; i<5; i++){ if( (j = aIdx[i])>=0 ){ pIdxInfo->aConstraintUsage[j].argvIndex = ++nArg; - pIdxInfo->aConstraintUsage[j].omit = !SQLITE_SERIES_CONSTRAINT_VERIFY; + pIdxInfo->aConstraintUsage[j].omit = + !SQLITE_SERIES_CONSTRAINT_VERIFY || i>=3; } } /* The current generate_column() implementation requires at least one @@ -6114,19 +6187,22 @@ static int seriesBestIndex( ** this plan is unusable */ return SQLITE_CONSTRAINT; } - if( (idxNum & 3)==3 ){ + if( (idxNum & 0x03)==0x03 ){ /* Both start= and stop= boundaries are available. This is the ** the preferred case */ pIdxInfo->estimatedCost = (double)(2 - ((idxNum&4)!=0)); pIdxInfo->estimatedRows = 1000; if( pIdxInfo->nOrderBy>=1 && pIdxInfo->aOrderBy[0].iColumn==0 ){ if( pIdxInfo->aOrderBy[0].desc ){ - idxNum |= 8; + idxNum |= 0x08; }else{ - idxNum |= 16; + idxNum |= 0x10; } pIdxInfo->orderByConsumed = 1; } + }else if( (idxNum & 0x21)==0x21 ){ + /* We have start= and LIMIT */ + pIdxInfo->estimatedRows = 2500; }else{ /* If either boundary is missing, we have to generate a huge span ** of numbers. Make this case very expensive so that the query @@ -7453,7 +7529,9 @@ static int writeFile( #if !defined(_WIN32) && !defined(WIN32) if( S_ISLNK(mode) ){ const char *zTo = (const char*)sqlite3_value_text(pData); - if( zTo==0 || symlink(zTo, zFile)<0 ) return 1; + if( zTo==0 ) return 1; + unlink(zFile); + if( symlink(zTo, zFile)<0 ) return 1; }else #endif { @@ -7539,13 +7617,19 @@ static int writeFile( return 1; } #else - /* Legacy unix */ - struct timeval times[2]; - times[0].tv_usec = times[1].tv_usec = 0; - times[0].tv_sec = time(0); - times[1].tv_sec = mtime; - if( utimes(zFile, times) ){ - return 1; + /* Legacy unix. + ** + ** Do not use utimes() on a symbolic link - it sees through the link and + ** modifies the timestamps on the target. Or fails if the target does + ** not exist. */ + if( 0==S_ISLNK(mode) ){ + struct timeval times[2]; + times[0].tv_usec = times[1].tv_usec = 0; + times[0].tv_sec = time(0); + times[1].tv_sec = mtime; + if( utimes(zFile, times) ){ + return 1; + } } #endif } @@ -11617,7 +11701,7 @@ static void sqlarUncompressFunc( sqlite3_value **argv ){ uLong nData; - uLongf sz; + sqlite3_int64 sz; assert( argc==2 ); sz = sqlite3_value_int(argv[1]); @@ -11625,14 +11709,15 @@ static void sqlarUncompressFunc( if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){ sqlite3_result_value(context, argv[0]); }else{ + uLongf szf = sz; const Bytef *pData= sqlite3_value_blob(argv[0]); Bytef *pOut = sqlite3_malloc(sz); if( pOut==0 ){ sqlite3_result_error_nomem(context); - }else if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){ + }else if( Z_OK!=uncompress(pOut, &szf, pData, nData) ){ sqlite3_result_error(context, "error in uncompress()", -1); }else{ - sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT); + sqlite3_result_blob(context, pOut, szf, SQLITE_TRANSIENT); } sqlite3_free(pOut); } @@ -13784,7 +13869,7 @@ sqlite3expert *sqlite3_expert_new(sqlite3 *db, char **pzErrmsg){ sqlite3_stmt *pSql = 0; rc = idxPrintfPrepareStmt(pNew->db, &pSql, pzErrmsg, "SELECT sql FROM sqlite_schema WHERE name NOT LIKE 'sqlite_%%'" - " AND sql NOT LIKE 'CREATE VIRTUAL %%'" + " AND sql NOT LIKE 'CREATE VIRTUAL %%' ORDER BY rowid" ); while( rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pSql) ){ const char *zSql = (const char*)sqlite3_column_text(pSql, 0); @@ -13888,103 +13973,1221 @@ int sqlite3_expert_sql( return rc; } -int sqlite3_expert_analyze(sqlite3expert *p, char **pzErr){ - int rc; - IdxHashEntry *pEntry; +int sqlite3_expert_analyze(sqlite3expert *p, char **pzErr){ + int rc; + IdxHashEntry *pEntry; + + /* Do trigger processing to collect any extra IdxScan structures */ + rc = idxProcessTriggers(p, pzErr); + + /* Create candidate indexes within the in-memory database file */ + if( rc==SQLITE_OK ){ + rc = idxCreateCandidates(p); + }else if ( rc==SQLITE_BUSY_TIMEOUT ){ + if( pzErr ) + *pzErr = sqlite3_mprintf("Cannot find a unique index name to propose."); + return rc; + } + + /* Generate the stat1 data */ + if( rc==SQLITE_OK ){ + rc = idxPopulateStat1(p, pzErr); + } + + /* Formulate the EXPERT_REPORT_CANDIDATES text */ + for(pEntry=p->hIdx.pFirst; pEntry; pEntry=pEntry->pNext){ + p->zCandidates = idxAppendText(&rc, p->zCandidates, + "%s;%s%s\n", pEntry->zVal, + pEntry->zVal2 ? " -- stat1: " : "", pEntry->zVal2 + ); + } + + /* Figure out which of the candidate indexes are preferred by the query + ** planner and report the results to the user. */ + if( rc==SQLITE_OK ){ + rc = idxFindIndexes(p, pzErr); + } + + if( rc==SQLITE_OK ){ + p->bRun = 1; + } + return rc; +} + +/* +** Return the total number of statements that have been added to this +** sqlite3expert using sqlite3_expert_sql(). +*/ +int sqlite3_expert_count(sqlite3expert *p){ + int nRet = 0; + if( p->pStatement ) nRet = p->pStatement->iId+1; + return nRet; +} + +/* +** Return a component of the report. +*/ +const char *sqlite3_expert_report(sqlite3expert *p, int iStmt, int eReport){ + const char *zRet = 0; + IdxStatement *pStmt; + + if( p->bRun==0 ) return 0; + for(pStmt=p->pStatement; pStmt && pStmt->iId!=iStmt; pStmt=pStmt->pNext); + switch( eReport ){ + case EXPERT_REPORT_SQL: + if( pStmt ) zRet = pStmt->zSql; + break; + case EXPERT_REPORT_INDEXES: + if( pStmt ) zRet = pStmt->zIdx; + break; + case EXPERT_REPORT_PLAN: + if( pStmt ) zRet = pStmt->zEQP; + break; + case EXPERT_REPORT_CANDIDATES: + zRet = p->zCandidates; + break; + } + return zRet; +} + +/* +** Free an sqlite3expert object. +*/ +void sqlite3_expert_destroy(sqlite3expert *p){ + if( p ){ + sqlite3_close(p->dbm); + sqlite3_close(p->dbv); + idxScanFree(p->pScan, 0); + idxStatementFree(p->pStatement, 0); + idxTableFree(p->pTable); + idxWriteFree(p->pWrite); + idxHashClear(&p->hIdx); + sqlite3_free(p->zCandidates); + sqlite3_free(p); + } +} + +#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ + +/************************* End ../ext/expert/sqlite3expert.c ********************/ + +/************************* Begin ../ext/intck/sqlite3intck.h ******************/ +/* +** 2024-02-08 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +*/ + +/* +** Incremental Integrity-Check Extension +** ------------------------------------- +** +** This module contains code to check whether or not an SQLite database +** is well-formed or corrupt. This is the same task as performed by SQLite's +** built-in "PRAGMA integrity_check" command. This module differs from +** "PRAGMA integrity_check" in that: +** +** + It is less thorough - this module does not detect certain types +** of corruption that are detected by the PRAGMA command. However, +** it does detect all kinds of corruption that are likely to cause +** errors in SQLite applications. +** +** + It is slower. Sometimes up to three times slower. +** +** + It allows integrity-check operations to be split into multiple +** transactions, so that the database does not need to be read-locked +** for the duration of the integrity-check. +** +** One way to use the API to run integrity-check on the "main" database +** of handle db is: +** +** int rc = SQLITE_OK; +** sqlite3_intck *p = 0; +** +** sqlite3_intck_open(db, "main", &p); +** while( SQLITE_OK==sqlite3_intck_step(p) ){ +** const char *zMsg = sqlite3_intck_message(p); +** if( zMsg ) printf("corruption: %s\n", zMsg); +** } +** rc = sqlite3_intck_error(p, &zErr); +** if( rc!=SQLITE_OK ){ +** printf("error occured (rc=%d), (errmsg=%s)\n", rc, zErr); +** } +** sqlite3_intck_close(p); +** +** Usually, the sqlite3_intck object opens a read transaction within the +** first call to sqlite3_intck_step() and holds it open until the +** integrity-check is complete. However, if sqlite3_intck_unlock() is +** called, the read transaction is ended and a new read transaction opened +** by the subsequent call to sqlite3_intck_step(). +*/ + +#ifndef _SQLITE_INTCK_H +#define _SQLITE_INTCK_H + +/* #include "sqlite3.h" */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** An ongoing incremental integrity-check operation is represented by an +** opaque pointer of the following type. +*/ +typedef struct sqlite3_intck sqlite3_intck; + +/* +** Open a new incremental integrity-check object. If successful, populate +** output variable (*ppOut) with the new object handle and return SQLITE_OK. +** Or, if an error occurs, set (*ppOut) to NULL and return an SQLite error +** code (e.g. SQLITE_NOMEM). +** +** The integrity-check will be conducted on database zDb (which must be "main", +** "temp", or the name of an attached database) of database handle db. Once +** this function has been called successfully, the caller should not use +** database handle db until the integrity-check object has been destroyed +** using sqlite3_intck_close(). +*/ +int sqlite3_intck_open( + sqlite3 *db, /* Database handle */ + const char *zDb, /* Database name ("main", "temp" etc.) */ + sqlite3_intck **ppOut /* OUT: New sqlite3_intck handle */ +); + +/* +** Close and release all resources associated with a handle opened by an +** earlier call to sqlite3_intck_open(). The results of using an +** integrity-check handle after it has been passed to this function are +** undefined. +*/ +void sqlite3_intck_close(sqlite3_intck *pCk); + +/* +** Do the next step of the integrity-check operation specified by the handle +** passed as the only argument. This function returns SQLITE_DONE if the +** integrity-check operation is finished, or an SQLite error code if +** an error occurs, or SQLITE_OK if no error occurs but the integrity-check +** is not finished. It is not considered an error if database corruption +** is encountered. +** +** Following a successful call to sqlite3_intck_step() (one that returns +** SQLITE_OK), sqlite3_intck_message() returns a non-NULL value if +** corruption was detected in the db. +** +** If an error occurs and a value other than SQLITE_OK or SQLITE_DONE is +** returned, then the integrity-check handle is placed in an error state. +** In this state all subsequent calls to sqlite3_intck_step() or +** sqlite3_intck_unlock() will immediately return the same error. The +** sqlite3_intck_error() method may be used to obtain an English language +** error message in this case. +*/ +int sqlite3_intck_step(sqlite3_intck *pCk); + +/* +** If the previous call to sqlite3_intck_step() encountered corruption +** within the database, then this function returns a pointer to a buffer +** containing a nul-terminated string describing the corruption in +** English. If the previous call to sqlite3_intck_step() did not encounter +** corruption, or if there was no previous call, this function returns +** NULL. +*/ +const char *sqlite3_intck_message(sqlite3_intck *pCk); + +/* +** Close any read-transaction opened by an earlier call to +** sqlite3_intck_step(). Any subsequent call to sqlite3_intck_step() will +** open a new transaction. Return SQLITE_OK if successful, or an SQLite error +** code otherwise. +** +** If an error occurs, then the integrity-check handle is placed in an error +** state. In this state all subsequent calls to sqlite3_intck_step() or +** sqlite3_intck_unlock() will immediately return the same error. The +** sqlite3_intck_error() method may be used to obtain an English language +** error message in this case. +*/ +int sqlite3_intck_unlock(sqlite3_intck *pCk); + +/* +** If an error has occurred in an earlier call to sqlite3_intck_step() +** or sqlite3_intck_unlock(), then this method returns the associated +** SQLite error code. Additionally, if pzErr is not NULL, then (*pzErr) +** may be set to point to a nul-terminated string containing an English +** language error message. Or, if no error message is available, to +** NULL. +** +** If no error has occurred within sqlite3_intck_step() or +** sqlite_intck_unlock() calls on the handle passed as the first argument, +** then SQLITE_OK is returned and (*pzErr) set to NULL. +*/ +int sqlite3_intck_error(sqlite3_intck *pCk, const char **pzErr); + +/* +** This API is used for testing only. It returns the full-text of an SQL +** statement used to test object zObj, which may be a table or index. +** The returned buffer is valid until the next call to either this function +** or sqlite3_intck_close() on the same sqlite3_intck handle. +*/ +const char *sqlite3_intck_test_sql(sqlite3_intck *pCk, const char *zObj); + + +#ifdef __cplusplus +} /* end of the 'extern "C"' block */ +#endif + +#endif /* ifndef _SQLITE_INTCK_H */ + +/************************* End ../ext/intck/sqlite3intck.h ********************/ +/************************* Begin ../ext/intck/sqlite3intck.c ******************/ +/* +** 2024-02-08 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +*/ + +/* #include "sqlite3intck.h" */ +#include +#include + +#include +#include + +/* +** nKeyVal: +** The number of values that make up the 'key' for the current pCheck +** statement. +** +** rc: +** Error code returned by most recent sqlite3_intck_step() or +** sqlite3_intck_unlock() call. This is set to SQLITE_DONE when +** the integrity-check operation is finished. +** +** zErr: +** If the object has entered the error state, this is the error message. +** Is freed using sqlite3_free() when the object is deleted. +** +** zTestSql: +** The value returned by the most recent call to sqlite3_intck_testsql(). +** Each call to testsql() frees the previous zTestSql value (using +** sqlite3_free()) and replaces it with the new value it will return. +*/ +struct sqlite3_intck { + sqlite3 *db; + const char *zDb; /* Copy of zDb parameter to _open() */ + char *zObj; /* Current object. Or NULL. */ + + sqlite3_stmt *pCheck; /* Current check statement */ + char *zKey; + int nKeyVal; + + char *zMessage; + int bCorruptSchema; + + int rc; /* Error code */ + char *zErr; /* Error message */ + char *zTestSql; /* Returned by sqlite3_intck_test_sql() */ +}; + + +/* +** Some error has occurred while using database p->db. Save the error message +** and error code currently held by the database handle in p->rc and p->zErr. +*/ +static void intckSaveErrmsg(sqlite3_intck *p){ + p->rc = sqlite3_errcode(p->db); + sqlite3_free(p->zErr); + p->zErr = sqlite3_mprintf("%s", sqlite3_errmsg(p->db)); +} + +/* +** If the handle passed as the first argument is already in the error state, +** then this function is a no-op (returns NULL immediately). Otherwise, if an +** error occurs within this function, it leaves an error in said handle. +** +** Otherwise, this function attempts to prepare SQL statement zSql and +** return the resulting statement handle to the user. +*/ +static sqlite3_stmt *intckPrepare(sqlite3_intck *p, const char *zSql){ + sqlite3_stmt *pRet = 0; + if( p->rc==SQLITE_OK ){ + p->rc = sqlite3_prepare_v2(p->db, zSql, -1, &pRet, 0); + if( p->rc!=SQLITE_OK ){ + intckSaveErrmsg(p); + assert( pRet==0 ); + } + } + return pRet; +} + +/* +** If the handle passed as the first argument is already in the error state, +** then this function is a no-op (returns NULL immediately). Otherwise, if an +** error occurs within this function, it leaves an error in said handle. +** +** Otherwise, this function treats argument zFmt as a printf() style format +** string. It formats it according to the trailing arguments and then +** attempts to prepare the results and return the resulting prepared +** statement. +*/ +static sqlite3_stmt *intckPrepareFmt(sqlite3_intck *p, const char *zFmt, ...){ + sqlite3_stmt *pRet = 0; + va_list ap; + char *zSql = 0; + va_start(ap, zFmt); + zSql = sqlite3_vmprintf(zFmt, ap); + if( p->rc==SQLITE_OK && zSql==0 ){ + p->rc = SQLITE_NOMEM; + } + pRet = intckPrepare(p, zSql); + sqlite3_free(zSql); + va_end(ap); + return pRet; +} + +/* +** Finalize SQL statement pStmt. If an error occurs and the handle passed +** as the first argument does not already contain an error, store the +** error in the handle. +*/ +static void intckFinalize(sqlite3_intck *p, sqlite3_stmt *pStmt){ + int rc = sqlite3_finalize(pStmt); + if( p->rc==SQLITE_OK && rc!=SQLITE_OK ){ + intckSaveErrmsg(p); + } +} + +/* +** If there is already an error in handle p, return it. Otherwise, call +** sqlite3_step() on the statement handle and return that value. +*/ +static int intckStep(sqlite3_intck *p, sqlite3_stmt *pStmt){ + if( p->rc ) return p->rc; + return sqlite3_step(pStmt); +} + +/* +** Execute SQL statement zSql. There is no way to obtain any results +** returned by the statement. This function uses the sqlite3_intck error +** code convention. +*/ +static void intckExec(sqlite3_intck *p, const char *zSql){ + sqlite3_stmt *pStmt = 0; + pStmt = intckPrepare(p, zSql); + intckStep(p, pStmt); + intckFinalize(p, pStmt); +} + +/* +** A wrapper around sqlite3_mprintf() that uses the sqlite3_intck error +** code convention. +*/ +static char *intckMprintf(sqlite3_intck *p, const char *zFmt, ...){ + va_list ap; + char *zRet = 0; + va_start(ap, zFmt); + zRet = sqlite3_vmprintf(zFmt, ap); + if( p->rc==SQLITE_OK ){ + if( zRet==0 ){ + p->rc = SQLITE_NOMEM; + } + }else{ + sqlite3_free(zRet); + zRet = 0; + } + return zRet; +} + +/* +** This is used by sqlite3_intck_unlock() to save the vector key value +** required to restart the current pCheck query as a nul-terminated string +** in p->zKey. +*/ +static void intckSaveKey(sqlite3_intck *p){ + int ii; + char *zSql = 0; + sqlite3_stmt *pStmt = 0; + sqlite3_stmt *pXinfo = 0; + const char *zDir = 0; + + assert( p->pCheck ); + assert( p->zKey==0 ); + + pXinfo = intckPrepareFmt(p, + "SELECT group_concat(desc, '') FROM %Q.sqlite_schema s, " + "pragma_index_xinfo(%Q, %Q) " + "WHERE s.type='index' AND s.name=%Q", + p->zDb, p->zObj, p->zDb, p->zObj + ); + if( p->rc==SQLITE_OK && SQLITE_ROW==sqlite3_step(pXinfo) ){ + zDir = (const char*)sqlite3_column_text(pXinfo, 0); + } + + if( zDir==0 ){ *** 15215 LINES SKIPPED *** From nobody Mon Jun 10 07:29:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyNjd71glz5P6PR; Mon, 10 Jun 2024 07:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyNjd6RR3z4tGm; Mon, 10 Jun 2024 07:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718004581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8rKw+E+6oY66WW+1N1ap+zzhAG6fu7eBBgW/m60YFM=; b=JKDgURss5ibphkwqTNww+5kMIZtRp5lfnC3AiMlxeroRVHtmJamXUVIgGvaLC8Hf4w4S6p gyBarfzn7V40dJCXQ8B8wX7DjdUVgHy1+WDv12XukPVrEW1Jaaqqb5VLVe5T2MlI8DC6HY y+Tcrjv7hXfw2vdddMhA3JNejCXozSu3enWXPrD7iMrtYHLsHyQhuniHByIKcEmFkDEls7 3ZUIYiUUvPXrCEP1VZ2uHs2TaQhiqyd98H0nVKAoNEET1UxtI++piQd8AWY5eYSnHbDbXs HBA2runleKSFvUMd6ojr0yo9AZ4Yfi5PJnttnrbw1ulJvi9fd07DK8yAm/IOSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718004581; a=rsa-sha256; cv=none; b=Vnj9Fh2/9o2fBedEIV1DkpLZDTm8tO3LTdL1rW1rZS0Gl9iFjZvNDZT37sgGkbm/QRIRmx ngWfJtaQ4QLHBdcJXHubx6VPZg3QcObu/wBtRKIhxyVENGZbOzW7xXOho0p4fp5g3kX3fC sp0LAAMn3Fmr+ZSl/h0x/nGK7VYForliNGDwbBWOuawQZ28FzzdqhEqgZ+SLw97cuWXjPT szy52MDCorI3lKbtCu7tNTS6B/wRyvBIrAzxKm7aNU4POqxvYKUQxQ5Xe7HGzIiHCLnIvo WIMEd4H5JUe7dKyQavF3VahVS/9wqmahBuJ+fHEKCNnDI2s0oQXwMCmF4eQZBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718004581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t8rKw+E+6oY66WW+1N1ap+zzhAG6fu7eBBgW/m60YFM=; b=iprE0FPpxcYM2N5TpgF/9J0Mq1FW/fJKY1sBtbL1rz8dOQkILU+KRKfdGPyCv17DZuxSxi datrxwAqqllp2T7stXtXfsOj65Ccpn1TbZabyZMcyJKawnaaLpZer6p6KnZ82O9GPn2XDP fNHqKmB9KZvF6o+t3OPQ/PafGgPlvc6Pnv/TU1X1E3+aha3876rGrXtYZT3R/Yd9Be74/x 8a018MRlNCKmtDg1istP1PH9Hxt8YvjtspCxCXWbJXXZY4gPI+r3Xt80JLlykxabtRMNlj vH1TzxqHoUiXUgistRvP6CbQWFknV+f8+Mf5EuQ3v4X5n1dI93AZdDEc7QCrJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyNjd5wftzGrS; Mon, 10 Jun 2024 07:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A7TfI6027948; Mon, 10 Jun 2024 07:29:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A7TfcU027946; Mon, 10 Jun 2024 07:29:41 GMT (envelope-from git) Date: Mon, 10 Jun 2024 07:29:41 GMT Message-Id: <202406100729.45A7TfcU027946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 55c5dad2f305 - stable/14 - Merge commit 382f70a877f0 from llvm-project (by Louis Dionne): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 55c5dad2f305f74d1ff5ca85c453635511aab9b2 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=55c5dad2f305f74d1ff5ca85c453635511aab9b2 commit 55c5dad2f305f74d1ff5ca85c453635511aab9b2 Author: Dimitry Andric AuthorDate: 2024-06-07 18:42:53 +0000 Commit: Dimitry Andric CommitDate: 2024-06-10 07:29:25 +0000 Merge commit 382f70a877f0 from llvm-project (by Louis Dionne): [libc++][NFC] Rewrite function call on two lines for clarity (#79141) Previously, there was a ternary conditional with a less-than comparison appearing inside a template argument, which was really confusing because of the <...> of the function template. This patch rewrites the same statement on two lines for clarity. Merge commit d129ea8d2fa3 from llvm-project (by Vitaly Buka): [libcxx] Align `__recommend() + 1` by __endian_factor (#90292) This is detected by asan after #83774 Allocation size will be divided by `__endian_factor` before storing. If it's not aligned, we will not be able to recover allocation size to pass into `__alloc_traits::deallocate`. we have code like this ``` auto __allocation = std::__allocate_at_least(__alloc(), __recommend(__sz) + 1); __p = __allocation.ptr; __set_long_cap(__allocation.count); void __set_long_cap(size_type __s) _NOEXCEPT { __r_.first().__l.__cap_ = __s / __endian_factor; __r_.first().__l.__is_long_ = true; } size_type __get_long_cap() const _NOEXCEPT { return __r_.first().__l.__cap_ * __endian_factor; } inline ~basic_string() { __annotate_delete(); if (__is_long()) __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap()); } ``` 1. __recommend() -> even size 2. `std::__allocate_at_least(__alloc(), __recommend(__sz) + 1)` - > not even size 3. ` __set_long_cap() `- > lose one bit of size for __endian_factor == 2 (see `/ __endian_factor`) 4. `__alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap())` -> uses even size (see `__get_long_cap`) This should fix incorrect deallocation sizes for some instances of std::string. Memory profiling or debugging tools like AddressSanitizer, LeakSanitizer or TCMalloc could then complain about the the size passed to a deallocation not matching the size originally passed to the allocation. Reported by: Aliaksei Kandratsenka PR: 279560 MFC after: 3 days (cherry picked from commit ead8e4c081e5c4de4d508fc353f381457b058ca6) --- contrib/llvm-project/libcxx/include/string | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/string b/contrib/llvm-project/libcxx/include/string index ba169c3dbfc9..56e2ef09947f 100644 --- a/contrib/llvm-project/libcxx/include/string +++ b/contrib/llvm-project/libcxx/include/string @@ -1943,10 +1943,10 @@ private: if (__s < __min_cap) { return static_cast(__min_cap) - 1; } - size_type __guess = - __align_it < sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : 1 > (__s + 1) - 1; + const size_type __boundary = sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : __endian_factor; + size_type __guess = __align_it<__boundary>(__s + 1) - 1; if (__guess == __min_cap) - ++__guess; + __guess += __endian_factor; return __guess; } From nobody Mon Jun 10 07:29:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyNjr0vTyz5P6GG; Mon, 10 Jun 2024 07:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyNjr0Qr5z4tnv; Mon, 10 Jun 2024 07:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718004592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A6DE9itxYpoEFE3p/tVFL+NuwhF+G7R0QNDNDspy2nw=; b=JzEf61lypo9ADsdsGwSteGvDt/YfOFRkDENmdq4iG29zZVL7PM7eD/DgbENEi+H0mf++zv mQuAErWpQOrdlFCUxTM+f9QS/o3MA+SJwntdyLA71bADE04hFzBkbyIt+wDXdKdsokaoNO Kjml8vsDpiYAdv+Ign6Tu6u9+9XKddfMKec7JfqkRxVI6pgQ32gRhift7Xgn/cSUwYqhmf SUaKjZixmdcHeyt8zSKbPupxktWuBDTXnGgxQ6TpBJF5GYUDUs++kN/LXy0gAv2IiGO6X1 kTX3qUrn8h6m2/9XloCD9xBcOk+VaR0RkSEThvTl/uVj47LV8kuiHDeFZoIpOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718004592; a=rsa-sha256; cv=none; b=SJ0WAZ825YXAYB+yc8dMc13pyFMh4b810t13AYW9jb0VVdHAc7rSvSerlI4eerjhV9FTpl fS4KeWW8QbDepN0BPxcjYaaqvyhNe9gZfasjvUnKS8s3DiNR6i1JMyCxI2lofpsXP+jEgb sL5X4LAMOOigtpuz0w2efzez+Ii8kJQaB7V+UvzTCGQcCcSs+KjbZQdH42BV4KRRdTtgVX Y5GUtCdumw/YPyunQmOyn4gtkKawiwznxdhxcalHstQ0BZWFkPUXRfrOYQuJEzJRZ6DT/4 0u7s0vYllt3m5vEGRMUCrc01r3PiNYryWM2VC0tatLit2nkSWihpk/uJtLFY7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718004592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A6DE9itxYpoEFE3p/tVFL+NuwhF+G7R0QNDNDspy2nw=; b=kwQs6dyhFZMxcrecMryCsn4PZdVy3y3feG+aarWLIrm8U327v/tplEuClifBly5SFK0b/C fEv+oiBqaEOhw0jjlLvrp4enefFVLwdHu+4K2LcLeaQaooIYAVwrLlSHvNYqbCXYbonzla bwKWjlwfbsMlVrVaEQE2AHsm5NaxCARGdVXetqWQ1simYQTKLzpmwfCBZGuXXEnWMnTfgi gGIs5lnEJepiVqxBnI+qHvWou8WIlIZfzgl5V4gJVd2n5+enUoDoh9Xnr3FsNpkJnvWkfG tL9oDSoqfoD2MdryKt9ATnsqqLUHKm4hdx9ejjNBIeqXeTgYr+R4prAXNsl2PA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyNjr021VzGrT; Mon, 10 Jun 2024 07:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45A7TpRS028110; Mon, 10 Jun 2024 07:29:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45A7TpjK028107; Mon, 10 Jun 2024 07:29:51 GMT (envelope-from git) Date: Mon, 10 Jun 2024 07:29:51 GMT Message-Id: <202406100729.45A7TpjK028107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: ef4d145057c1 - stable/13 - Merge commit 382f70a877f0 from llvm-project (by Louis Dionne): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ef4d145057c10e452ac07b3111b4b4d0c5382fb5 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ef4d145057c10e452ac07b3111b4b4d0c5382fb5 commit ef4d145057c10e452ac07b3111b4b4d0c5382fb5 Author: Dimitry Andric AuthorDate: 2024-06-07 18:42:53 +0000 Commit: Dimitry Andric CommitDate: 2024-06-10 07:29:30 +0000 Merge commit 382f70a877f0 from llvm-project (by Louis Dionne): [libc++][NFC] Rewrite function call on two lines for clarity (#79141) Previously, there was a ternary conditional with a less-than comparison appearing inside a template argument, which was really confusing because of the <...> of the function template. This patch rewrites the same statement on two lines for clarity. Merge commit d129ea8d2fa3 from llvm-project (by Vitaly Buka): [libcxx] Align `__recommend() + 1` by __endian_factor (#90292) This is detected by asan after #83774 Allocation size will be divided by `__endian_factor` before storing. If it's not aligned, we will not be able to recover allocation size to pass into `__alloc_traits::deallocate`. we have code like this ``` auto __allocation = std::__allocate_at_least(__alloc(), __recommend(__sz) + 1); __p = __allocation.ptr; __set_long_cap(__allocation.count); void __set_long_cap(size_type __s) _NOEXCEPT { __r_.first().__l.__cap_ = __s / __endian_factor; __r_.first().__l.__is_long_ = true; } size_type __get_long_cap() const _NOEXCEPT { return __r_.first().__l.__cap_ * __endian_factor; } inline ~basic_string() { __annotate_delete(); if (__is_long()) __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap()); } ``` 1. __recommend() -> even size 2. `std::__allocate_at_least(__alloc(), __recommend(__sz) + 1)` - > not even size 3. ` __set_long_cap() `- > lose one bit of size for __endian_factor == 2 (see `/ __endian_factor`) 4. `__alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap())` -> uses even size (see `__get_long_cap`) This should fix incorrect deallocation sizes for some instances of std::string. Memory profiling or debugging tools like AddressSanitizer, LeakSanitizer or TCMalloc could then complain about the the size passed to a deallocation not matching the size originally passed to the allocation. Reported by: Aliaksei Kandratsenka PR: 279560 MFC after: 3 days (cherry picked from commit ead8e4c081e5c4de4d508fc353f381457b058ca6) --- contrib/llvm-project/libcxx/include/string | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/string b/contrib/llvm-project/libcxx/include/string index ba169c3dbfc9..56e2ef09947f 100644 --- a/contrib/llvm-project/libcxx/include/string +++ b/contrib/llvm-project/libcxx/include/string @@ -1943,10 +1943,10 @@ private: if (__s < __min_cap) { return static_cast(__min_cap) - 1; } - size_type __guess = - __align_it < sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : 1 > (__s + 1) - 1; + const size_type __boundary = sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : __endian_factor; + size_type __guess = __align_it<__boundary>(__s + 1) - 1; if (__guess == __min_cap) - ++__guess; + __guess += __endian_factor; return __guess; } From nobody Tue Jun 11 01:33:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VyrmZ1wR0z5NLQR; Tue, 11 Jun 2024 01:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VyrmZ1Qlsz4n1r; Tue, 11 Jun 2024 01:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718069630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cptJ0DlMG35yLKgs4bpuIcgWduHvYoe9B6DMPFiYYdM=; b=kJWbvR8o+HrUa3PcujACkAfCZmTsB/EiBqGeao+Bf2HKqlHNkgseawng0ZH8JsacMfTKmr UOnv6JwZIwFGDZZ832QqLDgmHgXUZGO49SefQFE8W68vFAad6ig9+q0hsoPLP4Eu+nBICS PpN+75ufxnKrcaSwihwg6RvB8ISAX+NBnGoJz9ZVWHdf3Uxckcl2jYo6V59wfhxo73BTc4 mLWho+GsVAcFctRCU8RueLwb+VT104NSFHYBd2DAPPTbm+DzayrMK9l8kImmfYN/SumVbT X/Vb8ybaRSYti3PptnFqRZrszcB5VUF0PBqGqxhDoYCk/4qav5mproAEAIVqow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718069630; a=rsa-sha256; cv=none; b=qDVcl/b/7bMc01mehPHnxSkpYQcwWbBc+Igsfk6B+vYR7NRfsSUPt351Dhi5DzLFExWlZ4 ZVpTtWp2PYMTpQz3c9n1rczVbtkSDhT005UJk2ZujW8Cdr5BabYIK+//emWS6hMB5a/YMC SK1bjt2qZts3Nr8+NYTgQTOxu2Ps9j3lryd3IlJi2HWte103MTL4rs+eYs/XzwtqFL+eYb AVrsDCz8GzePXfAcKflaN8kh6S3ynvxxaEdEgDF2abGqolKlS8ZSZ2gnhEKxuxcHXI92Rc GNfbJblv8EM9uvJVldaE5rpIO7RwjlGYO+yaaweSmhxmeDgrxCbE6xdJdFOBeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718069630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cptJ0DlMG35yLKgs4bpuIcgWduHvYoe9B6DMPFiYYdM=; b=Bi3eFAGl9TYU0a+ar6BfnU54ADKLIzeVlt7/7lyHqk2InhIg7EALoI6U9dCZK/ab1wsmoA 0AgGfsvg8KxIytKZp5mWPCXngyyH3eaaBnKSbJP+NtqhpLpjV5i2Ves+YkvPjO8nFxNQ7W kYEo7CtgKBSQRHHRFV4tPqauTshlrksP+ILomOVqwUSJi6uBl75w2XGuLeSbxhHVbDjuJa VeNwUx13n83HjSni/Jyz25dtL/bPcfk0Le+oj2XQNK3XlzHIWTkENyz8ceDsArdVvukt8V fxwUGeb8TCUNcZVnG79zfHi/PO1dUtJmgOk1GO0xqX7q6k1bpiDiWnYk2d4+TQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VyrmZ11tpzq3m; Tue, 11 Jun 2024 01:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B1XoKs068679; Tue, 11 Jun 2024 01:33:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B1Xo9c068676; Tue, 11 Jun 2024 01:33:50 GMT (envelope-from git) Date: Tue, 11 Jun 2024 01:33:50 GMT Message-Id: <202406110133.45B1Xo9c068676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: a3f7b81fdd22 - stable/14 - mbuf: provide m_freemp() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a3f7b81fdd2205207085ba5d038b402aba748c6e Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a3f7b81fdd2205207085ba5d038b402aba748c6e commit a3f7b81fdd2205207085ba5d038b402aba748c6e Author: Gleb Smirnoff AuthorDate: 2024-06-11 01:31:02 +0000 Commit: Gleb Smirnoff CommitDate: 2024-06-11 01:31:02 +0000 mbuf: provide m_freemp() This function follows both m_nextpkt and m_next linkage freeing all mbufs. Note that existing m_freem() follows only m_next. Reviewed by: khng Differential Revision: https://reviews.freebsd.org/D45477 (cherry picked from commit badf44cc21249a56e7d822a77acfdd21f8352d50) --- sys/kern/kern_mbuf.c | 19 +++++++++++++++++++ sys/kern/uipc_mbuf.c | 3 +++ sys/sys/mbuf.h | 2 ++ 3 files changed, 24 insertions(+) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index 0897ac4cc2db..002e508e91cc 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -1569,6 +1569,25 @@ m_freem(struct mbuf *mb) mb = m_free(mb); } +/* + * Free an entire chain of mbufs and associated external buffers, following + * both m_next and m_nextpkt linkage. + * Note: doesn't support NULL argument. + */ +void +m_freemp(struct mbuf *m) +{ + struct mbuf *n; + + MBUF_PROBE1(m__freemp, m); + do { + n = m->m_nextpkt; + while (m != NULL) + m = m_free(m); + m = n; + } while (m != NULL); +} + /* * Temporary primitive to allow freeing without going through m_free. */ diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index f1e986eaa348..b10e524e6e4b 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -113,6 +113,9 @@ SDT_PROBE_DEFINE1_XLATE(sdt, , , m__free, SDT_PROBE_DEFINE1_XLATE(sdt, , , m__freem, "struct mbuf *", "mbufinfo_t *"); +SDT_PROBE_DEFINE1_XLATE(sdt, , , m__freemp, + "struct mbuf *", "mbufinfo_t *"); + #include /* diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 757eba3165f9..f7925da795cd 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -67,6 +67,7 @@ SDT_PROBE_DECLARE(sdt, , , m__cljget); SDT_PROBE_DECLARE(sdt, , , m__cljset); SDT_PROBE_DECLARE(sdt, , , m__free); SDT_PROBE_DECLARE(sdt, , , m__freem); +SDT_PROBE_DECLARE(sdt, , , m__freemp); #endif /* _KERNEL */ @@ -844,6 +845,7 @@ void m_extadd(struct mbuf *, char *, u_int, m_ext_free_t, u_int m_fixhdr(struct mbuf *); struct mbuf *m_fragment(struct mbuf *, int, int); void m_freem(struct mbuf *); +void m_freemp(struct mbuf *); void m_free_raw(struct mbuf *); struct mbuf *m_get2(int, int, short, int); struct mbuf *m_get3(int, int, short, int); From nobody Tue Jun 11 01:33:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyrmb3PtRz5NLbj; Tue, 11 Jun 2024 01:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyrmb2j9tz4mtD; Tue, 11 Jun 2024 01:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718069631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLKzVWpxx//zMnpfq8dciJ0e6CKODOU1Rbhfx99RWk4=; b=vapllASqZLXJpCuSoq0v5J/Ufdxnvhwd1dtWYDt2bY2sbGVvfbhtT7c+2cc/O2yx7UO0CD QEh5u6ZuzpACwB/Ns3OHmt5EqoAv1bEaLDscWDOs0iv151gWbASQLLmmBw6KIqa9tj03d2 ELwWBn41+KrgrxXSZn4wptMGgxQ5EExDA5kmxpMFXiI6G+iCcj3s6Ilqe2qgb3E39EJsPx pmq0izGfMDsuEEvrepF2dzayckSGqsqAGeM81zkGH7mR2+6H+01zcCRwmOjLcvxBaVizd0 /6W9c8eMtwgQDoDJ+qmiJP28O82/kuj9axmxs5r+IrnLSgR3jeKwX/x8dCacRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718069631; a=rsa-sha256; cv=none; b=ZYxbkidHMRBotF4YwCnSI/sGJ/+StqMqz/mZ+awchpHjLLM+WITDODvH18uzflslQd8rpu lf6jMeON//TSbmPr01H9cevIOUy7otakzXzgtzh0RGWvjz2qzqMtTepSAYh6mXPa/25Nx2 jVfSuVVKxT7GwOkOgJIiAR97LpC1fq4FMHVWouZvB+npraIomIJMm/1dgnvrPIpvUtrdbz bkCJ6e5dmx8FmRPgiQX7hOX0eXREqs97jOssJEZc72fO/Gd5PAE1UjjCy2tC5sfKwNMGkV 3P8dIA1P+cwp7e6Lz8fNmjmC0tBnk0DlVadRGDysCGnbQ2FRpd2rnfZpu2uWnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718069631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLKzVWpxx//zMnpfq8dciJ0e6CKODOU1Rbhfx99RWk4=; b=Uz9O6nY1neYmK/A3JMM3VyFppMfe21rax2pIF1tG+LZUTiMz4RAH42C7EcYAOq1jLMD20C h85GvPT1aLp2CFPWVCq/VPhYw5lucMY9ZIcm+R6YCg2wmcU7cB3KURtsOx096I+r5uDHiC 62p3JdOmFM4WFACvr3Pn+gETb3j4HBYZ2YVJ7BIYZonMJdCDKCFHIjprx8xKJlQfyKmJZz +5RbeWfCoWHZux/fXPnTlXoj9AkZLasgsdoXg5aopcMoaqg0PIUXt9I1Q2IPYE/5SAV8pw pRf91LD/TYYuYSYNcHPIEITSdfxH6Dc4BSPvxXocsC8j6Iyyc5d9+WShFKfw5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyrmb2KbMzpgs; Tue, 11 Jun 2024 01:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B1XpGv068730; Tue, 11 Jun 2024 01:33:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B1XpOC068727; Tue, 11 Jun 2024 01:33:51 GMT (envelope-from git) Date: Tue, 11 Jun 2024 01:33:51 GMT Message-Id: <202406110133.45B1XpOC068727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: f70581ff7d55 - stable/14 - unix: use m_freemp() when disposing unix socket buffers List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f70581ff7d556aa49a130fa24c876e74b877278c Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f70581ff7d556aa49a130fa24c876e74b877278c commit f70581ff7d556aa49a130fa24c876e74b877278c Author: Gleb Smirnoff AuthorDate: 2024-06-11 01:31:08 +0000 Commit: Gleb Smirnoff CommitDate: 2024-06-11 01:31:08 +0000 unix: use m_freemp() when disposing unix socket buffers The new unix/dgram uses m_nextpkt linkage, while the old unix/stream uses m_next linkage. This fixes memory leak. Diagnosed by: khng Reviewed by: khng, markj PR: 279467 Fixes: 458f475df8e5912609c14208c189414a8255c738 Differential Revision: https://reviews.freebsd.org/D45478 (cherry picked from commit a9b55a66440ce67e545b60f2861badbfc5ec6327) --- sys/kern/uipc_usrreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index e54cd01956bf..87b82763b5f1 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -2189,7 +2189,7 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2) if (m != NULL) { unp_scan(m, unp_freerights); - m_freem(m); + m_freemp(m); } } @@ -3276,7 +3276,7 @@ unp_dispose(struct socket *so) if (m != NULL) { unp_scan(m, unp_freerights); - m_freem(m); + m_freemp(m); } } From nobody Tue Jun 11 04:49:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyx6G3fGCz5Ncyy; Tue, 11 Jun 2024 04:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyx6G360fz54lM; Tue, 11 Jun 2024 04:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718081366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uUCeRuhUJSkztkUveV/NPSp0ko2XRfS/KamdqW2gdLk=; b=KizvdMw4qtJP/ZmjA8e95Bi+Drh+Lcdr3BKZJfdDOneO7MWsSS9M9lq0b+wxd2HXVAcGwd P5bjjFEd3uWcrLCj/iZ16E1k5j2djH4MORox9f8gZmX/CRsRTZkOdUMMs3l6rZ9Izwsfmc KevgZjuuj2UwYWUwoB2nYWOFPcDxw+4w6cHPM+YTXP0yMdYs5RkIX2WycLWSIMHc6WTit6 ZuUG4ZasTbr2I1sNqWsVrvwJgIxBs1dDsubh/h/U2pur2PJaGP/vGiYwsy3UjF1VDE0R4J ABsYcoqqXN8i3l9KYqvskO0yj7mp8IxOa/PMp05wchpV+XxJ/8BKCkw47gq0gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718081366; a=rsa-sha256; cv=none; b=CAwPAHVXlUb6YZ7yByyD/SVxb+fbtgmZXFmn2k3ZXM+q/JBmar27bUZ4cooNQBN+yeQLjy 7V6JR4DxZOzAyOpnHNGHw4tfCUf6+F2iDINdYbJrs8rJGa1USHquvNBGc7M7WMT4eLN729 aaD3M3WkpZsBLEB1CbpxgXtIf1HO1Ie89iBmNZDVxyYHNcMpqvNENrIZZEdHVr86P8Zbn3 gINQT7IQIC7Mfw/kcUg2303bimQ8KaBvmp3xb7WEoaGryfXuobx+H9HIiG2m9ShLEfU70g HxU8b3C44EH/01x0pv1tx/lT+QdfTF7PvWo+0WEJrvMKvqR0QJ+oJQLfM6kqFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718081366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uUCeRuhUJSkztkUveV/NPSp0ko2XRfS/KamdqW2gdLk=; b=N7kMkf9nnUsV2TrWA3QKMCmSE/AS69pJgzAtPBwXOnx5YzIpyczl989QcWglkMfCIIYsCu YdT+Dy1/t3gIgguo+EUbDDKd2WuiFrrxtn+7tOyEpezzmdH7D52U+FuhxCai7XI3HdbgJE AlSRlldNR35cbtQwt+H3AA/X8+L6/wXjnP/VKBRyqR6ku/It70ElSRGFaZSx9/H/jzjHGz 4hrUwynpOTEHPT0Te3k1qQfLx2sTpxlxVjxd6AF90RaPpjrqC9bVZnUIpxWEKIcAF+MWiL 1nETl33SI+940c8IjlkAYWjZEVcwR2HVQi8mb8FdgYCkoUstBGwNSOOjWp6NDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyx6G2hsXzvkM; Tue, 11 Jun 2024 04:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B4nQMi092247; Tue, 11 Jun 2024 04:49:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B4nQJ6092244; Tue, 11 Jun 2024 04:49:26 GMT (envelope-from git) Date: Tue, 11 Jun 2024 04:49:26 GMT Message-Id: <202406110449.45B4nQJ6092244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 9cd77bd9c68b - stable/14 - sys/sysctl.h: Fix wrong assertion with multiple access flags List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9cd77bd9c68bda6134c6672e9a923869b7923343 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9cd77bd9c68bda6134c6672e9a923869b7923343 commit 9cd77bd9c68bda6134c6672e9a923869b7923343 Author: Zhenlei Huang AuthorDate: 2024-06-08 03:21:11 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-11 04:48:59 +0000 sys/sysctl.h: Fix wrong assertion with multiple access flags With multiple flags passed in, e.g., CTLFLAG_RD | CTLFLAG_CAPRD, due to the precedence rules, this will result in false positive assertion. Fix that by surrounding the replacement lists with parentheses. Reviewed by: imp, erj Fixes: 10a1e981d411 iflib: mark isc_driver_version as constant MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45531 (cherry picked from commit 23f4131ad685debef98566351cb9f0e0a5903903) --- sys/sys/sysctl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index bc7a2bc601a1..76cbae25f4e5 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -395,14 +395,14 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define SYSCTL_CONST_STRING(parent, nbr, name, access, arg, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING | CTLFLAG_MPSAFE | (access),\ __DECONST(char *, arg), 0, sysctl_handle_string, "A", descr); \ - CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(!((access) & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING) #define SYSCTL_ADD_CONST_STRING(ctx, parent, nbr, name, access, arg, descr) \ ({ \ char *__arg = __DECONST(char *, arg); \ - CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(!((access) & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING); \ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_STRING | \ From nobody Tue Jun 11 04:50:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vyx7J0NX2z5NdHT; Tue, 11 Jun 2024 04:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vyx7H70mzz5581; Tue, 11 Jun 2024 04:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718081420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KwCCbCkvpjj+7pjUHk7PsQRDgMRG6Xw5WABsn/ELX8I=; b=F20ItGeysmz9NIgXIF0DwUL6Ze6izDspPNfONE8zf+pjR8cSvR25g7/EHQEPSmhZUmIR4s 0xTgN06H0vgVHBfGRdYTM3wf06vvP0hDknVGEn167LLJ/WI0pfZ7A2PdL8r+eYCBMtwDDz 1SW5YAcJuEplC7bNtzhmreTODlO+D4vd7wWWwleFiA4RHszAhlqI4A9lD8UoniPzycWMhz DBcIg09iyRcHN9gUEt70tU/fddh8wirCAcd9KBjSd8qkzrrhsOchxLRugMbe5m9UAefX03 ryijo5bzh7kN56PtcAdUkOosvA+l6YKRXNNHx6YUSfLQrD1OogveGcchucWEzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718081420; a=rsa-sha256; cv=none; b=PW3FoSvfw3CgYvbjkh7LkwNBvk1dhWBsqpxMn2bThVMkQGNvYkazYqhJxGxprh4NcCukaT dTsdOSV54GwjRlBi+mSPosccqsWG7ClizNDBNsrL9ewAwyvKMUHbSFtg82zFFTk0L5hrCz wY5AUesLbRXOWxbjPLXfsqq1fXVAKM2lFNuP9Athl+XEaNOpC0Wei8VdOPCooQxssfmjBZ ARF64P0iLPXeFt+qAl/sGOAG0x+kf6jXNi1K/+AhhX/MJRSg43vyy/6+iGJeuWymqKXX+8 urbqh5ziQ0Viyix3C+mOEyyb7rDsetMFfZuQ+gsLsDXKZ0mKcR2tPQ1DbLkAag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718081420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KwCCbCkvpjj+7pjUHk7PsQRDgMRG6Xw5WABsn/ELX8I=; b=DZhhJCyksyGqcpjMMcX48YFw9rU4AIO9UyJ/lMnotb0/A8Eqm1fGM5+cFX/+mw0PYXMgK3 KIMUBuLloLFtL4nFvscTtI8+DCbmUXOWXZegDO6BfUVyBOsrk4FF4SYulw2yJbZXPQRLno O5Pd4mijW6n2+PnOxXMLxWez5tN8VeLwHjvsb4khNoSZaUcOKOZikQSqXFVTZ+sw3aaWWS We98SOJ2zGpildRzBx5to7ewRivijfZuUeUO6AMt+TZgcjyvhwFW8kbPAJYTNrBcGDbUUw ZEYgm7rCQNhk6m5Z34erIPb8I1Ycrv5RLlSRa2I41ax7BWL7osJF/+530mYIvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vyx7H6czczvVp; Tue, 11 Jun 2024 04:50:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45B4oJFw001064; Tue, 11 Jun 2024 04:50:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B4oJaY001061; Tue, 11 Jun 2024 04:50:19 GMT (envelope-from git) Date: Tue, 11 Jun 2024 04:50:19 GMT Message-Id: <202406110450.45B4oJaY001061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: c720ff8f95fc - stable/13 - sys/sysctl.h: Fix wrong assertion with multiple access flags List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c720ff8f95fc2e36944f503d1b40301cea7b7687 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c720ff8f95fc2e36944f503d1b40301cea7b7687 commit c720ff8f95fc2e36944f503d1b40301cea7b7687 Author: Zhenlei Huang AuthorDate: 2024-06-08 03:21:11 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-11 04:49:58 +0000 sys/sysctl.h: Fix wrong assertion with multiple access flags With multiple flags passed in, e.g., CTLFLAG_RD | CTLFLAG_CAPRD, due to the precedence rules, this will result in false positive assertion. Fix that by surrounding the replacement lists with parentheses. Reviewed by: imp, erj Fixes: 10a1e981d411 iflib: mark isc_driver_version as constant MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45531 (cherry picked from commit 23f4131ad685debef98566351cb9f0e0a5903903) (cherry picked from commit 9cd77bd9c68bda6134c6672e9a923869b7923343) --- sys/sys/sysctl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 3a61f1153c5a..ff87e32df2b7 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -382,14 +382,14 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define SYSCTL_CONST_STRING(parent, nbr, name, access, arg, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING | CTLFLAG_MPSAFE | (access),\ __DECONST(char *, arg), 0, sysctl_handle_string, "A", descr); \ - CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(!((access) & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING) #define SYSCTL_ADD_CONST_STRING(ctx, parent, nbr, name, access, arg, descr) \ ({ \ char *__arg = __DECONST(char *, arg); \ - CTASSERT(!(access & CTLFLAG_WR)); \ + CTASSERT(!((access) & CTLFLAG_WR)); \ CTASSERT(((access) & CTLTYPE) == 0 || \ ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING); \ sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_STRING | \ From nobody Tue Jun 11 13:27:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cC1fZGz5LgHG; Tue, 11 Jun 2024 13:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cC0nYtz4flb; Tue, 11 Jun 2024 13:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ECPxdYIc86+g8kFFhxd94cAZrQJ0sGEKAhgYiEWXMkM=; b=XkE1u2cewEH5AaHb/trz5jdDF0qxBAOhnid5H3lgTfh/rs9Di2DqGed12VF+jEa5dbDq45 2VwStyLH8sqLiDwMSVPrnmlD5lqJVgnJ9S/2Jp6M9/twTZ8b9vduHKltt25ONwhMgNCOeT loPc/7kLadM919O/3FnQjjwIN4cjdswlRE24iiOtobBAwqSIzXIRfVQIZATtSrs0x9IG7W h3STh4rD3DbV+nxTmdiIr6/MDzYweEl9HeYsFnA21S2Vd1hYqPzvOGwZ9ziqfTTB4R31fn DO3qVRUXTsEywPF/FQ4SGBevi6fteT9BMSK+2WwqBOzbNR1KclAv7D31FRQsOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112459; a=rsa-sha256; cv=none; b=idM4RZT5hr1RQyX7sfdwOqk4/U78yvhqU5fh94TeAZI+S5A0c/DbV4NrElu/bM07u58ZSK yD3y4SQAcbQqLMmDFy0pn5fuEdiIs3ahLxwUddmhLnDpohuohjbaj8mbjjVYu8APMcM6bH 3OCR3s6BuX9XKTMtfnRKsUoHarqtNKgsy2LEQyhDxpSUpvPE4Lal7dEtErlqNADb5b5/ei nMv//d049ei+sa34fEQzQnmbl6W8UgjAJS+ZYLWbxbELJRf7GFdhzYK+bVSreXElBuGypt g1Y03JoDq1TOU3IOOx4IqfektyQAtdX5IUggJRAPEC10PCkZuitM3utxbZoxvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ECPxdYIc86+g8kFFhxd94cAZrQJ0sGEKAhgYiEWXMkM=; b=UDA9Hi6n9SUVkZaKEGmbKqEWQQoQPTsD7/DQ+3uULYi9n4UYEgZzwsGW56cRxoQkRzsZjQ JriNrFhNvRfAhiHDwsJfv9Glvj6hcePHzQI4bWAksCRo8j0AWADwPW7CsvhqLmGUBj8h+l xx0QCR2+SY6RbFOlAhCpcYlBfKknfThAtFg0+oepMswOGS+RyJCv7+TqL7Pfwp2sHJ1FJJ u7PR1aoialOfsQFnCkpzU7pMqsie+SJtQJbAxmuSlmfpGl6E9eCsVLG8kwER11ZTckweKZ 3ClpQlFsqa56xx3wGIpf+aOkZjNFYafv0S6b+a/q8RO+dnyKIH42Elw07U1I/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cC0GgWz199G; Tue, 11 Jun 2024 13:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRcul072731; Tue, 11 Jun 2024 13:27:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRcE0072728; Tue, 11 Jun 2024 13:27:38 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:38 GMT Message-Id: <202406111327.45BDRcE0072728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: c3fe41b3a375 - stable/14 - vnet tests: check for if_bridge.ko List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c3fe41b3a375bebef2bec5f0a5c2159b4a2ba347 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c3fe41b3a375bebef2bec5f0a5c2159b4a2ba347 commit c3fe41b3a375bebef2bec5f0a5c2159b4a2ba347 Author: Kristof Provost AuthorDate: 2024-06-04 18:02:18 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:03:23 +0000 vnet tests: check for if_bridge.ko A number of tests create a bridge, but did not check if if_bridge.ko is loaded. We usually get away with that, because `ifconfig bridge create` autoloads the module, but if we run the tests in a jail (e.g. because of kyua's upcoming execenv.jail.params feature) we can't load the module and these tests can fail. Check if the module is loaded, skip the test if it is not. Reviewed by: markj MFC after: 1 week Event: Kitchener-Waterloo Hackathon 202406 Differential Revision: https://reviews.freebsd.org/D45487 (cherry picked from commit 480ad4055314efbfff7eedbb34272031d836ba89) --- tests/sys/common/vnet.subr | 7 +++++++ tests/sys/net/if_bridge_test.sh | 13 +++++++++++++ tests/sys/net/if_ovpn/if_ovpn.sh | 2 ++ tests/sys/netinet/carp.sh | 7 ++++++- tests/sys/netpfil/common/rdr.sh | 1 + tests/sys/netpfil/pf/altq.sh | 4 +--- tests/sys/netpfil/pf/pfsync.sh | 1 + tests/sys/netpfil/pf/sctp.sh | 1 + tests/sys/netpfil/pf/tcp.sh | 1 + 9 files changed, 33 insertions(+), 4 deletions(-) diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr index 50abadaec81d..0f7dec0dc6f1 100644 --- a/tests/sys/common/vnet.subr +++ b/tests/sys/common/vnet.subr @@ -26,6 +26,13 @@ vnet_mkepair() echo ${ifname%a} } +vnet_init_bridge() +{ + if ! kldstat -q -m if_bridge; then + atf_skip "This test requires if_bridge" + fi +} + vnet_mkbridge() { ifname=$(ifconfig bridge create) diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index 44370a905223..66656be1d84f 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -39,6 +39,7 @@ bridge_transmit_ipv4_unicast_head() bridge_transmit_ipv4_unicast_body() { vnet_init + vnet_init_bridge epair_alcatraz=$(vnet_mkepair) epair_singsing=$(vnet_mkepair) @@ -76,6 +77,7 @@ stp_head() stp_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -142,6 +144,7 @@ stp_vlan_head() stp_vlan_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -216,6 +219,7 @@ static_head() static_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) bridge=$(vnet_mkbridge) @@ -273,6 +277,7 @@ span_head() span_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) epair_span=$(vnet_mkepair) @@ -326,6 +331,7 @@ delete_with_members_head() delete_with_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -352,6 +358,7 @@ mac_conflict_head() mac_conflict_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -390,6 +397,7 @@ inherit_mac_head() inherit_mac_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -418,6 +426,7 @@ stp_validation_head() stp_validation_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -461,6 +470,7 @@ gif_head() gif_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -545,6 +555,7 @@ check_mtu() mtu_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) gif=$(ifconfig gif create) @@ -606,6 +617,7 @@ vlan_head() vlan_body() { vnet_init + vnet_init_bridge vid=1 @@ -673,6 +685,7 @@ many_bridge_members_head() many_bridge_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) ifcount=256 diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh index 88df430aead6..3623f57115ac 100644 --- a/tests/sys/net/if_ovpn/if_ovpn.sh +++ b/tests/sys/net/if_ovpn/if_ovpn.sh @@ -584,6 +584,7 @@ multi_client_head() multi_client_body() { ovpn_init + vnet_init_bridge bridge=$(vnet_mkbridge) srv=$(vnet_mkepair) @@ -796,6 +797,7 @@ ra_head() ra_body() { ovpn_init + vnet_init_bridge bridge=$(vnet_mkbridge) srv=$(vnet_mkepair) diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index d08940d433d7..d0e10bc2c085 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -71,6 +71,7 @@ basic_v4_head() basic_v4_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -105,7 +106,6 @@ basic_v4_cleanup() vnet_cleanup } - atf_test_case "unicast_v4" "cleanup" unicast_v4_head() { @@ -116,6 +116,7 @@ unicast_v4_head() unicast_v4_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -173,6 +174,7 @@ basic_v6_head() basic_v6_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -220,6 +222,7 @@ unicast_v6_head() unicast_v6_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -281,6 +284,7 @@ unicast_ll_v6_head() unicast_ll_v6_body() { carp_init + vnet_init_bridge j=carp_uni_ll_v6 @@ -391,6 +395,7 @@ nd6_ns_source_mac_head() nd6_ns_source_mac_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) diff --git a/tests/sys/netpfil/common/rdr.sh b/tests/sys/netpfil/common/rdr.sh index 7d6297870e6c..0d6f27694c8c 100644 --- a/tests/sys/netpfil/common/rdr.sh +++ b/tests/sys/netpfil/common/rdr.sh @@ -83,6 +83,7 @@ local_redirect_body() firewall=$1 firewall_init $firewall nat_init $firewall + vnet_init_bridge bridge=$(vnet_mkbridge) ifconfig ${bridge} 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 57a9edf11366..a902c7caaf4f 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -156,9 +156,7 @@ codel_bridge_body() { altq_init is_altq_supported codel - if ! kldstat -q -m if_bridge; then - atf_skip "This test requires if_bridge" - fi + vnet_init_bridge epair=$(vnet_mkepair) ifconfig ${epair}a 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index 91c7b8410a08..441221f39d27 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -326,6 +326,7 @@ pbr_common_body() atf_skip "This test requires carp" fi pfsynct_init + vnet_init_bridge bridge0=$(vnet_mkbridge) bridge1=$(vnet_mkbridge) diff --git a/tests/sys/netpfil/pf/sctp.sh b/tests/sys/netpfil/pf/sctp.sh index 66225e132d1c..c6dba1719d00 100644 --- a/tests/sys/netpfil/pf/sctp.sh +++ b/tests/sys/netpfil/pf/sctp.sh @@ -504,6 +504,7 @@ pfsync_body() sctp_init pfsynct_init + vnet_init_bridge if ! kldstat -q -m carp then atf_skip "This test requires carp" diff --git a/tests/sys/netpfil/pf/tcp.sh b/tests/sys/netpfil/pf/tcp.sh index 84536480b44e..f1bffdba2bfa 100644 --- a/tests/sys/netpfil/pf/tcp.sh +++ b/tests/sys/netpfil/pf/tcp.sh @@ -39,6 +39,7 @@ rst_head() rst_body() { pft_init + vnet_init_bridge epair_srv=$(vnet_mkepair) epair_cl=$(vnet_mkepair) From nobody Tue Jun 11 13:27:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cD1LwGz5Lfq1; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cD0knPz4fPC; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyJhvn/xrlfx/I+ohgQZBuAaK+thlvUSmCZrQYmJx7s=; b=tNzBKi3iP9fp0wMP6WZpMFXVTYhRroTcfcWtkcRmpIEgoE7xglV3pslLj8SsNMoxhrIauC p/vYTjxiovkgcuOubGfvR8cHRSZ2AZa3SWd+xId3ZifMyXuT2TczW6mGRJnoxIRuCUhVDL Ytk+RxFr0+/Y0FB2U3zGxAJFY/pAiZcs6XosAPK2mc10qFJce0VXn5ybi/cO9yqk6ZJwxw BiOXEme1UGQE4o57aKY4jVEvxaLAaP3T2LPJmkC4PhECaP5l8vKjCFdMf7yaeSYRmTQY3T 2rE2wJOyB8NLgUOMh5Yg2jYH7r+Xv9Y1fvPCUlkQSubUtgcTLH9EEnzP/kgSFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112460; a=rsa-sha256; cv=none; b=jSWTZw3lTU5DQfezH/oMLxphER0Af1taC2Kbp2XmxP3I8fmi3kI7cWQJKIapqvpkFf5eoS 7hRpMdKdHIa64KClzkQY8xpjjko1zsT6hdULTVsrQmz+lxl79m43sekAgNKKcGON++In8V kE3FHtOCPfZD/AHY8eqFzcmZqUzbFKWc9KwX8dfgz+jaJByfQTzkZghcWpC/v3FN/ksI/b QfMkhnD1ES+Y5hDOBITBsaJ6+EivBTqGvJdhZSAuAnaw+3ZL1LaRnlbYOAsv2V/JqqPoe2 FQxrjnyAAL/mQtEUnWrgB2l5J2ck5ebC0Mi0AxW44E+Zz3GPuil2TEuP3TM3yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyJhvn/xrlfx/I+ohgQZBuAaK+thlvUSmCZrQYmJx7s=; b=K/1Jk4H7K05NCG+HvA5WXLBYqRIA/pJxASoQRabnQb8vl0lIuRFq1wZn4OGjiEa8sjUCgp V8ck09InIaGndnFmPwQ910BRNVJVMMgOfCef4RvuImI9vd9u1rXvaUJuEO8oWQRLlB5p64 /PpJEtFunZ+hQvR6hggOxCg4uxpEx7/GKgRpirMSpaN9VtU/8loI+hWh0sAkU0KFH4xOF1 6fOGqyUXbl4AEONldqSkqg7/XX02yzEgJfIFmvK2lh6iSboYPxNJPePP/TUBLjZtNSzB3w WGpjxzQOlOOkg0IP4xzMfJJiFYUozL4gpxRYrQHP7g/NOzYAVUyIse/nZzrH8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cD0MKnz19nt; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRdQn072833; Tue, 11 Jun 2024 13:27:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRdgJ072830; Tue, 11 Jun 2024 13:27:39 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:39 GMT Message-Id: <202406111327.45BDRdgJ072830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 154dd1eaa643 - stable/13 - vnet tests: check for if_bridge.ko List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 154dd1eaa643ffff4df525dca2e747490df61df3 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=154dd1eaa643ffff4df525dca2e747490df61df3 commit 154dd1eaa643ffff4df525dca2e747490df61df3 Author: Kristof Provost AuthorDate: 2024-06-04 18:02:18 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:05:13 +0000 vnet tests: check for if_bridge.ko A number of tests create a bridge, but did not check if if_bridge.ko is loaded. We usually get away with that, because `ifconfig bridge create` autoloads the module, but if we run the tests in a jail (e.g. because of kyua's upcoming execenv.jail.params feature) we can't load the module and these tests can fail. Check if the module is loaded, skip the test if it is not. Reviewed by: markj MFC after: 1 week Event: Kitchener-Waterloo Hackathon 202406 Differential Revision: https://reviews.freebsd.org/D45487 (cherry picked from commit 480ad4055314efbfff7eedbb34272031d836ba89) --- tests/sys/common/vnet.subr | 7 +++++++ tests/sys/net/if_bridge_test.sh | 11 +++++++++++ tests/sys/netinet/carp.sh | 2 ++ tests/sys/netpfil/common/rdr.sh | 1 + tests/sys/netpfil/pf/altq.sh | 4 +--- tests/sys/netpfil/pf/pfsync.sh | 1 + tests/sys/netpfil/pf/sctp.sh | 1 + tests/sys/netpfil/pf/tcp.sh | 1 + 8 files changed, 25 insertions(+), 3 deletions(-) diff --git a/tests/sys/common/vnet.subr b/tests/sys/common/vnet.subr index cc04b326c9db..9e92adc0db75 100644 --- a/tests/sys/common/vnet.subr +++ b/tests/sys/common/vnet.subr @@ -16,6 +16,13 @@ vnet_mkepair() echo ${ifname%a} } +vnet_init_bridge() +{ + if ! kldstat -q -m if_bridge; then + atf_skip "This test requires if_bridge" + fi +} + vnet_mkbridge() { ifname=$(ifconfig bridge create) diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index b9540c79faaa..f67978e25900 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -39,6 +39,7 @@ bridge_transmit_ipv4_unicast_head() bridge_transmit_ipv4_unicast_body() { vnet_init + vnet_init_bridge epair_alcatraz=$(vnet_mkepair) epair_singsing=$(vnet_mkepair) @@ -76,6 +77,7 @@ stp_head() stp_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -142,6 +144,7 @@ stp_vlan_head() stp_vlan_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -216,6 +219,7 @@ static_head() static_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) bridge=$(vnet_mkbridge) @@ -273,6 +277,7 @@ span_head() span_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) epair_span=$(vnet_mkepair) @@ -326,6 +331,7 @@ delete_with_members_head() delete_with_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -352,6 +358,7 @@ mac_conflict_head() mac_conflict_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -390,6 +397,7 @@ inherit_mac_head() inherit_mac_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair=$(vnet_mkepair) @@ -418,6 +426,7 @@ stp_validation_head() stp_validation_body() { vnet_init + vnet_init_bridge epair_one=$(vnet_mkepair) epair_two=$(vnet_mkepair) @@ -461,6 +470,7 @@ gif_head() gif_body() { vnet_init + vnet_init_bridge epair=$(vnet_mkepair) @@ -526,6 +536,7 @@ many_bridge_members_head() many_bridge_members_body() { vnet_init + vnet_init_bridge bridge=$(vnet_mkbridge) ifcount=256 diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index 8136b174785f..23dccaf90de6 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -66,6 +66,7 @@ basic_v4_head() basic_v4_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) @@ -110,6 +111,7 @@ basic_v6_head() basic_v6_body() { carp_init + vnet_init_bridge bridge=$(vnet_mkbridge) epair_one=$(vnet_mkepair) diff --git a/tests/sys/netpfil/common/rdr.sh b/tests/sys/netpfil/common/rdr.sh index 7d6297870e6c..0d6f27694c8c 100644 --- a/tests/sys/netpfil/common/rdr.sh +++ b/tests/sys/netpfil/common/rdr.sh @@ -83,6 +83,7 @@ local_redirect_body() firewall=$1 firewall_init $firewall nat_init $firewall + vnet_init_bridge bridge=$(vnet_mkbridge) ifconfig ${bridge} 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/altq.sh b/tests/sys/netpfil/pf/altq.sh index 0ced82a3a942..8622ce72dfbf 100644 --- a/tests/sys/netpfil/pf/altq.sh +++ b/tests/sys/netpfil/pf/altq.sh @@ -156,9 +156,7 @@ codel_bridge_body() { altq_init is_altq_supported codel - if ! kldstat -q -m if_bridge; then - atf_skip "This test requires if_bridge" - fi + vnet_init_bridge epair=$(vnet_mkepair) ifconfig ${epair}a 192.0.2.1/24 up diff --git a/tests/sys/netpfil/pf/pfsync.sh b/tests/sys/netpfil/pf/pfsync.sh index ada98699efec..8fcfdc2dcfa3 100644 --- a/tests/sys/netpfil/pf/pfsync.sh +++ b/tests/sys/netpfil/pf/pfsync.sh @@ -323,6 +323,7 @@ pbr_common_body() atf_skip "This test requires carp" fi pfsynct_init + vnet_init_bridge bridge0=$(vnet_mkbridge) bridge1=$(vnet_mkbridge) diff --git a/tests/sys/netpfil/pf/sctp.sh b/tests/sys/netpfil/pf/sctp.sh index 66225e132d1c..c6dba1719d00 100644 --- a/tests/sys/netpfil/pf/sctp.sh +++ b/tests/sys/netpfil/pf/sctp.sh @@ -504,6 +504,7 @@ pfsync_body() sctp_init pfsynct_init + vnet_init_bridge if ! kldstat -q -m carp then atf_skip "This test requires carp" diff --git a/tests/sys/netpfil/pf/tcp.sh b/tests/sys/netpfil/pf/tcp.sh index 84536480b44e..f1bffdba2bfa 100644 --- a/tests/sys/netpfil/pf/tcp.sh +++ b/tests/sys/netpfil/pf/tcp.sh @@ -39,6 +39,7 @@ rst_head() rst_body() { pft_init + vnet_init_bridge epair_srv=$(vnet_mkepair) epair_cl=$(vnet_mkepair) From nobody Tue Jun 11 13:27:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cD42b1z5LgCw; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cD1LpDz4fjY; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CHRWY0guO7Rnr4of2N3ya8sMMzr6M3J5Kdz0izQHV0Y=; b=xLiashf6P7IXjJNgS8GFgs/MI0Oah9eRM5IEn9c/W0LRXdSj8Vz9mLQqKMeML/cDyNFTMZ kmmenBtYUEOoCuA6g/EMxGIVibPxQCeNeRhXdgryKDAKKbhoTH7tFpAdfH61CCUSoS9hxm ERaGiHo2u2NLxB9zOKqGNR9LVVF8oTjf+ahuDZTr0A0h2zMm5G9CJnspKmqzWZ/+Pr9fdX +pA3+cDqYTeoECJJke8J3TOq0XP8KjJww0bwBldMqPhtFRoh+3ZSmX6ZMlhLA80WOnMvfx UhjQZXUpfyXSFLfs5sI3r4DJ5Xb0zJ8ab5lzDrg3Yi1L92/7ZrSp17aPIqtL6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112460; a=rsa-sha256; cv=none; b=q8GIeDhylmIC356GnGKRsliBoIpRkPGqtwox93PqwFHwvk+YQ8xaiHp/+DTyFcl3Ch7HKR N/fZELNFXMPDwPvXKxFWBFhI7pAYfydrFo0eRNq5WxcUt/I0WxribS0rhaWQOevFXCtZqK hiW4XIHYbhs1KIgQi5CyEmlYjUDXSJ/BhMYfI/98Dgw6BtJsivooJAPk5/u3MJxCnrPu4i kEv2+p275xHEWghAUEAZZykt7cqF+A7nZEFBIG2F1aKoNjrH50EexdAEV+UatfkhZuIO2S ugdyEXXeLYkQbTw28EKO6+pkk7F4DITNeNlti2J1uXfUpWMv1rlDcDqAsOmRQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CHRWY0guO7Rnr4of2N3ya8sMMzr6M3J5Kdz0izQHV0Y=; b=NWZL0DFHvnwnlnaP+Xzc1voKjPFbMcZ/gSzIZ/HaRD6kMeiDexTB9qwLfZqX20/wIO+lIW 40HJzpzNz7G/eGtNltnBvd0YZTlolWKdJvZYrVSLvGLplMis7DFw8+wiHihgzeXGWs0Y4r ROxNO+yWedPILn1xZdSB7OSMaC7T1jMKnrAdjd8bG9siz+kjy7xJbBtfa2NXOy4UBagX+R z2GTzq6NZg1wzCBM1VYwXwLxgF09nUthzXzBwSnp1anAqtz68UJ1+ucgqsS1i2F8B7naL9 KSFd8+w+pCauShJLlyS2JEt7FdOBugPAWMdheXqfdD5HagPbcl5YgPenhmHP2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cD0mBYz199H; Tue, 11 Jun 2024 13:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRdSA072884; Tue, 11 Jun 2024 13:27:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRdmv072881; Tue, 11 Jun 2024 13:27:39 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:39 GMT Message-Id: <202406111327.45BDRdmv072881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 357d111ef71f - stable/14 - pf tests: make ether:dummynet test a little more robust List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 357d111ef71fabba9590d2f59a1539d5d27a1f82 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=357d111ef71fabba9590d2f59a1539d5d27a1f82 commit 357d111ef71fabba9590d2f59a1539d5d27a1f82 Author: Kristof Provost AuthorDate: 2024-06-01 20:37:36 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:05:38 +0000 pf tests: make ether:dummynet test a little more robust Allow slightly more bandwidth, but cause ping to give up sooner. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 1c5b886e111663d3c7e30beddae9c10445f620d4) --- tests/sys/netpfil/pf/ether.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/sys/netpfil/pf/ether.sh b/tests/sys/netpfil/pf/ether.sh index 9a1ab1b005d7..e1855949476b 100644 --- a/tests/sys/netpfil/pf/ether.sh +++ b/tests/sys/netpfil/pf/ether.sh @@ -415,7 +415,7 @@ dummynet_body() # Sanity check atf_check -s exit:0 -o ignore ping -i .1 -c 3 -s 1200 192.0.2.2 - jexec alcatraz dnctl pipe 1 config bw 30Byte/s + jexec alcatraz dnctl pipe 1 config bw 300Byte/s jexec alcatraz pfctl -e pft_set_rules alcatraz \ "ether pass in dnpipe 1" @@ -430,14 +430,14 @@ dummynet_body() ping -i .1 -c 5 -s 1200 192.0.2.2 # We should now be hitting the limits and get this packet dropped. - atf_check -s exit:2 -o ignore ping -c 1 -s 1200 192.0.2.2 + atf_check -s exit:2 -o ignore ping -c 1 -t 1 -s 1200 192.0.2.2 # We can now also dummynet outbound traffic! pft_set_rules alcatraz \ "ether pass out dnpipe 1" # We should still be hitting the limits and get this packet dropped. - atf_check -s exit:2 -o ignore ping -c 1 -s 1200 192.0.2.2 + atf_check -s exit:2 -o ignore ping -c 1 -t 1 -s 1200 192.0.2.2 } dummynet_cleanup() From nobody Tue Jun 11 13:27:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cF2SMQz5LfdZ; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cF1mh2z4fJx; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xh6s/wN9zph7UNogDV0de46i8ybs0UHDYG47w1GnU6k=; b=PuiHbo6vx0pBHm7HZEOpgcT7E/UpoRRcKMIPiRHK1LNqkyKXrEDS/yaTa9/hNXNI49TU0p ra/W5yKPqJ1/XVyG/xUZIm0oMsMVaKEFzGKSrCSKiqD1p3mNIzyjwDpSohQvaexA3AeSwn aWLbZz7GnzECyqp8k0iqi0kG50AOvk63iBSrhZEaxz1IdBMllkrDv1CYEjaeFrn1dUHsLM CCPI4sOeWHA96bVMWtVm3M3oA7ksyO0IRlK0yAWOg9XdjzT25Y7ao1mt30tPWgTxSWk1LQ +2e5Zs2OPUsKem8ipG0yrAr0WCVSeYaEx1XsrGx1quFgJm1yI5gj+BcYSXhPgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112461; a=rsa-sha256; cv=none; b=qYE2Q0VszJd+sUBD0qlZiwtOazJrmxyM7M/s+lVFzsYHv6hQkAmBpSvFV9aCx5Uy7UetNk iHdh6MtK6Opdr+8U49w0v8x1LvTehfZ/OqriaXE/5Xf2Urp6TLA2eJNFdxnflJ6zeFE/zh ImFyUEMShmPMHRD91O3GOVTADvAi+P7Peo4SWkFSLZr1qe3tJ7uikoYPuhkpUEQ2WDm4GH m0kym5OmkfENfVRIjZ+3V3p1P5GMi+EASu7z+BWfnblKLSyBQaERALlm0kwBfW8hdI/fNa 7X7xdHtVyvBnCiiUe13/vccctUaXPw39v6wkUogBXl1lWc8z4qvwZL3Ggm6ydQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xh6s/wN9zph7UNogDV0de46i8ybs0UHDYG47w1GnU6k=; b=jnAvVbdUGusQtf8ULQQti2fkk5SVVlT4YH/JPCyEyzvtiaM60NgIrT0gIdICLmGZU0T5+m Q/0yTJs8Pe1KmI8IzF2nKqiIapdBAYf8bVXK+balhacTvYYAqf0zmxvowPXMQ/LOGl/0qW kzVtPTMTcGxf4zHNkD9jGN01L1UuQID7jS9fvniiGeSH7F5A5ADG2mtOOVcIYPFZZ8YsH6 ieyH3wn3+oc8EjxHs9e9TqeLNpY+GbaOVtT42OjaGbnyuuLjfnJdFPq5PnZwi+bGG4ZSc3 njbXhRYBRPWVVyZVQPjw4VltN5VYK9jvPWyJw+Zib0KgG3SJ2X0Kr/UEbSePSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cF1KSJz19nv; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRfw0072979; Tue, 11 Jun 2024 13:27:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRfmr072971; Tue, 11 Jun 2024 13:27:41 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:41 GMT Message-Id: <202406111327.45BDRfmr072971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 8fb5dc88ad8e - stable/14 - pf: fix overly large copy in pf_rule_to_krule() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8fb5dc88ad8edbf3ab2a60fff4c2af2ad71fceae Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8fb5dc88ad8edbf3ab2a60fff4c2af2ad71fceae commit 8fb5dc88ad8edbf3ab2a60fff4c2af2ad71fceae Author: Kristof Provost AuthorDate: 2024-06-04 12:55:02 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:06:04 +0000 pf: fix overly large copy in pf_rule_to_krule() The timeout array in struct pf_rule has PFTM_OLD_MAX entries, the one in struct pf_krule has PFTM_MAX entries (and PFTM_MAX > PFTM_OLD_MAX). Use the smaller of the sizes when copying. Reported by: CheriBSD MFC after: 1 week Event: Kitchener-Waterloo Hackathon 202406 (cherry picked from commit 4779b16fa61f858ad5c449834f550fbd5e162d98) --- sys/netpfil/pf/pf_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 1a383ae6fd09..7c148d857144 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2071,7 +2071,8 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) krule->os_fingerprint = rule->os_fingerprint; krule->rtableid = rule->rtableid; - bcopy(rule->timeout, krule->timeout, sizeof(krule->timeout)); + /* pf_rule->timeout is smaller than pf_krule->timeout */ + bcopy(rule->timeout, krule->timeout, sizeof(rule->timeout)); krule->max_states = rule->max_states; krule->max_src_nodes = rule->max_src_nodes; krule->max_src_states = rule->max_src_states; From nobody Tue Jun 11 13:27:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vz8cF2WmVz5LfqP; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vz8cF1q3Tz4fd6; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxxQzD0llWaoJtPi+o213mhovubUdjIOHN49Y4UVRaA=; b=W6z+hnOaL0nmcgFk5zoaln5LuQejaSuLBeH6Z5Du+MAz8V3QvX9U53NnIYUYIq6sbSGV8d j5i15ssNQDhUSppeAdR3ehGkOj+9yADR+cmMpLR0L62LKgY/dQ6R16Y0cIk82gCKFMjBd8 lNC4NAxx6pHZDF124W2n4XFfP+eZYUdRzYuqOiIqkuYYzFXYxdMW+ziOjsTNnmNye/5jPl ozKkzA9WL9/pA1+VPewF7i2JzV8GP90V5n79hGB0IPUJCYI8x0nN2N/beej3Aa8D6FhT05 etAfGGBI4rkM4IfhAuaBDRJYihl9wePS5Qrst6Zg4D7TInFohzT4wnguGLw21A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718112461; a=rsa-sha256; cv=none; b=T/x3PV56B8xa9PYzcDatsJrJXZj6wbu634Ae8VSX2pUAuwTznpVTx1SQsQh8V77D6iYq5/ Vfpyw6MsZh1dmFI6YnNrc3Z8AZNEgz+2eM5nPP9ugZSuJF48EzfQMxn6PC1tJxwy3wjd1H cqifkQHzyAvdi6hvtCgS3XyLIIaW3wZhCUGd4Soc4gFy0FuREQAxXdD9j/Dx1pQI/KxCoj rxndMQcSQpwjvW4r69jcHwaOR44O+Z3IbJeHLv8TPaUYG0i3r8OpN5PgeTmLLxvozYZUgQ lGzWYT/ynY+TSez104I4hAwWnJsBVzZZ9lrZ0mYuIhSaUCjtlHIdue3tcM/6hA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718112461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxxQzD0llWaoJtPi+o213mhovubUdjIOHN49Y4UVRaA=; b=NDDsfjObUQtSGdlZ2hpy4me2bvN9LthUcuHVEHJNxHWzoR6gY0aVOL8n2CAzc2UvlmuvaV z7VvVSylgzpf5/eiznVJcPkk/hYrajX+Uxq5nDb3Yj1ppjcUehjv4JJUgTGuQo1w9tPTEe kGvyKvjSl1xFUbUaBWC+2lb/96xnkjg4LtVioahBEJU/HR+wbrzu/+JFPMU/p+so35wz1S XhEGKW1X+1hYxuPUbhkFkvsfMX6CBgaRVn0CVdZrd9gbvDA21lNvH7pjdF6hLDG77TSp5+ Kef4+kviB7uSI0V4phrqlIJWBvr3spu2znYSqh1talxcfz7HDZH/I6bbVBr3Pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vz8cF1M06z19M9; Tue, 11 Jun 2024 13:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45BDRfxE072980; Tue, 11 Jun 2024 13:27:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45BDRfV6072976; Tue, 11 Jun 2024 13:27:41 GMT (envelope-from git) Date: Tue, 11 Jun 2024 13:27:41 GMT Message-Id: <202406111327.45BDRfV6072976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: d92f239a92c4 - stable/13 - pf: fix overly large copy in pf_rule_to_krule() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d92f239a92c448f2954fd4c14775a36532a78dc6 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d92f239a92c448f2954fd4c14775a36532a78dc6 commit d92f239a92c448f2954fd4c14775a36532a78dc6 Author: Kristof Provost AuthorDate: 2024-06-04 12:55:02 +0000 Commit: Kristof Provost CommitDate: 2024-06-11 06:06:11 +0000 pf: fix overly large copy in pf_rule_to_krule() The timeout array in struct pf_rule has PFTM_OLD_MAX entries, the one in struct pf_krule has PFTM_MAX entries (and PFTM_MAX > PFTM_OLD_MAX). Use the smaller of the sizes when copying. Reported by: CheriBSD MFC after: 1 week Event: Kitchener-Waterloo Hackathon 202406 (cherry picked from commit 4779b16fa61f858ad5c449834f550fbd5e162d98) --- sys/netpfil/pf/pf_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 98b5ce318596..a7f9f2604068 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1799,7 +1799,8 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) krule->os_fingerprint = rule->os_fingerprint; krule->rtableid = rule->rtableid; - bcopy(rule->timeout, krule->timeout, sizeof(krule->timeout)); + /* pf_rule->timeout is smaller than pf_krule->timeout */ + bcopy(rule->timeout, krule->timeout, sizeof(rule->timeout)); krule->max_states = rule->max_states; krule->max_src_nodes = rule->max_src_nodes; krule->max_src_states = rule->max_src_states; From nobody Wed Jun 12 16:41:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzrs63dFfz5N37N; Wed, 12 Jun 2024 16:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzrs60S8xz4gZ8; Wed, 12 Jun 2024 16:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wq5yKIK3n4bGIep4MGA0xhfy2Kcj5IP/YlsMI/yZcB4=; b=FDQSuzbjWAil2ZKjy4e5EjzKE9QY8+VkkWPO2LliLnTdPpO6nJHQVRVJnOoVeu2rU3LxaO nxWxDEFKSGzY/s9dmGzTXqu5FlbUWQe2T/9a7ud+bF8J3VtKqgE+8tWpngqpEw8uLhazAH jKycUka0LR7Lc0kve0ksH3Egzw1w9nWwkIsssCgeWE7DqEpsDppOwXlSX2Q4ZO92g/QD03 Ic3L+EpW8ZZVVtjABNNC3jnStldKKFatuGG5BD4MfaUgQVeHDwBuXFR3vtFHG6vo4u/bks UcbVjGUnQWSLRI+wr73BDdY922jVmFxT+ncom9+18L36OBkhScltoJHpftIDiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210474; a=rsa-sha256; cv=none; b=U+NQFCbHCjHXeC6NeKUgSnKsG1OUSFZ7c3KsZKvalC/UogAEhHwBsrjzh6DHVJahkOF8BF 81wq4Q2t1+ES/t2iSWNp17jYZ4DKLlWb+kVpl3Qhz1qaIvAwMKWHGKxSbpvXQxmXbYNEJi LxVbYOHDPHjGiQyTabfzAcKR5DE88vywCIsrU5B1tmvlsRsS6diLHoSeC/ruOHgIz8/jdN GLSuSBCMwJ8lPWBGqq8aGhLo35ueAndErj9MmpVi7CGlppbr6rteSd8xJYz3vnw6r7frKi UH5O4YRMd7FqUVWhVIkfF3Fx+ZWsbvAkHSUY6il3KfQczWmnmUw3OeR8jtt4cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wq5yKIK3n4bGIep4MGA0xhfy2Kcj5IP/YlsMI/yZcB4=; b=Xw6BMDcqDGxouuB66v3zLX+/peLnEPcQxivYAMcCIj0asDNt7axuAOlXYn8CgAEfjGjhnG 6jNln4PxnOOhxPcLWFM9al9lDBgzzc1hWiKUaaL8DH78jDgCmIQxclXYmD+I/fV6kE4D5U IZKe2cMI61b7CzJD27YRE3XgMROzX7ZYWB95jvKzRdmFDaoBicz9MB8oJ9xPSea9o62ed+ v9vA1k6W8sJPI1Iz6Yrm6A3UDsRSJfrRchF4HvK2LZRP6LjbLjKwdzcbQevs2X/tc9SPlc /Hnonuemh2beYncAX5rdWtQaLmFhWvqr2//BoNBTO2Dg+pPwTy92vgoyriyeCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzrs603tdz10nQ; Wed, 12 Jun 2024 16:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfDaF046285; Wed, 12 Jun 2024 16:41:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfDc1046282; Wed, 12 Jun 2024 16:41:13 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:13 GMT Message-Id: <202406121641.45CGfDc1046282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0c2b2e5bd99a - stable/14 - iwn(4): correct debug message: "not" to "no" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0c2b2e5bd99a993ff33ed148c6cd3c53d2c02216 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0c2b2e5bd99a993ff33ed148c6cd3c53d2c02216 commit 0c2b2e5bd99a993ff33ed148c6cd3c53d2c02216 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:01:06 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:56:52 +0000 iwn(4): correct debug message: "not" to "no" Sponosred by: The FreeBSD Foundation (cherry picked from commit 9e012a9da5df131b64c2dfd7d9b6645af4ccef0f) --- sys/dev/iwn/if_iwn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 3b1d879914b6..d2d44d93f948 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -7532,7 +7532,7 @@ iwn_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, break; } if (qid == sc->ntxqs) { - DPRINTF(sc, IWN_DEBUG_XMIT, "%s: not free aggregation queue\n", + DPRINTF(sc, IWN_DEBUG_XMIT, "%s: no free aggregation queue\n", __func__); return 0; } From nobody Wed Jun 12 16:41:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzrs73WrVz5N3Jr; Wed, 12 Jun 2024 16:41:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzrs71CxJz4gcW; Wed, 12 Jun 2024 16:41:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tiU6thc7FYRMS6p4QZwZNGwUXDnrwDm/gViEKqet9yM=; b=TLNKojoEbHxm0mpJ0umkztHnZaZzZ8Fq/K/uB4RPZRMX2eeZ1x7pbDqMxlbu4BQWI7O2Bg uELq6TXo5DWmUPRM0ade5vLNrn6Mxglh0lyKxe4BqXYIM0ydzJLRgOifgly/iIk1/4kw5o FH9LnRpllrwWWenbo8F7Uim1xnN7mnErf1plQNf+/deHudS6+vOjPo0yeD+nL+Mgn5IOWL m2mSPXkCstJHKzv4m/x7/IcADbbvUceG9aFi7b1d8ziCxVUxBVNvQF9KnBXRLgVUhndMjU i/pUMaE97xpkxGkMx+Qys9uQQ8gLcDmi4SJlahJaSfOrfsAgKr5/VPOJ3bf0wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210475; a=rsa-sha256; cv=none; b=UXxSonWH+cdpgOhGsL+2Y7gGHkBgXVa1l98VAnvLYCWnhJvbXU8M0Q6DgPbLm/g1OQPWNW e0C2ERmGkP+XWJQ4cwLrKsLqdWeYKbKf01045mmqrxWoX9LWZySWATU90Z4oynaMaeqrV+ 91ZSC/y7k+AzHbrUcMAwc3VqNATkcum8Oe2xbhAXhxRABTbd8lMRv1Qao0JfLvCY6ZVbIk Bj4Po8ZB8CzpIH6d1vxIiSlYVLzJY8GUBFdjfNCmMcuLCCELJWjtKUMp9/XCgQ4ZCX232W DA8lnw7ILf+GtUysIuNtOMN8nOu4snjsANMsczjUgh55+uESbB5HwuOxGctoxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tiU6thc7FYRMS6p4QZwZNGwUXDnrwDm/gViEKqet9yM=; b=raEkPW2uAm+n3c0JjeleMIxhPyjMSGkdW3lRfO6wmp3Ll4w19OSRf2zRMw/SSdiXHgGRt2 AzMrCgHCBY6bXdvEDOEue7hGzka6T/WURHIlZHGxNLAObppyX/JVRnBgWPekEUVoydcauI QwiSTHAl9r5A3lEq/H1yY7p1xSCCdxOCCmWTRJAi9b3fFtHLGehl6qJvlHYTmamahgVBpT yHfJEDOEflzGM/6QBK7rT6+sm+iOQYLGkk5bIZvZ0WyNNinIZmpx+QHl4lP1ccCeGn3tJI kaTAW8BsIt4RSYh4P1XLqFa2H/bBPnQvnb6T22Q77gXSdrdEkn1R8dSIWkjsLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzrs70hmhz114T; Wed, 12 Jun 2024 16:41:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfFCh046355; Wed, 12 Jun 2024 16:41:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfFal046352; Wed, 12 Jun 2024 16:41:15 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:15 GMT Message-Id: <202406121641.45CGfFal046352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4ed728875b89 - stable/14 - fwget: update wireless IDs for rtw88/89, ath1xk, mt76 and add iwlwifi List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4ed728875b89bbb05885b5dd7a606f70acd1524d Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4ed728875b89bbb05885b5dd7a606f70acd1524d commit 4ed728875b89bbb05885b5dd7a606f70acd1524d Author: Bjoern A. Zeeb AuthorDate: 2024-04-23 01:10:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:57:00 +0000 fwget: update wireless IDs for rtw88/89, ath1xk, mt76 and add iwlwifi Update and add (new) PCI IDs for Realtek rtw88/89, Mediatek 7996/7925, QCA ath1xk, and add Intel iwlwifi IDs. Rather than using a package per driver add fine(r) grained flavors even though it is a lot more likely to break in certain cases. For Intel we need a great level of detail to match PCI IDs so also pass the full pciconf -l line to into the pci_* files as "$2" to have access to these. This lines up with ports commit 80f50c9eb66d. Sponsored by: The FreeBSD Foundation Reviewed by: manu (earlier version) Differential Revision: https://reviews.freebsd.org/D44918 (cherry picked from commit d33f5a0afa54be7f18775f6506f015c7f79a6a5f) --- usr.sbin/fwget/pci/Makefile | 1 + usr.sbin/fwget/pci/pci | 2 +- usr.sbin/fwget/pci/pci_network_intel | 437 ++++++++++++++++++++++++++++++++ usr.sbin/fwget/pci/pci_network_mediatek | 53 ++-- usr.sbin/fwget/pci/pci_network_qca | 62 +++-- usr.sbin/fwget/pci/pci_network_realtek | 46 +++- 6 files changed, 539 insertions(+), 62 deletions(-) diff --git a/usr.sbin/fwget/pci/Makefile b/usr.sbin/fwget/pci/Makefile index 66b3901e4a91..6c500dae6df6 100644 --- a/usr.sbin/fwget/pci/Makefile +++ b/usr.sbin/fwget/pci/Makefile @@ -1,6 +1,7 @@ PACKAGE= fwget SCRIPTS=pci \ + pci_network_intel \ pci_network_mediatek \ pci_network_qca \ pci_network_realtek \ diff --git a/usr.sbin/fwget/pci/pci b/usr.sbin/fwget/pci/pci index 6a66049842e2..fbdfa0001c5c 100644 --- a/usr.sbin/fwget/pci/pci +++ b/usr.sbin/fwget/pci/pci @@ -107,7 +107,7 @@ pci_search_packages() fi . ${LIBEXEC_PATH}/pci_${class}_${vendor} - pci_${class}_${vendor} ${device} + pci_${class}_${vendor} ${device} "${fulldevice}" done IFS=${oldifs} } diff --git a/usr.sbin/fwget/pci/pci_network_intel b/usr.sbin/fwget/pci/pci_network_intel new file mode 100644 index 000000000000..cf8c52075db3 --- /dev/null +++ b/usr.sbin/fwget/pci/pci_network_intel @@ -0,0 +1,437 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 The FreeBSD Foundation +# +# This software was developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. +# + +# Some iwlwifi chipsets are detected by other means and we cannot replicate +# the full logic here. +# Currently we also filter out all those which do have a wildcard device ID +# as well as all for those which exists no firmware (yet). + +# iwlwifi (dynamic) +pci_network_intel_iwlwifi() +{ + + local idstr=$(echo $2 | sed 's,.*\ device=\(0x[0-9a-z]*\) subvendor=\(0x[0-9a-z]*\) subdevice=\(0x[0-9a-z]*\),\1/\2/\3,') + + case "${idstr}" in + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh } + ### >>> + + # 7000 + 0x08b1/*/0x4a6c) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4a6e) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4a70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4c60) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4c70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x402a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x406a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x446a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x486e) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4160) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4162) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4460) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4462) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4560) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x4870) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0x5770) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc02a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc06a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc160) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc162) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc360) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc460) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc462) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc560) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc760) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xc770) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xcc60) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b1/*/0xcc70) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x426a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4220) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4260) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4262) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4360) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0x4370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc26a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc220) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc260) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc262) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b2/*/0xc370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0172) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x0472) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x1070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x1170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8060) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8062) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8070) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8072) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8170) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8172) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8470) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b3/*/0x8570) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x0370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8270) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8272) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x08b4/*/0x8370) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x0000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2050) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x24fb/*/0x2150) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5c10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5f10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9e10) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x500a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x502a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x900a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5002) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5020) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5090) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5100) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5102) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5190) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5400) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5412) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5420) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5490) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x5590) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9000) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9112) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9400) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095a/*/0x9510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x520a) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5200) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5202) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5212) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5290) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5302) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x5310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9200) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x095b/*/0x9310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4012) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4410) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x4510) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3165/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4210) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4212) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + 0x3166/*/0x4310) addpkg "wifi-firmware-iwlwifi-kmod-7000"; return 1 ;; + + # 8000 + 0x24f3/*/0x0000) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x01f0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0004) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x10b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0044) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0250) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0810) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0850) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0910) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0930) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x0950) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x1150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x4010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x8150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9132) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0x9150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xb0b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xc110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd0b0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f3/*/0xd050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x0030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x1030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x8030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0x9030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0xc030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f4/*/0xd030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f5/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24f6/*/0x0030) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x3e01) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x3e02) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x10d0) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0014) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0150) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0810) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0850) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0910) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0930) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x0950) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1012) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1014) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x1130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8050) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x8130) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9010) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9074) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + 0x24fd/*/0x9110) addpkg "wifi-firmware-iwlwifi-kmod-8000"; return 1 ;; + + # 9000 + 0x9df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x30dc/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x31dc/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x271b/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x271c/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0x2526/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + 0xa370/*/*) addpkg "wifi-firmware-iwlwifi-kmod-9000"; return 1 ;; + + # 22000 + 0x02f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x02f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x3df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x4df0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x06f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x34f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x43f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/0x1653) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/0x1654) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0x2723/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x007c) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x0078) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x1651) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x1652) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x2074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x4070) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/0x6074) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + 0xa0f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-22000"; return 1 ;; + + # ax210 + 0x7a70/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x00b0) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0098) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7a70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x00b0) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0098) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7af0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7e40/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x7f70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x51f1/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1691) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/0x1692) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x54f0/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0a10) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0090) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0310) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x0510) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x1673) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x1674) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x2020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x4020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x6020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0x6024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0xe020) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/0xe024) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2725/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2726/*/0x1671) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2726/*/0x1672) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + 0x2729/*/*) addpkg "wifi-firmware-iwlwifi-kmod-ax210"; return 1 ;; + + # bz + 0x272b/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x272d/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x2727/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0x7740/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + 0xa840/*/*) addpkg "wifi-firmware-iwlwifi-kmod-bz"; return 1 ;; + + # sc + 0x6e70/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xd340/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xe340/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + 0xe440/*/*) addpkg "wifi-firmware-iwlwifi-kmod-sc"; return 1 ;; + + ### <<< + + esac +} + +pci_network_intel() +{ + + for _drv in iwlwifi; do + pci_network_intel_${_drv} "$1" "$2" + case $? in + 1) break ;; + esac + done +} diff --git a/usr.sbin/fwget/pci/pci_network_mediatek b/usr.sbin/fwget/pci/pci_network_mediatek index 5e4d2af9eb26..3ed6c8b95b47 100644 --- a/usr.sbin/fwget/pci/pci_network_mediatek +++ b/usr.sbin/fwget/pci/pci_network_mediatek @@ -2,6 +2,10 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright 2023 Bjoern A. Zeeb +# Copyright (c) 2024 The FreeBSD Foundation +# +# Portions of this software were developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -25,45 +29,38 @@ # SUCH DAMAGE. # -# mt7915 -pci_network_mediatek_mt7915() +pci_network_mediatek_mt76() { - # awk 'BEGIN { x = 0; } { if (/mt7915_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7915) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x7906) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - esac -} + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/mediatek/mt76/zzz_fw_ports_fwget.sh } + ### >>> -# mt7921 -pci_network_mediatek_mt7921() -{ + 0x0608) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x0616) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x0717) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7906) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x790a) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x7915) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x7916) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;; + 0x7922) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7925) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7961) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;; + 0x7990) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x7991) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x7992) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; + 0x799a) addpkg "wifi-firmware-mediatek-kmod-mt7996"; return 1 ;; - # awk 'BEGIN { x = 0; } { if (/mt7921_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7961) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x7922) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x0608) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x0616) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - esac -} - -# mt7996 -pci_network_mediatek_mt7996() -{ - - # awk 'BEGIN { x = 0; } { if (/mt7996_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c - case "$1" in - 0x7990) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; + ### <<< esac } pci_network_mediatek() { - for _drv in mt7915 mt7921 mt7996; do + for _drv in mt76; do pci_network_mediatek_${_drv} "$1" case $? in 1) break ;; diff --git a/usr.sbin/fwget/pci/pci_network_qca b/usr.sbin/fwget/pci/pci_network_qca index cf33e0d87239..a97d29ef1135 100644 --- a/usr.sbin/fwget/pci/pci_network_qca +++ b/usr.sbin/fwget/pci/pci_network_qca @@ -29,18 +29,27 @@ pci_network_qca_ath10k() { - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath10k-kmod\"; return 1 ;;\n", tolower($3) }' hw.h - # We ignore the ubiquity entry for now. case "$1" in - 0x003c) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0041) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x003e) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0042) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0040) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0056) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0046) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0042) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; - 0x0050) addpkg "wifi-firmware-ath10k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath10k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x003c) addpkg "wifi-firmware-ath10k-kmod-qca988x_hw20"; return 1 ;; + 0x003e) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw21" + addpkg "wifi-firmware-ath10k-kmod-qca6174_hw30" + return 1 ;; + 0x0040) addpkg "wifi-firmware-ath10k-kmod-qca99x0_hw20"; return 1 ;; + 0x0041) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw21"; return 1 ;; + 0x0042) addpkg "wifi-firmware-ath10k-kmod-qca6174_hw30" + addpkg "wifi-firmware-ath10k-kmod-qca9377_hw10" + return 1 ;; + 0x0046) addpkg "wifi-firmware-ath10k-kmod-qca9984_hw10"; return 1 ;; + 0x0050) addpkg "wifi-firmware-ath10k-kmod-qca9887_hw10"; return 1 ;; + 0x0056) addpkg "wifi-firmware-ath10k-kmod-qca9888_hw20"; return 1 ;; + + ### <<< esac } @@ -48,31 +57,42 @@ pci_network_qca_ath10k() pci_network_qca_ath11k() { - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath11k-kmod\"; return 1 ;;\n", tolower($3) }' pci.c case "$1" in - 0x1101) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; - 0x1104) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; - 0x1103) addpkg "wifi-firmware-ath11k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath11k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x1101) addpkg "wifi-firmware-ath11k-kmod-qca6390_hw20"; return 1 ;; + 0x1103) addpkg "wifi-firmware-ath11k-kmod-wcn6855_hw20"; return 1 ;; + 0x1104) addpkg "wifi-firmware-ath11k-kmod-qcn9074_hw10"; return 1 ;; + + ### <<< esac } # ath12k pci_network_qca_ath12k() { - # No ath12k firmware package yet - return 0 - # awk '/DEVICE_ID[[:space:]]/ { gsub("[()]", "", $3); printf "%s)\taddpkg \"wifi-firmware-ath12k-kmod\"; return 1 ;;\n", tolower($3) }' pci.c case "$1" in - 0x1109) addpkg "wifi-firmware-ath12k-kmod"; return 1 ;; - 0x1107) addpkg "wifi-firmware-ath12k-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/athk/ath12k/zzz_fw_ports_fwget.sh } + ### >>> + + 0x1107) addpkg "wifi-firmware-ath12k-kmod-wcn7850_hw20"; return 1 ;; + + ### <<< esac } pci_network_qca() { - for _drv in ath10k ath11k; do + for _drv in ath10k ath11k ath12k; do pci_network_qca_${_drv} "$1" case $? in 1) break ;; diff --git a/usr.sbin/fwget/pci/pci_network_realtek b/usr.sbin/fwget/pci/pci_network_realtek index 795d9d4a6e0a..d70470b65244 100644 --- a/usr.sbin/fwget/pci/pci_network_realtek +++ b/usr.sbin/fwget/pci/pci_network_realtek @@ -2,6 +2,10 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright 2023 Bjoern A. Zeeb +# Copyright (c) 2024 The FreeBSD Foundation +# +# Portions of this software were developed by Björn Zeeb +# under sponsorship from the FreeBSD Foundation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -29,14 +33,21 @@ pci_network_realtek_rtw88() { - # awk '/PCI_DEVICE\(PCI_VENDOR_ID_REALTEK,/ { gsub(").*", "", $2); printf "%s)\taddpkg \"wifi-firmware-rtw88-kmod\"; return 1 ;;\n", tolower($2) }' *.c case "$1" in - 0xd723) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xb821) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc821) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xb822) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc822) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; - 0xc82f) addpkg "wifi-firmware-rtw88-kmod"; return 1 ;; + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/rtw88/zzz_fw_ports_fwget.sh } + ### >>> + + 0xd723) addpkg "wifi-firmware-rtw88-kmod-rtw8723d"; return 1 ;; + 0xb821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;; + 0xc821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;; + 0xb822) addpkg "wifi-firmware-rtw88-kmod-rtw8822b"; return 1 ;; + 0xc822) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;; + 0xc82f) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;; + + ### <<< esac } @@ -44,11 +55,22 @@ pci_network_realtek_rtw88() pci_network_realtek_rtw89() { - # awk '/PCI_DEVICE\(PCI_VENDOR_ID_REALTEK,/ { gsub(").*", "", $2); printf "%s)\taddpkg \"wifi-firmware-rtw89-kmod\"; return 1 ;;\n", tolower($2) }' *.c - case "$1" in - 0x8852) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; - 0xa85a) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; - 0xc852) addpkg "wifi-firmware-rtw89-kmod"; return 1 ;; + case "$1" in + + # The case pattern table below is generated by a script also helping + # to generate the flavor/firmware Makefile definitions for ports. + # { sys/contrib/dev/rtw89/zzz_fw_ports_fwget.sh } + ### >>> + + 0xb851) addpkg "wifi-firmware-rtw89-kmod-rtw8851b"; return 1 ;; + 0x8852) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;; + 0xa85a) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;; + 0xb852) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;; + 0xb85b) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;; + 0xc852) addpkg "wifi-firmware-rtw89-kmod-rtw8852c"; return 1 ;; + 0x8922) addpkg "wifi-firmware-rtw89-kmod-rtw8922a"; return 1 ;; + + ### <<< esac } From nobody Wed Jun 12 16:41:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsN72hxz5N3Dg; Wed, 12 Jun 2024 16:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsN5fhMz4gcy; Wed, 12 Jun 2024 16:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gP4gKuORWlIfT4Isr/YWygbpKzIlNxSSIV/PwQtGZg=; b=UNbeTqLoSSHoENCfW8rrxXZ0/mqf4kbb5GXeBtIiZXPpD7USVXyJUCYsNzatZGwo9m3YNB 6FNp8pZKZtG6Bn1aIiPQvOvLX/7MREPXOzEQZz2Ai3r7d7bS4U+Z42KcB4Dr5TbQlwzqFp HVNoVju9oHCdMFHbxuRfl12OHvkLLrSIxAhoQgOoIPsoqWpkax8RakT0ZjwiIsGAm33sS6 FzQWedO1H3Xu4gLyFz6Oj7wpbjMLLCv6wJV7gaQVWXbZs2r5tXFUlLSebb6cCs2ALq1VyT FR0HOTZSyXhsPGF3r9l4HqZNVNhAzimbg99sPkh+jxA6XAYuz+f/QVnPp3Xy3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210488; a=rsa-sha256; cv=none; b=EvQ5UQyvqtW8zrZDj/sVWH34Scj9/p5gDUAE7sXcncoVyWdSsRLEeqe2pAXpj0Y6yk5EZs 0K3x5g4O+/1e77rxuX3JCDLKNigdiLfDiVKnMfDS7FyyCU4CBnlZ4mM0QwZFKjbeIGvLJy RyNIrXBJqcHc4zPUwYdfPQn9TSyzWkzN6Clr3TrnuK+0yLJDnCIpHxOPsldDz55JQurIWy 79K/7feB0YmbCJFu7r+IYlA8wMkswYdvGZndU1XyDMu+6UHVLfGYifE+Fl18bhqx49DneF lEqW9AABNLeMTmKg1EV6Zqy/4GrPc6Chc/XAdeSv1LSrGl8usfHSFsD/CWtvNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gP4gKuORWlIfT4Isr/YWygbpKzIlNxSSIV/PwQtGZg=; b=CR5vwVnSaayWpfwBccQki57cnoMJuXa9exeH7jJodh3HQACbqnOOkHy5Oh9J3bIM/1gP9M GVmCnyfJe5K5HWfkrhpnNYC9S+7oTjQgLOAHFJsp/B2Fs//8WdbjtgL+AuKpnjpY9P8NMM OHw2vdKN+RIcqB25HV2cboQXAVBLNwlPx3M9y5V5517SgGf6mrcFZKNC8KYvVGOCmtdrSr E2/yNao0h8NI2cG/f9xuXlpGXvflueWoO+FRNwC7d0dkmSU4CqnqBGWs056zmcPHQjVkhe Mbx4coaoJLJPwLExuazhag8pID/xpMMm++H/C87VJ/VNep2a7F/0/ojxjwJViQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsN5Gdcz10sC; Wed, 12 Jun 2024 16:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfSZU046947; Wed, 12 Jun 2024 16:41:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfSee046944; Wed, 12 Jun 2024 16:41:28 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:28 GMT Message-Id: <202406121641.45CGfSee046944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 537b2e7d48ca - stable/14 - LinuxKPI: 802.11: use net80211 IEEE80211_HTCAP_* definitions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 537b2e7d48cab6a5eb8dcb0d1474ecee72e95b93 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=537b2e7d48cab6a5eb8dcb0d1474ecee72e95b93 commit 537b2e7d48cab6a5eb8dcb0d1474ecee72e95b93 Author: Bjoern A. Zeeb AuthorDate: 2024-06-07 23:57:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:28 +0000 LinuxKPI: 802.11: use net80211 IEEE80211_HTCAP_* definitions Rather than using the values and leaving net80211 names in a comment define the LinuxKPI IEEE80211_HT_CAP_* to the net80211 IEEE80211_HTCAP_* names. That way errors like the one fixed in 3e0915b7b685 are less likely to happen. Sponsored by: The FreeBSD Foundation (cherry picked from commit 63a327b954a38ecd46934a2911321f3ea3d500b3) --- .../linuxkpi/common/include/linux/ieee80211.h | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 0fd90e921c77..aa1a0a4f3c5f 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -254,20 +254,20 @@ enum ieee80211_ac_numbers { #define IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL 0xf -/* XXX net80211 calls these IEEE80211_HTCAP_* */ -#define IEEE80211_HT_CAP_LDPC_CODING 0x0001 /* IEEE80211_HTCAP_LDPC */ -#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 /* IEEE80211_HTCAP_CHWIDTH40 */ -#define IEEE80211_HT_CAP_SM_PS 0x000c /* IEEE80211_HTCAP_SMPS */ +/* Define the LinuxKPI names directly to the net80211 ones. */ +#define IEEE80211_HT_CAP_LDPC_CODING IEEE80211_HTCAP_LDPC +#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 IEEE80211_HTCAP_CHWIDTH40 +#define IEEE80211_HT_CAP_SM_PS IEEE80211_HTCAP_SMPS #define IEEE80211_HT_CAP_SM_PS_SHIFT 2 -#define IEEE80211_HT_CAP_GRN_FLD 0x0010 /* IEEE80211_HTCAP_GREENFIELD */ -#define IEEE80211_HT_CAP_SGI_20 0x0020 /* IEEE80211_HTCAP_SHORTGI20 */ -#define IEEE80211_HT_CAP_SGI_40 0x0040 /* IEEE80211_HTCAP_SHORTGI40 */ -#define IEEE80211_HT_CAP_TX_STBC 0x0080 /* IEEE80211_HTCAP_TXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC 0x0300 /* IEEE80211_HTCAP_RXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 /* IEEE80211_HTCAP_RXSTBC_S */ -#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 /* IEEE80211_HTCAP_MAXAMSDU */ -#define IEEE80211_HT_CAP_DSSSCCK40 0x1000 /* IEEE80211_HTCAP_DSSSCCK40 */ -#define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 /* IEEE80211_HTCAP_LSIGTXOPPROT */ +#define IEEE80211_HT_CAP_GRN_FLD IEEE80211_HTCAP_GREENFIELD +#define IEEE80211_HT_CAP_SGI_20 IEEE80211_HTCAP_SHORTGI20 +#define IEEE80211_HT_CAP_SGI_40 IEEE80211_HTCAP_SHORTGI40 +#define IEEE80211_HT_CAP_TX_STBC IEEE80211_HTCAP_TXSTBC +#define IEEE80211_HT_CAP_RX_STBC IEEE80211_HTCAP_RXSTBC +#define IEEE80211_HT_CAP_RX_STBC_SHIFT IEEE80211_HTCAP_RXSTBC_S +#define IEEE80211_HT_CAP_MAX_AMSDU IEEE80211_HTCAP_MAXAMSDU +#define IEEE80211_HT_CAP_DSSSCCK40 IEEE80211_HTCAP_DSSSCCK40 +#define IEEE80211_HT_CAP_LSIG_TXOP_PROT IEEE80211_HTCAP_LSIGTXOPPROT #define IEEE80211_HT_MCS_TX_DEFINED 0x0001 #define IEEE80211_HT_MCS_TX_RX_DIFF 0x0002 From nobody Wed Jun 12 16:41:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsK40h2z5N3Db; Wed, 12 Jun 2024 16:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsK2cjlz4gqq; Wed, 12 Jun 2024 16:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EfzOPFDLtvkXYJEEo1lb1zronH4rEt4+YrJq2ICUpcg=; b=DLz7Kgu6OuEP5qOjOBj189jcs1BfJy2uFDaEOy6jWw9fFOCE3JF1XZyZ0yneYVQqCcUpEu mdMeg2HglabGWNeQCbaMdu8XNNh55gIPxEDKmuJv9bDOU1tLA+sj110/x5Gik71R6ENFCH KkDv0kl2X3MRtwsDz1s+TrvPcYHiZYPgPCUVLzWO4KVg4G5R6qtJ+2M4d36cTXXTnYWKz6 vnaQ1FEJtc/GpOoravaYLb5ebkmSMFEpp61Ld1OUTR6DobnCA3EWgStuAyRGHzpmJyQGN9 /ZDY51oDLP6jhZzkYAOD3+7SDQP2siXelt+RDwXCJTNNckfhXQshUgal8QE8/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210485; a=rsa-sha256; cv=none; b=SkN/VbSvHl4kGbX2qoryhMzZVKyfzZJu2jjgltrRX5Mhce/nV8Lc/pHOwWV9G+6OS3/b0u gDIJEoD3hyvGoQgVQVQVe1k5UMxzUA35lsey9W6MoGovNusqyHNZWuO0U8F0On7IStvT3O sdO6MSe80UpiepD9KQHQ8G6dP0XmsWgVxww5HReGl7FThMruKe9DbVs148JfNNP88uawyu X3j8OKuZK9mzMGprON/45uCKvgcJuNxhmEiGKjZygcRV6FQWGIjrfZ8LncIL9zOKsESjpK +RwJYrl4qH0Hjyr0o5pXZmBFm3bqmdXnRlOLV0QIbqTD5vUL6jOOZMSOjxbsgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EfzOPFDLtvkXYJEEo1lb1zronH4rEt4+YrJq2ICUpcg=; b=te8UPZoJVKkmdth3O2ykl9jslKTDUMa0V1G1J9rZRF+O4m35LbEhlZsrfeWexH/BAJv5Sa taZLyESuuN8HxgdijlzP3H7f+KPWqznWEI5NomWhHeZUlZYFC7G0ReZHiTSqZwnXabY9FF Fzz0urqUko2/fqH/wnuGCu/VXh/IMo3iZJX/4uG9qoSg2HZstsK8lFjW9iXYlnFootw5hl FNjXGDyNKpepVCRfpSkp7DqBI+kNpiyy4GOVQ7s+mQkcoHybkJetxFiPuiZqbn7ExXLEvi EhAEv09eshHFdHj77b+hD/ew5RRGu7KYJdS5Eb9fVc5+UrWVjWX4KgDoylfR5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsK2Dg3z10nY; Wed, 12 Jun 2024 16:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfPxu046794; Wed, 12 Jun 2024 16:41:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfPqw046791; Wed, 12 Jun 2024 16:41:25 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:25 GMT Message-Id: <202406121641.45CGfPqw046791@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 49f29c4183d9 - stable/14 - LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 49f29c4183d93afd2724509362daaf41b16eca5d Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=49f29c4183d93afd2724509362daaf41b16eca5d commit 49f29c4183d93afd2724509362daaf41b16eca5d Author: Bjoern A. Zeeb AuthorDate: 2024-02-18 21:07:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:04 +0000 LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls Lock the two TX MO downcalls into driver/firmware in lkpi_80211_txq_tx_one() to make sure they cannot happen in the middle of other (net80211 triggered) updates calling down into the driver/firmware. Sponsored by: The FreeBSD Foundation (commit) Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43966 (cherry picked from commit 45bce6fa306fc3a211949f63c9bbb7932fe5a3bd) --- sys/compat/linuxkpi/common/src/linux_80211.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 1943c6efd4d8..ecacb74f01f3 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3770,7 +3770,9 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) ltxq->txq.tid, ac, skb->priority, skb->qmap); #endif LKPI_80211_LTXQ_UNLOCK(ltxq); + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_wake_tx_queue(hw, <xq->txq); + LKPI_80211_LHW_UNLOCK(lhw); return; ops_tx: @@ -3783,7 +3785,9 @@ ops_tx: #endif memset(&control, 0, sizeof(control)); control.sta = sta; + LKPI_80211_LHW_LOCK(lhw); lkpi_80211_mo_tx(hw, &control, skb); + LKPI_80211_LHW_UNLOCK(lhw); } static void From nobody Wed Jun 12 16:41:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsJ3ztpz5N3DZ; Wed, 12 Jun 2024 16:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsJ1kH1z4gnT; Wed, 12 Jun 2024 16:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=//CxYJ+XTPuyS/cxI0Z+etDm1LGvbYPAAPTbC15Ge3c=; b=rDSVFIJjFJXCD9aHBp7PQ7ETZA4wTOgOdO/4exi8VwKynvYts4bWCo4LJ/i7HstcKMbQwt yK6wCXc7CNkroEt+8n4d9ubRxrTdfRPawRY2aUOIR9mxKhqWrV05iOQnsSbes3aNtwmjDj dggUIocuhqvlCBlDI1OZIxXNDFvR21yJ0rOThF1vCk75ckmMRKNQJCbqhlZwlqK3Q+azPB HUDxK7IjTy0KgL0t6gDAjKb/D281Vw2xVwrl/v2iXxMVmguYprE+z78BXxOvolPAQ+bnAd U+z4S7LSxJmxuPfsw0pqNqJ+2cZvFSZb6XQvIPGGUQ9nFvpCOv2MPiNOfLwqNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210484; a=rsa-sha256; cv=none; b=VIvYDO2eShbmaBUkc5eLOAPqxvKZgHv8i0uEfwMkPx4nhIeJ55R+cF3oH2YGasXC6zm1I7 t2P3n8Al9PQN0qRCs0ovck+q15M6Gxhyb8779F8wl55oP5hkkao7uAKEVZB9phteeUahsG oD5hFLBkBy+tPpwz9yHyGaq/KkxFejNv250KDdbjAIeitc664rgSamf/mSOQW6zN9ET14k wKqoXwl7PmBNohuempOpbC37FilMFEDI1pnU/KJwDUX6xj5dnq53hGVa8lvjPchEiuqx6t /wLjLmrolk5vl4DIMFRmoNl4zdI9su4wObcHsr7s3irBl2PeM78YNv68zdMSsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=//CxYJ+XTPuyS/cxI0Z+etDm1LGvbYPAAPTbC15Ge3c=; b=mnzTI7a7UPnHlWGcfy+JJedMxia36rDF3aH7H+FAByO+y9mOErV+Hf+7U3CM6w/L9G2Pt5 GwBrTovUDvRvUiDyipAAnyyGDNWRPsYVjb64WsFR/4RuEn0Yftol5eHjz7tfi2xH1ZBUmh Nj+ezh2LCeAdKCVTkmdHhxhV21o88I6+2h+ue6EOaVHbEWr5R/V6qwDdBQWfQkVUOErNGq 0Cpaf1N6QhmDzQLLeOrn/9pehBd7sjM0rb4bsgU6hE1RgO5eRWOH+Ktil83Ed+NIjrdzMY EX31h4CCdKo6pPtxTH+oxBMWWK0ir6fhcgwOPcz7Oc4VFFuNP/JBUZI1Oi+qSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsJ1Lb0z11QC; Wed, 12 Jun 2024 16:41:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfOu4046746; Wed, 12 Jun 2024 16:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfOh9046743; Wed, 12 Jun 2024 16:41:24 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:24 GMT Message-Id: <202406121641.45CGfOh9046743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 323db2cbbb99 - stable/14 - LinuxKPI: 802.11: rename chanctx_conf for consistency List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 323db2cbbb99d0ad0175d4187aaec1d966761d94 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=323db2cbbb99d0ad0175d4187aaec1d966761d94 commit 323db2cbbb99d0ad0175d4187aaec1d966761d94 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 21:03:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:58:56 +0000 LinuxKPI: 802.11: rename chanctx_conf for consistency We used to call the struct ieee80211_chanctx_conf variable "conf" in some places but that becomes confusing with bss_conf and other "conf" bits. On the vif it is already called chanctx_conf thus also rename it on the internal struct lkpi_chanctx and for our variables in the implementation. This should not have any external visibility. No functional changes intended. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45185 (cherry picked from commit d1af434d99941d32a09c48fb3ef77ef83e203d29) --- sys/compat/linuxkpi/common/src/linux_80211.c | 88 ++++++++++++++-------------- sys/compat/linuxkpi/common/src/linux_80211.h | 6 +- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 32b0287db65c..1943c6efd4d8 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1079,7 +1079,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int { struct linuxkpi_ieee80211_channel *chan; struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; struct lkpi_hw *lhw; struct ieee80211_hw *hw; struct lkpi_vif *lvif; @@ -1145,54 +1145,54 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Add chanctx (or if exists, change it). */ if (vif->chanctx_conf != NULL) { - conf = vif->chanctx_conf; - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + chanctx_conf = vif->chanctx_conf; + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); IMPROVE("diff changes for changed, working on live copy, rcu"); } else { /* Keep separate alloc as in Linux this is rcu managed? */ lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size, M_LKPI80211, M_WAITOK | M_ZERO); - conf = &lchanctx->conf; + chanctx_conf = &lchanctx->chanctx_conf; } - conf->rx_chains_dynamic = 1; - conf->rx_chains_static = 1; - conf->radar_enabled = + chanctx_conf->rx_chains_dynamic = 1; + chanctx_conf->rx_chains_static = 1; + chanctx_conf->radar_enabled = (chan->flags & IEEE80211_CHAN_RADAR) ? true : false; - conf->def.chan = chan; - conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->def.center_freq1 = chan->center_freq; - conf->def.center_freq2 = 0; + chanctx_conf->def.chan = chan; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->def.center_freq1 = chan->center_freq; + chanctx_conf->def.center_freq2 = 0; IMPROVE("Check vht_cap from band not just chan?"); KASSERT(ni->ni_chan != NULL && ni->ni_chan != IEEE80211_CHAN_ANYC, ("%s:%d: ni %p ni_chan %p\n", __func__, __LINE__, ni, ni->ni_chan)); #ifdef LKPI_80211_HT if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_40; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_40; } else - conf->def.width = NL80211_CHAN_WIDTH_20; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_20; } #endif #ifdef LKPI_80211_VHT if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) { #ifdef __notyet__ if (IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan)) { - conf->def.width = NL80211_CHAN_WIDTH_80P80; - conf->def.center_freq2 = 0; /* XXX */ + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80P80; + chanctx_conf->def.center_freq2 = 0; /* XXX */ } else #endif if (IEEE80211_IS_CHAN_VHT160(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_160; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_160; else if (IEEE80211_IS_CHAN_VHT80(ni->ni_chan)) - conf->def.width = NL80211_CHAN_WIDTH_80; + chanctx_conf->def.width = NL80211_CHAN_WIDTH_80; } #endif /* Responder ... */ - conf->min_def.chan = chan; - conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; - conf->min_def.center_freq1 = chan->center_freq; - conf->min_def.center_freq2 = 0; + chanctx_conf->min_def.chan = chan; + chanctx_conf->min_def.width = NL80211_CHAN_WIDTH_20_NOHT; + chanctx_conf->min_def.center_freq1 = chan->center_freq; + chanctx_conf->min_def.center_freq2 = 0; IMPROVE("currently 20_NOHT min_def only"); /* Set bss info (bss_info_changed). */ @@ -1218,14 +1218,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int changed |= IEEE80211_CHANCTX_CHANGE_RADAR; changed |= IEEE80211_CHANCTX_CHANGE_RX_CHAINS; changed |= IEEE80211_CHANCTX_CHANGE_WIDTH; - lkpi_80211_mo_change_chanctx(hw, conf, changed); + lkpi_80211_mo_change_chanctx(hw, chanctx_conf, changed); } else { - error = lkpi_80211_mo_add_chanctx(hw, conf); + error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf); if (error == 0 || error == EOPNOTSUPP) { - vif->bss_conf.chandef.chan = conf->def.chan; - vif->bss_conf.chandef.width = conf->def.width; + vif->bss_conf.chandef.chan = chanctx_conf->def.chan; + vif->bss_conf.chandef.width = chanctx_conf->def.width; vif->bss_conf.chandef.center_freq1 = - conf->def.center_freq1; + chanctx_conf->def.center_freq1; #ifdef LKPI_80211_HT if (vif->bss_conf.chandef.width == NL80211_CHAN_WIDTH_40) { /* Note: it is 10 not 20. */ @@ -1236,26 +1236,26 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } #endif vif->bss_conf.chandef.center_freq2 = - conf->def.center_freq2; + chanctx_conf->def.center_freq2; } else { ic_printf(vap->iv_ic, "%s:%d: mo_add_chanctx " "failed: %d\n", __func__, __LINE__, error); goto out; } - vif->bss_conf.chanctx_conf = conf; + vif->bss_conf.chanctx_conf = chanctx_conf; /* Assign vif chanctx. */ if (error == 0) error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, - &vif->bss_conf, conf); + &vif->bss_conf, chanctx_conf); if (error == EOPNOTSUPP) error = 0; if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: mo_assign_vif_chanctx " "failed: %d\n", __func__, __LINE__, error); - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); goto out; } @@ -1457,9 +1457,9 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1467,8 +1467,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -1795,9 +1795,9 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -1805,8 +1805,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -2364,9 +2364,9 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { struct lkpi_chanctx *lchanctx; - struct ieee80211_chanctx_conf *conf; + struct ieee80211_chanctx_conf *chanctx_conf; - conf = vif->chanctx_conf; + chanctx_conf = vif->chanctx_conf; /* Remove vif context. */ lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ @@ -2374,8 +2374,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_hw_conf_idle(hw, true); /* Remove chan ctx. */ - lkpi_80211_mo_remove_chanctx(hw, conf); - lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); free(lchanctx, M_LKPI80211); } @@ -4771,7 +4771,7 @@ linuxkpi_ieee80211_iterate_chan_contexts(struct ieee80211_hw *hw, if (!lchanctx->added_to_drv) continue; - iterfunc(hw, &lchanctx->conf, arg); + iterfunc(hw, &lchanctx->chanctx_conf, arg); } LKPI_80211_LHW_LVIF_UNLOCK(lhw); } diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index b0156a5ade3f..a48cf719c693 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -267,12 +267,12 @@ struct lkpi_hw { /* name it mac80211_sc? */ struct lkpi_chanctx { bool added_to_drv; /* Managed by MO */ - struct ieee80211_chanctx_conf conf __aligned(CACHE_LINE_SIZE); + struct ieee80211_chanctx_conf chanctx_conf __aligned(CACHE_LINE_SIZE); }; #define LCHANCTX_TO_CHANCTX_CONF(_lchanctx) \ - (&(_lchanctx)->conf) + (&(_lchanctx)->chanctx_conf) #define CHANCTX_CONF_TO_LCHANCTX(_conf) \ - container_of(_conf, struct lkpi_chanctx, conf) + container_of(_conf, struct lkpi_chanctx, chanctx_conf) struct lkpi_wiphy { const struct cfg80211_ops *ops; From nobody Wed Jun 12 16:41:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsD57KLz5N3Jt; Wed, 12 Jun 2024 16:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsC6J0Rz4gnP; Wed, 12 Jun 2024 16:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAt68nZivDQUKxIuljbaHvSPkN7o02/6+1VsJl35Mgc=; b=BDtqIbV1645jUOfGpyfc+6Ay1wmCSXB3p1Z+s7lZBq9UksvF7c4ZzG6rKwc41p/1nISCUY wq5cz15+7AxCq1SzpdiDgBK5mRr/9BofEWEafZ3CW+IL/24lKAOr5ZinXm6KFhJ9/EXLgz arTsB+mRC7dSBOfektJDtzcTEqH0dXO1lsLKQuQKLee2/Cadhh5L7uElyS3ZV2NuI1AJMM GFzkMbty/XkNXlhI2wTHWkC0vXYEjtBJxB8K77AkyS7V2tmLbA7pdrJf6X3FAtq40wWsq1 uQf6IOTTUGz14drYeYA6lsVGPfCaREX8mTDB35coPdaCt33TNRfAIrW40JpUqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210479; a=rsa-sha256; cv=none; b=S7praf9tImQvjvhMnoGdwqzi5hQJPAJrmZjl5Pk38WWxQZK9yXy7oclKjawZau1iZMJtYE kQw1zhc2RdMJsxzP3qszygjWFOie5nmx5OXgPnLCfMTjrGovBCk8ft7MOgH5Zgv9DcBjE4 G2ui5SvnA3MHR0NpWnRVmNws2dlcE4kIrZdrCUvkatC+eXW/htCX9kHI8H8GZ/pTSFP05/ zlOBfvbDiNDzKDsHX6fd6CQtQFgzlp9gZq1XDd2eZX5exraEszx6DoqGigiEX6alNsfEVA faOid3Di1JiBVJNZA75nCaeTpN9VU6XrGZW6j9uenJphMV0rx5Oi4j/2dAJYgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAt68nZivDQUKxIuljbaHvSPkN7o02/6+1VsJl35Mgc=; b=i+pBkSyZSwL7iUQhFPJX+wXGNCCCI/tbB8aOlPE77GvXvk0yNGqs8u1lZKy/nxLWh8Uh+d bOI0UfmrOqS8lj06rFlzbHr1Qd5ztz2j7wJBZGzlfYxiXLe2JbQwuORHzNnlfYwen2NlqR D8U19k+MJ7APonUQXukUfLrAjCw/OqPg4zq/WUUejMS2zHs4suOaI8QdcDaSSNG7GnsKF6 rohxpwPgG2Vvl12hzjD0UBrljuOVFb2lwm3/jud8n/0PHdfZAQmG9hg82gSHmvXAkzCM1N Ln6FGdREyEgJlkFQp0Ct96YCmj8YuaPv8dztdAC2Umla2aT5KgQEzHzVAmmIxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsC4M0Xz11QB; Wed, 12 Jun 2024 16:41:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfJh6046528; Wed, 12 Jun 2024 16:41:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfJWS046525; Wed, 12 Jun 2024 16:41:19 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:19 GMT Message-Id: <202406121641.45CGfJWS046525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 31c476da2d94 - stable/14 - LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 31c476da2d944c3776186e73f8db56c57ba89b8d Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=31c476da2d944c3776186e73f8db56c57ba89b8d commit 31c476da2d944c3776186e73f8db56c57ba89b8d Author: Bjoern A. Zeeb AuthorDate: 2024-04-06 21:15:16 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:57:44 +0000 LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup() Add the SET_SYSTEM_SLEEP_PM_OPS() by factoring some other macro code out in order to set the suspend/resume functions when the struct is already given. Such is the case in iwlwifi d3. Also add an initial implementation of device_can_wakeup(). Though this is likely all we need we have no way of setting the flag for it yet so leave a pr_debug() and a comment there as well. Until we want to support WoWLAN this is likely not needed for wireless. Doing it the proper way checking a bool in 'struct dev_pm_info' would change 'struct device' and with that 'struct pci_dev' and break the KBI. In favour of mergeability this version does not implement the full functionality yet. Both help to make an updated iwlwifi d3 compile. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45358 (cherry picked from commit 3753988c5d22393fbdefb6aa16b5a5a699d05642) --- sys/compat/linuxkpi/common/include/linux/pm.h | 30 +++++++++++++++------------ sys/compat/linuxkpi/common/src/linux_compat.c | 18 ++++++++++++++++ 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h index 871c7b587864..c8d943027909 100644 --- a/sys/compat/linuxkpi/common/include/linux/pm.h +++ b/sys/compat/linuxkpi/common/include/linux/pm.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -58,25 +58,26 @@ struct dev_pm_info { IS_ENABLED(CONFIG_PM_SLEEP) ? (_p) : NULL #ifdef CONFIG_PM_SLEEP +#define __SET_PM_OPS(_suspendfunc, _resumefunc) \ + .suspend = _suspendfunc, \ + .resume = _resumefunc, \ + .freeze = _suspendfunc, \ + .thaw = _resumefunc, \ + .poweroff = _suspendfunc, \ + .restore = _resumefunc, \ + #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ - .suspend = _suspendfunc, \ - .resume = _resumefunc, \ - .freeze = _suspendfunc, \ - .thaw = _resumefunc, \ - .poweroff = _suspendfunc, \ - .restore = _resumefunc, \ + __SET_PM_OPS(_suspendfunc, _resumefunc) \ } #define DEFINE_SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ - .suspend = _suspendfunc, \ - .resume = _resumefunc, \ - .freeze = _suspendfunc, \ - .thaw = _resumefunc, \ - .poweroff = _suspendfunc, \ - .restore = _resumefunc, \ + __SET_PM_OPS(_suspendfunc, _resumefunc) \ } + +#define SET_SYSTEM_SLEEP_PM_OPS(_suspendfunc, _resumefunc) \ + __SET_PM_OPS(_suspendfunc, _resumefunc) #else #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ @@ -86,6 +87,9 @@ const struct dev_pm_ops _name = { \ } #endif +bool linuxkpi_device_can_wakeup(struct device *); +#define device_can_wakeup(_dev) linuxkpi_device_can_wakeup(_dev) + static inline void pm_wakeup_event(struct device *dev __unused, unsigned int x __unused) { diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index b0691eb0f79a..894e233042e3 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2592,6 +2592,24 @@ io_mapping_create_wc(resource_size_t base, unsigned long size) return (io_mapping_init_wc(mapping, base, size)); } +/* We likely want a linuxkpi_device.c at some point. */ +bool +device_can_wakeup(struct device *dev) +{ + + if (dev == NULL) + return (false); + /* + * XXX-BZ iwlwifi queries it as part of enabling WoWLAN. + * Normally this would be based on a bool in dev->power.XXX. + * Check such as PCI PCIM_PCAP_*PME. We have no way to enable this yet. + * We may get away by directly calling into bsddev for as long as + * we can assume PCI only avoiding changing struct device breaking KBI. + */ + pr_debug("%s:%d: not enabled; see comment.\n", __func__, __LINE__); + return (false); +} + #if defined(__i386__) || defined(__amd64__) bool linux_cpu_has_clflush; struct cpuinfo_x86 boot_cpu_data; From nobody Wed Jun 12 16:41:21 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsG3BCFz5N3GR; Wed, 12 Jun 2024 16:41:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsF71wbz4gfy; Wed, 12 Jun 2024 16:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3u/RBonjeTYuGDbwfSTQK5xmnvBQySalsw6tUvw6Xw=; b=RSUhH8LjW9Xrm9EyWYokXQmbM+5OicBHok+bjPlKwRX8Xxj2AVIEaj5eZiRsisTlopFr0t 4WGI2/KyChrougOt0lWd+mw2GDkFyyMM7IZc6XUPJIpJBNiCeq+h9lVopjIuZCGCMxaFww HFudEL/wGvMJu8hM/tgB9MsVdpdbdKszHLg0SfafbFL4nslXJcyIq9uroxnyDqYHvhSa9L mMopyvKK1QOKus/vLr91tWj61PEfD5xlloC1x6yRIegkFf1aJCkdhiFa6wHO+F+xrVXkZK XBRtI5QmwIGbYz1Yk67AxiGZ7HWMpn2rKGz5e4atg1ovF26K0cVVoHTb9GbxIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210482; a=rsa-sha256; cv=none; b=meI/vF+jH6AEzV4vGVVJCq/2A7K8O1noSpteRZBCeher3YmSgVpg8a4qtsm5u49CAKFXCb 1r3DLLZO3daXbmG7T4htGrh4bG2ADPlYK9js51nO+Pt2u6kj0hmX6pOJvn3F+pgtp7nKK9 WfvPPCi7s3zb34Sw6ZrgM2z9dBSdzTbJFttQ/nqfJQNm8fea/GoUKZ46utPnzswhciD1G4 l/SCDAUWQlo9huyUVR+TfHsJ3S1uKlj6igT7fxLmL8qM5adYos3767otHWhhrNXvVKjz4f O6QwXTFXAFw1OUXKp4XFi+Rf9uI5iZJQ3CirS2pW5R6Bsyigt8ZUgM3uFt1O8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3u/RBonjeTYuGDbwfSTQK5xmnvBQySalsw6tUvw6Xw=; b=qZJtVB5ZMhaFxaGlv3ouMgCVuWOmKmpmZYKaHoIwa63zhrxpmstoPoCFJXZxBvjvYMrWs9 5Ppjo095AzceIFxDHaL999+qhgGM0ppU/qjQZxcOmE0W4OlJngRISWDQuYxmq9qDuXYJOa hel9hrfLbzgYv5+b7/SGqF3zXyvyGxTdlxIEFCxMTx7I2ZOcNCWewRPnlDbwd6VI3Tx+ru TRjNuy+B6FlF0IRDfSGxT9+gqfakrXJNtj1xci33CSbHPTjSXN9ZNjOWnt9rfHENtIKoun 0jpBL9VLZvt2PrlsjbFLZm39UQNpK5A2cr0AYC+VMBZkfMauvFkkLvR5mddaXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsF6f9Kz11Hh; Wed, 12 Jun 2024 16:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfLD2046619; Wed, 12 Jun 2024 16:41:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfLKN046616; Wed, 12 Jun 2024 16:41:21 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:21 GMT Message-Id: <202406121641.45CGfLKN046616@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: eef52bbe9cb4 - stable/14 - LinuxKPI: 802.11: fix for_each_sta_active_link() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: eef52bbe9cb44616116fab65f9bbf16d1e2d43ef Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=eef52bbe9cb44616116fab65f9bbf16d1e2d43ef commit eef52bbe9cb44616116fab65f9bbf16d1e2d43ef Author: Bjoern A. Zeeb AuthorDate: 2024-05-21 21:58:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:58:30 +0000 LinuxKPI: 802.11: fix for_each_sta_active_link() Likely a c&p error from for_each_vif_active_link() to for_each_sta_active_link(). We are checking the nitems on the vif instead of the sta in this macro. Function wise there is no difference as the arrays are the same size but for correctness fix this. Sponsored by: The FreeBSD Foundation (cherry picked from commit 69b6c4a6ec6654978628ccd48edce46f00ac3e96) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index fc9d7829dae3..6a477ae5c32a 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1253,7 +1253,7 @@ ieee80211_hw_restart_disconnect(struct ieee80211_vif *vif) (_link = rcu_dereference((_vif)->link_conf[_linkid])) ) #define for_each_sta_active_link(_vif, _sta, _linksta, _linkid) \ - for (_linkid = 0; _linkid < nitems((_vif)->link_conf); _linkid++) \ + for (_linkid = 0; _linkid < nitems((_sta)->link); _linkid++) \ if ( ((_vif)->active_links == 0 /* no MLO */ || \ ((_vif)->active_links & BIT(_linkid)) != 0) && \ (_linksta = link_sta_dereference_protected((_sta), (_linkid))) ) From nobody Wed Jun 12 16:41:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsM0kfRz5N37T; Wed, 12 Jun 2024 16:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsL3Zbpz4gg7; Wed, 12 Jun 2024 16:41:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Biqq2Q0dgqCF9Qvc2zpso6Kj4VyTZXgZoKB3e8XARP0=; b=hXc1IG76sjvT+GxuV4gIsHJ7a9fZZbu/iaWu2IjdV4sDpYa+oMqE+WfareQAAW/FFZjqof 42xUYDdi9A35A0zNEYcucZmemJhyTMxTCSxqeZ8QxEHLVjRhad80l7wmXuRxyXWWV5tY81 zJTN7oHrHqmPD7EukT+ONdlzSyASPXDflSBXwPbreFUQqtJgPfsisgwmbCSOWxiUdAJZfi 4qUnbpJ911jyIP7JNkNVCOO9JEQeUXY9T8vmSMtUG2M3FjjFzh6mpVQIHdzPyxhmhpUqYI PgqQoF8ywo7SIsNamADkjcWGVoDDK8ZVjUbNHqEQsBv71qT399cGReROAMxPfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210486; a=rsa-sha256; cv=none; b=cKPc0C+xKfY1Tqkmm/1rjtwJCY1dno1ZrEm7ymePuUJH5wE8+KBd/q7pBGEmExTvAFKxFc yI2Diz0vKErvK6Qj9/0XxpUUkgkfI8VRadpuNhlMutrPeejpbTXV7soQZzWjGoq4+AZ0r2 ZEshleGTsayibhW5sD9QmVLSbkXswc8gIkErTSY2QwmzF6eHWrxuacGH1gaF/m9GMlt1Xs w5UIkPOCAbXaCsm5fBbp39FziYmKqI3GZaJfwZazq117uFi+g+h2spcCRqW/PGgw+VcvA6 sThA1V5gjypM0ozSVcnTZONeLyT0tkt2cuX5u7sBSFWleyfVjjuS5F2zSH8AWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Biqq2Q0dgqCF9Qvc2zpso6Kj4VyTZXgZoKB3e8XARP0=; b=I35oYt7QWnibY3mCkd7TkPdJTindpEpiI68huTjdy7ddGR2bF4QGJsa9HlbwuLX2QXSXeD QN6Ab/XKINyLaqjVTWqmyjaBP65tCmfQMjbe5Y7cbkPmRxgvb24004v3ggtlMM8K6wQShj jQLDHvynwAzG4PmJYnOKUCbsBVYAqa38C7p1gCVB6PksYVke5/kKV97hrm0MjuxtsQRb/H y8yTqwocZO6rKT5QSRPgJwJY5MaO1ESIFz3GMlQG/6CVcgsOdnr+0Z16fOlsZcLa800Vqh OI9JjC3HiiuX3ol7aQaOlQQINg7QX7jMqRX6B6NHjrCHs910BiZcIaEWNZuITQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsL3BxCz10Fm; Wed, 12 Jun 2024 16:41:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfQ94046849; Wed, 12 Jun 2024 16:41:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfQBU046846; Wed, 12 Jun 2024 16:41:26 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:26 GMT Message-Id: <202406121641.45CGfQBU046846@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 29f9003cbbb3 - stable/14 - LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 29f9003cbbb3874fdbb02b99069868d00bcdff5a Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=29f9003cbbb3874fdbb02b99069868d00bcdff5a commit 29f9003cbbb3874fdbb02b99069868d00bcdff5a Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:35:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:11 +0000 LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() The logic following this new assignment in some cases may not set lsta but the later tracing is checking for it to be != NULL. With lsta not initialized that check may not hold up and later we would dereference lsta->state and possibly panic. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45507 (cherry picked from commit 582469016aed4fac3a7ead24dc31000edbb7e823) --- sys/compat/linuxkpi/common/src/linux_80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ecacb74f01f3..6c96f1541488 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -5055,6 +5055,7 @@ no_trace_beacons: goto err; } + lsta = NULL; if (sta != NULL) { lsta = STA_TO_LSTA(sta); ni = ieee80211_ref_node(lsta->ni); From nobody Wed Jun 12 16:41:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsF12Yxz5N3B2; Wed, 12 Jun 2024 16:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsD650qz4ghf; Wed, 12 Jun 2024 16:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J4efHithKnGao3p3rkW9BJhuANO2HPdUCB1rFd38sM0=; b=dqrgVauZlYsgZXTzluyO35Xh9Y8GFHBqAlZe4PEVAKCw2BtasCY9ESZh2Ni93/NUTkazdr a7ghfLAipsvp64IrO5LUEDoS7BD4oqtxX15EVSVKeKfDGmDib3gL3MrdB2xJCWm6IF23Ok HZ9v3KHrc7EyFv/Esn6Iuu0nVIUTYKar1swIifBFYwIZK6UV5vr+G8V89pkZKVhFNc/Y79 tIHofoQHfXLteCSy3xKxYPY47EZsUY7+AMsV9yK1omMP1FPft4R6kHEr6pt/ni9K5CSSvi EtAGO7SdjZ/QVj7SExgAy633A90EFV1XGOxBFm7nrK5vETXfZyPCrc83DHVJuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210480; a=rsa-sha256; cv=none; b=KerGEcQiFTfTrknT7BFoiBlk99O/htVLS8vzqzVRR402qN1mL++bE3P/qigvJG+m/PgfJp LlGCeQeihWYBmHWR3JA8PiUrGjHr3R4g93/JwpFBA36OURvj1SgHukTsG4JQvTYv+rNox3 F+el5fsqQsG/R4xvdq6XVSOZsQ/qTcWmrmdpvE7Lw3qnbuX80LWAk1hMKI617Ee7UtdqCn gqW1dx8tholf7b4EdneoVySHp7LtbKawfycJSFhEIyg1RwgXQxFCElGEKcjRE4CY1xonTB 3NUpre8tzZNxiNjiahAiWMR8RjDUi2GGNw9Q8znS2ee1DLvYLOsAUyGjsgA2/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J4efHithKnGao3p3rkW9BJhuANO2HPdUCB1rFd38sM0=; b=sl2EsuHpt0e4tvvqq4LtXtjTw5Op+L2oNYNyAWx4vBNNIWURG4LZwEOxotxEv/WJOPArSn 8sXvTNY2b4jFybjwyc5bBHOlaeBGoi3gPOSX5PWAXIEvjpPMgy0BGtbEoIxCA3yB9NdQZu 8i/QdvJ4JiGF5MP9ebIFiSSydVRoTM1hL9csPIsos83d+B1OTDxvUvlCgfDzAxAECgJ7V8 tTMIk3cd+LehheY/+qSGsrSW2uUD9ufgSt+zD4azni3LmsAnXJgv8i8p3ska7LV4tMMGH2 uK9c5ttsI4wfnEXO8Bxs33VKkV1H1dzrXi0XrnJAcARIQ5er8OpdwmHOcZhD3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsD5jQbz10Fk; Wed, 12 Jun 2024 16:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfKHN046576; Wed, 12 Jun 2024 16:41:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfKl1046573; Wed, 12 Jun 2024 16:41:20 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:20 GMT Message-Id: <202406121641.45CGfKl1046573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 04131cf0765d - stable/14 - LinuxKPI: remove extern from function declarations List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 04131cf0765de5d3c3ae2f4bd1b49bb7db230c06 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=04131cf0765de5d3c3ae2f4bd1b49bb7db230c06 commit 04131cf0765de5d3c3ae2f4bd1b49bb7db230c06 Author: Bjoern A. Zeeb AuthorDate: 2024-05-27 19:49:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:57:51 +0000 LinuxKPI: remove extern from function declarations Sponsored by: The FreeBSD Foundation Reviewed by: emaste (earlier version, found another two) Differential Revision: https://reviews.freebsd.org/D45386 (cherry picked from commit ecd1d1f1dac49c7ecbf1e7c5ffc64356c2851efd) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index 2fcc0dc05f29..e5dd2e44b0fa 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -90,15 +90,15 @@ struct page_frag_cache { * * NOTE: This function only works for pages allocated by the kernel. */ -extern void *linux_page_address(struct page *); +void *linux_page_address(struct page *); #define page_address(page) linux_page_address(page) /* * Page management for unmapped pages: */ -extern struct page *linux_alloc_pages(gfp_t flags, unsigned int order); -extern void linux_free_pages(struct page *page, unsigned int order); +struct page *linux_alloc_pages(gfp_t flags, unsigned int order); +void linux_free_pages(struct page *page, unsigned int order); void *linuxkpi_page_frag_alloc(struct page_frag_cache *, size_t, gfp_t); void linuxkpi_page_frag_free(void *); void linuxkpi__page_frag_cache_drain(struct page *, size_t); @@ -147,8 +147,8 @@ dev_alloc_pages(unsigned int order) /* * Page management for mapped pages: */ -extern vm_offset_t linux_alloc_kmem(gfp_t flags, unsigned int order); -extern void linux_free_kmem(vm_offset_t, unsigned int order); +vm_offset_t linux_alloc_kmem(gfp_t flags, unsigned int order); +void linux_free_kmem(vm_offset_t, unsigned int order); static inline vm_offset_t get_zeroed_page(gfp_t flags) From nobody Wed Jun 12 16:41:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsQ4ZGGz5N37w; Wed, 12 Jun 2024 16:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsP6Hyzz4gXC; Wed, 12 Jun 2024 16:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xhwqn3i9cOMm/t3jloFgazq2HNgfPdFsHV+4IH5CyBo=; b=gjOBZcJUtmBBjpyGSdNeWirLf+wH1qOOgVUPV4LVPHkBu4ydMg/Ty2R0yJ/tUfZ1c90zQM a7LT44R/DpWjKBWYN9JwvCoe54h9RvmQuqGYMU/OX+q43tlMvuOxiJAyrEo3j+fzCOGvA/ iSxWDuBTK2vOo2YulVDL46TkU6oD4HqdxV6GBv1p+5u8d9xxvjKnqEMUwJUHHlXd4veOTv h4QeO2nwP3nG0XF1Sr+jke2oJgQXhOSIFPE/9Eklh0T5pFc2qMcVVIGDLBXmw01eOeYQMQ P/t8zO4ww4ZUS6iH4VCyw3j3EGb6DBvVJZKpCjT1XemLBk4ZzTytDMg4nIZyVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210489; a=rsa-sha256; cv=none; b=kxA9DZpczXTtLK2ffYPmlBdXoJMsEYX4UGKV7/2sWvHj3trdI+Mn9wTz4b+aptgoQ4iIzS BIYnJTWk0+Qn0HbBNUyI+KjfS4FM3TpHZhPj9RPjUGPKK4kjlUxZdixbSfaVD5696qIDlh 9+tcjT1+N6Me49Im2X5I6sKDqYu7iUHQw1+SVCktpAtu6/wvt53X9k1TkOAV7Mes4tXMRL o5hLpiY48V0I1jMZthhavbweeCxU/sWkjZ9JBIwCAw+Op0Y2RVoA5uZFotxRY9bb1TTbp6 By9tx14vXz2PloNbjgfbIZhWLRlDhCsgjj1VHUwzrNQ91Fqf/3zlK5XA2c/Wsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xhwqn3i9cOMm/t3jloFgazq2HNgfPdFsHV+4IH5CyBo=; b=SW6V0H39jx4kdnMn5pH8STUGAkW9RFASeIM4T6l5giz5C9AQ7nPXlKJoHITXfU/NMTwOln S7bBWYWshJUP3MB440vLdDNSi9kjHsdJoUAxbDZtrK8HCSgafgvIauacdtQLhEjU2a4sqJ rq8yrky/TiTcDZYA6DPoUjJCb4xmMNklCxQvQCZpOYdED5t38SKE8FjKGrSTuGWyUmgvEr QXmQkIG3Of1l78AxJ3v07EGdY1976GOBfH0Lh4FQ8KotZlIqnJUgm6KcnLNM7LfFHmqc7i qa5n5hc5yIOo3Ec1JOWJotcj3oeP8Qz6XAlwwX7lNbamjhalhUtRKwcKnQJRMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsP5wCsz114W; Wed, 12 Jun 2024 16:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfTXN046996; Wed, 12 Jun 2024 16:41:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfTcf046993; Wed, 12 Jun 2024 16:41:29 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:29 GMT Message-Id: <202406121641.45CGfTcf046993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 9e36362f6a87 - stable/14 - LinuxKPI: 802.11: close race lkpi_sta_scan_to_auth()/(*iv_update_bss)() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9e36362f6a871215c269edb43b87daba55b495e5 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9e36362f6a871215c269edb43b87daba55b495e5 commit 9e36362f6a871215c269edb43b87daba55b495e5 Author: Bjoern A. Zeeb AuthorDate: 2024-02-18 20:57:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:32 +0000 LinuxKPI: 802.11: close race lkpi_sta_scan_to_auth()/(*iv_update_bss)() We have to unlock the net80211 ic lock in order to be able to call sleepable downcalls to the driver/firmware; a 2nd thread may go through net80211::join1() and (*iv_update_bss)() after we checked and unlocked. Re-check status at the end of the function under the ic lock so that we do not accidentally set lvif_bss_synched to true again despite it no longer being true. This should fix a race where we lost the (*iv_update_bss)() state during startup where one SCAN->AUTH is followed by a (then) AUTH->AUTH and lkpi_sta_a_to_a() did the wrong thing. Once we re-consider net80211 state and allowing a second join on a different node or iv_bss update without previously tearing down the older node we can likely undo a lot of these extra checks and workarounds. Sponsored by: The FreeBSD Foundation (updated version) Tested by: emaste (on and off) Reviewd by: cc Differential Revision: https://reviews.freebsd.org/D43967 (cherry picked from commit 105b9df26ee0286f3a5a7d191075e068dee1c4a2) --- sys/compat/linuxkpi/common/src/linux_80211.c | 66 +++++++++++++++++++--------- 1 file changed, 46 insertions(+), 20 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 6c96f1541488..728103778e4e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1276,25 +1276,6 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int lsta = ni->ni_drv_data; LKPI_80211_LVIF_LOCK(lvif); - /* Re-check given (*iv_update_bss) could have happened. */ - /* XXX-BZ KASSERT later? or deal as error? */ - if (lvif->lvif_bss_synched || lvif->lvif_bss != NULL) - ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " - "lvif_bss->ni %p synched %d, ni %p lsta %p\n", __func__, __LINE__, - lvif, vap, vap->iv_bss, lvif->lvif_bss, - (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, - lvif->lvif_bss_synched, ni, lsta); - - /* - * Reference the ni for this cache of lsta/ni on lvif->lvif_bss - * essentially out lsta version of the iv_bss. - * Do NOT use iv_bss here anymore as that may have diverged from our - * function local ni already and would lead to inconsistencies. - */ - ieee80211_ref_node(ni); - lvif->lvif_bss = lsta; - lvif->lvif_bss_synched = true; - /* Insert the [l]sta into the list of known stations. */ TAILQ_INSERT_TAIL(&lvif->lsta_head, lsta, lsta_entry); LKPI_80211_LVIF_UNLOCK(lvif); @@ -1343,11 +1324,56 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int * (ideally we'd do that on a callback for something else ...) */ + LKPI_80211_LHW_UNLOCK(lhw); + IEEE80211_LOCK(vap->iv_ic); + + LKPI_80211_LVIF_LOCK(lvif); + /* Re-check given (*iv_update_bss) could have happened while we were unlocked. */ + if (lvif->lvif_bss_synched || lvif->lvif_bss != NULL || + lsta->ni != vap->iv_bss) + ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " + "lvif_bss->ni %p synched %d, ni %p lsta %p\n", __func__, __LINE__, + lvif, vap, vap->iv_bss, lvif->lvif_bss, + (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, + lvif->lvif_bss_synched, ni, lsta); + + /* + * Reference the "ni" for caching the lsta/ni in lvif->lvif_bss. + * Given we cache lsta we use lsta->ni instead of ni here (even though + * lsta->ni == ni) to be distinct from the rest of the code where we do + * assume that ni == vap->iv_bss which it may or may not be. + * So do NOT use iv_bss here anymore as that may have diverged from our + * function local ni already while ic was unlocked and would lead to + * inconsistencies. Go and see if we lost a race and do not update + * lvif_bss_synched in that case. + */ + ieee80211_ref_node(lsta->ni); + lvif->lvif_bss = lsta; + if (lsta->ni == vap->iv_bss) { + lvif->lvif_bss_synched = true; + } else { + /* Set to un-synched no matter what. */ + lvif->lvif_bss_synched = false; + /* + * We do not error as someone has to take us down. + * If we are followed by a 2nd, new net80211::join1() going to + * AUTH lkpi_sta_a_to_a() will error, lkpi_sta_auth_to_{scan,init}() + * will take the lvif->lvif_bss node down eventually. + * What happens with the vap->iv_bss node will entirely be up + * to net80211 as we never used the node beyond alloc()/free() + * and we do not hold an extra reference for that anymore given + * ni : lsta == 1:1. + */ + } + LKPI_80211_LVIF_UNLOCK(lvif); + goto out_relocked; + out: LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); +out_relocked: /* - * Release the reference that keop the ni stable locally + * Release the reference that kept the ni stable locally * during the work of this function. */ if (ni != NULL) From nobody Wed Jun 12 16:41:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsN0682z5N3Df; Wed, 12 Jun 2024 16:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsM4Ktbz4gnb; Wed, 12 Jun 2024 16:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ivJDjp6q+2MwTrhNEKmNtYxI1T1WtCZUR4xDteFKKfE=; b=GeUgNJvO+YYRKxQ4aqTp7MM0z71vU4g9Jcyk6Wmvs3ZpXm3aAj/lMJD6RPna5GIzHBUzcu xLacZXaSKzAltx5a1Vhiq2l3S5N+nliDZvJVNXQH+5IZDvyJXTgu9FJmbhI5pmkS/j3kI7 HJeHa7XYUqhMyQxxWtnNbKArjVaMNh6y7p31r6QENoVbCtgJGVXmt+/rg45yXIikdsvSMM ICHONiqJZFbzYlC46UFFu304uTlIWRmGOCneMlHbFwmC2RU22ZjySSwBWyeAAJ3lNpefiJ OS1vb2Q0e4WQD/5gfWt8H5MTBsdnrldkDiTl1zRUDr3FKmDksgvuwNvNqOmPRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210487; a=rsa-sha256; cv=none; b=AM0m6h5GWZIGGu5jCQojznjQW5xS0cnCBp54IbB542MYMsu8fJ/R+4MLX6CvnVE18ji6SR ZKqIgNepheeHBqz4BGlknJOeraAluVNsKTnx5cIvZLkcRUyrM0sF+7Z12ThsQb1ZwrVmzw LpZ2+sHiFCJvs+UsZbzH8yPzg0zpD8DHXT3jkraItS1rzXF/KnbfZo3X/ynlBvXnbM6uv+ //t6NGCrFK0gi2hesG3pMDWYQvaMwbN0UtzAVD7MCJjnu6uUDDKT2JDeNGUf/Yc65CregR RpFYJmMEKou5p16GmI7QWHxWAuLfJAKsaliO0A86ioZSH7b4l19CPBZinMe1Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ivJDjp6q+2MwTrhNEKmNtYxI1T1WtCZUR4xDteFKKfE=; b=LiHHoh2p1OQ2jCXEmNsHEGB+CvtP0u1qLjAJvi6C662cEpOjam+j5pK86Wc3bq+re8hSWC n52g5yfrGnv262LFKAwGPz3epyVOmIRDfke1nFeR6Swm9qbzPiaz2frVsn1F9jWLeCnjaw NuXc5YcVWSED71yNyPF2lysS3riSxa0djewZ324ZpKGzRZRbJQwgwch9rAfqKCpn8fIusD aberB9UyGLHYaVxYLQSSOh+0ErA8RLuDYnfF3C4bClgercoxO4A+8wBamUZiNNhG6ubasH F61JDl0iLfx0PwLIqvOB481WENhB9A4JK8HYuQ/7pKaChlJh2Bigwnd/y++1Jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsM3wXPz11QD; Wed, 12 Jun 2024 16:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfRJ6046897; Wed, 12 Jun 2024 16:41:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfRbh046894; Wed, 12 Jun 2024 16:41:27 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:27 GMT Message-Id: <202406121641.45CGfRbh046894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e0ac61759dea - stable/14 - LinuxKPI: 802.11: Fix definition of IEEE80211_HT_CAP_RX_STBC List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e0ac61759dea2d572a078ab018ca5d3ead912f0b Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e0ac61759dea2d572a078ab018ca5d3ead912f0b commit e0ac61759dea2d572a078ab018ca5d3ead912f0b Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 21:57:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:20 +0000 LinuxKPI: 802.11: Fix definition of IEEE80211_HT_CAP_RX_STBC IEEE80211_HT_CAP_RX_STBC was set to 0x100 instead of 0x300. Correct to get the expected behavior. Sponsored by: The FreeBSD Foundation Fixes: b0f73768220e9 LinuxKPI: 802.11 header updates Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D45506 (cherry picked from commit 3e0915b7b6857afdbd283f2d448906e6a032ee07) --- sys/compat/linuxkpi/common/include/linux/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 2000e7480ff8..0fd90e921c77 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -263,7 +263,7 @@ enum ieee80211_ac_numbers { #define IEEE80211_HT_CAP_SGI_20 0x0020 /* IEEE80211_HTCAP_SHORTGI20 */ #define IEEE80211_HT_CAP_SGI_40 0x0040 /* IEEE80211_HTCAP_SHORTGI40 */ #define IEEE80211_HT_CAP_TX_STBC 0x0080 /* IEEE80211_HTCAP_TXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC 0x0100 /* IEEE80211_HTCAP_RXSTBC */ +#define IEEE80211_HT_CAP_RX_STBC 0x0300 /* IEEE80211_HTCAP_RXSTBC */ #define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 /* IEEE80211_HTCAP_RXSTBC_S */ #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 /* IEEE80211_HTCAP_MAXAMSDU */ #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 /* IEEE80211_HTCAP_DSSSCCK40 */ From nobody Wed Jun 12 16:41:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsH3wTVz5N3Jv; Wed, 12 Jun 2024 16:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsH0yrKz4gnR; Wed, 12 Jun 2024 16:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pT8C+W0CCsHJKriZ8oIznI8vyeMNDdT9ZzSuBU1TmEg=; b=hhIPt2H02Ef+uy42SFShl81o9RzxNflL8VOUiZX3ui4xGhNGDTqVvF+Sl/Bt2DIrIBSxOE 6mdfPBvUEmotYhqIfCVBIL5q4MU7yKICZo9dYV3hZZq7pGuxtNtlqCu/NPmTVGNBmLt/7S IFmCOrvFvaDI8fDYee8r/yKo66AMeG2ueRKPDQTcl/FedA1UosS1hlgcufKg658jtMSWXg TLeW1JfFuDlYEquVk8ezuclF4hxaxDKZ/T1uN8okraUED/H6drI9sHdL80ehcei2CiQX8R TUHAG5gPXVnQurWvADWvWZ3eE0Dc74mHWE0FbC+iZW5MVESG1jFWHtLOHanPyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210483; a=rsa-sha256; cv=none; b=kkrOFfAsh18MxMhENgp4aXrqh9QG1a73jpWUnIHk7ngl1hwigxrl4IRUqjxZOQQPkw8I62 Ee7VPLxP3gPutSET2WFxjFFlu2tP6z1h822rRzcDVKdSX1T+5dap1A1k5l3y26/gDbW5Zw St4zzfbrUsT9JllbRxIYzeMQpdS0TKWof4EUNjf8/1PT+LgFcL+2b+WDmap97E5MAMsSYy 6ym0fPEjcQBpqc1E2eNbw4j/1wRoBWDT23hZhPnxu2UmirpARWdO5HH7T6H4aGIjlrfSvy WuL4wS0DTnDWPua/d6nag3+L/f5JxYoP7T/Qv9fmp0QFWEzek+NiNDaQhoNaLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pT8C+W0CCsHJKriZ8oIznI8vyeMNDdT9ZzSuBU1TmEg=; b=dFC4a3WEdJjK1nwfre3+naRKBFiraQSWtGpIHAoj8cN+oK+eUdF8t8sl7Fp7r3bRKVaQV7 nkxI6BjgOvTU6HfUsXQaO0kSsViGLvkLnWNkPRdX9/8vsEDHiCIgYhuNBylTUefmqbZrAa 78GsqvxDidhnZCTOHM/1tzsM8YJfN6FjaENncPhnT3M9RbL9KwFmQYK/b5yydRm2ASzeAZ sRXHh4c92mdTcfCqa4DigSzyrnb8OMVosDYF1Kf8YGdBCDbscXBMRiELaJb7P15ZBiU1c/ 67GOIjKAgmZFTqmGTzq20S93fwX8jgJk9WiLLnsKwcCS801HhY0Q1DngoblzwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsH0bf0z11Hj; Wed, 12 Jun 2024 16:41:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfMvK046681; Wed, 12 Jun 2024 16:41:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfMMA046677; Wed, 12 Jun 2024 16:41:22 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:22 GMT Message-Id: <202406121641.45CGfMMA046677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7ad7453748e2 - stable/14 - LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7ad7453748e2adafa1e1a3e44b02fc852d4c5301 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ad7453748e2adafa1e1a3e44b02fc852d4c5301 commit 7ad7453748e2adafa1e1a3e44b02fc852d4c5301 Author: Bjoern A. Zeeb AuthorDate: 2024-05-22 02:24:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:58:36 +0000 LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes While the previous order worked well for iwlwifi 22000 and later chipsets (AXxxx, BE200), earlier chipsets had trouble and ran into firmware crashes. Change the teardown order to avoid these problems. The inline comments in lkpi_sta_run_to_init() (and lkpi_disassoc()) try to document the new order and also the old problems we were seeing (too early sta removal or silent non-removal) leading to follow-up problems. There is a possible further problem still lingering but a lot harder to trigger (see comment in review) and likely related to some other doings so we'll track it separately. Sponsored by: The FreeBSD Foundation PR: 275255 Tested with: AX210, 8265 (bz); 9260 (Bakul Shah) Differential Revision: https://reviews.freebsd.org/D45293 (cherry picked from commit 5a4d24610fc6143ac1d570fe2b5160e8ae893c2c) --- sys/compat/linuxkpi/common/src/linux_80211.c | 84 ++++++++++++++++++---------- 1 file changed, 55 insertions(+), 29 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 758db287d613..32b0287db65c 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -994,33 +994,37 @@ lkpi_hw_conf_idle(struct ieee80211_hw *hw, bool new) } } -static void +static enum ieee80211_bss_changed lkpi_disassoc(struct ieee80211_sta *sta, struct ieee80211_vif *vif, struct lkpi_hw *lhw) { + enum ieee80211_bss_changed changed; + + changed = 0; sta->aid = 0; if (vif->cfg.assoc) { - struct ieee80211_hw *hw; - enum ieee80211_bss_changed changed; lhw->update_mc = true; lkpi_update_mcast_filter(lhw->ic, true); - changed = 0; vif->cfg.assoc = false; vif->cfg.aid = 0; changed |= BSS_CHANGED_ASSOC; - /* - * This will remove the sta from firmware for iwlwifi. - * So confusing that they use state and flags and ... ^%$%#%$^. - */ IMPROVE(); - hw = LHW_TO_HW(lhw); - lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, - changed); - lkpi_hw_conf_idle(hw, true); + /* + * Executing the bss_info_changed(BSS_CHANGED_ASSOC) with + * assoc = false right away here will remove the sta from + * firmware for iwlwifi. + * We no longer do this but only return the BSS_CHNAGED value. + * The caller is responsible for removing the sta gong to + * IEEE80211_STA_NOTEXIST and then executing the + * bss_info_changed() update. + * See lkpi_sta_run_to_init() for more detailed comment. + */ } + + return (changed); } static void @@ -1460,6 +1464,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -1743,16 +1749,11 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* See comment in lkpi_sta_run_to_init(). */ + bss_changed = 0; + bss_changed |= lkpi_disassoc(sta, vif, lhw); - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ - /* - * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST - * as otherwise drivers (iwlwifi at least) will silently not remove - * the sta from the firmware and when we will add a new one trigger - * a fw assert. - */ - lkpi_disassoc(sta, vif, lhw); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -1769,7 +1770,6 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; @@ -1802,6 +1802,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); @@ -2290,14 +2292,33 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + bss_changed = 0; /* + * Start updating bss info (bss_info_changed) (assoc, aid, ..). + * * One would expect this to happen when going off AUTHORIZED. - * See comment there; removes the sta from fw. + * See comment there; removes the sta from fw if not careful + * (bss_info_changed() change is executed right away). + * + * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST + * as otherwise drivers (iwlwifi at least) will silently not remove + * the sta from the firmware and when we will add a new one trigger + * a fw assert. + * + * The order which works best so far avoiding early removal or silent + * non-removal seems to be (for iwlwifi::mld-mac80211.c cases; + * the iwlwifi:mac80211.c case still to be tested): + * 1) lkpi_disassoc(): set vif->cfg.assoc = false (aid=0 side effect here) + * 2) call the last sta_state update -> IEEE80211_STA_NOTEXIST + * (removes the sta given assoc is false) + * 3) add the remaining BSS_CHANGED changes and call bss_info_changed() + * 4) call unassign_vif_chanctx + * 5) call lkpi_hw_conf_idle + * 6) call remove_chanctx */ - lkpi_disassoc(sta, vif, lhw); + bss_changed |= lkpi_disassoc(sta, vif, lhw); + + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); @@ -2311,15 +2332,19 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto out; } + lkpi_lsta_remove(lsta, lvif); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); - bss_changed = 0; vif->bss_conf.qos = 0; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); bss_changed |= BSS_CHANGED_BSSID; + vif->bss_conf.use_short_preamble = false; + vif->bss_conf.qos = false; + /* XXX BSS_CHANGED_???? */ lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); LKPI_80211_LVIF_LOCK(lvif); @@ -2327,7 +2352,6 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lvif->lvif_bss = NULL; lvif->lvif_bss_synched = false; LKPI_80211_LVIF_UNLOCK(lvif); - lkpi_lsta_remove(lsta, lvif); /* * The very last release the reference on the ni for the ni/lsta on * lvif->lvif_bss. Upon return from this both ni and lsta are invalid @@ -2347,6 +2371,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ + lkpi_hw_conf_idle(hw, true); + /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); From nobody Wed Jun 12 16:41:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzrsR2yvjz5N3Gh; Wed, 12 Jun 2024 16:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzrsR0Q2Wz4glW; Wed, 12 Jun 2024 16:41:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v4Et0HF/jYB/yNPoWFfwjixclw/ZtbpxXTQ34jcyDfA=; b=t9VJ5dQCd7zWwl7z6vUBX/3Xt1BomAy6vwScSsAYr1h5MS/3jfjElhcKV4gQhOJdTb5DWm 6q8Y3IKQbaslrjZQ0pdMciHsyt+DDJVYopTOewA4cuizwjHs4KFCZdxaBqzzf7M4IGRR9I 0rY/V6/r+tGlMUjcYPEikzTZ0LX3vvTqLRw8v5HzzovbLWd0u/J4ySQOntfF1V/AKqoJaF R+WV0dzc2/4Y1NT26Tpr4u/Wab903GdK/nx2DSWyDRvaCpNWPVyP02tKJP//vqoWyT7ED0 21tzlA5TiZrjpLpRvCin6EC5fIEO7vND1QxfeBEqYKyanT1RdZUYOzDWl125Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718210491; a=rsa-sha256; cv=none; b=jIjCq/p9FFNzAr6DLB5W8ywZipOHjdBsxus0y7yT7YGt0jL1/8W7nE3JNyreOUCXLV/r0L sWcXCTkt9x/MwSjQpMai5A6ZfrQBiaezY0AqqwGiI8Vuil67z3ICNsjF2Yat+V0CgLK1km TvEv1IYeejFDZwXFcAC8km98tnmNZXwVO4rbyJNtBLXjaVki4P2z3B0VonUH7W1ikHqMKb NXzVKLEPdRLl8zSVmk5hnvhOM9mxCOSK2WwqySEN9OMDSFj0GjcD14iyoU2gKdgTGdRIK+ SS16uVt7fC1YJTGcg1F6263PLDL8/JyTLrVLVKzWyk0dKjF6lftxyFNTGzJBiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718210491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v4Et0HF/jYB/yNPoWFfwjixclw/ZtbpxXTQ34jcyDfA=; b=hQ82RV2ArZqZcyu794MJDsFDCvojw7mdTcGSoaRrWrW2Lo0aWvE9JEedEvLttlRyfRqU2b XdvWqYg2f4Yy3iRXakr0nuFdLnPHVEcnxrNxek7b2js2jzqPWzmnV49hFXc7bBiECdAmzJ vgO8ptLfRDw6M7F9+vXsv/tm/SzTuDym91bWI7eEroS7UskxbEmwepOFIkSAQ301z3YGA2 2kYNngRlZ4UWDlQdVub1Laocz1X/UKhE6IzyzQrnxmMdjOWAfArqqljW9poTRCiQcVMwGX kXCORApovo4N2k4mBDh+QqR7K8IzdqFebKJ0stY02DrGLopLr0CcBCE2BRq3Mw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzrsQ70smz10nc; Wed, 12 Jun 2024 16:41:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CGfUdw047068; Wed, 12 Jun 2024 16:41:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CGfUr3047065; Wed, 12 Jun 2024 16:41:30 GMT (envelope-from git) Date: Wed, 12 Jun 2024 16:41:30 GMT Message-Id: <202406121641.45CGfUr3047065@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 2ab1b827d49f - stable/14 - LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2ab1b827d49f473e30a91382d2ce03e268af45c5 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2ab1b827d49f473e30a91382d2ce03e268af45c5 commit 2ab1b827d49f473e30a91382d2ce03e268af45c5 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:54:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 13:59:46 +0000 LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames The "Invalid TXQ" error from iwlwifi seems to be triggered by a frame being sent for a sta which is no longer known to the driver/fw. While we make sure to trigger the sending of the frame in net80211 early enough (by calling (*iv_newstate)() early on rather than at the end), TX in LinuxKPI is run in a deferred task. When we drop the net80211 ic lock again and re-acquire the LHW lock the packet may not yet have made it to the driver. Work around this between the (ic and lhw) locks by making sure (a) no new packets get queued after we return from (*iv_newstate)(), and (b) the TX task has run or gets cancelled and we manually push any remaining packets out (or let lsta_free() clean them up). The disabled packet queuing now also needs to be re-enabled in scan_to_auth() in case an lsta is staying in service or gets re-used. Also make sure that any following lkpi_wake_tx_queues() calls no longer ignore queues which have not seen a prior dequeue. This former workaround "feature" (ltxq->seen_dequeue) should be fully garbage collected in a later change on its own. Sponsored by: The FreeBSD Foundation PR: 274382 Tested by: emaste, lwhsu, thj, rkoberman at gmail.com Accepted by: adrian Differential Revision: https://reviews.freebsd.org/D45508 (cherry picked from commit 886653492945f7e945eb9bdaf5bc2ae26df96236) --- sys/compat/linuxkpi/common/src/linux_80211.c | 95 +++++++++++++++++++++++++--- 1 file changed, 86 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 728103778e4e..ca8db481347e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -146,6 +146,7 @@ const struct cfg80211_ops linuxkpi_mac80211cfgops = { static struct lkpi_sta *lkpi_find_lsta_by_ni(struct lkpi_vif *, struct ieee80211_node *); #endif +static void lkpi_80211_txq_tx_one(struct lkpi_sta *, struct mbuf *); static void lkpi_80211_txq_task(void *, int); static void lkpi_80211_lhw_rxq_task(void *, int); static void lkpi_ieee80211_free_skb_mbuf(void *); @@ -1062,6 +1063,51 @@ lkpi_wake_tx_queues(struct ieee80211_hw *hw, struct ieee80211_sta *sta, } } +/* + * On the way down from RUN -> ASSOC -> AUTH we may send a DISASSOC or DEAUTH + * packet. The problem is that the state machine functions tend to hold the + * LHW lock which will prevent lkpi_80211_txq_tx_one() from sending the packet. + * We call this after dropping the ic lock and before acquiring the LHW lock. + * we make sure no further packets are queued and if they are queued the task + * will finish or be cancelled. At the end if a packet is left we manually + * send it. scan_to_auth() would re-enable sending if the lsta would be + * re-used. + */ +static void +lkpi_80211_flush_tx(struct lkpi_hw *lhw, struct lkpi_sta *lsta) +{ + struct mbufq mq; + struct mbuf *m; + int len; + + LKPI_80211_LHW_UNLOCK_ASSERT(lhw); + + /* Do not accept any new packets until scan_to_auth or lsta_free(). */ + LKPI_80211_LSTA_TXQ_LOCK(lsta); + lsta->txq_ready = false; + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + + while (taskqueue_cancel(taskqueue_thread, &lsta->txq_task, NULL) != 0) + taskqueue_drain(taskqueue_thread, &lsta->txq_task); + + LKPI_80211_LSTA_TXQ_LOCK(lsta); + len = mbufq_len(&lsta->txq); + if (len <= 0) { + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + return; + } + + mbufq_init(&mq, IFQ_MAXLEN); + mbufq_concat(&mq, &lsta->txq); + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + + m = mbufq_dequeue(&mq); + while (m != NULL) { + lkpi_80211_txq_tx_one(lsta, m); + m = mbufq_dequeue(&mq); + } +} + /* -------------------------------------------------------------------------- */ static int @@ -1275,6 +1321,14 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int __func__, ni, ni->ni_drv_data)); lsta = ni->ni_drv_data; + /* + * Make sure in case the sta did not change and we re-add it, + * that we can tx again. + */ + LKPI_80211_LSTA_TXQ_LOCK(lsta); + lsta->txq_ready = true; + LKPI_80211_LSTA_TXQ_UNLOCK(lsta); + LKPI_80211_LVIF_LOCK(lvif); /* Insert the [l]sta into the list of known stations. */ TAILQ_INSERT_TAIL(&lvif->lsta_head, lsta, lsta_entry); @@ -1427,7 +1481,7 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -1585,7 +1639,7 @@ lkpi_sta_auth_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, in } /* Wake tx queue to get packet out. */ - lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), true, true); + lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), false, true); /* * .. we end up in "assoc_to_run" @@ -1729,7 +1783,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); - /* Call iv_newstate first so we get potential DISASSOC packet out. */ + /* Call iv_newstate first so we get potential DEAUTH packet out. */ error = lvif->iv_newstate(vap, nstate, arg); if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " @@ -1738,12 +1792,16 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -2121,12 +2179,16 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -2255,12 +2317,16 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int } IEEE80211_UNLOCK(vap->iv_ic); + + /* Ensure the packets get out. */ + lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, true, true); + lkpi_wake_tx_queues(hw, sta, false, true); /* flush, no drop */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); @@ -3596,7 +3662,7 @@ lkpi_ic_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, lsta = ni->ni_drv_data; LKPI_80211_LSTA_TXQ_LOCK(lsta); - if (!lsta->txq_ready) { + if (!lsta->added_to_drv || !lsta->txq_ready) { LKPI_80211_LSTA_TXQ_UNLOCK(lsta); /* * Free the mbuf (do NOT release ni ref for the m_pkthdr.rcvif! @@ -3822,6 +3888,7 @@ lkpi_80211_txq_task(void *ctx, int pending) struct lkpi_sta *lsta; struct mbufq mq; struct mbuf *m; + bool shall_tx; lsta = ctx; @@ -3837,9 +3904,19 @@ lkpi_80211_txq_task(void *ctx, int pending) LKPI_80211_LSTA_TXQ_LOCK(lsta); /* * Do not re-check lsta->txq_ready here; we may have a pending - * disassoc frame still. + * disassoc/deauth frame still. On the contrary if txq_ready is + * false we do not have a valid sta anymore in the firmware so no + * point to try to TX. + * We also use txq_ready as a semaphore and will drain the txq manually + * if needed on our way towards SCAN/INIT in the state machine. + */ + shall_tx = lsta->added_to_drv && lsta->txq_ready; + if (__predict_true(shall_tx)) + mbufq_concat(&mq, &lsta->txq); + /* + * else a state change will push the packets out manually or + * lkpi_lsta_free() will drain the lsta->txq and free the mbufs. */ - mbufq_concat(&mq, &lsta->txq); LKPI_80211_LSTA_TXQ_UNLOCK(lsta); m = mbufq_dequeue(&mq); From nobody Wed Jun 12 19:16:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJJ5JtYz5NHbG; Wed, 12 Jun 2024 19:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJJ4pjpz56Q1; Wed, 12 Jun 2024 19:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0UbzKXJXKYWmBDzo0hbXSaiO5yRgoxPTvW8dMCWpkU=; b=CU2y1qr1fL8SY3XEpCH4ps75ezdKJ7k6o+Y2S4xiBwzOy+XlQ7UTK+kCFnVzrV4IG19VLN bKNmqbebTJWADsBODkrA2H74Da9vUmeeC6e9EI1yJmEV58o3O3hgQoJskGFqW2dyN3DwoR OABe3SOFUM7WBFvT47pXY7nC16InJoa6nnycmXK+BS4TZBzQGwC4qkBwKjpiXcJNAWIITW wdzSh3T5yO29CMSKu0OI73BcoV62jO+xuOw2AHCUa8k6ZlrG4IPn4rHVV+OnOO45zIbU6X rUPeMMMiH0RJ125ZNw1ZHiH9pvl1RXp0zyEBiOHWOcblvYxoZmTMXkqdxbwA+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219792; a=rsa-sha256; cv=none; b=Fh5wOa0WMgB4dxTAtIJ0l2UhEHFhK9EfNWy+88qJAM6ONiOxTIZhgdSAHrStkKdjAB2Pom OYNR/tPa31l4jpRxzVc1Rrg3XtBB090hR99E6+nVdGoQVU3I60Er1WqG6PRCizjdWa2X34 PVR35eQfGjMAZTxtvBnlfDPFSSx9g3U71UPaYq+aOZyktFBPMXfUP3vIq2tH4nFSu3Uuiy HBCLlllX4/HwFfK6qzMsxopROHhscgKE53RQMdZfW7KS03oSdNsy+HtHvghDw7KkapFjzA Fi/fZ88AuVhKQNNUXsZ8Lc0+fyIlacYONmGabLLIjeHbjsl4HrVpNrpshkYMiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0UbzKXJXKYWmBDzo0hbXSaiO5yRgoxPTvW8dMCWpkU=; b=PJw10lu1Nt8QyrM4TQ2KZhxUm6JMcLPhM8N4EbulS7yptbzAnuO7GOmSL9TOvKO/qaig2L mdADB2I5DFqPUggTxLXic1FAbnz0xstgU7XIdfekUUJPdke0jbXY4UoiJum9j+Dj8d5HVN gupZrzvIns+ilzWwHyfi7/MGd+UBojMD03Wc6+uf0WRBGkbvQxRWnZ40Fk+IiIfcNHP3OL m/cIqsAFjmAPHovL6GYvVycyxrsLLRDOEjPObuh6n9O1d7VlJ0xtss5xyKrziTOeZWZqZS rzXqqFJP8Y5ia41CBbR3hIy+aQlmjA7lFnooHM4CX9xgIMDc9e6CxHBHfu/d8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJJ4Hgzz15Dj; Wed, 12 Jun 2024 19:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGWur003395; Wed, 12 Jun 2024 19:16:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGWC6003392; Wed, 12 Jun 2024 19:16:32 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:32 GMT Message-Id: <202406121916.45CJGWC6003392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4cb9d580269b - stable/13 - bsdinstall: update comment related to pkg List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4cb9d580269b866a6fbf69826efcd156be538826 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4cb9d580269b866a6fbf69826efcd156be538826 commit 4cb9d580269b866a6fbf69826efcd156be538826 Author: Bjoern A. Zeeb AuthorDate: 2024-04-25 14:47:30 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:20 +0000 bsdinstall: update comment related to pkg pkg_add has been gone since 2013(?). Refer to pkg(8) instead. Sponsored by: The FreeBSD Foundation Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D44946 (cherry picked from commit ad31d4764255c0848f1f0fa10760d16b5a2922aa) --- usr.sbin/bsdinstall/scripts/docsinstall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/docsinstall b/usr.sbin/bsdinstall/scripts/docsinstall index 92d1743b5ddc..77d311c9ca16 100755 --- a/usr.sbin/bsdinstall/scripts/docsinstall +++ b/usr.sbin/bsdinstall/scripts/docsinstall @@ -148,7 +148,7 @@ f_mustberoot_init dialog_menu_main || f_die f_dialog_menutag_fetch selected -# Let pkg_add be able to use name servers +# Let pkg(8) be able to use name servers f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ # From nobody Wed Jun 12 19:16:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJK6TWZz5NHMY; Wed, 12 Jun 2024 19:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJK5KMnz56MX; Wed, 12 Jun 2024 19:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aDQ/u6siWNHc9mTFmO1gKxC+4Rq7b1joBfRMnhKlSws=; b=bZtlQl53uNc4Qwv72EHpJYGaODY85k5NKGvjhaMhcV4H5BoAukHfxYWNdIOzc2RID2v+ol jGRp2YxeZBh+R1PMwz0i7JLnJ3r1D8LLUo1sPTwMA49qGb07QLX+/k4YvASpphMk9YxMtT 8A8GecPCLV9fQ+yib4jhZP6Fducz5jgL8YJcVRwOEpYF5LGHX+0eSlVdObyxrXcH+6BL8+ gYQnwuJIMQrLnPF/7CT4TcJqNnC6DiN8KvOfsjapEHkk1jwu1dOLUE7XRjSJm5ddw8VfFd qVgqflWzS4dBDaNMOOsuALc3lwlWN/ac8y5P6v8Rviweu74rR3IrSHGE9ZaVYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219793; a=rsa-sha256; cv=none; b=geS28mokQWyidogEGkZRAxOv0zdCnXzda6uURbmSySgIY0gSubfukp96W528Z/NgPThtzo 0gyBwRrER8Rbu0lqMr2iar8UW1ZoihNm0J54Q+bXJsPyel5OZ8HZ/HdSixoJFNcThhtiQw y2UWe0fkeiW55WBJ+1tjZi3bQWLxF3tlqa8lJaMMeU/sAHAHxmR5GKZ8DTLo/LxNUJU5dx PRPUPm4q2o/kl1RalcfIkejEexWG6h31muWdClHbEu2B1Lub4LmmcGeREWYjeb/xMKUQ6k 3IjLkNFcAZ7Ecpd7s4BmbOTK8uGZ6nTyMDWBgJrpdT0BD2gHe38mJBwoE/lTxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aDQ/u6siWNHc9mTFmO1gKxC+4Rq7b1joBfRMnhKlSws=; b=v/E8Vrb30EX5cnCdMB1o9OgH+IH08pl2nt5R2MWG4Dm8dQKoaoEJ40cF7gAVhExqoT+xan Gbjx8U1i4C9nurMNNx0Tz4jdL9ZYA3dLHXzMtEiLcvwom2mBYYT3AMFeU31g57pbutKyyJ m8Acdg5qA7V0ZBPLxcMUF/XoHuorrWWdrg8WpdlAWy7jWmh9U361JqR+wiTcW4oNsvftVJ xn30UpPhgkFzOK6f6jOibc5Q6L1PxLBmR29LuLveGmAhBdaJmupyecGk25byGSn+WhQCPI gE7UrBmOCQnSe8PMKOV14PlC+LTxr8LL0PaYUuyU0Y1WotsRNeATJhn5KLRRvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJK4x4cz14Tm; Wed, 12 Jun 2024 19:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGX38003450; Wed, 12 Jun 2024 19:16:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGX4T003447; Wed, 12 Jun 2024 19:16:33 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:33 GMT Message-Id: <202406121916.45CJGX4T003447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8e64a7ec0b5d - stable/13 - net80211: amrr_init: change order of commands List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8e64a7ec0b5d8a9b788ec36e9a17d896f7ebcd59 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8e64a7ec0b5d8a9b788ec36e9a17d896f7ebcd59 commit 8e64a7ec0b5d8a9b788ec36e9a17d896f7ebcd59 Author: Bjoern A. Zeeb AuthorDate: 2024-02-05 14:48:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:26 +0000 net80211: amrr_init: change order of commands First run the KASSERT before trying to do the free operation. Better for reporting and debugging. Add a guard setting the value to NULL afterwards. NULL pointers are a lot easier to test for. Reviewed by: cc Differential Revision: https://reviews.freebsd.org/D43751 (cherry picked from commit cd9fee3d2c370e81109505c2abfd381af952e9b3) --- sys/net80211/ieee80211_amrr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_amrr.c b/sys/net80211/ieee80211_amrr.c index 7248af0edccf..461554d75ea1 100644 --- a/sys/net80211/ieee80211_amrr.c +++ b/sys/net80211/ieee80211_amrr.c @@ -132,8 +132,9 @@ amrr_init(struct ieee80211vap *vap) static void amrr_deinit(struct ieee80211vap *vap) { - IEEE80211_FREE(vap->iv_rs, M_80211_RATECTL); KASSERT(nrefs > 0, ("imbalanced attach/detach")); + IEEE80211_FREE(vap->iv_rs, M_80211_RATECTL); + vap->iv_rs = NULL; /* guard */ nrefs--; /* XXX locking */ } From nobody Wed Jun 12 19:16:34 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJM0g79z5NHbH; Wed, 12 Jun 2024 19:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJL5yHpz567F; Wed, 12 Jun 2024 19:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K1d/XabHf7PY9iurRAsRQUqQksFjs/CL6O7nEVPiZRw=; b=CNXEdfhePHaj3/KIEdSIbhum8AdNDKfNBxEPYYYRCJCo9yko1Z04x4sJvGiIJGQe52b1R9 Pv03CzWvR5dpNDqoLiVvev+REDGx2Oo5BrI22unyyA2fDxH8k9jQCDRDuj52zukN79PblK Nxo2C2bOu6HSZSO9IQWrvMyt1lU0JgKPMuLpDnaL7VlxZY1ENEDMuiyCpjFJ+VOysmF8Tu 7SrvXkc2tl1E1jr8jbmQioavnz3TfMGp989+RDDJb+c0byFNi7FRzs4e7buk/doRbsyM3v MMDpczrJTsC+/LB9lC2AsAOWGyybbH58oYTpsjTDtZS77IsL4ysUCJ5WSDCR+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219794; a=rsa-sha256; cv=none; b=kjHoLSnw9Y95Yy74ut95nVXbuLZnhMM2eWGz44CZ1DWxxk6aQgWcH6fOn+RQf/hOrt+8G/ LfR52P645x32VD0QKh2SrcrlSICHFors1AzSum+fIAqXIHtdeNYMXTaNyiQIO5Q/X1l29F 1iq7rac9Lwa8lhUcizPb6cImxo8/CvrRNDUd4CWY6iphDV6BMX+sanbm7AvAJr7LwtCoPL FEHCCznmK8s9R3rew7Du+HtUJ6tkLYYHFJMRJ1dyPXtEQkXmpigoMikzFj5Rg8T0PHEkei xyVuqWkfiPmQjoTbDIScwJjt8UNGGirkDhSmWFhKVuKxkKy1L1MiLHgthWFtRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K1d/XabHf7PY9iurRAsRQUqQksFjs/CL6O7nEVPiZRw=; b=PGC73/TCPBdf6dh15QcLE2o1DE/8uZLacPUaus9/QcC1B5To97xAOeytlaCz/jZSTwWuHh tBP+AM/O8ObVlzOd1eF0StOiFsAEnI3N8WmShGObvhnzgFyxWOeBmsxUV+XxnL5t7t8dz9 h5Th9+QkK7+GAuNtn99h6bMgPaBeYVpdCr0KnYWwaV3ETHGBzOxsbQ3VWm2doUR28PWsel uT3cdSFi4tPx7bhT51df1qvuMHLqXsaANBEMni4NAO58eqPkGwJuZfLu53NiPvL+kFT6px tIY+7/PbylYpab9sU7gyqlwqFJC53tRXogJyQ98do7aDK8dWfL5u4zimBnJzLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJL5ZlPz14Tn; Wed, 12 Jun 2024 19:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGYIr003490; Wed, 12 Jun 2024 19:16:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGYox003486; Wed, 12 Jun 2024 19:16:34 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:34 GMT Message-Id: <202406121916.45CJGYox003486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7ced40667656 - stable/13 - net80211: fix IEEE80211_FHT_BITS List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7ced406676562da38b5c2ae1f5cd5ba90fc5e012 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ced406676562da38b5c2ae1f5cd5ba90fc5e012 commit 7ced406676562da38b5c2ae1f5cd5ba90fc5e012 Author: Bjoern A. Zeeb AuthorDate: 2024-05-31 21:48:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:36 +0000 net80211: fix IEEE80211_FHT_BITS AMPDU_RX was added as a second AMPDU_TX, LDPC_TX and LDPC_RX missing; correct and add missing. Makes ddb output (and other debugging) look more correct. Sponsored by: The FreeBSD Foundation Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D45505 (cherry picked from commit 5bbf4b6291863452acfb5a7fc76f227848841cac) --- sys/net80211/ieee80211_var.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index aa99ccefd248..393c703c29df 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -722,7 +722,7 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_FHT_BITS \ "\20\1NONHT_PR" \ - "\23GF\24HT\25AMPDU_TX\26AMPDU_TX" \ + "\21LDPC_TX\22LDPC_RX\23GF\24HT\25AMPDU_TX\26AMPDU_RX" \ "\27AMSDU_TX\30AMSDU_RX\31USEHT40\32PUREN\33SHORTGI20\34SHORTGI40" \ "\35HTCOMPAT\36RIFS\37STBC_TX\40STBC_RX" From nobody Wed Jun 12 19:16:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJN2scXz5NHJq; Wed, 12 Jun 2024 19:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJM710Mz567f; Wed, 12 Jun 2024 19:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80wgffg2vkfVU2vqcQQ045O4mNaydAf92ZIp/PuPTzs=; b=T+ZlA3H/WCi691OtHm9hGxyCUZu0YfvkcXc+QXm8DAZqlABWdLm4MsadJ3Fpv+CMHs2UUe csfVItX2tFIX4/b3vDBeoQtt3DEIJoUHd4rTaF156HlgiD7cM0ZA4hbwo7prWFXtgxSLrg XIBPqUQoT0h/Itc+rSPmiDVcYkTXBGZtQU9lX1VG1r5uitQ2OAqlNESZsmWtEt6REsmbhk j8eJzm4ekCtjRWG1AgzSJnWPYFRR7ZuByg4FW9vgxAnzw8rJsjmaQOV+chJrzk0At4YmtR s+GMDrdl93eqt9G03YRhpuPVq3JibhsZw0N4Wa1PFmi8p4iK3Rqwp74XgONL8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219796; a=rsa-sha256; cv=none; b=LAsMgpJe5fMUWYd+tr4V1enOJdpNYDtkxjXGEIkzAQh2N8L1j9ODS2zvrQyg4hlKIsUDNG BeSx0AMvlwGCympr7UmwNUj6/3Gaq70HSZnDAn5O4UPVsereCq95+EFti/MpAheQXHUmzE 78wIrw9YUSE4kc2f788lwy1lO0U/dIVvZHmq7c8UfQVWEFBc7BAuok56TinIridE2PCTI3 awvjPxY1wsWqDi+tr7hKCD02LajsCK/y6JqUDit/rZ11I3VDKrxdSbk3jgrvadiWVkXfoa bBSymkzDrFb66iGj4s8DwCPN8F1VtoX6zcmiD+TeuzXtua48eWECmSaMoOE8jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=80wgffg2vkfVU2vqcQQ045O4mNaydAf92ZIp/PuPTzs=; b=O3zYVoYI0I9gFYzpEQtrLxwyxRfkWWKYpx2garY/arRCG2QkgPnXmQBtE431dj08tZ/swJ VnEZJX3BeLxdUi+1IV8lUtrPhpVxRyxBL5o3+i1Z4M04wPFw+CyKIHA+SAHMftYNAKT7lM qkiHwpWt3Wdki+j9H0hvjrtOqrPWGfqTroqLvrctPxJfpuE1nTjfY4zsUS+jRw5waP1BaW EQAUKcpvHWvgMzm/GXa3SUqZmZzbdgn4UkkRLG6nwew1deWaGD/7Ckz7cBvwr07x5xL4Do nOOxhYuMZt/Xz/r83q5qg+P40P+8gtg61uhNr4A3wMYEVNA1Ohg3OEnQNwmTJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJM6bryz14Tp; Wed, 12 Jun 2024 19:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGZUG003551; Wed, 12 Jun 2024 19:16:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGZvw003549; Wed, 12 Jun 2024 19:16:35 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:35 GMT Message-Id: <202406121916.45CJGZvw003549@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 999d1558b1d8 - stable/13 - iwn(4): correct debug message: "not" to "no" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 999d1558b1d831038b257de49a1f77178c962086 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=999d1558b1d831038b257de49a1f77178c962086 commit 999d1558b1d831038b257de49a1f77178c962086 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:01:06 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:43 +0000 iwn(4): correct debug message: "not" to "no" Sponosred by: The FreeBSD Foundation (cherry picked from commit 9e012a9da5df131b64c2dfd7d9b6645af4ccef0f) --- sys/dev/iwn/if_iwn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 2cbde90782be..4091bf135ae1 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -7520,7 +7520,7 @@ iwn_addba_request(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, break; } if (qid == sc->ntxqs) { - DPRINTF(sc, IWN_DEBUG_XMIT, "%s: not free aggregation queue\n", + DPRINTF(sc, IWN_DEBUG_XMIT, "%s: no free aggregation queue\n", __func__); return 0; } From nobody Wed Jun 12 19:16:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJP21Xqz5NHpF; Wed, 12 Jun 2024 19:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJP0sp4z56Ql; Wed, 12 Jun 2024 19:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6k8BzpgY1gFe+MdrEKdJml4fMp048oN8rhOdSGmpCeM=; b=UThkeYDULyMwHUxf5vuLvxTeZ5GIU1Exn2UHVbDTRkI1Q4yl5xlgMwm03mBZDz0+RfcRc0 OogNBLGIaX32reURASQA0p19KFo0pI1Krw4EUfsSGoZTMyuaPIE0eS4nXrAV4FQZLRLnC7 8KJvrRMUCasTTQFBnXz9OdJPSR7iUD2PBco13jLLVNrSEWAzYKqhdPopNiUNawYrkWUYVj Qzqn91w5C7hcRiPPglr8GEhg0JGhdtn4t0XhPMyrFRSDagguFKxx3+2WKRVATLoRc5SX6v j4BEsBAhIDNnhPiohZX2EMHZd4usMvXb9JAfAzsprwnX/CNOivDZpUDxFuCGLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219797; a=rsa-sha256; cv=none; b=L2QHNAb2Si6UeZ72saSM0ak4+zei0XgPbH/BfeQdwwYU120MoQ0hv3FPKfULai35m+Srmr sUnGIr+QFQsC0yyc+A3YOQFjY9hW/NBEOWczQebxQq7BNwWMEnOLLODLtrs6hkvmnkrsBR VVEzEHvMsKQQujBZpUYnoHRWZwCabG69XdOviSpOMcVgOLWPCUOZaRPThtSs28FhJx9KfN 1g+gNkkLE4tDf+jtOFIvpjfmX2uLEkh5IkiD+5qEjREQnhHOBqPfwl5B+jpsG/F4ttcqhT q+Ax7UAicwpBX3uMc0yW7t0VUhNPtVpf2NcfQ11yidpfj/qsdBch8CtWJ+aNZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6k8BzpgY1gFe+MdrEKdJml4fMp048oN8rhOdSGmpCeM=; b=pLyLmWPPwJIMWyfQDemUJM0uCvhol3YfT2xWJokNVyrgGYFZakhnAdowKJ3RpvxuCUqp+a WCBm2njZnOkznPDL6ggEEnjtNBED9wkKeGOd0Isr3GjOE4fAyrgX2GmKLgfgMmqTVhVlV9 mfyPpi1SHC0ZM/RGd5snxPFrDsncBaRNrOHX9iZo+ifYphrXGahCxXcYNifJWOnFjlogd8 mjQPkI2ofBO6/Ojf1waZ0QMxRc0jRT2WjxutUwItoX94b68CW7Iq1NFIW7jNvZbsac0Y6U 4jKqFvJbe2qagdh1eGmqTJN1yW3IFEUtuQwjcg5iMKI52JyP1nOU73vco1airg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJP0TByz15BD; Wed, 12 Jun 2024 19:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGah7003590; Wed, 12 Jun 2024 19:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGaRb003587; Wed, 12 Jun 2024 19:16:36 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:36 GMT Message-Id: <202406121916.45CJGaRb003587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 98cf07160021 - stable/13 - LinuxKPI: add PCI_VENDOR_ID_ITTIM List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 98cf071600217600d33a033063e71f41553dc6e2 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=98cf071600217600d33a033063e71f41553dc6e2 commit 98cf071600217600d33a033063e71f41553dc6e2 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:40:42 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:48 +0000 LinuxKPI: add PCI_VENDOR_ID_ITTIM Add PCI_VENDOR_ID_ITTIM as needed by mt76. Sponsored by: The FreeBSD Foundation (cherry picked from commit ce707e674f7941c0743e72193c433fcf554a82b5) --- sys/compat/linuxkpi/common/include/linux/pci_ids.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci_ids.h b/sys/compat/linuxkpi/common/include/linux/pci_ids.h index f23cd7d6a124..b52ecc525db6 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci_ids.h +++ b/sys/compat/linuxkpi/common/include/linux/pci_ids.h @@ -51,6 +51,7 @@ #define PCI_VENDOR_ID_HP 0x103c #define PCI_VENDOR_ID_IBM 0x1014 #define PCI_VENDOR_ID_INTEL 0x8086 +#define PCI_VENDOR_ID_ITTIM 0x0b48 #define PCI_VENDOR_ID_MEDIATEK 0x14c3 #define PCI_VENDOR_ID_MELLANOX 0x15b3 #define PCI_VENDOR_ID_QCOM 0x17cb From nobody Wed Jun 12 19:16:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJQ5Fkrz5NHbQ; Wed, 12 Jun 2024 19:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJQ1sMcz56HX; Wed, 12 Jun 2024 19:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYnMV0Pap9TSfWNXc6mmwWaXY4XprPFj3QrJegs6ENo=; b=aALlUNtVL/P3GHaPVv3l9/+qYKjw0MykhphNety1zErrO1XKtSIbinR+tNOVyIQmK0Byu6 6MSF5x2dkuD36UX3OS/3GZJiZKHwpl8PMDUv1aJPADrYoCTUPxoZTcaSIuzPTlvpaZDj4Y +c6Bn3yPtvTv1xUC5cSDzmQAZH8tReMrgDyATyOokmGrPK1TcGQ9hIhMSswEpWW7/tCm7/ 8OvzeL1pk4in1I418GDSibP5mFhQhIusHonNM4xmjeM5RbRjdBl7UL2CykP1Yg+hgXmL0o PAaVmA88Zh7YbJBQeT3uGwNRcF4rtThPdIfkntOoMpYxmyfCvAeA4/Z70tLjIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219798; a=rsa-sha256; cv=none; b=NE5Z7T1VWHJTi5npQLz3zcan8JxLz+Yz5XQr/WAOduolz/8ARXpPUWRbAEzumRJMiRzrhB RD558Zjt3Mryt2DCmjWg/a0xRvudYElzKt1t7APPRn/wfn7WGDJr+nVWumGnXyiuyi+hrB ldSZN9gdXyJhRKixuC2QmfWBXiimC5Als/FAU97Ac1tR+6otAE4CL0/bzzQFbqnSqBWSWM sFaqaFkl/3TpzaSATwFjFpg5RDKclLm3oFcYDBYTPZhGD6lkf5Afj4lxYLtlFFYuhUM4aE 8OJ6EE5Td1ecTDFjBY+9VxSrsuEClc85jYxMxWhBACAF6fOw3Xp0C19IJKirJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYnMV0Pap9TSfWNXc6mmwWaXY4XprPFj3QrJegs6ENo=; b=EG5iML7C28hxbFngwCXXxs4i1P01hXQN0cN1mux4fsndQsQulJDloNDfXsxqxB1Fbdaj+P /wAHXZjayFVGn7rtpfkB0GOfLaYB9K/GHxR+51yRO54VF3f0QbcLwNq9T8qTgv++FzgDnh +wkCtmdyaL2cKf6UpG9bAT7XpFIamEGzc9sxWJye1U02Y3ZocFSw8dELLCwYwh8JriGZ0v SJBFDprt2uNGb/MJWS6YaF9a8eEfQ4qCIdlDUt31CdxDKspSvEwqq2edm85lmwai6X8By9 7DZsVb66L9dcAVtmX4xUKoAK8Hywip55d/oED0xpfCnfQqOZFPiCY+7kexh34A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJQ1T2fz15Dk; Wed, 12 Jun 2024 19:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGcXA003638; Wed, 12 Jun 2024 19:16:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGcuf003635; Wed, 12 Jun 2024 19:16:38 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:38 GMT Message-Id: <202406121916.45CJGcuf003635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f1146027f1d9 - stable/13 - LinuxKPI: add further constants to pci.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f1146027f1d9c476e53e1ef9afb0e5f9d3bf41c0 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f1146027f1d9c476e53e1ef9afb0e5f9d3bf41c0 commit f1146027f1d9c476e53e1ef9afb0e5f9d3bf41c0 Author: Bjoern A. Zeeb AuthorDate: 2024-03-31 17:26:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:56:53 +0000 LinuxKPI: add further constants to pci.h Updated wireless drivers require more knowledge about PCI (BAR) bits. Sponsored by: The FreeBSD Foundation Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D44573 (cherry picked from commit a1cdddcf1596d258ce0b01b156dfd9921bd60e08) --- sys/compat/linuxkpi/common/include/linux/pci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index d8ab851435f5..5e859e1a65c5 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -107,6 +107,8 @@ MODULE_PNP_INFO("U32:vendor;U32:device;V32:subvendor;V32:subdevice", \ #define to_pci_dev(n) container_of(n, struct pci_dev, dev) #define PCI_STD_NUM_BARS 6 +#define PCI_BASE_ADDRESS_0 PCIR_BARS +#define PCI_BASE_ADDRESS_MEM_TYPE_64 PCIM_BAR_MEM_64 #define PCI_VENDOR_ID PCIR_VENDOR #define PCI_DEVICE_ID PCIR_DEVICE #define PCI_COMMAND PCIR_COMMAND From nobody Wed Jun 12 19:16:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJR4hGBz5NHdp; Wed, 12 Jun 2024 19:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJR2yCQz56J2; Wed, 12 Jun 2024 19:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3km4zg+HDVWdqomKnjU9cp93AACkolhQSO6vzICJgvo=; b=xSC/Ia+XNpBXKuTwHkboI1tEU2ZFfs8syZbE/hcSpUzgECy8bS4XLJAwpwq4XqrjhwQgJY gQVthLRfQL7jdKCHBqBcKUuDGkcvHLZz9RBGioewXlIS3bYRxK5ipXHA0yXnax9C8Cb3cC EGVFK/LpHMNvJreuJJDynX/u0KK6wXQs498mTFdHaSNs9tghyr1oxQjBFN68FhDr6pNpY3 hO9uvu0NExlmlgV8IwjSMhG1WRO+G8dFObdJI7g9wXQZxlVNAzXu6KqqC+Dc6X/mP0U5WF WMhSGsHM0Ne4UsUCHvGGaHghjcv5aowDFmqasrWtuONIPMAQ3Z86n0d1tVc8wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219799; a=rsa-sha256; cv=none; b=LNjxFMxaC7T76CNeOe8zmZ8IHekfywaX8Le04nNREkSA5aCO3utxjUPlWOhJIZEQpKS41g h0AJktSQ/Pwl+BQT9w5oS3Fo3B7+s7ntYUi1KpClFqt6tvWv1oNs4T1xCbOrEkgHyAZtsZ eK5s2wJiD3vFOvQ87cXpPAPjSZoE+Sc7ARnnutYfqCjwoHy5AEp3uboZ2Bpp+LqmPL0kOB AkrxRnU681OxLWiblkMCO0TaYxMc+yZuXujSpEQBR/ASAspv0KX5V18s/9be+Nvi62E7Jq xMD1oC/2HE5XKs9S/9fLKClZidi3q2Wzo6iotWsKT0MaeanaVe3OWBQIYIgTsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3km4zg+HDVWdqomKnjU9cp93AACkolhQSO6vzICJgvo=; b=d7CbzPQAZTGDg7C3JPD0PALWZ82ynnpegyKhY5553A0mCQEJXqpIPOhWfuHVoq9gMlHxJ6 vqWHKUo68iLxaB8mwOUOpWaebel3B9P968gdXM37M4uM9L6Ixobl+WNLtteN73QLTkb9vz ZFFsPxOA3KH+GmPHBJDEc+kAaSLlL2vkroYfCVsFaeX+s57KqR7Q2tHcjNdcwucxA9E8aR qpBGXqAAyDsszL5IMtEuuAhS3ypZvnDxjBPcLr/ioEWqSfF8ABC0RGu4W49mjnmXl7j0O5 2xNSWzbro2AWcs3FDPzbvoxfMmlCaPWC6tp8qeu6TCWeFO/d4gwzjVaEMld8mA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJR2XC9z1584; Wed, 12 Jun 2024 19:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGdTJ003677; Wed, 12 Jun 2024 19:16:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGdnN003674; Wed, 12 Jun 2024 19:16:39 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:39 GMT Message-Id: <202406121916.45CJGdnN003674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 25878310adcb - stable/13 - LinuxKPI: implement memzero_explicit() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 25878310adcbb361b31bc89b34f744c0c5a29bb1 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=25878310adcbb361b31bc89b34f744c0c5a29bb1 commit 25878310adcbb361b31bc89b34f744c0c5a29bb1 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:30:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:01 +0000 LinuxKPI: implement memzero_explicit() Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44586 (cherry picked from commit 218b2ccf8cc90698487515c681f3e3453b0dcead) --- sys/compat/linuxkpi/common/include/linux/string.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index f745c2f6d343..06dcdbd97663 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -273,4 +273,11 @@ memcpy_and_pad(void *dst, size_t dstlen, const void *src, size_t len, int ch) memset(_ptr + _o, _c, sizeof(*(ptr)) - _o); \ }) +static inline void +memzero_explicit(void *p, size_t s) +{ + memset(p, 0, s); + __asm__ __volatile__("": :"r"(p) :"memory"); +} + #endif /* _LINUXKPI_LINUX_STRING_H_ */ From nobody Wed Jun 12 19:16:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJS69Kqz5NHmW; Wed, 12 Jun 2024 19:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJS3nKNz56Vy; Wed, 12 Jun 2024 19:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x/9XIfpA1UOMCnEz81o5gcXGOgwn78nVqOXKXMovpBA=; b=yl7kC8TT6OQf+wyfL1JyL1FxZJ3Smv9bcnkCK83RltTkNYEO2M69URg9qZ7ZqWydAlPF41 jImwncwl1b+cutP2CCNtR1EW7Adxo1WC/2HuFM9Z23D5mbIaGW0M9ykAioiKpH98Bw+E6e tP8fyQ9AA2G+MEFC0BLDnd+qijgAY3eSHwCFxwSj63QxPqElND8Cz4dYwMDNrG4BCegOZB mPOBhbHZizvy7539IFlVxYzzW17ul40mlZ0fdfN7Ee5qkE9ZL85g6P/uMF5pYICqU0UA+G 8u0KujEEN79tXgo7zGZZLygoRDUDz2Eh8gt04SXlRg/tb2g2Hz059tzHNymuZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219800; a=rsa-sha256; cv=none; b=oJ4rSZ69kktMFVT1bIrOAeWE8rCm7zsyhg0RIkwIi7UOzbFsNdScr94FlL13a5iwnquGPQ HncCwV/nRNLYrcyZnVHhLAVJtj0uZg3e0v4aVG3NeKbQKSNTaa5r2Oj0gekdagOgpaNv9u dWJ6tADuyDUDa7nvZT565+TS7sHZXwDp57pevCbDte4gIxemkH4zawvd5RSELSRVi7+pCJ e07bgQAT19vkcG8JX6htg+WqLBSasQDDbnG82bUJ31Q1eI5SsDqQ9j+61inrR46/t/T8E9 2ZVl9oukoae2rTofDeR4WXy7bTYGunGwhG41BkslqW9ZwzKjuDBk9pNIipxZ1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x/9XIfpA1UOMCnEz81o5gcXGOgwn78nVqOXKXMovpBA=; b=Ci0yMCsdl8DL19HjUQQ2OLMxrOhcKL0UF11UWZKWYqYu7/bPRy7ODMQzOQvxkoOqjPTwMq 71CsKS9I/oWtW/CAlJZ7aiMKqUOBK+dhvGFXvAnQ3zKamLcAo1yZTFZjxA1UgNxgNeMsSG pvs2maiBS1/a5qhcG7udOPOdxmnvJQZdumMHQ1SHEYv/6uUPkSke3g1MV+45janqaPuqH3 2QVPzB/1wu/Z6kal/+sjuOsredPEk83zOXJ6619/IPik5HPIA/O5E7LJ4jVDZ0iTcL77+q 66Oq08rbBDIMjlYGVqqa0C3MUhvZ2XzvuhTGD1mFmSeoClGXJshs8SPbLmqjXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJS3N9Xz14mQ; Wed, 12 Jun 2024 19:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGehM003716; Wed, 12 Jun 2024 19:16:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGexJ003713; Wed, 12 Jun 2024 19:16:40 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:40 GMT Message-Id: <202406121916.45CJGexJ003713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8d796198774d - stable/13 - LinuxKPI: add BITS_TO_BYTES() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8d796198774d0908f7a1328fa7257b37ed665a35 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8d796198774d0908f7a1328fa7257b37ed665a35 commit 8d796198774d0908f7a1328fa7257b37ed665a35 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 23:48:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:06 +0000 LinuxKPI: add BITS_TO_BYTES() Just like BITS_TO_LONG() ... used in rtw89. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44603 (cherry picked from commit f674f016c03d49e14f1c651ed088a6f2d01a62ee) --- sys/compat/linuxkpi/common/include/linux/bitops.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 58677631b604..1415d5224084 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -54,6 +54,7 @@ #define GENMASK_ULL(h, l) (((~0ULL) >> (BITS_PER_LONG_LONG - (h) - 1)) & ((~0ULL) << (l))) #define BITS_PER_BYTE 8 #define BITS_PER_TYPE(t) (sizeof(t) * BITS_PER_BYTE) +#define BITS_TO_BYTES(n) howmany((n), BITS_PER_BYTE) #define hweight8(x) bitcount((uint8_t)(x)) #define hweight16(x) bitcount16(x) From nobody Wed Jun 12 19:16:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJV1K8Mz5NHmX; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJT4nkpz56bX; Wed, 12 Jun 2024 19:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lL4ktS6yAerSScC7RlwcpU/06gJAEnKcjds9H42plLE=; b=FGLK/XLmlGtS8OLIqLTdc0VZVzKoBZHWC5uenGHSN9igxEHioYlQqfLCKbuIXSILQDBpR2 Ro9WGjeCXk5aNVf0h9hT5tP2Q5UUka7V2hmF9n8C2WHfSTvgiqMVfyuOtJnAZXDLkQfKKw CxDfbguZnDAKjqfLbGVey4q5UiHxP+kuRhS2fQLKeAZ2uO+VQpwCL+PhL59lA2V1lqn9dR YWU4nAqStXCQ8DcsyVHRpfH7Ii95BajozmpC2FZzibfuE0htA7vRQPscWfMGpcQn0Atu4+ f1Uu+XeGOjnoKMHgnNcIrFjbjK4ipyCEem09/QbBKVV8nIqysk/QY/FZc4U3VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219801; a=rsa-sha256; cv=none; b=Uh3gxlhuVO4VnjRyM9ikM/A6qjEFLQaEYeCxjdT/X4cMinADN1uex3vs78+BpCPN2hzogB p38W5Ojx4nMcABteGRQBjKrrMf4Q6AhV855qDVMhUzMpTipw4a+2ygH7fX1UHE37sXzVuF rOFxO3LbVmcWY9JW3nX43zcvcaGHjJSMdNDDXE4YXX/JaEkGvWY3aKxAyYgDRM+koeSOHv DtjSis7wzJ+N5OpC8Qdk99qupswurIejGvmPrRe0+H3EqE29rZj4U4yeR/esSbUxedPLVb QepyNlM7Yx9wkczAcWaY9FrpOIdSmT4C8X9pfLNmO7sTRPtvTO2EjOtW+A+6Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lL4ktS6yAerSScC7RlwcpU/06gJAEnKcjds9H42plLE=; b=cBaJ8fl96bquHNtotegR2NVZ1tTuH6b4LQCmTDXQgOYs3e/djBoeU1XqmSMzJ0KujFkfs9 JmsYh1NOqGLP3fPqvuap9FpMCNKiCY2fIVqi7bDHU1CNGOIuli3+NWS35SFo05viu+I5PV PSDaghPp9y6Jo9GNqmjUqDOSdr1lQ/ycZLAwjtkYVjLQdArX/0o5dVfEC9Vaxct6S7ExQ7 zNdCswWbdVQ5htmol2+Zl80hzpwO8P94ngnfba1F5kOBjnKfWfiFutEvZqzP1vRxn/BXOL uDnFIvERELkoWgNn4eoQgzCPFgPUBixDaG8uBCDNwCpo1NnUTfhXh3eZzCAIww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJT4PsQz15Dl; Wed, 12 Jun 2024 19:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGfOO003761; Wed, 12 Jun 2024 19:16:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGfXE003758; Wed, 12 Jun 2024 19:16:41 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:41 GMT Message-Id: <202406121916.45CJGfXE003758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: d5edaf3cf216 - stable/13 - LinuxKPI: add dev_alloc_pages() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d5edaf3cf216c5e682a8664e5abb4fc5a01e3fdf Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d5edaf3cf216c5e682a8664e5abb4fc5a01e3fdf commit d5edaf3cf216c5e682a8664e5abb4fc5a01e3fdf Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:44:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:13 +0000 LinuxKPI: add dev_alloc_pages() Add dev_alloc_pages() though it seems a weird KPI, not passing a dev despite its name. Used by updated wireless driver. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44588 (cherry picked from commit 738c02ba24c66391870067602f1c9c030d5c5e5d) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index c5de09e896de..2fcc0dc05f29 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -138,6 +138,12 @@ __free_page(struct page *page) linux_free_pages(page, 0); } +static inline struct page * +dev_alloc_pages(unsigned int order) +{ + return (linux_alloc_pages(GFP_ATOMIC, order)); +} + /* * Page management for mapped pages: */ From nobody Wed Jun 12 19:16:42 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJV6pfbz5NHbX; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJV60Tpz56fB; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8qdN0vd3jK+K6P5THeUQb20temiOOqC4pN5P75sK3OQ=; b=vYTq2JN/qDVpQfN2CbBU2Emk/v8F1vDKEIrWL/3+L9RcvBSfMAoL7JkNMFSuavFQuz+qCW ouE9rdBdOE7e/CiFRueNhHLyz5dXNdWr8f763PnbV4KrgguGQMBR2hsJvyrR7I4JJMH2Xi P+Mvpbu9Gm1dG4j1M2pBadiZR/MhVjAf2H4t+syiKKZmshvCURbqh4yG/jVDj7q3bzHo0p 6/EYOUr0d6JPtHyVLwyBkgxMRwt3QCnfTi0d0bATWtK5dUy3WsHLITQ9aITrB2UknzJPAf 15REUOd5V+j5YqV6hGJNJKTaDlYHyj8ix05nqCj+GOk4vHMGBYEngym5MOHyTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219802; a=rsa-sha256; cv=none; b=lHjkcsOyiIHkUhM9cUvjo/aC6YIyfaV8WU1zXXcWMpScF7Uf3pw29SJhNiKRxgHzUWEQ28 Kij+CMX3WcMqxT7NyazKYL3L5vmwdq+5FihV5E9BPE+CYAi/cs1/KQlgtGuRodgoZ9RXu7 /CFK3XIsuYPUjCQH6rW26vE4EdqQ7gVmMBkyHhI4wPgHpglDSWqugznPbnEYcRbys1wQfX 1XXKodMRK/fZkVcwRmL/NMxgaI8saBYVoKURUsD9fWBgp6UKM9uTto3hA5FPP+v8i35vu0 j4r3l7H4oey2I/PKTGTfSm68ZeLbA7G8Ms3eQW1Y33s0y8GG5QGOB4KM7TF1YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8qdN0vd3jK+K6P5THeUQb20temiOOqC4pN5P75sK3OQ=; b=Ndwb08PaqHrZ1KnK3/oYVZn0ePGZK50xKv9OAyVBNHOS9mSZst19j9kXtigb8iyy3oRLPz r+9btfyqhfW1zWSWnzkHpknahb+T2l+fNEE3CF1mZxurTnMvXoSB3X+Df2vy5f7TuOYmlL 5JbZG9F4MetbIuyLmCf5VzzXWjZ5+1N3USg3fhuI8/tLzaJ9VpNtw7rLScuE/XzB0Prv/S d/JJeNu1WSNX79OXtMv+HvGNRzCFUgbiVLTfFpg3QUysBt29FupfGrQNDWq4FOQh2TZczs 3lCyeNc9q9BM+/y2PHBdLSos3YPuwhrNmgcUyWD3wdhxOxnHaQm1PTzaFjjGmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJV5WyLz15BF; Wed, 12 Jun 2024 19:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGg2h003803; Wed, 12 Jun 2024 19:16:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGgaZ003800; Wed, 12 Jun 2024 19:16:42 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:42 GMT Message-Id: <202406121916.45CJGgaZ003800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 425edb6fc2d5 - stable/13 - LinuxKPI: sk_buff: implement skb_queue_splice_tail_init() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 425edb6fc2d5e1fcc38e8e194639980d1115b511 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=425edb6fc2d5e1fcc38e8e194639980d1115b511 commit 425edb6fc2d5e1fcc38e8e194639980d1115b511 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:17:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:25 +0000 LinuxKPI: sk_buff: implement skb_queue_splice_tail_init() Implement skb_queue_splice_tail_init() and SKB_DATA_ALIGN() as needed by the mt76 wireless driver. Sponsord by: The FreeBD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44590 (cherry picked from commit 3d3ec17825a124f0119d76c4d2523d73012fa226) --- sys/compat/linuxkpi/common/include/linux/skbuff.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h index 02190a29e241..ee3f427aa6e9 100644 --- a/sys/compat/linuxkpi/common/include/linux/skbuff.h +++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h @@ -89,6 +89,7 @@ struct skb_shared_hwtstamps { }; #define NET_SKB_PAD max(CACHE_LINE_SIZE, 32) +#define SKB_DATA_ALIGN(_x) roundup2(_x, CACHE_LINE_SIZE) struct sk_buff_head { /* XXX TODO */ @@ -824,7 +825,7 @@ skb_mark_not_on_list(struct sk_buff *skb) } static inline void -___skb_queue_splice_init(const struct sk_buff_head *from, +___skb_queue_splice(const struct sk_buff_head *from, struct sk_buff *p, struct sk_buff *n) { struct sk_buff *b, *e; @@ -847,7 +848,21 @@ skb_queue_splice_init(struct sk_buff_head *from, struct sk_buff_head *to) if (skb_queue_empty(from)) return; - ___skb_queue_splice_init(from, (struct sk_buff *)to, to->next); + ___skb_queue_splice(from, (struct sk_buff *)to, to->next); + to->qlen += from->qlen; + __skb_queue_head_init(from); +} + +static inline void +skb_queue_splice_tail_init(struct sk_buff_head *from, struct sk_buff_head *to) +{ + + SKB_TRACE2(from, to); + + if (skb_queue_empty(from)) + return; + + ___skb_queue_splice(from, to->prev, (struct sk_buff *)to); to->qlen += from->qlen; __skb_queue_head_init(from); } From nobody Wed Jun 12 19:16:43 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJX1GSVz5NHbY; Wed, 12 Jun 2024 19:16:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJW6qC3z56c9; Wed, 12 Jun 2024 19:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bgXisdiLrz8/MJSdl5/f2alnmx1vxk7BalmPdQpwcag=; b=cz/auIlqS2RIuwcTnRU92YjmZPhK4CLYSZny0dgO2M/rpGzYMNYHwk8CGVVXzFj1oTgQb2 9HPW4neXKn4+rm81PVdQmNh/V3+JBjZXFvmRWIpIyiheaqDxDYNRHRrcPM1eaj1vjw4xfm w1IQUHwN4Z+XAr3S2IRae7TUKn/3Nc+knkqLY20MCVMD2py0FthMrrreqj8SMK8oaQeq7t BNAeYKq6e+ktbNghs4ttwVxtVX65wtXRwhAYhw6g7drPvjmjZ5LkY32QbtCkT9MHCFVrcY vEegl6K4lArjqsFlpecGmSGy0Zao2hj1887BWOVREHtlHYfrZqQBzVs8ZE6PuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219804; a=rsa-sha256; cv=none; b=XsYDBX/NT79sgLUsSvKD2I2fmIyX1OyPUkb5xpB9a0vLPXaFVIkGVx+Z7RQARoLLpwEdaL rxZtyk26JlP8FZvju7m9bmwefLm/USrhsssGFGIto4BlVWfI7GVCK0fMDMfka8WOsDFuze 5xCqmtcUJ+L7UfixGY2QuJo5e9kJWmWQyjQGTEw7v/AUuXMPTiybtttMqGRJNKZ0gubkK9 hUza7fmhaThcLnczkNHH+FjI1NkmhqBr7tYq6uKzjJl4YaCD+qVAMnvGpAsRPXXWiiOsFb jxYb7T62or5d9mGRo2JBxROWIAOatOITV1WI62vMWoaIfL3pPDDcO7gwh5UeRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bgXisdiLrz8/MJSdl5/f2alnmx1vxk7BalmPdQpwcag=; b=BfLfIwwrlEmbgw1BHxM7y7wqRcW9/FS419M0xKhaAGrCKP++FN9uOSIYa4nkd7sg4HVU/N cxsM1VVVsVCelELWdWir18pBNac9V3Q2M9MWedFbDyKLfTdMZRrc+3O5G7dMzQpvHBosDU xFGs6l66+2NzYFA75psH9t8DmSpfJ5RNgIAQPzHqdw1RiN4+IAmBXaNaDUWPNrbxddk1vn ut0VKeJHF5RZ/C+Yc6QTu2eklaEOy96qpcq1Mjj4PtP9kWW8EYoSOTCDOGwYST4SxXQtMU NDdANJK/hNYUivZB2DYPYV7aSmXt29gm+VGboLvRy/ZjK8vXcDv4VdgCSUpNBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJW6QtCz14xG; Wed, 12 Jun 2024 19:16:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGhUr003854; Wed, 12 Jun 2024 19:16:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGhZj003851; Wed, 12 Jun 2024 19:16:43 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:43 GMT Message-Id: <202406121916.45CJGhZj003851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4d9e8a65d031 - stable/13 - LinuxKPI: napi_schedule() requires return value, implement napi_is_scheduled() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4d9e8a65d0318efbd3bc6b427c1580cd3c8200a4 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4d9e8a65d0318efbd3bc6b427c1580cd3c8200a4 commit 4d9e8a65d0318efbd3bc6b427c1580cd3c8200a4 Author: Bjoern A. Zeeb AuthorDate: 2024-03-31 17:27:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:33 +0000 LinuxKPI: napi_schedule() requires return value, implement napi_is_scheduled() A newer version of iwlwifi requires a return value from napi_schedule(); unclear if the function always should have been bool. Add the bool to test based on the napi_schedule_prep() result. Also add napi_is_scheduled() for rtw89. Sponsored by: The FreeBSD Foundation Reviewed by: emaste (previous version) Differential Revision: https://reviews.freebsd.org/D44591 (cherry picked from commit 21761f2ede4ebad13e78112b9409c1f20f946781) --- sys/compat/linuxkpi/common/include/linux/netdevice.h | 9 ++++++++- sys/compat/linuxkpi/common/src/linux_netdev.c | 8 ++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/netdevice.h b/sys/compat/linuxkpi/common/include/linux/netdevice.h index 02734585bf63..12ff307b3ce4 100644 --- a/sys/compat/linuxkpi/common/include/linux/netdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/netdevice.h @@ -233,7 +233,7 @@ void linuxkpi_netif_napi_add(struct net_device *, struct napi_struct *, void linuxkpi_netif_napi_del(struct napi_struct *); bool linuxkpi_napi_schedule_prep(struct napi_struct *); void linuxkpi___napi_schedule(struct napi_struct *); -void linuxkpi_napi_schedule(struct napi_struct *); +bool linuxkpi_napi_schedule(struct napi_struct *); void linuxkpi_napi_reschedule(struct napi_struct *); bool linuxkpi_napi_complete_done(struct napi_struct *, int); bool linuxkpi_napi_complete(struct napi_struct *); @@ -275,6 +275,13 @@ netif_napi_add_tx(struct net_device *dev, struct napi_struct *napi, netif_napi_add(dev, napi, napi_poll); } +static inline bool +napi_is_scheduled(struct napi_struct *napi) +{ + + return (test_bit(LKPI_NAPI_FLAG_IS_SCHEDULED, &napi->state)); +} + /* -------------------------------------------------------------------------- */ static inline void diff --git a/sys/compat/linuxkpi/common/src/linux_netdev.c b/sys/compat/linuxkpi/common/src/linux_netdev.c index 61ebcdbf7a39..61342395f03c 100644 --- a/sys/compat/linuxkpi/common/src/linux_netdev.c +++ b/sys/compat/linuxkpi/common/src/linux_netdev.c @@ -185,7 +185,7 @@ linuxkpi___napi_schedule(struct napi_struct *napi) } } -void +bool linuxkpi_napi_schedule(struct napi_struct *napi) { @@ -195,8 +195,12 @@ linuxkpi_napi_schedule(struct napi_struct *napi) * iwlwifi calls this sequence instead of napi_schedule() * to be able to test the prep result. */ - if (napi_schedule_prep(napi)) + if (napi_schedule_prep(napi)) { __napi_schedule(napi); + return (true); + } + + return (false); } void From nobody Wed Jun 12 19:16:45 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJY3tFnz5NHdt; Wed, 12 Jun 2024 19:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJY19qJz56X7; Wed, 12 Jun 2024 19:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jbsv0DnGi+NFRChhOkK9Vkx9R1oT3GBPkwWDZXEjovg=; b=U15yasldaN/+MI7Una3dLOOewnGVzeJ9Rlyyaa4UxhT/BapLI6cU1R3NWWprBEo2n8iJvW eXr2tCwOWmLAKPSLOv7VNKi0ztKLuCi9oRo9t+GYEbHepHPNiuqpjQsHbdKWi6bfEBmurP 46WBJ3zMrNK7BUKCMXPN4guh49TQZNCYTcgTNy+/kC4L/PgpsdDWW6X8OOW+rB145q66Ue euCpZadMCpcWLNQeuGsKlHN5Vptg79S46pLxDxXIeUQUzKGpXrisUJsdGGxUCozJc1oI0p pFoCXxKgSaJZUqVvQOcHiqiZfxoxRxoYaEr/ghb9QzCbDiHzggFgCa9s3Irgiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219805; a=rsa-sha256; cv=none; b=dCDTE+G/8tZ10ZSx1VWsFNexUVAvROu6QewBCO/QySaWJ9dUV/mAsoSdyrZ+uwgX7wdNr0 1sw2U3nmC18F7KKivf9cJfY9w/9olmP1/yRnUxT8OjB2+QjzCIOgV0nMEL9uj24baLA0+7 X1hvuiQ6WeAYQx+VpLq/vtiUVzf3Oc2ZL8pUDowPXmfDObDq5YFE6yEDMTXBC9Ihln6jKl uNqt+uMjp6MK+LXnvdXvEnd0MoNtzIl3Jr4xMGpJqhHBhN+ApwcS4gb07wZupnZmycsBLz eycE0WDA7PBiRqATvtMN0PXZGCTmN3Iop6WZuA2hNTEqK4jtrMUrr2gWNpGGQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jbsv0DnGi+NFRChhOkK9Vkx9R1oT3GBPkwWDZXEjovg=; b=MvC57WIWKUfjg9/2bogRqoHlYa8i51Ia7aDlQOMr/s0WV8Oz3GJHn6CO3WYSlRAcZp6gEO KmbDoMIHSyTAUvKaE0hDlykjA6u3fFKhwaoMTCfNE1NjB7XA4cxFtk5cnGDnzyzMts4Vsi mSz1vkmq5nQTtoenKt5RCEjtMmFpjyfCjDLhqHnHPDPjoTkoaUKfYuBpRFcXaATVVt4Fqp LKxrpYSVKy1IrHO4xPjRgBsJeiaIZogvxTu5K+UM1TIFo1pa/3jyyTX8s2hyrhqWStvh7+ 3rKNDNPsgiNzt1RKlpRhN3IwRJ9TFhYbhxCwB2E4tA3Z/wRz3euDeTUVL97F0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJY0p30z14xH; Wed, 12 Jun 2024 19:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGjQa003893; Wed, 12 Jun 2024 19:16:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGjbj003890; Wed, 12 Jun 2024 19:16:45 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:45 GMT Message-Id: <202406121916.45CJGjbj003890@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e262be127d20 - stable/13 - LinuxKPI: add devm_kfree() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e262be127d20b193701b1bd127e2f157ace9d2ab Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e262be127d20b193701b1bd127e2f157ace9d2ab commit e262be127d20b193701b1bd127e2f157ace9d2ab Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:45:43 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:40 +0000 LinuxKPI: add devm_kfree() mt76 calls devm_kfree() directly, so alias it to our lkpi_devm_kmalloc_release() function. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44589 (cherry picked from commit 170c2e0e2bb1b2d9a7661ba729f8264381c9d9d7) --- sys/compat/linuxkpi/common/include/linux/device.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 7742750339d9..c20afda0d209 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -257,6 +257,7 @@ int lkpi_devres_destroy(struct device *, void(*release)(struct device *, void *) void lkpi_devres_release_free_list(struct device *); void lkpi_devres_unlink(struct device *, void *); void lkpi_devm_kmalloc_release(struct device *, void *); +#define devm_kfree(_d, _p) lkpi_devm_kmalloc_release(_d, _p) static inline const char * dev_driver_string(const struct device *dev) From nobody Wed Jun 12 19:16:46 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJZ3WbRz5NHph; Wed, 12 Jun 2024 19:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJZ2RHVz56lh; Wed, 12 Jun 2024 19:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a8/PceXyILzw4gwp94Bzr/dTJwjmreZ7TImLTIj8PyY=; b=CCZVwvI2u0GQEHhBJNgeL8+MU0rM+iyqSPCmOvP4OGClDq1jzuHmkipCWcLgIQaCt1sB0u 2iVoGRNffIieGms04wF57691yfNMEtDd1cl1fIooh0eeXFdm9kbCeEc5Jqvv61VNG/N28H tlai9sBOuX085rnbi7h/8MLenBZ2MbzoxkoWz9P35ZSk9PmC2Gv8Q65SbRQe3RB4vmsJmv LAvWawcqEwgxVaOhGw5yG0/OQ+IeYcIVbi2C6ePEPHaKnPNIXQ5/VODcP/I9l3iCmcPBhG 2A2ivhwfwCvsj6i5zKTIlUdCl/ESydhioyExqqI0ki/D1zEz94Q5h/BYFOsIAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219806; a=rsa-sha256; cv=none; b=vlu6O7RfWZFH9ig/t24BGBwmzgmsQhnWQ5q/XyI3SdwE337lrCDUTySFRE35mgQVnzXB1O mGzVSNVov8EaJ8FDNzuTyor73oXwl+LEPmaEm8u6ZsgKDqyvwk2a/n57FFiMi4UKGIe+EH 58kGyTa1DEL5U3K9S8VpXYnHjV3AsCfsWk4zT8xonBSF0sFD4VNOcLCvVVJ825PtJIY9hW o5BCfQRCARaUNowZHtsKzYqW6pg0ZiNmG8OSCO3EGhQ66GPoxOunmSfIYArKWLsIqhwe9/ mAZEUHcZ12YdJU9CTBIoZ5otjy4ubtg0rFC56E+1ZMzMkcbrKA0oZKhAjZO5tA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a8/PceXyILzw4gwp94Bzr/dTJwjmreZ7TImLTIj8PyY=; b=Qk4bAy6NXXT7JGhO9qWR5EcFpKlsPc1aMDSk+x3OfOuN5QNp1Xj/mq6xwU/4x+X26BodvL G3U7alCpQirZT1Btim9FBxICrHBUHjPuR7qFR2BA1St1wmyai7IWS0jqkEsq6BUDMDPqE2 Rxubcc4tQbi+ABeerdz9mqdiKIsYpsVIicRyWeWDI+tj/WopJfYAOq2fg7qLxld2ouhh9T 8mRDZQQOHgJEOUQwEWIKUwjLt5pYe7wVRqQSudrfmfHbT/ZW4mTAymB4Dwbz2HLxON8dq5 DI7F4aYCceVMs9JOPtqjZNO/WMwn4F0nQAo7zrieLYrdw9+1j0x4unTL9YQ8lA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJZ23h1z1585; Wed, 12 Jun 2024 19:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGkin003938; Wed, 12 Jun 2024 19:16:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGksL003935; Wed, 12 Jun 2024 19:16:46 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:46 GMT Message-Id: <202406121916.45CJGksL003935@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0f87cc98f926 - stable/13 - LinuxKPI: add __counted_by() and __nonstring List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0f87cc98f92691957a253b78a5b6fba5f1824ea9 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0f87cc98f92691957a253b78a5b6fba5f1824ea9 commit 0f87cc98f92691957a253b78a5b6fba5f1824ea9 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 09:41:54 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:46 +0000 LinuxKPI: add __counted_by() and __nonstring Add checks for __counted_by(_x) and __nonstring as and depending on compiler support enable the attribute/feature. This is needed to make mtk76 and ath1xk drivers compile. Sposnored by: The FreeBSD Foundation Reviewed by: emaste, dim Differential Revision: https://reviews.freebsd.org/D44587 (cherry picked from commit 2a8c50592f7fce8bceedf004f674a5a9eae0fd46) --- sys/compat/linuxkpi/common/include/linux/compiler.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 22300e73652d..94595b2e8c50 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -66,6 +66,17 @@ #define ____cacheline_aligned_in_smp __aligned(CACHE_LINE_SIZE) #define fallthrough /* FALLTHROUGH */ do { } while(0) +#if __has_attribute(__nonstring__) +#define __nonstring __attribute__((__nonstring__)) +#else +#define __nonstring +#endif +#if __has_attribute(__counted_by__) +#define __counted_by(_x) __attribute__((__counted_by__(_x))) +#else +#define __counted_by(_x) +#endif + #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #define typeof(x) __typeof(x) From nobody Wed Jun 12 19:16:48 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJc5NCPz5NHhg; Wed, 12 Jun 2024 19:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJc4VNsz56gZ; Wed, 12 Jun 2024 19:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tUAy4bc5fDl5vUXmhMFDnbW9ZWpjOeMCmVyYi1Ee5wI=; b=wb6mmkaFJ/tqENur3GFCUqZN0bG0/QrLBHcgW5zCmlIrBf/lEFlbOmzQnQtLnCIgrovjrP yrNA7wtAxmLGJoWPqTsHEN4UOrv5tCD6dWVC1LdwMQjI3E6O8GBcJ/IKz6NZonycsgkTiK M51gUXimD+geTuObKOu2wJ1wuIrKSgpT0QoKqpZXIA0PeCaJVLYFYZ0I015jAcyRkZYz1f celFdKz6cHwRnOQphel9UWQse8lfNC7II/UiiCgZ6KQE+TWdLB2M/QTc1C4HA19JL8XWcJ A8P/6wInIgxXQMGMqwCGQ+sCvzKPBsawTqLy6iFwn2Bvd7p26KKD0r0Zt70Ksw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219808; a=rsa-sha256; cv=none; b=JcQHNDxuUCkHePDrjx1WIbWkdUMqmTahuWCbKfpsU3sZ25iCTK3ObvfKzB8Ml2o6kvH0c+ KumSn3blSXLll3JIbxNGxunCGsOVUqutaBzzbQeL6pRVMRELE9lsYagx1kT5QK9Usr71mw 0RWuIjBrUnqJsPn1M01mCUnRS6uAFiRZFHV8oVOtCuxKVrj3hitbgL7COvhdzLdKqqKPWQ pWt4a0gnJIjTqRskmFO9GBuXwC8FjNiZrJ/9EM8emQAd2LLUiDZJo1rGyhKfSAS8RYaG65 BNHu+E5ylIZQSZFEyO1d/KG6wMQLsWBsxUKm2w8CRZ3tbUshGJQJmJ6nCHLjCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tUAy4bc5fDl5vUXmhMFDnbW9ZWpjOeMCmVyYi1Ee5wI=; b=aR2FXBoTjfY0SBZvHkJXujXvCx0gaFl+QvatsCItpAed34Vo0nxKWXtpzsS2MupQ4vGg+C uaiUnGBhYnrI1bk331B8egg2WBDpNNIyqbZAe7GKwDCBopUp54CdAt6rS6Ml8/SV045Q1N zIcZ/fN1e9m/8cfX1zbVdw56C8Lq6xa1mfjddSd/KSR3jw68TJ7X0G93wzCUl5fE8NPZsP f9fmardGmH4WW9hE6FJIEEBR8tPrWPwJ40+k/yi8mgHi7KIdqJiLpAQWC+yx+NO8qzJdcr tX98j7+uixATJ85+1FBejsAHvOjc4e4JdMypgG5UHj5ONnNIeqi/tkQqWSyxjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJc458pz14Tq; Wed, 12 Jun 2024 19:16:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGmYK004028; Wed, 12 Jun 2024 19:16:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGmwx004025; Wed, 12 Jun 2024 19:16:48 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:48 GMT Message-Id: <202406121916.45CJGmwx004025@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 395833f4ea8f - stable/13 - LinuxKPI: add kvmemdup() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 395833f4ea8f4852f47ca1473baf99239331379e Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=395833f4ea8f4852f47ca1473baf99239331379e commit 395833f4ea8f4852f47ca1473baf99239331379e Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 17:43:25 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:56 +0000 LinuxKPI: add kvmemdup() Add kvmemdup() as a variant of kmemdup(). While currently it could just call kmemdup() we duplicate the code and use kvmalloc() in case someone will change the implementation of kvmalloc/kvfree in slab.h. This is used by an updated wireless driver. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45181 (cherry picked from commit 8e4b8e9d807aa379d2a1c3aaac2537ba7d6bf0bf) --- sys/compat/linuxkpi/common/include/linux/string.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index 06dcdbd97663..9302c95e8636 100644 --- a/sys/compat/linuxkpi/common/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h @@ -97,6 +97,18 @@ kmemdup(const void *src, size_t len, gfp_t gfp) return (dst); } +/* See slab.h for kvmalloc/kvfree(). */ +static inline void * +kvmemdup(const void *src, size_t len, gfp_t gfp) +{ + void *dst; + + dst = kvmalloc(len, gfp); + if (dst != NULL) + memcpy(dst, src, len); + return (dst); +} + static inline char * strndup_user(const char __user *ustr, long n) { From nobody Wed Jun 12 19:16:47 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJb6R5vz5NHpr; Wed, 12 Jun 2024 19:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJb3nf5z56rM; Wed, 12 Jun 2024 19:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k3nILbUfAUuWw71hIkxgsVICusdVKJM5AzsR59zHYO4=; b=H4ioFi36FeV82BXxYnMz4ToMfaCVLeRS6VQT9aKyNGy+M9cKHWZ/GYqTY6DHEwpLgJViwr aNMxqiXECz/r+gou6hfZZjvdza0414pAaWWLrXpeGIqyNmcAkSOb9uOBMQBEg4OVgqMZcm iQtrfSDbkYlUPieoDzRE8NCtyrdckJ6OEfTeQnYHYMkMnmi7VT1EvrYmjkfSznbj3MyvDL tKQAnoudSL29w/BNsTew1Cj6wLaK3H8OLrbZTL6Pvrovsm3ZtMR0sW2R7J3oudO/qhNKvc pYXgzpKCp7RKNtvFY3ZjIwBoDNO0u7UTn9XimSL10c5vjfe0Lp/p6LHBVXE17Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219807; a=rsa-sha256; cv=none; b=fXS3Daq07MhI8l9zqAPK7l4/JquYOeZiKd9evUN7GDtb/hmnlu+7VCvsRgaTjXmtbL1ZFa aAhnJAfs498fGTrP1shnJ/qL81Drmd8SoMB3SuQjJ1f+BWmNPTYiInLHCHgXBWLezzkN1s 6W2oHiGAkJlYvnSLsEpyfKlhYIdUrNhJZc3fqgUHkd71ySdCSo9IaJTqSa9n8vcviN4+Ah KknJxcjOHUViYzVygCiV3pB+8JcmuLs7KktTKJIox1Y+XHUR/sxlrs0rPNAPfjNSJjEILU KDsvKcicMYarvJ3uvAej+ow1FhOGDGaVCOrfY9A08VLpsjDF59GP1f51XHQ8kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k3nILbUfAUuWw71hIkxgsVICusdVKJM5AzsR59zHYO4=; b=iZ6+pkzPpjG1jgvlgh4wqS9K0cEz21+Zu9bC9D6Cmcw9n47cPUkYHszoY3rZLzzhqmQ6dd RM3UpxhuN3T4kebNf2UVpMrlUF2WJJhJVcO523ZWWSKohdgx9ZYkyq4GQr6AzOfT5csamZ 4Yo48yIm0mGQloRBNZDo0JQ+tnwvhaEtVM+Np1A1DwlcgyRrcd4T1WH4RaoOd054WyUSrp SBIsEizveAm24JxZxj4c1RXkYOG6o+vUG84Ko96KnE8phZ1rKGoJGlQEF7KlWbzgfX4l8P z9UMpYGPbblfC6usFGoLwO1QE1dl71oJdjINYm/GQkwys8uimcY5Pff/s2vCwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJb3Lswz14xJ; Wed, 12 Jun 2024 19:16:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGl7f003989; Wed, 12 Jun 2024 19:16:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGl7s003986; Wed, 12 Jun 2024 19:16:47 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:47 GMT Message-Id: <202406121916.45CJGl7s003986@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c503386b189f - stable/13 - LinuxKPI: utsname.h add missing SPDX-License-Identifier List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c503386b189f2335bf1f4ee1597b6d7af1a87375 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c503386b189f2335bf1f4ee1597b6d7af1a87375 commit c503386b189f2335bf1f4ee1597b6d7af1a87375 Author: Bjoern A. Zeeb AuthorDate: 2024-04-19 18:23:12 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:57:51 +0000 LinuxKPI: utsname.h add missing SPDX-License-Identifier Reported by: markj (2023-05-24; sorry took me a while) (cherry picked from commit 563c72e2137cb8cb9eb0eabf78319e8fe9c8aedd) --- sys/compat/linuxkpi/common/include/linux/utsname.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/utsname.h b/sys/compat/linuxkpi/common/include/linux/utsname.h index e6c52f8a5020..3239801ca17b 100644 --- a/sys/compat/linuxkpi/common/include/linux/utsname.h +++ b/sys/compat/linuxkpi/common/include/linux/utsname.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 2023 Bjoern A. Zeeb * * Redistribution and use in source and binary forms, with or without From nobody Wed Jun 12 19:16:49 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJd6W8Cz5NHml; Wed, 12 Jun 2024 19:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJd5VC1z56dS; Wed, 12 Jun 2024 19:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l1DGpO7LZjZinw4EWv2q6PEryVzJVWKjk2OKXkqzkHs=; b=XDBHlwZARTByt1kRMGA8YXUA9X68/ezi9MSvchbCZPh9HKDsYR2q7kOuNEKEhQiB/HRFLJ L5zYj4nqTzJVsFB0oqh9HEmKWn1Ho1Hr/NDqftXoQjhCW+p6BDv1FXwd70arnAkgOKXuKK OJ9taxs4B+2J1ZblfoMjo0N8eXzAm8d6GbP2ElytYRbe3Gvgfc4Z8sourq1mtX5IUT/cnu RExY0DlEsLGtQ6S9omQNgNbDO0pP+1EzP4Y5BTQj8s9oFltel3rqJF77XweYSAgoILwzLX ZRK8QcvNBNQuelie+QB+alJ4UONV+dQ894gIjdIxxiXPvWbyjWVDTWJtVDlX1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219809; a=rsa-sha256; cv=none; b=jepdgqHpTpkF5Shvusmb4iWFDOaa+JUBl6Ej8q5BPDGSUL7GvfdtkhDSN0dMXt/9vP2mOq yXD3iaArK20Es97GIFLVxfcf746T2nlrCTIPiLkc8PQqND3vBrK69oQhziqtc4x3iCnZaO GIO+W27wkBOmcme2V8RiFjFDf9ZUtoGptt+3fz1781cAYOZKg1LElbRkKG4hqhYEWnrp/7 uGSo2Me41kFsVAAIvG67H54/oPkBqQIBiEr91oawPtSa/KBxgveXJya3UvnNIsCxHfAXCr y8LnlfuZzb3GQWlNX5oFLT0R3d5BbcCqE6yk5YCiTgP34TKxFWTpJgLCbjDrEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l1DGpO7LZjZinw4EWv2q6PEryVzJVWKjk2OKXkqzkHs=; b=vBSOmGBr+LMjrYdwWReN+1ydIq1DVmVRCQ66jZLdsek3y/Rk5qOAqQ/JSCuZd6UngckEAj rTjL6S4AQvsfdJin8YUkmWYWh4Cs0UTf5GsWwY3ME0JI7kRjLWvjtnYYN62ZTY0kHkRZrJ YbnM1Z+XhJ0Bv54ionmqRffA4Nd4U6ycCeZd7jZ3aE4bSUu7mTLZlOmMNsa6PsqLOzkOAQ Yoq8RLG/RHEbUnZr00v+5vLoo2IY6S35JylMp7UpN/c9IY08xzDAt9JANPwLfF9S+0Yfcv IaqnisFyXwQOXsq7CQsY15onZTSqNpXvBZ9YVLfSHImiBMe68Q3PKZ/R+OuEEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJd56k2z1587; Wed, 12 Jun 2024 19:16:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGnZD004067; Wed, 12 Jun 2024 19:16:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGned004064; Wed, 12 Jun 2024 19:16:49 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:49 GMT Message-Id: <202406121916.45CJGned004064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 33929383594a - stable/13 - LinuxKPI: add FIELD_PREP_CONST() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 33929383594abc079f8269e2837b49f265260909 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=33929383594abc079f8269e2837b49f265260909 commit 33929383594abc079f8269e2837b49f265260909 Author: Bjoern A. Zeeb AuthorDate: 2024-05-13 17:40:26 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:58:01 +0000 LinuxKPI: add FIELD_PREP_CONST() Add FIELD_PREP_CONST() like FIELD_PREP() without any extra checks likely expected on this version in Linux. This is called by an updated wireless driver. Sposnored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45180 (cherry picked from commit bb025df257386c5d1087b652e8ed951bceb89862) --- sys/compat/linuxkpi/common/include/linux/bitfield.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitfield.h b/sys/compat/linuxkpi/common/include/linux/bitfield.h index a2020d247489..8a91b0663f37 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitfield.h +++ b/sys/compat/linuxkpi/common/include/linux/bitfield.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -131,6 +131,10 @@ _uX_replace_bits(8) #define FIELD_PREP(_mask, _value) \ (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) +/* Likely would need extra sanity checks compared to FIELD_PREP()? */ +#define FIELD_PREP_CONST(_mask, _value) \ + (((typeof(_mask))(_value) << __bf_shf(_mask)) & (_mask)) + #define FIELD_GET(_mask, _value) \ ((typeof(_mask))(((_value) & (_mask)) >> __bf_shf(_mask))) From nobody Wed Jun 12 19:16:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJg0CHvz5NHf9; Wed, 12 Jun 2024 19:16:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJf6TQmz575D; Wed, 12 Jun 2024 19:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rEGHpHBBWfNITX1bxW9uBbn5vG+Oo/Q1aVC1XCTBxmg=; b=VgXpG2Fu1SeAJurIfoTSMTNjSJxdHjA687twYnXG+fVhFv1vGEMOooWHSP79nEjkayloL5 t5nZQRrjEIHfyuseJdHSNMGYRzFPUzAzvwcI7G7OLgkWp3h/WkxRmevOL4jsdSBhiQ5rKE HiWfh+aBaY9q/sAZp6vCy1xdKnDjhSvbRdf+n3pPVldOlefTLK5xUFssAUdPQx3mLL4ULw 1oaK6cVdGhZ+2oH0EUTMcUkXtUFBeqAORCnnf8UM7NX2kBImjdu6NrK4VeAYKHhfMm++0v v60heb9yO4ueE50QsntoQkj6zSyYTo6L/zDtxKvXBsdmJAsLEv4RoRhRv2vnxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219810; a=rsa-sha256; cv=none; b=gldDqzCFL6Skm5gs0LzXsHFhn2Y0/TE6FwZNzTivCQM13xeu28gB/WdAs+HNo3NS2HwcDl ojX1gTL82WhoA+mk4B2VReR8C/1M0XV56FFbF5tWSKH3KsTo0BB3CNlr9xsa1j5kJTTEM8 mpInrRr0lFu10Kxx02s68jJWHA9CctHBwwFL9hgi9il4ZdOK6hKMPnjwGZreeSknhrmcdA HRcJHOZmtSnM7yGfC8yUvWHwhP9G01HiTZ3Icvggm54BNvPoM376pgINjHd2/Izy2r27zO lp+ZFBTGBfcrTR2xG89LQcUOTp2kWlBI2ZAWbYN2Ln97r9U7aa9iDc44Gif1TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rEGHpHBBWfNITX1bxW9uBbn5vG+Oo/Q1aVC1XCTBxmg=; b=umFUqXVuSNMouPSxKofk5J6CQeMBOoCP1YE3xTs7ZjFY+LPpeD9Q9mXaRxAsUQ81bP2b+Q a7t1TinAtbmkTVMfg9e/TVU+yfI598NE2xwpNoiPYZ6FzIlE9JkvS6SSSrji/UpArWYKgQ Hn6/L9oDuxTJWMXn8+/i8O4ykhqOpxh/dTMMMcKi3i641ExQB7ngAaiCH7uSV2P9Kij1R7 AT2FTtm6tl9H7Jd8KSevN8n/Dk24xpFmGRVdJP631JR4lbUBUZAZqrKnyN2JH5f2G5TYyN YwVRnZwlSI5mkpL3OTirSrngQKUrsYTtzAmdOqQbr0XpBhGhkBHRtKZdgzjDjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJf63SQz15Dm; Wed, 12 Jun 2024 19:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGocH004118; Wed, 12 Jun 2024 19:16:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGoiM004115; Wed, 12 Jun 2024 19:16:50 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:50 GMT Message-Id: <202406121916.45CJGoiM004115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 323d4a20bd20 - stable/13 - LinuxKPI: remove extern from function declarations List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 323d4a20bd202463b2da29b7d7d1957671c66619 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=323d4a20bd202463b2da29b7d7d1957671c66619 commit 323d4a20bd202463b2da29b7d7d1957671c66619 Author: Bjoern A. Zeeb AuthorDate: 2024-05-27 19:49:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:58:06 +0000 LinuxKPI: remove extern from function declarations Sponsored by: The FreeBSD Foundation Reviewed by: emaste (earlier version, found another two) Differential Revision: https://reviews.freebsd.org/D45386 (cherry picked from commit ecd1d1f1dac49c7ecbf1e7c5ffc64356c2851efd) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index 2fcc0dc05f29..e5dd2e44b0fa 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -90,15 +90,15 @@ struct page_frag_cache { * * NOTE: This function only works for pages allocated by the kernel. */ -extern void *linux_page_address(struct page *); +void *linux_page_address(struct page *); #define page_address(page) linux_page_address(page) /* * Page management for unmapped pages: */ -extern struct page *linux_alloc_pages(gfp_t flags, unsigned int order); -extern void linux_free_pages(struct page *page, unsigned int order); +struct page *linux_alloc_pages(gfp_t flags, unsigned int order); +void linux_free_pages(struct page *page, unsigned int order); void *linuxkpi_page_frag_alloc(struct page_frag_cache *, size_t, gfp_t); void linuxkpi_page_frag_free(void *); void linuxkpi__page_frag_cache_drain(struct page *, size_t); @@ -147,8 +147,8 @@ dev_alloc_pages(unsigned int order) /* * Page management for mapped pages: */ -extern vm_offset_t linux_alloc_kmem(gfp_t flags, unsigned int order); -extern void linux_free_kmem(vm_offset_t, unsigned int order); +vm_offset_t linux_alloc_kmem(gfp_t flags, unsigned int order); +void linux_free_kmem(vm_offset_t, unsigned int order); static inline vm_offset_t get_zeroed_page(gfp_t flags) From nobody Wed Jun 12 19:16:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJh1xSQz5NHkF; Wed, 12 Jun 2024 19:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJh0wJ4z56vh; Wed, 12 Jun 2024 19:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NgMbcaHN6TnYbNfMb3XlNI3GxFjCgWsQeZIK67yGH6I=; b=MTJ6RvyN7byGPyA8U7olsU3CSGvxJTfk0zZ2BslUSNZ6XiJMaX/UrOqT/oJJcifByMUxvj 2S+J57S5ExPrkDJ8hIIYThTyiFND2BNCmaSsPC/+UAyMuk2jFkmeYBmaTIeNI/oY8UrNqS WSuRnPUPxmQAVBNEvJH093DCDyHin1py/k78v+xmDdP9YOcdy1qOUI9hwp8F4d8CVs8n8O DIqTFkwEzo2g1jr+zbCT0GMDb75yEbnBuNeIrHFNE6pxZJOzDdZuU5BMV7sujiWPbIovuT 0pjDnAobx/GToXjVMsfGgkIBDXTX8ODeh14p+ziFd1TTm78A0JMbpr9Xe1KnbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219812; a=rsa-sha256; cv=none; b=d5Fkoyno9CJNja+cpY6DjqTPYhdTDyKEUDZ+YeBRMwHOFUypCE7UD5RenFvC22z6lgDZkp eE7EL6tVaFNEtK4is3QnCtjNx+ev8YZV1HuBs7z+En6XpimBEpES0VCw35lKKxNjExJ9vt bWAZm5py0vvi6dHAVGrwLecbQTMR62UU6Sr083NFdei7+ZwbgJjbOf7LgE4JuKkgACyeLc DRi9SC9avanJedJ4Mm2f9aprbLXSPVuifo/Uv6aQopfOljMQk7hkCBMpkif+ZNgtiCHNzN TRZZ0lGU7mwL0ZfY6nPSwcr2brVuLq7kd+F9Go/nYoHfSg3bhR4ki+rzd9Jk1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NgMbcaHN6TnYbNfMb3XlNI3GxFjCgWsQeZIK67yGH6I=; b=rb+DcPWfPQ+iFmtV+COIRV79qdYr3bpAGajuTIyjlCO6QEi3s5v7ND+U78qy3a4IVmdc4h bAhGrqC3AtGGPeBTDCqRb9hEXemAkRNOFuhqHbFSq3B1cUBG/JrfhePdYrcNOfPKswACvh cQxKUUxv8Dhn5iqd5s9Ptsx/L1JODv2vd2uURUgEXxAb0eAUeWeq9+0o1Od0AzWRb4MhB+ Lk/Eo/4vwirREJ08z5Kzxo3HYmHpZN6HKp2L68w2X1eccrabKWxVs9Ljr6EZR2ZgMVfVHH 3gpGp6+FBhZwWB6yZKNV5F9Vp/AwJUq2PvTfjgzhwCtB7ppbjgER0QVxs4KzOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJh0Wf0z14jH; Wed, 12 Jun 2024 19:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGp84004167; Wed, 12 Jun 2024 19:16:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGpYx004164; Wed, 12 Jun 2024 19:16:51 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:51 GMT Message-Id: <202406121916.45CJGpYx004164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 947dfe1e01f3 - stable/13 - LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 947dfe1e01f31819b2a37c1400731ac367bacebe Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=947dfe1e01f31819b2a37c1400731ac367bacebe commit 947dfe1e01f31819b2a37c1400731ac367bacebe Author: Bjoern A. Zeeb AuthorDate: 2024-04-06 21:15:16 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:58:11 +0000 LinuxKPI: pm: add SET_SYSTEM_SLEEP_PM_OPS() and device_can_wakeup() Add the SET_SYSTEM_SLEEP_PM_OPS() by factoring some other macro code out in order to set the suspend/resume functions when the struct is already given. Such is the case in iwlwifi d3. Also add an initial implementation of device_can_wakeup(). Though this is likely all we need we have no way of setting the flag for it yet so leave a pr_debug() and a comment there as well. Until we want to support WoWLAN this is likely not needed for wireless. Doing it the proper way checking a bool in 'struct dev_pm_info' would change 'struct device' and with that 'struct pci_dev' and break the KBI. In favour of mergeability this version does not implement the full functionality yet. Both help to make an updated iwlwifi d3 compile. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45358 (cherry picked from commit 3753988c5d22393fbdefb6aa16b5a5a699d05642) --- sys/compat/linuxkpi/common/include/linux/pm.h | 30 +++++++++++++++------------ sys/compat/linuxkpi/common/src/linux_compat.c | 18 ++++++++++++++++ 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h index 53be7399579d..79e1ed8ba1c6 100644 --- a/sys/compat/linuxkpi/common/include/linux/pm.h +++ b/sys/compat/linuxkpi/common/include/linux/pm.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -54,25 +54,26 @@ struct dev_pm_domain { IS_ENABLED(CONFIG_PM_SLEEP) ? (_p) : NULL #ifdef CONFIG_PM_SLEEP +#define __SET_PM_OPS(_suspendfunc, _resumefunc) \ + .suspend = _suspendfunc, \ + .resume = _resumefunc, \ + .freeze = _suspendfunc, \ + .thaw = _resumefunc, \ + .poweroff = _suspendfunc, \ + .restore = _resumefunc, \ + #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ - .suspend = _suspendfunc, \ - .resume = _resumefunc, \ - .freeze = _suspendfunc, \ - .thaw = _resumefunc, \ - .poweroff = _suspendfunc, \ - .restore = _resumefunc, \ + __SET_PM_OPS(_suspendfunc, _resumefunc) \ } #define DEFINE_SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ - .suspend = _suspendfunc, \ - .resume = _resumefunc, \ - .freeze = _suspendfunc, \ - .thaw = _resumefunc, \ - .poweroff = _suspendfunc, \ - .restore = _resumefunc, \ + __SET_PM_OPS(_suspendfunc, _resumefunc) \ } + +#define SET_SYSTEM_SLEEP_PM_OPS(_suspendfunc, _resumefunc) \ + __SET_PM_OPS(_suspendfunc, _resumefunc) #else #define SIMPLE_DEV_PM_OPS(_name, _suspendfunc, _resumefunc) \ const struct dev_pm_ops _name = { \ @@ -82,6 +83,9 @@ const struct dev_pm_ops _name = { \ } #endif +bool linuxkpi_device_can_wakeup(struct device *); +#define device_can_wakeup(_dev) linuxkpi_device_can_wakeup(_dev) + static inline void pm_wakeup_event(struct device *dev __unused, unsigned int x __unused) { diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index d3804e9ecf05..81127bf364f9 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2773,6 +2773,24 @@ io_mapping_create_wc(resource_size_t base, unsigned long size) return (io_mapping_init_wc(mapping, base, size)); } +/* We likely want a linuxkpi_device.c at some point. */ +bool +device_can_wakeup(struct device *dev) +{ + + if (dev == NULL) + return (false); + /* + * XXX-BZ iwlwifi queries it as part of enabling WoWLAN. + * Normally this would be based on a bool in dev->power.XXX. + * Check such as PCI PCIM_PCAP_*PME. We have no way to enable this yet. + * We may get away by directly calling into bsddev for as long as + * we can assume PCI only avoiding changing struct device breaking KBI. + */ + pr_debug("%s:%d: not enabled; see comment.\n", __func__, __LINE__); + return (false); +} + #if defined(__i386__) || defined(__amd64__) bool linux_cpu_has_clflush; struct cpuinfo_x86 boot_cpu_data; From nobody Wed Jun 12 19:16:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJj4gt3z5NHhm; Wed, 12 Jun 2024 19:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJj1xxmz5713; Wed, 12 Jun 2024 19:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cie1NNB94d06DDKcK1SqXg0Asyuy/xSgMA7bI0xmCkY=; b=sdyRaW8rNYRiVOx12NSNtGKCD5JmsOPD5GEZ7TDe9Jk2MP7i8DZFRu4sH2VQZDzquf6JCq wP43178og5NGvcvHy/+o31nHvZ8ASTDUlHynYtIgB/8thQOnq/d+lW9G+GbAWejJL4pzbP xqh9B2DJBpM3qjIa1L9Q6hQyZ/dlKEKLc6qpxF7Ag62C3OP4gaWNI/Q7UQILIWrq3Izl3P 1vMHo+8YGA9GlTpHsdIe2iD0cK/+J6AmEdlQCtqipVZbhg73VW4IfM98RqYK+HPmi7UwKI YkAnHDs6AvA0XqXY3r/DtIr070tpsvTuM0YJhUFyvu7bZOIvlbLpsdcE+iguiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219813; a=rsa-sha256; cv=none; b=fFMMUIb7rdw+Jghid9viiAi75DkJ0ZUdoV/Shf9ELstpUUBL5C46wOpjA9Fnfl9h7MmbMu 2ud43+nMk7iVNZAal8WhefXIC/A+QVXY4H6sMODS9EEa3i6/66stH/YLzPVYys/uDDCl7i sRG2X3QTU14SvorGUJlPRJ1NqAvFFraV/AZRw/2nS2yNn7sH9iCYRlhdgVyQpDC7Fa3c+b Eq70aaYKxJQElNSwHA1X1ZX2s2qDbQ0lAEocoDBDtCwwzkeRTzHguTLIigMuehuyZJBiPx 4HEw/sSSGrYfUkSrJ5dHDLQmZnajr40z2lqIlSvme2RKeDAS+UPQMHJJilf+9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cie1NNB94d06DDKcK1SqXg0Asyuy/xSgMA7bI0xmCkY=; b=fO+615iBIyKbHKumGpjRpc9KwE1vL0+Y3KRxIyivC1IYHnO82xf39k3nY332PetFytR9Co xDIMgwTD/biLI+BfPr3ZtLaCXlpYdWEUCJHW+w9hgZcJvqKDzMq5bjRjKCYF1M5EYu/yod NV3VpjUSdbypSmyx1KNJ1GUXoIbF+KRSUE6EutJUoZVwJXyMXJt5id/o+OhcIfZHUUIBUY guHppYVKjQOphyTG4sKHz9O0sXy7Om26VJeRNh9Wfj7YhzyC4lLh0H7ENjuw8VAM24XuM4 m0As6j7j7SREqSLoiUiV+gyTgnmodrZarbig+Twy7IErJNHsNm2FY5nsIaJL4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJj1WVMz14Dh; Wed, 12 Jun 2024 19:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGrw2004224; Wed, 12 Jun 2024 19:16:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGrHZ004221; Wed, 12 Jun 2024 19:16:53 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:53 GMT Message-Id: <202406121916.45CJGrHZ004221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 7cda20918644 - stable/13 - LinuxKPI: 802.11: return proper value for IEEE80211_CRYPTO_AES_CCM List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7cda20918644f283590a5bb348066bdc2bef18b8 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7cda20918644f283590a5bb348066bdc2bef18b8 commit 7cda20918644f283590a5bb348066bdc2bef18b8 Author: Bjoern A. Zeeb AuthorDate: 2024-03-04 23:03:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 16:59:35 +0000 LinuxKPI: 802.11: return proper value for IEEE80211_CRYPTO_AES_CCM In case of LKPI_80211_HW_CRYPTO we convert from LinuxKPI cipher_suites to net80211 ic_cryptocaps fields. For WLAN_CIPHER_SUITE_CCMP we accidentally returned the bit number instead of the shifted value which leads to ieee80211_crypto_newkey() setting IEEE80211_KEY_SWCRYPT, which in turned lead to us trying to decode the frame again despite HW had already done it. This was found out of a discussion in D43634. Reviewed by: cc, adrian Differential Revision: https://reviews.freebsd.org/D44208 (cherry picked from commit 906521f8176b13533556d742db4ab28e847b85c0) --- sys/compat/linuxkpi/common/src/linux_80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 876ff3693bd0..e5fcb81dce6a 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -546,7 +546,7 @@ lkpi_l80211_to_net80211_cyphers(uint32_t wlan_cipher_suite) case WLAN_CIPHER_SUITE_TKIP: return (IEEE80211_CRYPTO_TKIP); case WLAN_CIPHER_SUITE_CCMP: - return (IEEE80211_CIPHER_AES_CCM); + return (IEEE80211_CRYPTO_AES_CCM); case WLAN_CIPHER_SUITE_WEP104: return (IEEE80211_CRYPTO_WEP); case WLAN_CIPHER_SUITE_AES_CMAC: From nobody Wed Jun 12 19:16:54 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJk4sTkz5NHhp; Wed, 12 Jun 2024 19:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJk3GxHz56sy; Wed, 12 Jun 2024 19:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YedWzx5J//eJb31ChTuUrkK4/aQAkpsx6vr7v7aLbCY=; b=DEkibcF8A2Tcg1KJpaUoaIIigMiiD6qu9+4T2r0KWGBp561mLcQGt/saAaNBSRJrb8BGl7 zWMPU2j+8NkAqNjz8ZpgU3Hef2c7WN7BS8paQ1jm2gH+SpmEqQ1yPiDtTezyZnt3TT4cRK q+gLaxQn93FbJk/leUbFJhd+A1Nv6G+QQyNSSfn806ttaqeqBGYUaSfqEqswpJya6r8BJ/ I4QkbP8GdF7iLEQatFzHPgIk05erKKNYJLnny5gsR5ru71N2+/0wHJGIcY5Hdbfl/aBd3a 7clW4Mu0DKznQQQJL2XfCONYk6CrvRjHI3RaPm5e5YNQjZ7TQM2DsDMEYZh3CA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219814; a=rsa-sha256; cv=none; b=ML2JKolUXu+isHfIB8COJIw7HIg7b7rJrWCPJS6dXKH/eFW6/HCA3tCmRqO60SnJzLiqJa awe9Ur2Yt5s4+spgn0pV2YgfWCWa+XM/keTRjNLvzJAvSJFdvvA5A/Mv+SYzQm5AhV48dT kFQJYYn1ZrPbTGWVmvn9oXj0UulB7tskJtDt1CyiDbS8cLQbV4JMUnH7PrsfMafSlOayOb yNHj26V/mHlhuxrHikaoCneBBF+3EdnETpLeK+4hcsOjUOVb7xqzxYQ/hDlNxqnCyML1OH ocvLxS06bJMPjgiOL3aweQUSMYrBgCbOXjGJelELEPT9Ae3Kvl3BnpQugr1niA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YedWzx5J//eJb31ChTuUrkK4/aQAkpsx6vr7v7aLbCY=; b=hFEA6KDKyLnjv+UUiGQhOWtsI+3cW8RB0MykyCGsHbQ4mhvLRDiZIQFuTNt4zfaDVPqybs PvE9eac00L71RAi2Uidjm1Z0O4kjGmXdnQPppZNcj3OtHNWCEfVgnsS7LsEi7wGaNMlhNk 1lv3MMgPRZitVHIJWAALbHvZc2ZfcKMbbvqRBNYQTk5YHuk9nMDWGrZZlRjYYnEPknutoa ahSsLgfZKvifSxtCg3Lms5L00sflrwTnRMpwAc9O94W0gpApaB7aFfsCZfiFemddkyXI8L tpFUvaXvCQSoE00yQXgpfVvj8nURQBz3ZGJwJ2QXmHFavgc0Ghj3mbK9p2FWXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJk2qj6z14jJ; Wed, 12 Jun 2024 19:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGsa6004272; Wed, 12 Jun 2024 19:16:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGsBH004269; Wed, 12 Jun 2024 19:16:54 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:54 GMT Message-Id: <202406121916.45CJGsBH004269@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c91ba48865a6 - stable/13 - net8011: radiotap: add more EHT constants List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c91ba48865a61a84f521085fd59ed797655e8816 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c91ba48865a61a84f521085fd59ed797655e8816 commit c91ba48865a61a84f521085fd59ed797655e8816 Author: Bjoern A. Zeeb AuthorDate: 2024-04-02 23:34:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:00:10 +0000 net8011: radiotap: add more EHT constants (cherry picked from commit ab95bca9988ab15a2502efd03db43068a0a2b18b) --- sys/net80211/ieee80211_radiotap.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/net80211/ieee80211_radiotap.h b/sys/net80211/ieee80211_radiotap.h index dba454a8fa42..d44f81b68b8c 100644 --- a/sys/net80211/ieee80211_radiotap.h +++ b/sys/net80211/ieee80211_radiotap.h @@ -540,6 +540,11 @@ struct ieee80211_radiotap_eht_usig { #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_VALIDATE_BITS_OK 0x00000080 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_PHY_VER 0x00007000 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW 0x00038000 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_20MHZ 0x0 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_40MHZ 0x1 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_80MHZ 0x2 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_160MHZ 0x3 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_320MHZ_1 0x4 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_UL_DL 0x00040000 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BSS_COLOR 0x01f80000 #define IEEE80211_RADIOTAP_EHT_USIG_COMMON_TXOP 0xfe000000 From nobody Wed Jun 12 19:16:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJl6D3fz5NHfG; Wed, 12 Jun 2024 19:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJl4Nr9z576B; Wed, 12 Jun 2024 19:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZJpUdd3CVsMEb3R3z+pY5xD7fxu2fgPsas+0NpGOrs=; b=aTi66ABwVCkFZqKd6s+4uitsbadr6LcCLNuQ25bGIQ6TzzezGWc61kaHZ3wkIwZbA8rHHc PFP3R9gJjFfoQrxQV14tO5QGpsdFttWkkSNYc+jq0OtR1Z6OczDJ+gdwMgcgL4zb/qCZoj 8I6neCE9bH5qJgN/PDIajaIELmC5XGsYOe5TuNng0B0XspUje7J6sZW4BNjalCWzZTnXMK lLq81CaYguzbpY/UEZ3qM4Mx38p8kGWbhrtJ2pNK677PLHxOp6oatuu0XUfDanEVs+/oIx 5a1Lwr1JtTcipnHTU2YgeO79HuF/OOwccjmPcKvfu4neZZwKHtCy9SbZZWvyIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219815; a=rsa-sha256; cv=none; b=SJL4Aba3MtkjkOOS2q+6JMIbc/E45y0FZXcNcCBgn5Qa1l/3bR2nTM7sSjskk+eOYmMIS7 fZcZ3SocyCE89laqIgLHAEVGyTGYIl8qVdQQZmS9rV9m/PP1HIEK27tnquFBnrNXytV25X D3YmIqWgg+KRcI+WULAQWP9LB1HWXvXSUWdOoCmimGE6TrgRPDwW6CL4nmog1jpnqswUPy Cu6kTSuC1KyinGRkEDLz8wLIN4YuU+ERtqSeiI2td/uppQZegjsrNlmbMe33qAF1ysxmWC DFHSLJS32Ow3fsVvhypjZzR+v2a8tgcr1moHMBRTBG+dXkXRA5HajIWk3IuzaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yZJpUdd3CVsMEb3R3z+pY5xD7fxu2fgPsas+0NpGOrs=; b=ClBTzNWP+iBppBM5/axoFvDfHVyqd5d8oiMsHjDlBAWkj7bf4JuH4d9ufERK40g1jlEnEc 5QZbMbWyPzfgwoVtD3Xs4rwiMJ2BqmXbT2yEpitJca+oWu/Z//VRQyy/gOHkq9rqx8mUh1 r+NO/eEL1zxoyqe63NAqLlRW3NdWAAG4/OU3IMLpp/kg8v25IeaiJ6ctpiJR+1zdke0O/F fzO6KzCdi32ezSYq3AQaPpK+3mGPKZGxWITZfdNM9yFJ2kxkk4lBJtguFmKR9n87wjQsS9 z/NPI2Fa+0+s0F+WDUu0zRVLaWnyRqszhh6Fli57BOroTrlg5QF65tka+KkQFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJl3ydfz14xK; Wed, 12 Jun 2024 19:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGtI3004314; Wed, 12 Jun 2024 19:16:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGti7004311; Wed, 12 Jun 2024 19:16:55 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:55 GMT Message-Id: <202406121916.45CJGti7004311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 1c17a175c4c1 - stable/13 - LinuxKPI: 802.11: fix for_each_sta_active_link() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1c17a175c4c1b9f0cd995d77e3015698e3e174a9 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1c17a175c4c1b9f0cd995d77e3015698e3e174a9 commit 1c17a175c4c1b9f0cd995d77e3015698e3e174a9 Author: Bjoern A. Zeeb AuthorDate: 2024-05-21 21:58:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:00:49 +0000 LinuxKPI: 802.11: fix for_each_sta_active_link() Likely a c&p error from for_each_vif_active_link() to for_each_sta_active_link(). We are checking the nitems on the vif instead of the sta in this macro. Function wise there is no difference as the arrays are the same size but for correctness fix this. Sponsored by: The FreeBSD Foundation (cherry picked from commit 69b6c4a6ec6654978628ccd48edce46f00ac3e96) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index fc9d7829dae3..6a477ae5c32a 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1253,7 +1253,7 @@ ieee80211_hw_restart_disconnect(struct ieee80211_vif *vif) (_link = rcu_dereference((_vif)->link_conf[_linkid])) ) #define for_each_sta_active_link(_vif, _sta, _linksta, _linkid) \ - for (_linkid = 0; _linkid < nitems((_vif)->link_conf); _linkid++) \ + for (_linkid = 0; _linkid < nitems((_sta)->link); _linkid++) \ if ( ((_vif)->active_links == 0 /* no MLO */ || \ ((_vif)->active_links & BIT(_linkid)) != 0) && \ (_linksta = link_sta_dereference_protected((_sta), (_linkid))) ) From nobody Wed Jun 12 19:16:56 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJn1FqSz5NHq6; Wed, 12 Jun 2024 19:16:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJm5Wm1z57F3; Wed, 12 Jun 2024 19:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZIJ7MPfO4dMuLvXdPMukRqbKvB2vC1DG18hXI2fH44=; b=mY0YtUki21bqz1FE6xzH4YwogEVz8o6lK7JcRcg2wKGgjogMmMdfL5FHfJuUDm5j2M186S w21W0kUM7UBQwn7D3L3FAfImOvzB50b8OwNefSn+38E7HsenVHstt4qkMiF679b/SMvMhZ 4uBLlY1N5/ouYCGcCeG0sqBk9Mdk5BK0rvFM5mWFhzUTEPRC/j9nSBCKgBLIkRIlddUb1p 1/Q765PQS1Mf0l6MBJfwyN9lFnVRXUF7XqF/Z3C9nFGQqoyAZiI2L59Eu4yMcNtAu888Qy gR1lq+2A795ey7ZWqpGfNkWF2DAsS8zbYqbZ6GvPb9RRmXYUhtbxdYUiWUvCDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219816; a=rsa-sha256; cv=none; b=Qp5vdwHzIEVXpq40zKkUSUJ+PwS0GyWJt4xX+v/hsB7CKHIqt59z5tUctLf+8FQbDh7Q8V b8wypzDBcL5OM++Q1hS3Ho+yjCEujKdmOwSFVuR4gnjYfI+j5no/DYCm+J1o4uUbG4cPr8 Mhv2f4bO6sw7F+z1ZFr8mGOr9+CGEJmiADNgzbuK5xw2lWYhiL9x9SD7KFsIBSbmQW8hVr uM4A919LbC6flqWpd3J2XRCQaemVpYjRkCOrX4HZSogX21hALfUiLm1MR+M3uEtWTC4ZiZ LN6m+srdCA1skFShYqIZjl4sFc0hFuKGQR4GkqaCmkIY5xHCCW81AJsbyToTAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gZIJ7MPfO4dMuLvXdPMukRqbKvB2vC1DG18hXI2fH44=; b=HhHmJt1hWGeRoIh5uANWHgJ5trOA9WcjHqCAssR3iocHVk8jhi0TdGKBLQfYUSS/ivr2BD +XGp2mwqHH1P8S+mDgX5ynXP53XE1gC7ycEB0zVAapeS8AYIObzveNbNEiE9aEJzON/s8G uA75ZHDcsbxHGSMRzNIETvQXUjvxdhyTjOk4DgwJthmD+qY2G7vllBjU453okSBNCrXjO6 toW5FkHu+Oer9gsT2y8v1QHLWrf8ASiQzujdqZz7oNbc7pZh3X4EUuuTn0I0/jpnDsSjAO fI48dtX/jgv/IcHDu+ksOf3oeDnP5H6mSl0eEVICPcyNzSSgc40zxHocd2OdWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJm58JGz158D; Wed, 12 Jun 2024 19:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGuXY004373; Wed, 12 Jun 2024 19:16:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGuCF004370; Wed, 12 Jun 2024 19:16:56 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:56 GMT Message-Id: <202406121916.45CJGuCF004370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ba0e9f526481 - stable/13 - LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ba0e9f526481d087bb9b3dfeb341134a5d56a7c5 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ba0e9f526481d087bb9b3dfeb341134a5d56a7c5 commit ba0e9f526481d087bb9b3dfeb341134a5d56a7c5 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:35:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:02:05 +0000 LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx() The logic following this new assignment in some cases may not set lsta but the later tracing is checking for it to be != NULL. With lsta not initialized that check may not hold up and later we would dereference lsta->state and possibly panic. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45507 (cherry picked from commit 582469016aed4fac3a7ead24dc31000edbb7e823) --- sys/compat/linuxkpi/common/src/linux_80211.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index e5fcb81dce6a..b48f64fb1b0f 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4926,6 +4926,7 @@ no_trace_beacons: goto err; } + lsta = NULL; if (sta != NULL) { lsta = STA_TO_LSTA(sta); ni = ieee80211_ref_node(lsta->ni); From nobody Wed Jun 12 19:16:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJp1fGcz5NHhq; Wed, 12 Jun 2024 19:16:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJn63SSz576t; Wed, 12 Jun 2024 19:16:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TwaM42kImBv3Z69Lvuj2uxf+fAnlEX32FI4p5lxcqHI=; b=y286BU4TL11c1S+Di3yn25DDEgKjyqdwwUQ2OPfc3jYLpJGG+jLTrjOB4EF14QS5lQKQbC b4vW1kc6DIxRzToaOxRdqQxL3mR1394G3V2G4h+VHUWgnjNoUoRcIg0BMv4LGAQsVKeiui iOnktiRxZdzJwmlp69O4+oydUbMoiL39T3wjNiNPFki7xnP5m6lAMcWFvF7TJF2m/zRm7V QO6QHYYn0eo49ODpHjQHhGu7lKQfA3LW65W5zPt4P256cNlP80Uhxxn3Qv0F0frwnUUHW5 e7UArpTmBkqGsCn3kjInTIkNMisLNWcqpcxia1343pQmoCXWoFXK7g27ztekNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219817; a=rsa-sha256; cv=none; b=enwe0N7VqXeT36RM52n2U9SUE3X3+bTdxUW974S82CUqDIWj+wx3LCeiz+sOBftk+aL9uH tYTrEQ4C/zF4fO/nbeCPenmqSUUZVmEwYYn78tfqGBygHEjH/rbJXaW+LCPim8SkZAvacK 28EHowz4Hy/ez24OgU1lPTN8LWFIYKOlopEapucPbdko4s2ndXHozYNUaB0zBZyS++KaKw 9B+dTSEG8jXHjEIDrGYqMSdrQzZ9uShVfdALkh6W7tQnP7dbCSjCbYfk6Kplqnd9Mlwv5O /g6YianrKLajsePRTFImCcExBGS6abw41Dz5mhnoexqg+Ymu7FQ3Z4czpL5C1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TwaM42kImBv3Z69Lvuj2uxf+fAnlEX32FI4p5lxcqHI=; b=cn2/oNxUTWxaL4URRxfPAdICv+943BqocU5pvPqszrKDHc3jGQMqGW9G4p14ODyxliXFRv RckK3vBUPFf8q8pfKPu4rO6FFpgdJlP3CL/QGgeBnyXOwWTzZVSezcfGkQ+94nzc/Uf0AB GwnD4jU/KE/ffPBDO9HuLcFnYIYpCnI4K9VO50ZJn3NCm0134KUDAMvVPiABPNHMGRhqVU x2J8DkIs0ml0SSmBJGlcFMb1xZI4W8BuoLZ/e1eCcwCyrRaD8lKGLVfRjny54SQgR/JJ2P JEwAB6m+nC7hV4PgRU8oCBScuVN8RJi63M9CO/90achcTtwRQ0U+GwwhEd20Ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJn5fwgz15BH; Wed, 12 Jun 2024 19:16:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGvhS004421; Wed, 12 Jun 2024 19:16:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGvVc004418; Wed, 12 Jun 2024 19:16:57 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:57 GMT Message-Id: <202406121916.45CJGvVc004418@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 88de7a318d13 - stable/13 - LinuxKPI: 802.11: Fix definition of IEEE80211_HT_CAP_RX_STBC List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 88de7a318d1381acc8c654c50ed7ea185f9abbbe Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=88de7a318d1381acc8c654c50ed7ea185f9abbbe commit 88de7a318d1381acc8c654c50ed7ea185f9abbbe Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 21:57:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:02:40 +0000 LinuxKPI: 802.11: Fix definition of IEEE80211_HT_CAP_RX_STBC IEEE80211_HT_CAP_RX_STBC was set to 0x100 instead of 0x300. Correct to get the expected behavior. Sponsored by: The FreeBSD Foundation Fixes: b0f73768220e9 LinuxKPI: 802.11 header updates Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D45506 (cherry picked from commit 3e0915b7b6857afdbd283f2d448906e6a032ee07) --- sys/compat/linuxkpi/common/include/linux/ieee80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 2000e7480ff8..0fd90e921c77 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -263,7 +263,7 @@ enum ieee80211_ac_numbers { #define IEEE80211_HT_CAP_SGI_20 0x0020 /* IEEE80211_HTCAP_SHORTGI20 */ #define IEEE80211_HT_CAP_SGI_40 0x0040 /* IEEE80211_HTCAP_SHORTGI40 */ #define IEEE80211_HT_CAP_TX_STBC 0x0080 /* IEEE80211_HTCAP_TXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC 0x0100 /* IEEE80211_HTCAP_RXSTBC */ +#define IEEE80211_HT_CAP_RX_STBC 0x0300 /* IEEE80211_HTCAP_RXSTBC */ #define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 /* IEEE80211_HTCAP_RXSTBC_S */ #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 /* IEEE80211_HTCAP_MAXAMSDU */ #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 /* IEEE80211_HTCAP_DSSSCCK40 */ From nobody Wed Jun 12 19:16:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzwJq2K56z5NHxr; Wed, 12 Jun 2024 19:16:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzwJq0fFQz57JB; Wed, 12 Jun 2024 19:16:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9F08clXp8hSJ/PAXz+ffY3MJcGTpb+12AYAlHlRKk9c=; b=lQ9hENFza77Olx4RsIPdGPwe3vwZ6mrpk0+z7Gs2OpK6vfu3zLUOXWtWSfITDU6huucaeb Sw4/vAzhP00BFouRZ0CAmC7merRO05t0xi+l9+3rk60461p8vOo8sxVe/JwGXVSs5bj4EW Y6nml64mB50ofWln3xUeWqLpi2Y/tvNtQRGnnQYWKbh7fO53fj/ap3+FF/GMjDnWWshaCY A0pQDeSICwKLZ0T/du8TaGMZGvBQ5ye/aMslxUfSTJ/KRU5s5flvngPMEIS5WN/PsFhsQ0 ZPyTi86myJ1KiUTiTLFWPzwte3JP89eOrAXq0jSNCitJQAiDRqivV7Q75Ic/ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718219819; a=rsa-sha256; cv=none; b=yXr4d+ZqgZqaAiJ2kvK3AL+AGRmvWHgdDVquX5/xHkSaEWIbFz4Kxa1lNGuUvgAYeKEjfF LvMAgTYSN5heZdt7OZkyW4sLWYhIaSlV907iBfrPir4Rz1ONB1Q1YTAIXhrQo1vJKyQ3Ux HOEfgtVc/zPQgG1JyVqDFaPc4QEmADMUZAJGZS8OhPi52OyGSwbmvn8MpH06NYGQMW9g1K JF3taFaxvT720CxTgEwByd2+IpFwsYBNqcrlpKIHm8Rlm68ZbX0yZ4M043gDeQNYnKTWMy OiPlJCOh7WUVY7XKiGIK+/PRU0JlO1ezv+3eyPu0Hzo/gF6O6Oayo4Ol6hj3fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718219819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9F08clXp8hSJ/PAXz+ffY3MJcGTpb+12AYAlHlRKk9c=; b=As/F368egAHEJi7qmIPzwpMQUcjz3cYSdIz33MlkmyiGWCgDOL54i/rXUv8FURH+tjW1FC xydSt6spPzT6kfPrjM7zhjOLRbgpc3My384/Q00hlAWrUOmw0tzNNK65a8rkCnS9hJBiw8 Itkbbp2izuN8YMBO6epSVs4/0O7ZIItwurCwOV4LLRX0rFYFjYVxtV8+KqcnujJF5pQXdR EhNElOfCphkMXyNoaEhvuH2pODdHiSnFJLuxCoLJtPCyBaFLVa7HNxnKRg54K4O5z2zCDC IYSQ+aimE8eLNPzgJOeBufJZ/+XBY6AsFZYWABy28x1PA+J4NWyjrnBb5TtWng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzwJp73YKz158F; Wed, 12 Jun 2024 19:16:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CJGwGr004476; Wed, 12 Jun 2024 19:16:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CJGwUx004473; Wed, 12 Jun 2024 19:16:58 GMT (envelope-from git) Date: Wed, 12 Jun 2024 19:16:58 GMT Message-Id: <202406121916.45CJGwUx004473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 2f5608c9af3b - stable/13 - LinuxKPI: 802.11: use net80211 IEEE80211_HTCAP_* definitions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2f5608c9af3b4f5c8900ee8bf0291f92fda817b0 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2f5608c9af3b4f5c8900ee8bf0291f92fda817b0 commit 2f5608c9af3b4f5c8900ee8bf0291f92fda817b0 Author: Bjoern A. Zeeb AuthorDate: 2024-06-07 23:57:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 17:02:46 +0000 LinuxKPI: 802.11: use net80211 IEEE80211_HTCAP_* definitions Rather than using the values and leaving net80211 names in a comment define the LinuxKPI IEEE80211_HT_CAP_* to the net80211 IEEE80211_HTCAP_* names. That way errors like the one fixed in 3e0915b7b685 are less likely to happen. Sponsored by: The FreeBSD Foundation (cherry picked from commit 63a327b954a38ecd46934a2911321f3ea3d500b3) --- .../linuxkpi/common/include/linux/ieee80211.h | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 0fd90e921c77..aa1a0a4f3c5f 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -254,20 +254,20 @@ enum ieee80211_ac_numbers { #define IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL 0xf -/* XXX net80211 calls these IEEE80211_HTCAP_* */ -#define IEEE80211_HT_CAP_LDPC_CODING 0x0001 /* IEEE80211_HTCAP_LDPC */ -#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002 /* IEEE80211_HTCAP_CHWIDTH40 */ -#define IEEE80211_HT_CAP_SM_PS 0x000c /* IEEE80211_HTCAP_SMPS */ +/* Define the LinuxKPI names directly to the net80211 ones. */ +#define IEEE80211_HT_CAP_LDPC_CODING IEEE80211_HTCAP_LDPC +#define IEEE80211_HT_CAP_SUP_WIDTH_20_40 IEEE80211_HTCAP_CHWIDTH40 +#define IEEE80211_HT_CAP_SM_PS IEEE80211_HTCAP_SMPS #define IEEE80211_HT_CAP_SM_PS_SHIFT 2 -#define IEEE80211_HT_CAP_GRN_FLD 0x0010 /* IEEE80211_HTCAP_GREENFIELD */ -#define IEEE80211_HT_CAP_SGI_20 0x0020 /* IEEE80211_HTCAP_SHORTGI20 */ -#define IEEE80211_HT_CAP_SGI_40 0x0040 /* IEEE80211_HTCAP_SHORTGI40 */ -#define IEEE80211_HT_CAP_TX_STBC 0x0080 /* IEEE80211_HTCAP_TXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC 0x0300 /* IEEE80211_HTCAP_RXSTBC */ -#define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 /* IEEE80211_HTCAP_RXSTBC_S */ -#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 /* IEEE80211_HTCAP_MAXAMSDU */ -#define IEEE80211_HT_CAP_DSSSCCK40 0x1000 /* IEEE80211_HTCAP_DSSSCCK40 */ -#define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 /* IEEE80211_HTCAP_LSIGTXOPPROT */ +#define IEEE80211_HT_CAP_GRN_FLD IEEE80211_HTCAP_GREENFIELD +#define IEEE80211_HT_CAP_SGI_20 IEEE80211_HTCAP_SHORTGI20 +#define IEEE80211_HT_CAP_SGI_40 IEEE80211_HTCAP_SHORTGI40 +#define IEEE80211_HT_CAP_TX_STBC IEEE80211_HTCAP_TXSTBC +#define IEEE80211_HT_CAP_RX_STBC IEEE80211_HTCAP_RXSTBC +#define IEEE80211_HT_CAP_RX_STBC_SHIFT IEEE80211_HTCAP_RXSTBC_S +#define IEEE80211_HT_CAP_MAX_AMSDU IEEE80211_HTCAP_MAXAMSDU +#define IEEE80211_HT_CAP_DSSSCCK40 IEEE80211_HTCAP_DSSSCCK40 +#define IEEE80211_HT_CAP_LSIG_TXOP_PROT IEEE80211_HTCAP_LSIGTXOPPROT #define IEEE80211_HT_MCS_TX_DEFINED 0x0001 #define IEEE80211_HT_MCS_TX_RX_DIFF 0x0002 From nobody Wed Jun 12 21:34:19 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzzMH610wz5NVNt; Wed, 12 Jun 2024 21:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzzMH5TL5z4LhS; Wed, 12 Jun 2024 21:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NwWUAQvCZm/QXZ6K6Z+pOWAcSfH1jkHqAdA1y/nS6wU=; b=kxNkI5s4Ao0RXbKSyAqcSdT4rmpHrnhPsY9MF6kIK0RaLi8Sysl4SyCGUKcL1xR/MCuzPY Q9xbJ0uM0ZtpOY0CDu3VsNh2+DhCw3vrLzbrAxxleGqYpnnRdfvtchQM9/8DoluOWm4GGb TltRL0SyLQZ5SWuv8Y75mJqm3hp5bFOLCc0aSmAv7XT++I/wLpaK3K5gHgq6xVFPKpFI4g r5tTI95DnytCQD+OV6DHkQuOwiSbOXRMdVahHdXiLIfoclI23/uq4mVGvI0oJ5XnORbHLF y1bHq7sL9zEob2mOuIiobFYtNIYkM5Zo1ZRGOG+gpYKMjYNW72cUnJZcLlOeJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718228059; a=rsa-sha256; cv=none; b=jiY60+McuX510FksmpTmG7LDm4D+Vu9z0nQJZ5K02KeAjhQ4XVEWQXu0M2RXZcDnlhQXOq kcj8Af/hV+hvBhgaJzfMDmp98H4OLHzwtwyPDh+G8FJMRYoitdI8/FY9nP/pBl7V3xU3Ax /Z/Ew94bdQht/QwknuwZdYe0QHVJgRgi4RoMoSEHW4dtuJp1pNaiSEQMu4j16lnl8FfJzz kh8KcEVlpoN3j101agBBuNSYnxiwFbBTxBLmxvU7Tm6jh5HOaI1OddRwX4sv/3HYcAgNgF eex0B/ICk388jDgBIe+zPPgI3zNea/BLPhRm8o/QOm1rnE/07L3fdC0ZKw719Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NwWUAQvCZm/QXZ6K6Z+pOWAcSfH1jkHqAdA1y/nS6wU=; b=aUUyhEm6xT18V1k8DiYxXySU9UvgFT/rokTqh6qBNnyAf1LH7lgRoXeoy7z32+1CIxKduZ jY0NSvrib6UTOoLdYokj4PeMUfIiyJcX9Hc44v1vOePIev8Uv+ew1Oz1bwpHMI31oSPDkk YYB9IRHkxxcUKhagATHz0rrXfIE7NewWDeydYF/2Y5uI2Zr0v66RtrRbs5ZFsHoyh5AVkv uSts6jr+TMNlQ+8HGhv74jCvQjtLhMFpFMEuN7CdDNiSQNzXEq9iAQAoVprbsvoA+XpcKa 0Ckrgtb4h2KMGk4Ax2aoax8x+7NC0ePoULlkCCH8pudJxePSqM/gBEMVxwuU8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzzMH551pz182f; Wed, 12 Jun 2024 21:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLYJdv041166; Wed, 12 Jun 2024 21:34:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLYJRt041163; Wed, 12 Jun 2024 21:34:19 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:34:19 GMT Message-Id: <202406122134.45CLYJRt041163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 83549ee250c0 - stable/13 - u3g: Add support for SIM7600G List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 83549ee250c041bc46971d66b7a2f55bc11b41a5 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=83549ee250c041bc46971d66b7a2f55bc11b41a5 commit 83549ee250c041bc46971d66b7a2f55bc11b41a5 Author: Maxime Thiebaut AuthorDate: 2024-06-06 10:43:46 +0000 Commit: Kristof Provost CommitDate: 2024-06-12 19:34:29 +0000 u3g: Add support for SIM7600G Signed-off-by: Maxime Thiebaut Reviewed by: kp (cherry picked from commit b5b90ff9844d1cb780ff777fc42ad393e4683563) --- sys/dev/usb/serial/u3g.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index cbe7ecc5bf74..986e243c60d3 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -207,6 +207,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(ALINK, 3GU, 0), U3G_DEV(ALINK, DWM652U5, 0), U3G_DEV(ALINK, SIM7600E, 0), + U3G_DEV(ALINK, SIM7600G, 0), U3G_DEV(AMOI, H01, 0), U3G_DEV(AMOI, H01A, 0), U3G_DEV(AMOI, H02, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 602420b44ce7..a32a53d49735 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1064,6 +1064,7 @@ product ALCOR AU6390 0x6390 AU6390 USB-IDE converter product ALINK DWM652U5 0xce16 DWM-652 product ALINK 3G 0x9000 3G modem product ALINK SIM7600E 0x9001 LTE modem +product ALINK SIM7600G 0x9011 LTE modem product ALINK 3GU 0x9200 3G modem /* Altec Lansing products */ From nobody Wed Jun 12 21:34:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VzzMJ3rZWz5NV6Z; Wed, 12 Jun 2024 21:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VzzMJ2DKpz4Ly0; Wed, 12 Jun 2024 21:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ik5w5UcAEB0l/8I47UEapii6UiNKYgBvYGAZOAHdWN4=; b=EkGTomrCLmQpkgjJ8GvfZLKn+p9ue4fpFyZxms6g+S0cI2QsvjT3PfArewoEPzq8301Gdh TnOsUsoCO0BJ/ryl25biVti+X9Ugt3OSdGNG17GXtoO9RkCBrayGdLY159iH1t+w2fNVK0 GLVH6BF0h91nwIvLPABOjOSF7zNaNPPwtxruvwR81IsfXKb+yY08AneoCHC+ywXt4x7SL2 oYEiEH+TF+x1U5EfFTQpxYUIi7Bm6mWc829QiV+a0GZmQrJosv2s8qvCBGH5fYTa+HJzCe SrFS/kcQJP4KeDYdQA0vGVJSc1rIhqxi8dRdDdMrIFtjd43OX89gticZFpbvyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718228060; a=rsa-sha256; cv=none; b=ryVn5S9Y+hsrG3tITm1I4O+n5WY4M3mPoAZAlSRPG3m/PCosmz+T7oKxsoTHOF/XWBhPI1 my80NjcwVvRBBCfjWFeZhuOlJ95lUSRfL+ZPOdhyhTElBOzVpIvP0rQA/W2s9BKkATydtV BvgSRQVfFBJyVF0w2oaddbGiZe63tF5QODOpHhq8ntj+11PR2s6dLksRfOYwAjIXzXjYwR L0z0dFGyrnMpS+/XCcTJHRxxQvAlhlrEyVbMyUxxf8N3uIr7wUxwUrMmFNA2BL5UF/wPfU zS5iSd/935zgr61dVrPVVaMgTLzcym18CXPHMi1js44KIdw71FFzHL7dMJNh9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718228060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ik5w5UcAEB0l/8I47UEapii6UiNKYgBvYGAZOAHdWN4=; b=IZKm5F7X6SPkHeQ/YZ4N4+uj2MdL4ldEay8c0cvkbOyX8swi098c5t46ExYEY5hgA3KuTH mfMXAHH5cwFC/MC7ZORcPYVx8kbH4d76hJbyM+Pwiktfwo4UORatpVk+gMuWNTTQsIsG/m /7nd78oWAt7xxtvL2YOS0AxH+A1mIttz9fDwfoZZ1vA4Qu0T8ufiZhLqFuleLXsd+CTor2 KFFSC581IPLMmLUVN7tTFidRKDMmlfm6bMbAywQgi3T6aOEu67rt4N5b1tDGoANCW/vOgV AlEWZrGSGbg1C/izKyLWAAR6B1VnwurrPgEwb9cJdSBeyjMkZ9c5M/zjoJ54SQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VzzMJ1rP0z18CS; Wed, 12 Jun 2024 21:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLYKOu041270; Wed, 12 Jun 2024 21:34:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLYKQl041267; Wed, 12 Jun 2024 21:34:20 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:34:20 GMT Message-Id: <202406122134.45CLYKQl041267@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 1296443295ab - stable/14 - u3g: Add support for SIM7600G List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1296443295aba0dd3e10a3a84013b9e60aef6196 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1296443295aba0dd3e10a3a84013b9e60aef6196 commit 1296443295aba0dd3e10a3a84013b9e60aef6196 Author: Maxime Thiebaut AuthorDate: 2024-06-06 10:43:46 +0000 Commit: Kristof Provost CommitDate: 2024-06-12 19:34:25 +0000 u3g: Add support for SIM7600G Signed-off-by: Maxime Thiebaut Reviewed by: kp (cherry picked from commit b5b90ff9844d1cb780ff777fc42ad393e4683563) --- sys/dev/usb/serial/u3g.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index e0a1ff29b0a4..88f94ddaecc6 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -205,6 +205,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(ALINK, 3GU, 0), U3G_DEV(ALINK, DWM652U5, 0), U3G_DEV(ALINK, SIM7600E, 0), + U3G_DEV(ALINK, SIM7600G, 0), U3G_DEV(AMOI, H01, 0), U3G_DEV(AMOI, H01A, 0), U3G_DEV(AMOI, H02, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 65dcb06c2f3f..2a217b1eaf17 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1064,6 +1064,7 @@ product ALCOR AU6390 0x6390 AU6390 USB-IDE converter product ALINK DWM652U5 0xce16 DWM-652 product ALINK 3G 0x9000 3G modem product ALINK SIM7600E 0x9001 LTE modem +product ALINK SIM7600G 0x9011 LTE modem product ALINK 3GU 0x9200 3G modem /* Altec Lansing products */ From nobody Wed Jun 12 21:55:24 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqc3QF0z5NXSp; Wed, 12 Jun 2024 21:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqc1TLpz4Plc; Wed, 12 Jun 2024 21:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N0G7VPCvdrN5dOy6IPmc6kHRsAwNnhtNAwasxsiaXGk=; b=av4KQSfMZJPeA8mc06YKc7ypf57QQhI6Dkg8HsqK21tXwod4bSWTxMf5B8aXBTcvs/fGCB vUoS23U34d2DmhhZ4bJLBEOwmHG9Sll8xpRKC6Pc543YE11Xrja7P/oE5ShdhzddCmNLVn wNliuX4iY53oD41n56ahVH+DZmIlEc2YY1gSXNhwkGLu/c2tZBEdZYuJyrbXPwXthdusyi w5wSLLfGTuojA4XpaB7KgOvHGUahBNWDYHMb84PcVcC9mGAAffCjNJbJrVJvzWiu8WiUe8 9it4ZXlQsmIkrttzwTCUaJ/byHx/h+bZtGFSIKnbI9NGAZotbNC4cj47z8iRkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229324; a=rsa-sha256; cv=none; b=f39iI2DvbNWzNTsNR9ebDGfvkBuSblVcgmZLSpTOLWlSfoOqwrq1pcx1xEwagJFtth4ZB8 u9ecMqI3rKqU3Qhb1DxCWJ+jf2f+ZJnCGuLkViRTj+/3psiLyVSkDLXFqi3RcNcU7y060p sa5gDoe+UcFw4UUP0KXj0QdLnaWiZHOWDDKxyxpZVABtZHWI92B1L4TfahEkLxREEBZVLB OO6/ZvwOJLGCjPxj4pY8HEnv+GAnPbQF6zwAoQi4IveJzWUz8q/Soc5MCdsZApMXJEaM4j +g0ltzMqYR3cTTlrm+TKX2lJE8iMgdZH6StL6iSla+TdDNWAcd/tjqW0O6htbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N0G7VPCvdrN5dOy6IPmc6kHRsAwNnhtNAwasxsiaXGk=; b=eJVmM04hXXeqDUgxnRKDMaI1cDCyO18M7DKcdXbd7h2B986XJqhO7mbV2RS/vWU8r8aDas y76hg3TRm65e506U9hR8T/YBzDT+UxyEhKrghld9uAczSSvwM/n8ybA5kKgg634zdedIDC bHO/ZWJG36Mt5WEPVz4QJyIKt7S6w4afsy9LUxAXMeSzQTwK3Gac5IiLAmNjXxzykCOh7l 49rw+NVPBAIQvDMGl7MFDXRNq/a7VVc0SzDQgMD49hbR+ggw6w0SxVHuXxNCtGGKimpTdz rRuAaLm4aVR8BOPA97/DzZcMAPDkm+DmrwaWjHSClNhlIuuBHhqMW6xpWBs4xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqc11Kxz18gC; Wed, 12 Jun 2024 21:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtODj075450; Wed, 12 Jun 2024 21:55:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtOPN075447; Wed, 12 Jun 2024 21:55:24 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:24 GMT Message-Id: <202406122155.45CLtOPN075447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 7f7389e66816 - stable/14 - man bluetooth/fwdownloaders: alignment nits, SPDX List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7f7389e6681639fdbdeef9f5987d593e13b508b3 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7f7389e6681639fdbdeef9f5987d593e13b508b3 commit 7f7389e6681639fdbdeef9f5987d593e13b508b3 Author: Alexander Ziaee AuthorDate: 2024-05-31 19:27:58 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:46:24 +0000 man bluetooth/fwdownloaders: alignment nits, SPDX MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1267 (cherry picked from commit 9c0d6df100eda06697ad4ca86c97c554ee9d727c) --- usr.sbin/bluetooth/ath3kfw/ath3kfw.8 | 10 +++++++--- usr.sbin/bluetooth/bcmfw/bcmfw.8 | 7 +++++-- usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 | 14 +++++++++----- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 index 340871d31df8..ed015bbf229d 100644 --- a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 +++ b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2010 Maksim Yevmenkin .\" Copyright (c) 2013, 2016 Adrian Chadd .\" All rights reserved. @@ -31,6 +34,7 @@ .Nd firmware download utility for Atheros AR3011/AR3012 chip based Bluetooth USB devices .Sh SYNOPSIS .Nm +.Op Fl DI .Fl d Ar device_name .Fl f Ar firmware_path .Nm @@ -58,19 +62,19 @@ utility will query the device to determine which firmware image and board configuration to load in at runtime. .Pp The options are as follows: -.Bl -tag -width indent +.Bl -tag -width "-f firmware_path" .It Fl D Enable verbose debugging. .It Fl d Ar device_name Specify .Xr ugen 4 device name. -.It I -Enable informational debugging. .It Fl f Ar firmware_path Specify the directory containing the firmware files to search and upload. .It Fl h Display usage message and exit. +.It Fl I +Enable informational debugging. .El .Sh EXIT STATUS .Ex -std diff --git a/usr.sbin/bluetooth/bcmfw/bcmfw.8 b/usr.sbin/bluetooth/bcmfw/bcmfw.8 index 22d793641759..b9fa72706d2d 100644 --- a/usr.sbin/bluetooth/bcmfw/bcmfw.8 +++ b/usr.sbin/bluetooth/bcmfw/bcmfw.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2003 Maksim Yevmenkin .\" All rights reserved. .\" @@ -64,7 +67,7 @@ I am using the following files from the bluez-firmware-1.0 package: .Dl "MD5 (BCM2033-FW.bin) = b4e142b3272cfe5a84b32fda6b4b032f" .Pp The options are as follows: -.Bl -tag -width indent +.Bl -tag -width "-m mini-driver_file_name" .It Fl f Ar firmware_file_name Specify firmware file name for download. .It Fl h @@ -75,7 +78,7 @@ Specify mini-driver file name for download. Specify device name. .El .Sh FILES -.Bl -tag -width ".Pa /dev/ubtbcmfw Ns Ar N Ns Pa \&. Ns Ar EE" -compact +.Bl -tag -width "-m mini-driver_file_name" -compact .It Pa BCM2033-MD.hex Mini-driver image. .It Pa BCM2033-FW.bin diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 index 368a3865a0eb..66517badd0fc 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2013, 2016 Adrian Chadd .\" Copyright (c) 2019 Vladimir Kondratyev .\" Copyright (c) 2021 Philippe Michaud-Boudreault @@ -32,6 +35,7 @@ USB devices .Sh SYNOPSIS .Nm +.Op Fl DI .Fl d Ar device_name .Fl f Ar firmware_path .Nm @@ -45,8 +49,8 @@ device. .Pp This utility will .Em only -work with Intel Wireless 7260/8260/8265 chip based Bluetooth USB devices and some of -their successors. +work with Intel Wireless 7260/8260/8265 chip based Bluetooth USB devices +and some of their successors. The identification is currently based on USB vendor ID/product ID pair. The vendor ID should be 0x8087 .Pq Dv USB_VENDOR_INTEL2 @@ -62,19 +66,19 @@ utility will query the device to determine which firmware image and board configuration to load in at runtime. .Pp The options are as follows: -.Bl -tag -width indent +.Bl -tag -width "-f firmware_path" .It Fl D Enable verbose debugging. .It Fl d Ar device_name Specify .Xr ugen 4 device name. -.It Fl I -Enable informational debugging. .It Fl f Ar firmware_path Specify the directory containing the firmware files to search and upload. .It Fl h Display usage message and exit. +.It Fl I +Enable informational debugging. .El .Sh EXIT STATUS .Ex -std From nobody Wed Jun 12 21:55:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqd6mhkz5NX1T; Wed, 12 Jun 2024 21:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqd2H2Wz4Q2y; Wed, 12 Jun 2024 21:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6+clVvk0nFYp7cvxewj9RR67prUvhIOODZyb8IfOcJ8=; b=dhyQs7o3pmNKOGwW2IBloew0UIM0sasNr+Y39dFPZZKC01h83vnq6sCh2Q3Brzt6RQkWSe YCP3lHlVesa6GC5uwaO5aahPZ4TicVaoRJoOmKOlk31noeye4fVxThF66LTPebzcjThjuA hdYI+UBlQgj7QwYVYOUG9D4KqLYcxWBByQUlpXgQErZsjRXYEzF1Evd9MD0Osxz+rVYtIN yi9AUggquW7D30XASxtcmbDulIQHhhJING3IEWrbq9FNNelPd55nQKLJo3208AuIkJymi/ 4vG5C0b5M7+WP+VgJQvSrtT9GzDK4KdBn7QkyaeuGIsvwdF9xw49hmiM4cwjKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229325; a=rsa-sha256; cv=none; b=AvmajXMA5qXZaNBBwo2MnZM99yBgCm+xCApK1l5Lb1iMKj8UD5Qt1u9OmZ8vQwQQbFr9xS TbHrqkW5Y+DJwPXAzXQkBse/+n115Xb3qXL+de86krffT3fzne0o20Ziw5kfB9Dpj9kQ+s XMNDTlsUk8Yp3K3UpVvESiNzPuWtWwGIdJdVC+UGqnshyHXivR8+MwNqZx7kdfhDvhLM+R QSU9/xgcWGAoQjaGLRSOc6JPYRlB1qKaC2m6035C0o/y3j3H/ye4O+K+SgC3VEL+HjJczj 6GvdRGqQC4cvHLslvSi7DbCEs8YNcX2pGiDDLxCI61MwUXQnrbXng3w0j10N5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6+clVvk0nFYp7cvxewj9RR67prUvhIOODZyb8IfOcJ8=; b=s0E1u8vD/HGGlwAqfKQ7YQzPtLdbJCSZKkSIwCmX+mu1SWR6Ip7gqp7CzepcI9CpCVLEtH H8jMMzT9Pc0b3BOfG4ydVR7qCvn6Vgs6PZw9iTQytJql9uWIdOSzzoth2yg3MNvmatJjmd xxo5Mw9xP9y/gENHSyrB01sstUeo/NQthkhvq0E7TZG9m8rO27q3ORxPhUitR/6VXv30p4 vWdNz1DzZuq/oRMAvAF06Ek6/vIwNeHn8rvV1FrX63YWjJKpOFQA3VpdgAnupo0t4W3rGc J1126E7As6KERmLKBKavpsrq5VVdh1q1lWAypkeRVRXfNH7PCNPsEQVbRUu+vQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqd1d1Fz18lD; Wed, 12 Jun 2024 21:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtPan075489; Wed, 12 Jun 2024 21:55:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtPXJ075486; Wed, 12 Jun 2024 21:55:25 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:25 GMT Message-Id: <202406122155.45CLtPXJ075486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: e366cf07bc64 - stable/14 - smbfs manuals: describe consistently List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e366cf07bc647948b3ae7861d24c0a1cc0570264 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e366cf07bc647948b3ae7861d24c0a1cc0570264 commit e366cf07bc647948b3ae7861d24c0a1cc0570264 Author: Alexander Ziaee AuthorDate: 2024-05-30 21:37:15 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:46:25 +0000 smbfs manuals: describe consistently MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/ (cherry picked from commit dddf29712f38ba1d804c02bcfd02d24098ae48b0) --- contrib/smbfs/mount_smbfs/mount_smbfs.8 | 3 +-- contrib/smbfs/smbutil/smbutil.1 | 2 +- share/man/man5/nsmb.conf.5 | 7 ++++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/smbfs/mount_smbfs/mount_smbfs.8 b/contrib/smbfs/mount_smbfs/mount_smbfs.8 index 4b4c205dc7da..604b1b414243 100644 --- a/contrib/smbfs/mount_smbfs/mount_smbfs.8 +++ b/contrib/smbfs/mount_smbfs/mount_smbfs.8 @@ -1,11 +1,10 @@ .\" $Id: mount_smbfs.8,v 1.10 2002/04/16 02:47:41 bp Exp $ -.\" $FreeBSD$ .Dd November 1, 2018 .Dt MOUNT_SMBFS 8 .Os .Sh NAME .Nm mount_smbfs -.Nd "mount a shared resource from an SMB file server" +.Nd mount a server message block (SMB1/CIFS) file system .Sh SYNOPSIS .Nm .Op Fl E Ar cs1 Ns Cm \&: Ns Ar cs2 diff --git a/contrib/smbfs/smbutil/smbutil.1 b/contrib/smbfs/smbutil/smbutil.1 index cf133bad309a..c82ba91ea99e 100644 --- a/contrib/smbfs/smbutil/smbutil.1 +++ b/contrib/smbfs/smbutil/smbutil.1 @@ -4,7 +4,7 @@ .Os .Sh NAME .Nm smbutil -.Nd "interface to the SMB requester" +.Nd interface to the server message block (SMB1/CIFS) requester .Sh SYNOPSIS .Nm .Op Fl hv diff --git a/share/man/man5/nsmb.conf.5 b/share/man/man5/nsmb.conf.5 index 1a09743874e5..0da10343ed77 100644 --- a/share/man/man5/nsmb.conf.5 +++ b/share/man/man5/nsmb.conf.5 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2003 .\" Originally written by Sergey A. Osokin .\" Rewritten by Tom Rhodes @@ -28,9 +31,7 @@ .Os .Sh NAME .Nm nsmb.conf -.Nd configuration file for -.Tn SMB -requests +.Nd configuration file for server message block (SMB1/CIFS) requests .Sh DESCRIPTION The .Nm From nobody Wed Jun 12 21:55:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqg0Cf9z5NXbm; Wed, 12 Jun 2024 21:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqf30HBz4Phd; Wed, 12 Jun 2024 21:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKhUsliUMUb6K0M4iO+Vw4lJ9g2jlwnDW8xgbqFDXPw=; b=hF9C9wqIrZAOPhUmrxU+a1RZQ5w2UNlihsrdT2tydCZFU9pAtr1ibxUyQ4NQpRMDHHziqI jeZoHlpLnPkadtBnsbI6b65+9iH52F/5iRjv5juF09Qq6SmoqaFHI4GenOXWFnT7CI/z/6 gFiz9zleCKXEWlfyuiXc5iGJQgIoyO7P05+S/UiWykJNJ2Bul2vZyebFUOHqKqfrVguuYT wprMltaV5Ktn0SosEmkUybatK3pUBbYERJ/kYmQZClVzsMNVwEIhEn4o/vXVQdd5Tt1Yqh aAHv+UdAvtAgQU3onc8ngAtLQOre4xshlJZaeq0DRsx5XNzYAKS6j3IoqEjK+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229326; a=rsa-sha256; cv=none; b=yNcKUY9mL7yx5AOp+0u1Xp1M4AYVpvmZRAOtAoEqMstl+x1MXWxhrp68R0FLDn6vIgJSqW Zjm6dcBux0iqyRncGTAuUoYnohH4KLg5Mm02PJBGs/jGOKrfFSvdH7BVSBm3VLSeRDuzte T9CoP5c8MaLatIGpmoJ8OrZgHIakR12SnEIYogTlYu9dkUTa1w4AXaazmwqwCCmRltxrKL VGftpQ+PnI1/0aAYEwFberWEkaX2S4GC6obv/M57B6/EISwdYzMfPIi+1RRmUqNUm9w0Fl fx7OG5k4x2ymrOi+UaTI61ZCqr3BWpi5hsRiUHbZuVTIZGZYpxIbghy9O3NihQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKhUsliUMUb6K0M4iO+Vw4lJ9g2jlwnDW8xgbqFDXPw=; b=mzsYb2hud+rDMGD94Rp/FHpTbpew3RANL5Zyp88WWpA3VCu6RwGtRIPkyPCxolsr9asJez kjWa3foFBQtJ6i1x6mJ3u3GVBzDjXrv7B9CYFRR4tFqddz7mLY7+2d6iM2CbbxpBN6IEA2 lYiW97XmoeNxm9fqg5SYxrpIQXXtX4ODTB8oSzYnJLcIEisuAJygEOE/CASHBJTOPiSNCx kslvGIlzQYYmvkxhDcQJbBZeZoblbFTkGoZsuX3LrqEfsMMv6TnMP+lUtXVB8QIBffIPiI 9GmvEmQa2jBf4fH5foojp3x/4F4IEcpDq8XRTMhlHZ0GRiT+oYkwSUYgxLilyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqf2Yjxz18gD; Wed, 12 Jun 2024 21:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtQKM075528; Wed, 12 Jun 2024 21:55:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtQDd075525; Wed, 12 Jun 2024 21:55:26 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:26 GMT Message-Id: <202406122155.45CLtQDd075525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 657a482888d4 - stable/14 - man bluetooth/fwdownloaders: terse descriptions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 657a482888d4465bfa6d2e90925406418e94bbc0 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=657a482888d4465bfa6d2e90925406418e94bbc0 commit 657a482888d4465bfa6d2e90925406418e94bbc0 Author: Alexander Ziaee AuthorDate: 2024-05-31 12:13:54 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:46:25 +0000 man bluetooth/fwdownloaders: terse descriptions + descriptions no longer wrap on a standard console, no keywords removed + more consistent language with other firmware tooling manuals MFC after: 3 days Reviewed by: imp (bumped date for Nd changes) Pull Request: https://github.com/freebsd/freebsd-src/pull/1266 (cherry picked from commit 2c901189bb65ea0bae03aa83459570a0f0ea0aa8) --- usr.sbin/bluetooth/ath3kfw/ath3kfw.8 | 4 ++-- usr.sbin/bluetooth/bcmfw/bcmfw.8 | 6 ++---- usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 index ed015bbf229d..beb1b102b194 100644 --- a/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 +++ b/usr.sbin/bluetooth/ath3kfw/ath3kfw.8 @@ -26,12 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 4, 2016 +.Dd May 31, 2024 .Dt ATH3KFW 8 .Os .Sh NAME .Nm ath3kfw -.Nd firmware download utility for Atheros AR3011/AR3012 chip based Bluetooth USB devices +.Nd download firmware for Atheros AR3011/AR3012 Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl DI diff --git a/usr.sbin/bluetooth/bcmfw/bcmfw.8 b/usr.sbin/bluetooth/bcmfw/bcmfw.8 index b9fa72706d2d..50e9739340ee 100644 --- a/usr.sbin/bluetooth/bcmfw/bcmfw.8 +++ b/usr.sbin/bluetooth/bcmfw/bcmfw.8 @@ -25,14 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: bcmfw.8,v 1.7 2003/05/21 00:33:40 max Exp $ -.\" -.Dd March 31, 2003 +.Dd May 31, 2024 .Dt BCMFW 8 .Os .Sh NAME .Nm bcmfw -.Nd firmware download utility for Broadcom BCM2033 chip based Bluetooth USB devices +.Nd download firmware for Broadcom BCM2033 Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl h diff --git a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 index 66517badd0fc..1924c5f3ce74 100644 --- a/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 +++ b/usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8 @@ -26,13 +26,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 3, 2021 +.Dd May 31, 2024 .Dt IWMBTFW 8 .Os .Sh NAME .Nm iwmbtfw -.Nd firmware download utility for Intel Wireless 7260/8260/8265 chip based Bluetooth -USB devices +.Nd download firmware for Intel Wireless AC Bluetooth USB devices .Sh SYNOPSIS .Nm .Op Fl DI From nobody Wed Jun 12 21:55:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqh0xkBz5NXR5; Wed, 12 Jun 2024 21:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqg3gv8z4Q70; Wed, 12 Jun 2024 21:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gNcg8w9EUlTAnZQQzETqKmSbicWWjw7shPvkx88B7mc=; b=cX4yYPrW0cE+oDlWqhgA64WU1jGjbBKJvvn1mCILXMzUb6Lizuc9KKfpC8QweH/WdvHRHp 1ChVb6iOWE64fM2odg2n69MOl9Tpk2Rrvqe4yi+/n9P7pD2Pe7EJv6VHRa6v0Fd/R5m50N nnHYE90pZ2suDvuAfzO5e+zc9/0E9Sq/cH/+8d1zzlWUb7aW1wrQXGFYz01VeL9Ux043E3 otjMupN2ZV3HBETvQWwgxABH3v1tmpG0gZ+mUZ8sVC2ZQ9/hVgnc/sXDu6y0SfUpUS4NP/ w5ppMnpg9U/fnwbxym/I4qcp9JQe1fxyctqbcp0mM09IVMl0XcObBYTLfGW7Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229327; a=rsa-sha256; cv=none; b=B1GtlARgfAxrryBHvoJCFVwKkwaj9SzMjjp77eaOXMbX9s83knifWZEt/NNbiFYUHEHMMD u9vzXalcC31+VKzMRnSUJJFwZ9EJzNmUpiTkNNzULZoCGj1HC1BfjR6FwIRbkhIFbR6a4S w36IuIcjQ7K9wFhMmsXh1yb5/gjdimq0YCVM7CWoY+8nxfcjOn6xVSscQJhO1o9Jak2HI5 dDLxen2JU8261YYqb2beFtdV0UYyg6QFgiZmMNdh+LDgduGAybkwysd6IDLp8JO4MrKHwq k7HjCcxiwT8RPLTyskEAX760DbPaiU2U7CjHfJZIKuH9ZuoKRe3NNs2+HQWm+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gNcg8w9EUlTAnZQQzETqKmSbicWWjw7shPvkx88B7mc=; b=a+9iWMxSHUXTAhALtOm0MEH85OpUXrEk16fIyg1sxQ7N2pSjT1Kv5ntlN7hMcJZLotDK7I nG4QVKZPseccxj+PPTSxjTuC/gyvavKM68ejt/M1Ati/HSXGOO5A8mSkNWwDBGZ/120mLS 1UiJ+/wW/EnfKtfTirhsBjL1I+KHp9BdYZQ9TjP9QwkvnCxMkBfbuXBt2uhXgwl1ILM5j6 ZaeAJE88XJmjtl+H4uHMnvHiniHm6QCA9Kleurjl1kH6fM0ocK3lpTZYA2F1ejFpLwme7Q 8Nzo6/IqduTAO5gIX/pRmrtskqYsj6/WzLPH8VKds2GfpP5s259ipjjE6M1+mA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqg3HjJz197D; Wed, 12 Jun 2024 21:55:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtRMS075576; Wed, 12 Jun 2024 21:55:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtRhs075573; Wed, 12 Jun 2024 21:55:27 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:27 GMT Message-Id: <202406122155.45CLtRhs075573@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: aeaff9c5deac - stable/14 - smbus manuals: include term SMBus in description List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: aeaff9c5deacd552eb0dbdfcd6731487e1e14b51 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=aeaff9c5deacd552eb0dbdfcd6731487e1e14b51 commit aeaff9c5deacd552eb0dbdfcd6731487e1e14b51 Author: Alexander Ziaee AuthorDate: 2024-05-30 21:58:20 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:53:22 +0000 smbus manuals: include term SMBus in description Fixes: 5ad3b09f2fe9 (smb: distinguishable descriptions) MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/ (cherry picked from commit 8ccdf86ee57575b04983bc7be68c357fb83668f8) --- share/man/man4/iicsmb.4 | 8 +++++--- share/man/man4/smb.4 | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/share/man/man4/iicsmb.4 b/share/man/man4/iicsmb.4 index b6f5e39ce5cc..ffa38000659f 100644 --- a/share/man/man4/iicsmb.4 +++ b/share/man/man4/iicsmb.4 @@ -1,5 +1,7 @@ -.\" Copyright (c) 1998, Nicolas Souchu -.\" All rights reserved. +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 1998, Nicolas Souchu. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -27,7 +29,7 @@ .Os .Sh NAME .Nm iicsmb -.Nd I2C to SMB bridge +.Nd I2C to SMBus bridge .Sh SYNOPSIS .Cd "device iicsmb" .Pp diff --git a/share/man/man4/smb.4 b/share/man/man4/smb.4 index d2a1c3b9a618..bec89d8cb05f 100644 --- a/share/man/man4/smb.4 +++ b/share/man/man4/smb.4 @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm smb -.Nd SMB generic I/O device driver +.Nd System Management Bus (SMBus) generic I/O device driver .Sh SYNOPSIS .Cd "device smb" .Sh DESCRIPTION From nobody Wed Jun 12 21:55:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vzzqh729dz5NXR7; Wed, 12 Jun 2024 21:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vzzqh51z8z4Q3B; Wed, 12 Jun 2024 21:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3zBWgrXciGEQQntZxZkB63ZLVZabMmxor30K9QM+92g=; b=mkZOo1+34JaDDU46wSONqsrLGyjmD5XLnHQZrkqrbAcLoDRljf63yVzuoJhrR/jqoC5/aM 5Pm8MTANE1HnxAde9Kb93wKIohto5M3XYqF9YbXQGIPm3mQDVqMoNRHSCiFpJ7ZoBN7YBs vvLGN8C25AyDwrH42uyL/DOZFRF/jJEtYD4RFUVok9yaIjR5tAO9wGRYIOGwNobNUjUxUi E3fxpzfwlJdX6T3K5iq+qwl0ruurRor0+SnhhqF52PC2Ob5k4X7++wHhjFBFYSgajmomRu TnZMR9HrCgJ1ccRsLmr8/rSneC3k1fGN+Ej71a33lK7YjnL9P9Rm6a+6EcuuGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718229328; a=rsa-sha256; cv=none; b=r5y5v+8Y9TDgQU/Ut16tzl/0vTWgwYRot9bYOTuHrH/oNcE9hdFKJ0O98/VluZT59+0xeu AZtSegw68zNWFxZhW+JMQ6P8RVzvFGXPTQ57hHME43CPV3v9QmQjh5T5c+NEY4rx4+Ie5c 1GjQpQGrViV3gB/87aQeQCCXV3ArtWWAhUqAsTdRz9wKyprJ7GuNwog0j4NjE79WHB8RJ4 Ijjm1sq0Eoh71WYiknk5RmZnohgPz/MHgkZD03poOKsq9HQlfQ7iKhEn5dXmc3jB2YZIDf IMi9MAz31ypIk+7XTL5KHev/Y93Bl8F9amHsUcjOE+mzOnB7xADXIrhHSvCmmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718229328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3zBWgrXciGEQQntZxZkB63ZLVZabMmxor30K9QM+92g=; b=dPpzWwKIiF1miQpSukfTLG0X3FB/vToemuhef6JtlcBPWFoo+NfHw7R2UQVS1OlnWQEgH/ VobLox8GZBCj/RPp0xzuB2jzP7NKHtot+GNqnmvCuctCNcHw4QfEC7rrgu/Xumatn4AhMB MV2W1GPnFsRktKcznL8Mfa1ScONVUHJHWb9/MMFZAVWRNE2sFkLojbQ9CnRNTJ42q1GtZW I353zrf1B4XBYiRCrx/7XJVvoMQwyHc5WmhY6M55iOYHM9NphsdtBPucNCp/N3ezeQi6sZ WF9m81Uu08hY9T4XLa8+R2gtkeLIcSEquR1t+pbwCg1H3KXbuLd87WaI4pEC6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vzzqh4d37z19D1; Wed, 12 Jun 2024 21:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CLtSCc075627; Wed, 12 Jun 2024 21:55:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CLtSrA075624; Wed, 12 Jun 2024 21:55:28 GMT (envelope-from git) Date: Wed, 12 Jun 2024 21:55:28 GMT Message-Id: <202406122155.45CLtSrA075624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 170a7f2ec185 - stable/14 - ifconfig(8): wordsmith -G and -g descriptions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 170a7f2ec18570e11b6b8530ce746d33119d9a6a Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=170a7f2ec18570e11b6b8530ce746d33119d9a6a commit 170a7f2ec18570e11b6b8530ce746d33119d9a6a Author: Pau Amma AuthorDate: 2024-06-06 21:12:53 +0000 Commit: Warner Losh CommitDate: 2024-06-12 21:53:56 +0000 ifconfig(8): wordsmith -G and -g descriptions Remove spurious ".Ar groupname". Add missing full stops. While there, tweak word order for better grammar. MFC after: 3 days Reviewed by: Alexander Ziaee, Mina Galić, allanjude, imp Differential Revision: https://reviews.freebsd.org/D45092 (cherry picked from commit 21faf821a3046f2522dc8d49797f1c1ec74c6b0f) --- sbin/ifconfig/ifconfig.8 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index fa463ad8af5d..259be41bf94b 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -25,9 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 -.\" -.Dd May 12, 2024 +.Dd June 6, 2024 .Dt IFCONFIG 8 .Os .Sh NAME @@ -216,11 +217,10 @@ Shortcut notation for Exclude members of the specified .Ar groupname from the output. -.Ar groupname . .Pp -Only one option +Only one .Fl G -should be specified as later override previous ones +option should be specified as later ones override earlier ones. .Ar groupname may contain shell patterns in which case it should be quoted. .Pp @@ -246,9 +246,9 @@ lists names of interfaces belonging to .Ar groupname . Any other flags and arguments are ignored in this case. .Pp -Only one option +Only one .Fl g -should be specified as later override previous ones +option should be specified as later ones override earlier ones. .Ar groupname may contain shell patterns in which case it should be quoted. .Pp From nobody Wed Jun 12 22:19:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W00Ly1Dn4z5NYxS; Wed, 12 Jun 2024 22:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W00Ly0hfVz4TJn; Wed, 12 Jun 2024 22:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718230746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kfnUq+pAVF1R8ryEaIZNntI136d/dS5wVd/qnR6gtHY=; b=A5s2GvLfmyJMMsRx67LN295/OcxoTYLR2pPYQINfCAPntV2zyhf4EI1pWMGcQGfeNIUpvh L257uX5Y8r8XCbsMEb3dHnzxoBYoYkcP2Ek+axM8yEDU50X3MvArdIMkJxRJps4emL8BPV 3opYVczSflo36amhmyfPMjPjznsuL+xdeY8UsNNbB6oGcUx38j9qK5VrlDggqWIFmZIUl9 WsSU3AQq2DSykidPqFYmPWngagcdqun+zQHdwSvmQRyGKop00ZTS4HC5Sxb7B4IOdMLwVw 2lt0BDiJqXpchEbQfZethhq0d5ZRNxRtl2e0vqNWkhBavXWaGmOcQwczKPaFSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718230746; a=rsa-sha256; cv=none; b=Qkz/CQV/uYATotHUPOnqROL3oRoHlvw4tLdNk8+9UAzQZX/fjErkZVyPDLLHF1dQQnNapL Z0sdqY8dcRdOQogUPlfby9qjcdLaLJnJ0D2BXBBPgNQwXK6UsEos9kgUNbTfwLrU+aQo8s F6QFEqr85RwkLqvGxRvDhuJ3klzEEIrSA+MZiQxuJD3bPsm1LiLml4AjEd3J1ldhtIkh96 IElV46IYPJR7YkGdNUG8VEK/QCs/Ep8Ci673hFYPwvsd3/bpb9rjb8bIzsEdddVOcfaE+J YWHNOaunFKsz2jnli9mNcy5uUwNwJC/r/Ve2ZF1fyUSu7IKkG7KImQTXmacGPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718230746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kfnUq+pAVF1R8ryEaIZNntI136d/dS5wVd/qnR6gtHY=; b=nD6QUHs4BV5pideTEBkkvMndCbSqz5TYFYqa4AP9rIQEqPQhHVBpYlsM7aDQsafLulbFND q5vPQoCTVbqpZLDoiuif4BBmBm2dqlZAQO7vusJ6p4KQl3NrLtwd4GB1ZYYrRmXIu3+Jnt N7X54GbxAllwKB22NLvxk0+dl7y/l3UBc4LtoX6UzrLiFNtvl8wE+rJuyWFOjCPzQp1TbQ wpIu6k72bzChTbAgbuMPTITKl/34XPToWGMsMjmgEHtvVQtg83pqOvdQwLIP8wX6NbNZp1 wlx3Ce6aFM5VS4TtZwVEsMw/focrF81XJM9/9rv2HDQqaFCrb6nh17fIAUf2Gg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W00Ly08pdz19ZY; Wed, 12 Jun 2024 22:19:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45CMJ5gQ010485; Wed, 12 Jun 2024 22:19:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45CMJ57g010482; Wed, 12 Jun 2024 22:19:05 GMT (envelope-from git) Date: Wed, 12 Jun 2024 22:19:05 GMT Message-Id: <202406122219.45CMJ57g010482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f9ac06af3b2d - stable/13 - net80211: move net_epoch into net80211 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f9ac06af3b2dec6ac75f5639cb1396f9d943fc06 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f9ac06af3b2dec6ac75f5639cb1396f9d943fc06 commit f9ac06af3b2dec6ac75f5639cb1396f9d943fc06 Author: Bjoern A. Zeeb AuthorDate: 2023-10-29 14:25:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-06-12 22:18:50 +0000 net80211: move net_epoch into net80211 Move the net_epoch into net80211 around the if_input calls and out of the driver (in this first case LinuxKPI). This reduces coverage but also allows us to alloc in calls like (*ampdu_rx_start) which do not actually pass data up the stack. The follow-up commits (squashed) reverts: b65f813c1ab99448278961c5ca80dc422b1eae29 Revert "Widen EPOCH(9) usage in PCI WLAN drivers.", 21c4082de9e2cf9a0fd81a9a981ab06022956847 Revert "Widen EPOCH(9) usage in USB WLAN drivers.", 17c328b6aebfa03cd1c2cbfbbc617e3b341bf1e4 Revert "Enter the network epoch in USB WiFi drivers when processing input", af2441fbc7fa9e522e7f8697e5a181bdd4ff9e00 Revert "[ath] Attempt to fix epoch handling.", and 6c3e93cb5a4aa4b8a2d8d4d326f2a7c34d3a4458 for if_ath.c only ath: Revert "Use NET_TASK_INIT() and NET_GROUPTASK_INIT() for drivers that process". Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42427 (cherry picked from commit de607e3c230be88f6232b9c9fd6c37199648dc8c) (cherry picked from commit 1c6dd33d26eb02c6145383a49150965eeca61120) (cherry picked from commit 39b702797994fbd62a21dd3af6d4cd7045fded23) (cherry picked from commit 75f298492a12d53df97c26963ec9f2dc0b052878) (cherry picked from commit eb3821e6d92fa45ece7ec08efde45e35be1bdc95) (cherry picked from commit 82506f26c03aa312b91e01a797f31e061749a76d) --- sys/compat/linuxkpi/common/src/linux_80211.c | 3 --- sys/dev/ath/if_ath_rx.c | 11 +---------- sys/dev/ath/if_ath_rx_edma.c | 4 ---- sys/dev/bwi/if_bwi.c | 3 --- sys/dev/bwn/if_bwn.c | 3 --- sys/dev/ipw/if_ipw.c | 3 --- sys/dev/iwi/if_iwi.c | 3 --- sys/dev/iwm/if_iwm.c | 5 ----- sys/dev/iwn/if_iwn.c | 3 --- sys/dev/malo/if_malo.c | 3 --- sys/dev/mwl/if_mwl.c | 4 ---- sys/dev/otus/if_otus.c | 3 --- sys/dev/ral/rt2560.c | 4 +--- sys/dev/ral/rt2661.c | 3 --- sys/dev/ral/rt2860.c | 3 --- sys/dev/rtwn/pci/rtwn_pci_rx.c | 5 ----- sys/dev/rtwn/usb/rtwn_usb_rx.c | 3 --- sys/dev/usb/wlan/if_rsu.c | 3 --- sys/dev/usb/wlan/if_rum.c | 3 --- sys/dev/usb/wlan/if_run.c | 3 --- sys/dev/usb/wlan/if_uath.c | 3 --- sys/dev/usb/wlan/if_upgt.c | 3 --- sys/dev/usb/wlan/if_ural.c | 3 --- sys/dev/usb/wlan/if_urtw.c | 3 --- sys/dev/usb/wlan/if_zyd.c | 3 --- sys/dev/wpi/if_wpi.c | 3 --- sys/dev/wtap/if_wtap.c | 5 +---- sys/net80211/ieee80211_hostap.c | 4 ++++ sys/net80211/ieee80211_input.c | 3 +++ 29 files changed, 10 insertions(+), 95 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index b48f64fb1b0f..df72495e68b6 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4802,7 +4802,6 @@ linuxkpi_ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_sta *sta, struct napi_struct *napi __unused, struct list_head *list __unused) { - struct epoch_tracker et; struct lkpi_hw *lhw; struct ieee80211com *ic; struct mbuf *m; @@ -5021,7 +5020,6 @@ skip_device_ts: } #endif - NET_EPOCH_ENTER(et); if (ni != NULL) { ok = ieee80211_input_mimo(ni, m); ieee80211_free_node(ni); @@ -5031,7 +5029,6 @@ skip_device_ts: ok = ieee80211_input_mimo_all(ic, m); /* mbuf got consumed. */ } - NET_EPOCH_EXIT(et); #ifdef LINUXKPI_DEBUG_80211 if (linuxkpi_debug_80211 & D80211_TRACE_RX) diff --git a/sys/dev/ath/if_ath_rx.c b/sys/dev/ath/if_ath_rx.c index 44edc75a5f09..586a56d8120e 100644 --- a/sys/dev/ath/if_ath_rx.c +++ b/sys/dev/ath/if_ath_rx.c @@ -666,8 +666,6 @@ ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, int is_good = 0; struct ath_rx_edma *re = &sc->sc_rxedma[qtype]; - NET_EPOCH_ASSERT(); - /* * Calculate the correct 64 bit TSF given * the TSF64 register value and rs_tstamp. @@ -1089,8 +1087,6 @@ ath_rx_proc(struct ath_softc *sc, int resched) int kickpcu = 0; int ret; - NET_EPOCH_ASSERT(); - /* XXX we must not hold the ATH_LOCK here */ ATH_UNLOCK_ASSERT(sc); ATH_PCU_UNLOCK_ASSERT(sc); @@ -1310,7 +1306,6 @@ static void ath_legacy_rx_tasklet(void *arg, int npending) { struct ath_softc *sc = arg; - struct epoch_tracker et; ATH_KTR(sc, ATH_KTR_RXPROC, 1, "ath_rx_proc: pending=%d", npending); DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: pending %u\n", __func__, npending); @@ -1323,18 +1318,14 @@ ath_legacy_rx_tasklet(void *arg, int npending) } ATH_PCU_UNLOCK(sc); - NET_EPOCH_ENTER(et); ath_rx_proc(sc, 1); - NET_EPOCH_EXIT(et); } static void ath_legacy_flushrecv(struct ath_softc *sc) { - struct epoch_tracker et; - NET_EPOCH_ENTER(et); + ath_rx_proc(sc, 0); - NET_EPOCH_EXIT(et); } static void diff --git a/sys/dev/ath/if_ath_rx_edma.c b/sys/dev/ath/if_ath_rx_edma.c index 6c722ca8275f..fb25fb77b062 100644 --- a/sys/dev/ath/if_ath_rx_edma.c +++ b/sys/dev/ath/if_ath_rx_edma.c @@ -555,7 +555,6 @@ ath_edma_recv_proc_deferred_queue(struct ath_softc *sc, HAL_RX_QUEUE qtype, int16_t nf; ath_bufhead rxlist; struct mbuf *m; - struct epoch_tracker et; TAILQ_INIT(&rxlist); @@ -572,8 +571,6 @@ ath_edma_recv_proc_deferred_queue(struct ath_softc *sc, HAL_RX_QUEUE qtype, TAILQ_CONCAT(&rxlist, &sc->sc_rx_rxlist[qtype], bf_list); ATH_RX_UNLOCK(sc); - NET_EPOCH_ENTER(et); - /* Handle the completed descriptors */ /* * XXX is this SAFE call needed? The ath_buf entries @@ -597,7 +594,6 @@ ath_edma_recv_proc_deferred_queue(struct ath_softc *sc, HAL_RX_QUEUE qtype, if (ngood) { sc->sc_lastrx = tsf; } - NET_EPOCH_EXIT(et); ATH_KTR(sc, ATH_KTR_INTERRUPTS, 1, "ath edma rx deferred proc: ngood=%d\n", diff --git a/sys/dev/bwi/if_bwi.c b/sys/dev/bwi/if_bwi.c index ff7038546771..8770353f0c5a 100644 --- a/sys/dev/bwi/if_bwi.c +++ b/sys/dev/bwi/if_bwi.c @@ -1503,7 +1503,6 @@ bwi_stop_locked(struct bwi_softc *sc, int statechg) void bwi_intr(void *xsc) { - struct epoch_tracker et; struct bwi_softc *sc = xsc; struct bwi_mac *mac; uint32_t intr_status; @@ -1623,9 +1622,7 @@ bwi_intr(void *xsc) device_printf(sc->sc_dev, "intr noise\n"); if (txrx_intr_status[0] & BWI_TXRX_INTR_RX) { - NET_EPOCH_ENTER(et); rx_data = sc->sc_rxeof(sc); - NET_EPOCH_EXIT(et); if (sc->sc_flags & BWI_F_STOP) { BWI_UNLOCK(sc); return; diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c index b90dc2dbeab7..caa8206cf413 100644 --- a/sys/dev/bwn/if_bwn.c +++ b/sys/dev/bwn/if_bwn.c @@ -5073,7 +5073,6 @@ bwn_intr(void *arg) static void bwn_intrtask(void *arg, int npending) { - struct epoch_tracker et; struct bwn_mac *mac = arg; struct bwn_softc *sc = mac->mac_sc; uint32_t merged = 0; @@ -5134,7 +5133,6 @@ bwn_intrtask(void *arg, int npending) if (mac->mac_reason_intr & BWN_INTR_NOISESAMPLE_OK) bwn_intr_noise(mac); - NET_EPOCH_ENTER(et); if (mac->mac_flags & BWN_MAC_FLAG_DMA) { if (mac->mac_reason[0] & BWN_DMAINTR_RX_DONE) { bwn_dma_rx(mac->mac_method.dma.rx); @@ -5142,7 +5140,6 @@ bwn_intrtask(void *arg, int npending) } } else rx = bwn_pio_rx(&mac->mac_method.pio.rx); - NET_EPOCH_EXIT(et); KASSERT(!(mac->mac_reason[1] & BWN_DMAINTR_RX_DONE), ("%s", __func__)); KASSERT(!(mac->mac_reason[2] & BWN_DMAINTR_RX_DONE), ("%s", __func__)); diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c index 2581f13ac3eb..fd4089b7eb54 100644 --- a/sys/dev/ipw/if_ipw.c +++ b/sys/dev/ipw/if_ipw.c @@ -1158,7 +1158,6 @@ static void ipw_rx_data_intr(struct ipw_softc *sc, struct ipw_status *status, struct ipw_soft_bd *sbd, struct ipw_soft_buf *sbuf) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct mbuf *mnew, *m; struct ieee80211_node *ni; @@ -1230,13 +1229,11 @@ ipw_rx_data_intr(struct ipw_softc *sc, struct ipw_status *status, IPW_UNLOCK(sc); ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi - nf, nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi - nf, nf); - NET_EPOCH_EXIT(et); IPW_LOCK(sc); bus_dmamap_sync(sc->rbd_dmat, sc->rbd_map, BUS_DMASYNC_PREWRITE); diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c index fc9677c6a3d6..57249d288acb 100644 --- a/sys/dev/iwi/if_iwi.c +++ b/sys/dev/iwi/if_iwi.c @@ -1179,7 +1179,6 @@ static void iwi_frame_intr(struct iwi_softc *sc, struct iwi_rx_data *data, int i, struct iwi_frame *frame) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct mbuf *mnew, *m; struct ieee80211_node *ni; @@ -1269,13 +1268,11 @@ iwi_frame_intr(struct iwi_softc *sc, struct iwi_rx_data *data, int i, IWI_UNLOCK(sc); ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); - NET_EPOCH_ENTER(et); if (ni != NULL) { type = ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else type = ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); IWI_LOCK(sc); if (sc->sc_softled) { diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index f4af7b1f315b..df6b37d33ce5 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -3467,7 +3467,6 @@ static bool iwm_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset, bool stolen) { - struct epoch_tracker et; struct ieee80211com *ic; struct ieee80211_frame *wh; struct ieee80211_node *ni; @@ -3487,8 +3486,6 @@ iwm_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset, ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); IWM_UNLOCK(sc); - - NET_EPOCH_ENTER(et); if (ni != NULL) { IWM_DPRINTF(sc, IWM_DEBUG_RECV, "input m %p\n", m); ieee80211_input_mimo(ni, m); @@ -3497,8 +3494,6 @@ iwm_rx_mpdu(struct iwm_softc *sc, struct mbuf *m, uint32_t offset, IWM_DPRINTF(sc, IWM_DEBUG_RECV, "inputall m %p\n", m); ieee80211_input_mimo_all(ic, m); } - NET_EPOCH_EXIT(et); - IWM_LOCK(sc); return true; diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 4091bf135ae1..8433c16cce23 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -3020,7 +3020,6 @@ static void iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, struct iwn_rx_data *data) { - struct epoch_tracker et; struct iwn_ops *ops = &sc->ops; struct ieee80211com *ic = &sc->sc_ic; struct iwn_rx_ring *ring = &sc->rxq; @@ -3180,7 +3179,6 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, } IWN_UNLOCK(sc); - NET_EPOCH_ENTER(et); /* Send the frame to the 802.11 layer. */ if (ni != NULL) { @@ -3192,7 +3190,6 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, } else (void)ieee80211_input_all(ic, m, rssi - nf, nf); - NET_EPOCH_EXIT(et); IWN_LOCK(sc); DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end\n",__func__); diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c index 17c1c5145ee3..5f8a4c0b4099 100644 --- a/sys/dev/malo/if_malo.c +++ b/sys/dev/malo/if_malo.c @@ -1935,7 +1935,6 @@ malo_set_channel(struct ieee80211com *ic) static void malo_rx_proc(void *arg, int npending) { - struct epoch_tracker et; struct malo_softc *sc = arg; struct ieee80211com *ic = &sc->malo_ic; struct malo_rxbuf *bf; @@ -2068,13 +2067,11 @@ malo_rx_proc(void *arg, int npending) /* dispatch */ ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, ds->nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, ds->nf); - NET_EPOCH_EXIT(et); rx_next: /* NB: ignore ENOMEM so we process more descriptors */ (void) malo_rxbuf_init(sc, bf); diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c index 69489d5ee2ec..5d726cbb18fe 100644 --- a/sys/dev/mwl/if_mwl.c +++ b/sys/dev/mwl/if_mwl.c @@ -2604,7 +2604,6 @@ cvtrssi(uint8_t ssi) static void mwl_rx_proc(void *arg, int npending) { - struct epoch_tracker et; struct mwl_softc *sc = arg; struct ieee80211com *ic = &sc->sc_ic; struct mwl_rxbuf *bf; @@ -2793,8 +2792,6 @@ mwl_rx_proc(void *arg, int npending) /* dispatch */ ni = ieee80211_find_rxnode(ic, (const struct ieee80211_frame_min *) wh); - - NET_EPOCH_ENTER(et); if (ni != NULL) { mn = MWL_NODE(ni); #ifdef MWL_ANT_INFO_SUPPORT @@ -2810,7 +2807,6 @@ mwl_rx_proc(void *arg, int npending) ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); rx_next: /* NB: ignore ENOMEM so we process more descriptors */ (void) mwl_rxbuf_init(sc, bf); diff --git a/sys/dev/otus/if_otus.c b/sys/dev/otus/if_otus.c index 4696cfa08d2b..9fb2af8aed90 100644 --- a/sys/dev/otus/if_otus.c +++ b/sys/dev/otus/if_otus.c @@ -1804,7 +1804,6 @@ otus_rxeof(struct usb_xfer *xfer, struct otus_data *data, struct mbufq *rxq) static void otus_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) { - struct epoch_tracker et; struct otus_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; @@ -1855,7 +1854,6 @@ tr_setup: * callback and safe to unlock. */ OTUS_UNLOCK(sc); - NET_EPOCH_ENTER(et); while ((m = mbufq_dequeue(&scrx)) != NULL) { wh = mtod(m, struct ieee80211_frame *); ni = ieee80211_find_rxnode(ic, @@ -1868,7 +1866,6 @@ tr_setup: } else (void)ieee80211_input_mimo_all(ic, m); } - NET_EPOCH_EXIT(et); #ifdef IEEE80211_SUPPORT_SUPERG ieee80211_ff_age_all(ic, 100); #endif diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c index 4ae46b66ae49..d7cafe1994c9 100644 --- a/sys/dev/ral/rt2560.c +++ b/sys/dev/ral/rt2560.c @@ -1083,7 +1083,6 @@ rt2560_prio_intr(struct rt2560_softc *sc) static void rt2560_decryption_intr(struct rt2560_softc *sc) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct rt2560_rx_desc *desc; struct rt2560_rx_data *data; @@ -1194,13 +1193,12 @@ rt2560_decryption_intr(struct rt2560_softc *sc) wh = mtod(m, struct ieee80211_frame *); ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); + RAL_LOCK(sc); sc->sc_flags &= ~RT2560_F_INPUT_RUNNING; skip: desc->flags = htole32(RT2560_RX_BUSY); diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c index 14bd808a6a7f..1194ef12189f 100644 --- a/sys/dev/ral/rt2661.c +++ b/sys/dev/ral/rt2661.c @@ -955,7 +955,6 @@ rt2661_tx_dma_intr(struct rt2661_softc *sc, struct rt2661_tx_ring *txq) static void rt2661_rx_intr(struct rt2661_softc *sc) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct rt2661_rx_desc *desc; struct rt2661_rx_data *data; @@ -1072,13 +1071,11 @@ rt2661_rx_intr(struct rt2661_softc *sc) /* send the frame to the 802.11 layer */ ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); RAL_LOCK(sc); sc->sc_flags &= ~RAL_INPUT_RUNNING; diff --git a/sys/dev/ral/rt2860.c b/sys/dev/ral/rt2860.c index 1a1047e26097..122764012ce3 100644 --- a/sys/dev/ral/rt2860.c +++ b/sys/dev/ral/rt2860.c @@ -1176,7 +1176,6 @@ rt2860_maxrssi_chain(struct rt2860_softc *sc, const struct rt2860_rxwi *rxwi) static void rt2860_rx_intr(struct rt2860_softc *sc) { - struct epoch_tracker et; struct rt2860_rx_radiotap_header *tap; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; @@ -1324,13 +1323,11 @@ rt2860_rx_intr(struct rt2860_softc *sc) /* send the frame to the 802.11 layer */ ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void)ieee80211_input(ni, m, rssi - nf, nf); ieee80211_free_node(ni); } else (void)ieee80211_input_all(ic, m, rssi - nf, nf); - NET_EPOCH_EXIT(et); RAL_LOCK(sc); diff --git a/sys/dev/rtwn/pci/rtwn_pci_rx.c b/sys/dev/rtwn/pci/rtwn_pci_rx.c index 3bc033716a9e..7f06725afb0e 100644 --- a/sys/dev/rtwn/pci/rtwn_pci_rx.c +++ b/sys/dev/rtwn/pci/rtwn_pci_rx.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include @@ -83,7 +82,6 @@ rtwn_pci_setup_rx_desc(struct rtwn_pci_softc *pc, static void rtwn_pci_rx_frame(struct rtwn_pci_softc *pc) { - struct epoch_tracker et; struct rtwn_softc *sc = &pc->pc_sc; struct rtwn_rx_ring *ring = &pc->rx_ring; struct rtwn_rx_stat_pci *rx_desc = &ring->desc[ring->cur]; @@ -163,15 +161,12 @@ rtwn_pci_rx_frame(struct rtwn_pci_softc *pc) /* Send the frame to the 802.11 layer. */ RTWN_UNLOCK(sc); - - NET_EPOCH_ENTER(et); if (ni != NULL) { (void)ieee80211_input_mimo(ni, m); /* Node is no longer needed. */ ieee80211_free_node(ni); } else (void)ieee80211_input_mimo_all(ic, m); - NET_EPOCH_EXIT(et); RTWN_LOCK(sc); diff --git a/sys/dev/rtwn/usb/rtwn_usb_rx.c b/sys/dev/rtwn/usb/rtwn_usb_rx.c index 30921bdc2101..5db967ddcc18 100644 --- a/sys/dev/rtwn/usb/rtwn_usb_rx.c +++ b/sys/dev/rtwn/usb/rtwn_usb_rx.c @@ -361,7 +361,6 @@ rtwn_rx_frame(struct rtwn_softc *sc, struct mbuf *m) void rtwn_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) { - struct epoch_tracker et; struct rtwn_usb_softc *uc = usbd_xfer_softc(xfer); struct rtwn_softc *sc = &uc->uc_sc; struct ieee80211com *ic = &sc->sc_ic; @@ -404,7 +403,6 @@ tr_setup: m->m_pkthdr.PH_loc.ptr = rtwn_rx_frame(sc, m); m = m->m_nextpkt; } - NET_EPOCH_ENTER(et); RTWN_UNLOCK(sc); m = m0; while (m != NULL) { @@ -422,7 +420,6 @@ tr_setup: m = next; } RTWN_LOCK(sc); - NET_EPOCH_EXIT(et); break; default: /* needs it to the inactive queue due to a error. */ diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c index dd23f313a524..1cb38f3d40b3 100644 --- a/sys/dev/usb/wlan/if_rsu.c +++ b/sys/dev/usb/wlan/if_rsu.c @@ -2555,7 +2555,6 @@ rsu_rxeof(struct usb_xfer *xfer, struct rsu_data *data) static void rsu_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) { - struct epoch_tracker et; struct rsu_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; @@ -2590,7 +2589,6 @@ tr_setup: * ieee80211_input() because here is at the end of a USB * callback and safe to unlock. */ - NET_EPOCH_ENTER(et); while (m != NULL) { next = m->m_next; m->m_next = NULL; @@ -2609,7 +2607,6 @@ tr_setup: RSU_LOCK(sc); m = next; } - NET_EPOCH_EXIT(et); break; default: /* needs it to the inactive queue due to a error. */ diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c index 364f02393d8d..f97e7e477026 100644 --- a/sys/dev/usb/wlan/if_rum.c +++ b/sys/dev/usb/wlan/if_rum.c @@ -1168,7 +1168,6 @@ rum_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame_min *wh; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct usb_page_cache *pc; uint32_t flags; @@ -1287,7 +1286,6 @@ tr_setup: else ni = NULL; - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, RT2573_NOISE_FLOOR); @@ -1295,7 +1293,6 @@ tr_setup: } else (void) ieee80211_input_all(ic, m, rssi, RT2573_NOISE_FLOOR); - NET_EPOCH_EXIT(et); } RUM_LOCK(sc); rum_start(sc); diff --git a/sys/dev/usb/wlan/if_run.c b/sys/dev/usb/wlan/if_run.c index 8eca1a8ab0b4..9df50534ec00 100644 --- a/sys/dev/usb/wlan/if_run.c +++ b/sys/dev/usb/wlan/if_run.c @@ -2870,7 +2870,6 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uint32_t dmalen) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; struct ieee80211_node *ni; - struct epoch_tracker et; struct rt2870_rxd *rxd; struct rt2860_rxwi *rxwi; uint32_t flags; @@ -2993,14 +2992,12 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uint32_t dmalen) } } - NET_EPOCH_ENTER(et); if (ni != NULL) { (void)ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else { (void)ieee80211_input_all(ic, m, rssi, nf); } - NET_EPOCH_EXIT(et); return; diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index 86c7eb6b2bdd..7d5e50590ea2 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -2703,7 +2703,6 @@ uath_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct uath_data *data; struct uath_rx_desc *desc = NULL; @@ -2750,7 +2749,6 @@ setup: ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); nf = -95; /* XXX */ - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, (int)be32toh(desc->rssi), nf); @@ -2759,7 +2757,6 @@ setup: } else (void) ieee80211_input_all(ic, m, (int)be32toh(desc->rssi), nf); - NET_EPOCH_EXIT(et); m = NULL; desc = NULL; } diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c index 9d3a11e961c4..200b1d9264d9 100644 --- a/sys/dev/usb/wlan/if_upgt.c +++ b/sys/dev/usb/wlan/if_upgt.c @@ -2209,7 +2209,6 @@ upgt_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_frame *wh; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct upgt_data *data; int8_t nf; @@ -2247,14 +2246,12 @@ setup: ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh); nf = -95; /* XXX */ - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); /* node is no longer needed */ ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); m = NULL; } UPGT_LOCK(sc); diff --git a/sys/dev/usb/wlan/if_ural.c b/sys/dev/usb/wlan/if_ural.c index e55faab226ba..9e9e92230e3a 100644 --- a/sys/dev/usb/wlan/if_ural.c +++ b/sys/dev/usb/wlan/if_ural.c @@ -848,7 +848,6 @@ ural_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) struct ural_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct usb_page_cache *pc; uint32_t flags; @@ -929,13 +928,11 @@ tr_setup: if (m) { ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); } RAL_LOCK(sc); ural_start(sc); diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c index b159c513a126..cf02bd1dfb5b 100644 --- a/sys/dev/usb/wlan/if_urtw.c +++ b/sys/dev/usb/wlan/if_urtw.c @@ -4041,7 +4041,6 @@ urtw_bulk_rx_callback(struct usb_xfer *xfer, usb_error_t error) struct urtw_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; - struct epoch_tracker et; struct mbuf *m = NULL; struct urtw_data *data; int8_t nf = -95; @@ -4085,14 +4084,12 @@ setup: } else ni = NULL; - NET_EPOCH_ENTER(et); if (ni != NULL) { (void) ieee80211_input(ni, m, rssi, nf); /* node is no longer needed */ ieee80211_free_node(ni); } else (void) ieee80211_input_all(ic, m, rssi, nf); - NET_EPOCH_EXIT(et); m = NULL; } URTW_LOCK(sc); diff --git a/sys/dev/usb/wlan/if_zyd.c b/sys/dev/usb/wlan/if_zyd.c index 110bba2fa9fa..aa0942c069da 100644 --- a/sys/dev/usb/wlan/if_zyd.c +++ b/sys/dev/usb/wlan/if_zyd.c @@ -2219,7 +2219,6 @@ zyd_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) struct zyd_softc *sc = usbd_xfer_softc(xfer); struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; - struct epoch_tracker et; struct zyd_rx_desc desc; struct mbuf *m; struct usb_page_cache *pc; @@ -2275,7 +2274,6 @@ tr_setup: * "ieee80211_input" here, and not some lines up! */ ZYD_UNLOCK(sc); - NET_EPOCH_ENTER(et); for (i = 0; i < sc->sc_rx_count; i++) { rssi = sc->sc_rx_data[i].rssi; m = sc->sc_rx_data[i].m; @@ -2291,7 +2289,6 @@ tr_setup: } else (void)ieee80211_input_all(ic, m, rssi, nf); } - NET_EPOCH_EXIT(et); ZYD_LOCK(sc); zyd_start(sc); break; diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c index 93c5bf0a60fd..0a5996cf1d97 100644 --- a/sys/dev/wpi/if_wpi.c +++ b/sys/dev/wpi/if_wpi.c @@ -1907,7 +1907,6 @@ static void wpi_rx_done(struct wpi_softc *sc, struct wpi_rx_desc *desc, struct wpi_rx_data *data) { - struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct wpi_rx_ring *ring = &sc->rxq; struct wpi_rx_stat *stat; @@ -2027,7 +2026,6 @@ wpi_rx_done(struct wpi_softc *sc, struct wpi_rx_desc *desc, } WPI_UNLOCK(sc); - NET_EPOCH_ENTER(et); /* Send the frame to the 802.11 layer. */ if (ni != NULL) { @@ -2037,7 +2035,6 @@ wpi_rx_done(struct wpi_softc *sc, struct wpi_rx_desc *desc, } else (void)ieee80211_input_all(ic, m, stat->rssi, WPI_RSSI_OFFSET); - NET_EPOCH_EXIT(et); WPI_LOCK(sc); return; diff --git a/sys/dev/wtap/if_wtap.c b/sys/dev/wtap/if_wtap.c index 05487572c242..ddb0cb466297 100644 --- a/sys/dev/wtap/if_wtap.c +++ b/sys/dev/wtap/if_wtap.c @@ -439,7 +439,6 @@ wtap_inject(struct wtap_softc *sc, struct mbuf *m) static void wtap_rx_proc(void *arg, int npending) { - struct epoch_tracker et; struct wtap_softc *sc = (struct wtap_softc *)arg; struct ieee80211com *ic = &sc->sc_ic; struct mbuf *m; @@ -480,7 +479,6 @@ wtap_rx_proc(void *arg, int npending) ni = ieee80211_find_rxnode_withkey(ic, mtod(m, const struct ieee80211_frame_min *), IEEE80211_KEYIX_NONE); - NET_EPOCH_ENTER(et); if (ni != NULL) { /* * Sending station is known, dispatch directly. @@ -490,8 +488,7 @@ wtap_rx_proc(void *arg, int npending) } else { type = ieee80211_input_all(ic, m, 1<<7, 10); } - NET_EPOCH_EXIT(et); - + /* The mbufs are freed by the Net80211 stack */ free(bf, M_WTAP_RXBUF); } diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index dcbcffbe09a0..2a90353938ff 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -422,6 +422,8 @@ hostap_deliver_data(struct ieee80211vap *vap, (void) ieee80211_vap_xmitpkt(vap, mcopy); } if (m != NULL) { + struct epoch_tracker et; + /* * Mark frame as coming from vap's interface. */ @@ -438,7 +440,9 @@ hostap_deliver_data(struct ieee80211vap *vap, m->m_pkthdr.ether_vtag = ni->ni_vlan; m->m_flags |= M_VLANTAG; } + NET_EPOCH_ENTER(et); ifp->if_input(ifp, m); + NET_EPOCH_EXIT(et); } } diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index a1db4a50c2ce..f2da4852485a 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -273,6 +273,7 @@ void ieee80211_deliver_data(struct ieee80211vap *vap, struct ieee80211_node *ni, struct mbuf *m) { + struct epoch_tracker et; struct ether_header *eh = mtod(m, struct ether_header *); struct ifnet *ifp = vap->iv_ifp; @@ -303,7 +304,9 @@ ieee80211_deliver_data(struct ieee80211vap *vap, m->m_pkthdr.ether_vtag = ni->ni_vlan; m->m_flags |= M_VLANTAG; } + NET_EPOCH_ENTER(et); ifp->if_input(ifp, m); + NET_EPOCH_EXIT(et); } struct mbuf *