From nobody Fri Jan 13 01:07:40 2023 X-Original-To: dev-commits-src-main@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 4NtNZ459S7z2p2FX; Fri, 13 Jan 2023 01:07: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 4NtNZ44gdVz3kyD; Fri, 13 Jan 2023 01:07:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673572060; 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=VlYBHpXgEtLq+Q/2bt1u/kEe6i/Izt1C7r+WNoJDw6k=; b=MBw/vvhL4uEr4cPCpr2EwVniTfQtlMYE8nikTvuZquO1VNW3KxnIGC4/TqAuZ8/SaSmgap AKl/0XPOabnf2WhiH08h2yNj3dJCrgZah263KsTjB0z9/ClOBEf0kvWfNcKKERp8WuXI0/ 45FYjntQh+JnPfeiQpKHXzYZlEVumLwt2mAH1xqmHSW2Ppdn4bDaJfSdLOalFZoZsv2sDB pZIi6fPx7pCW9ZnB+smYof9ZJ4KS4IV54oiTgXIZUtDkQAE6XiLfCMP+tMVtHNd2nGGx5B LtYA3RDdOIIRdg3CIIia371khO8Au/pSRtL/2xTmk4Jp6nx3JhbX2ftddtMg+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673572060; 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=VlYBHpXgEtLq+Q/2bt1u/kEe6i/Izt1C7r+WNoJDw6k=; b=yBCLigUAUMXohzvrQ9OIbxYsW3PJxf6SoK+P+LMIHInbYcoB/oHDv+JRLAxm1FveU1vhFv t+r2dlFQE4zygochB+SZ6HpAGteTMgScPnm0OfZnwX/umGP82rA7RTs8Luoed1nxmWTDZt zc0gTfYmXAgyFfm+vKNZZS1sc9CO7tQihptllF7bn+qnOHOmgA9QfNk82C9+ze5vpv7CxZ zJJOm9vX2x8aDdHHsHPs364S00Q10/IisqQIRfuOtYncr5y30gVJdjlq0RgpeL0VU1MaSO KVnBfsSBe6UFKEXcwl55+O7Uof/jEIwvtMpz5NNrSQtFrOe857f+O9bDmCbEnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673572060; a=rsa-sha256; cv=none; b=ayxtmCR/JS0hfVLsOFpoO5QP70SBXvch+YgpU8RBwfM2ejgw9mqtam//bGTngG+lfDsENo rM/2tQCaYbMgbi5+/I+uagN2+sY6X9Lv4IzwaK2GGY2ARV2wpqeVDj/4wLfY/IwM+zja7U zdGKY0G7MuUbNvaTn6Z2/gK4g1ujabrm3w87I7mKl35z3SAb5moC6EvoQwOmecxzrf7T+D z+q7sUb7Wg7OSNLydgLPxAkYIMGkKALK4i+E6qypbKeLsXnSpEK3WuOQC8/HevtksMNpTk 5ayXScG/fiBoFQwYDgcFQgVLTOJ2CVsXjM5ahhSFFhewEefhtDhHv/MxN6nlhA== 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 4NtNZ43Zt8zpbp; Fri, 13 Jan 2023 01:07:40 +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 30D17eTG094538; Fri, 13 Jan 2023 01:07:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30D17eqc094537; Fri, 13 Jan 2023 01:07:40 GMT (envelope-from git) Date: Fri, 13 Jan 2023 01:07:40 GMT Message-Id: <202301130107.30D17eqc094537@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: 8aaefd0512da - main - rtw88: use #define for NL80211_BAND_2GHZ instead of hardcoded number List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 8aaefd0512daea0f9869cd2fe3cee9443d5fb6aa Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8aaefd0512daea0f9869cd2fe3cee9443d5fb6aa commit 8aaefd0512daea0f9869cd2fe3cee9443d5fb6aa Author: Bjoern A. Zeeb AuthorDate: 2023-01-13 01:05:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-01-13 01:05:01 +0000 rtw88: use #define for NL80211_BAND_2GHZ instead of hardcoded number Use NL80211_BAND_2GHZ instead of a hard coded 0 as array index for the band. While LinuxKPI provides a KPI compatibility some of these values may not necessarily be KBI compatible (in this case they shoule be so this is a NOP) and after all it is better style. No functional change. MFC after: 3 days --- sys/contrib/dev/rtw88/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/contrib/dev/rtw88/main.c b/sys/contrib/dev/rtw88/main.c index 35381a35f5d9..deac3564d847 100644 --- a/sys/contrib/dev/rtw88/main.c +++ b/sys/contrib/dev/rtw88/main.c @@ -1189,7 +1189,11 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si, RA_MASK_OFDM_IN_HT_2G; wireless_set = WIRELESS_CCK | WIRELESS_OFDM | WIRELESS_HT; +#if defined(__linux__) } else if (sta->deflink.supp_rates[0] <= 0xf) { +#elif defined(__FreeBSD__) + } else if (sta->deflink.supp_rates[NL80211_BAND_2GHZ] <= 0xf) { +#endif wireless_set = WIRELESS_CCK; } else { ra_mask &= RA_MASK_OFDM_RATES | RA_MASK_CCK_IN_BG;