From nobody Tue Mar 14 22:19:54 2023 X-Original-To: dev-commits-src-all@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 4PbnyM1YpJz3xZD5; Tue, 14 Mar 2023 22:19: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 4PbnyM14JHz3wMQ; Tue, 14 Mar 2023 22:19:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678832395; 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=fXCm5VapkNANgdZ0B145Hbp39UAlg0c6vF84smWi4iM=; b=FznRZoMvWDN82/u/NLiAI+hm1BQGdNUI7MffUwRTzLvSFAoLNOUQ+jNvekJ3PvbS7yUsrM etq1BAmc8XPuth9KlKOvfLSI5F2SV/56lNIMu1800QlS1915vYId5fvhmqQShwikmd/5Rt FHzQ/2MX+o73YglsvB1CvS716KP3Al8joGnlhaDEBw9UQeoVQq2+oDnB4GaHtqsRVKJZG9 gDfdd4nKSMKNNhz4IRGTzfF5lWZUCBqzgJhGXM7ZmUTfkRSz6pEfMLzzQwvXV1V89r4JVm tpP+utI6NT4AZex6bovObqD1cpcyUSUdun9/ymmzv9gR1tD79+GIkJzyUcDs/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678832395; 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=fXCm5VapkNANgdZ0B145Hbp39UAlg0c6vF84smWi4iM=; b=UX5fTNIk88oEszRj2q/PHagWbfhwG1+JmpATy7Q0JoBgz2bpeQiEKIYsPxL8dgNTgrWCvR Pefy2N+0l6jdmCamvdiTPtLY4EoYlU1e+gZqe/EoMAHcg/9SLFV7VPEew2BIg1qTrWKrnD Ql7H03a0ll+HmLoQkjOoGrJE0Gh7iWIJLYO8SF18ZbHuuxNmhdUt2/eLQhx01oeR9lM0Ip UGwfeK2D9YYgqBGJHQy8m6WYiv4R3cfUpz6Vpfhay6CQXtqn8XSwqzwTzQtpII0pivU9Gm WdIN9JYl9ds/1xnOum5ok17cGQKo6KfOX1nDknhwnNXmbhR5FhJXeos5VlLC6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678832395; a=rsa-sha256; cv=none; b=hKgzTk9+pE87k0NoLlrIOnsyfO0lDkLy7gUitN7WCzun9iX9FNCgSzZxfkWK1djjBmJdRv 3xYi/3wi32vwkuVWsRgPF9ykY3GaBelY9cWMNg6h5Kj4heVo0aSEf51QaCUsqaIOZPouIZ 9Te7y+rvCDIqmfVsqg9iyAW+RCzL7nfN5s0NOPYCJb46brvAHXg5SUhVvOa2JEFT38iUKl XFjvc0ephL6/2azF70L3xnNFh7/eocZK19ukY69YSIEpetPZGXvs56xq3EeqL0rp/E8rWQ cI9sKf1lUTkJcygAsTH9nGVLlG4GQqtV3fUEVrYfcmsyaNsHVG9bGZeFgyKwhQ== 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 4PbnyM07c2zsNG; Tue, 14 Mar 2023 22:19:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32EMJs8v034373; Tue, 14 Mar 2023 22:19:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32EMJsbM034372; Tue, 14 Mar 2023 22:19:54 GMT (envelope-from git) Date: Tue, 14 Mar 2023 22:19:54 GMT Message-Id: <202303142219.32EMJsbM034372@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 3346164ce844 - main - net80211: define mask for ss_flags rather than using hardcoded 0xfff List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 3346164ce844f8995311c3988ab193bd6ddda0c9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3346164ce844f8995311c3988ab193bd6ddda0c9 commit 3346164ce844f8995311c3988ab193bd6ddda0c9 Author: Bjoern A. Zeeb AuthorDate: 2023-03-14 21:00:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-03-14 22:16:41 +0000 net80211: define mask for ss_flags rather than using hardcoded 0xfff scan state ss_flags in two places cut off the "internal" GOTPICK options. Replace the hardcoded 0xfff with a defined mask. Note that "internal" flags is confusing as we also supplement the the 16bit by another 16bit of "internal flags" passed around but comaparing to GOTPICK never stored to my understanding. No functional change. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D38832 --- sys/net80211/ieee80211_scan.h | 1 + sys/net80211/ieee80211_scan_sw.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_scan.h b/sys/net80211/ieee80211_scan.h index e1f7b786be19..8db7bd03e2d7 100644 --- a/sys/net80211/ieee80211_scan.h +++ b/sys/net80211/ieee80211_scan.h @@ -136,6 +136,7 @@ struct ieee80211_scan_state { #define IEEE80211_SCAN_ONCE 0x0010 /* do one complete pass */ #define IEEE80211_SCAN_NOBCAST 0x0020 /* no broadcast probe req */ #define IEEE80211_SCAN_NOJOIN 0x0040 /* no auto-sequencing */ +#define IEEE80211_SCAN_PUBLIC_MASK 0x0fff /* top 4 bits for internal use */ #define IEEE80211_SCAN_GOTPICK 0x1000 /* got candidate, can stop */ uint8_t ss_nssid; /* # ssid's to probe/match */ struct ieee80211_scan_ssid ss_ssid[IEEE80211_SCAN_MAX_SSID]; diff --git a/sys/net80211/ieee80211_scan_sw.c b/sys/net80211/ieee80211_scan_sw.c index 51e1189824e3..6442ed42112c 100644 --- a/sys/net80211/ieee80211_scan_sw.c +++ b/sys/net80211/ieee80211_scan_sw.c @@ -196,8 +196,7 @@ ieee80211_swscan_start_scan_locked(const struct ieee80211_scanner *scan, if ((flags & IEEE80211_SCAN_NOSSID) == 0) ieee80211_scan_copy_ssid(vap, ss, nssid, ssids); - /* NB: top 4 bits for internal use */ - ss->ss_flags = flags & 0xfff; + ss->ss_flags = flags & IEEE80211_SCAN_PUBLIC_MASK; if (ss->ss_flags & IEEE80211_SCAN_ACTIVE) vap->iv_stats.is_scan_active++; else @@ -307,7 +306,7 @@ ieee80211_swscan_check_scan(const struct ieee80211_scanner *scan, ic->ic_flags |= IEEE80211_F_SCAN; /* NB: need to use supplied flags in check */ - ss->ss_flags = flags & 0xff; + ss->ss_flags = flags & IEEE80211_SCAN_PUBLIC_MASK; result = ss->ss_ops->scan_end(ss, vap); ic->ic_flags &= ~IEEE80211_F_SCAN;