From nobody Wed Jan 18 16:25:03 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 4NxrhJ4Prwz2yJcw; Wed, 18 Jan 2023 16:25:04 +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 4NxrhH2TXYz3FjH; Wed, 18 Jan 2023 16:25:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674059103; 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=NGoFyAC4YgdRYoXf4J4vthg0MrtKVF0wA+Kg5G640NE=; b=eQlsFIsvXh0ZRwRsnOdl13HyTPP6hC3bQjnGpogVy6apvtJ8wa1NgOz5B4nai+DS6Fq0ZJ ZHnO1ors6ssO9OK/sgBkpIwYIpMOOmwSSmpHzIVYzom6jeGu1fUT9GTuvPZH8F+iDVFvGJ HYNVnQ46ng0js87s9QfYX1ZabIauxSoUcdKR8usC+7Wg+VGByv0S5ugcBZ49c5I1gWMl0D mtzx9YrXlFh+3NsfXs3sR1A1L2GQA4tzwEPx/k7hMuExTs+UWJj3bO+kWq8If5rntGZvTs z1PBFmOPnCg/Od0vRWwe36koVrwSpHtg7aclimUZF/02NF5gNxnLx8BwGyWu5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674059103; 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=NGoFyAC4YgdRYoXf4J4vthg0MrtKVF0wA+Kg5G640NE=; b=G9A97lZlRYYSKq27RxHo0PMOFg47wRgJ8HS7nE9TQ7a48jakUMo8gSN/g4wMdEv+FN4q4l FiiGvQAajDqSVg/1DrBvw6ro0q68KlV3Fvs8KOOKzJD5WXWdFmjJsF1DSoM3heJ2yVRojk 9nF3eikL5ODy5V3zqGCTHMW4KW2jmn4LHgaLV4NBVyGyLpkMc+zYhm+Kq5mrjfrGJ5kj9A vI/PfU3rZI9XRWkcyMSmvuTYUp8sWbDpXw+Xhb1dfGeS2aZFJklMWmgmODRj2sQeKTqnqs gRCF5THrJIOWz1x8msccL9o0mDUa/rYmSz0WVT4CEV2UulYK7Ne7J3UVNVddjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674059103; a=rsa-sha256; cv=none; b=w4Qo3nxdWaB9w+3smfDYLX0dXVGNfv3cIMpWyej+57vlr3NJ2UQKEwyPEJHrUxZDFtrplx MGVdjYiMXMMSjsfVZq9bQBNQgO6k7vGRmyuZRZ2QjNwEl41d/alP9ewjj4KAfXurD+xetL pFS+hdj1MB0xfD6yIhcV+ICJyHnFEd/jjxDWuoG9X1T7mKl8XhX59ZlaJ+ILfCOLoZsZeR 9yV8EyYEACQjv4TV3yeI9MOkf/lqQmlbadoj/Isk3y2juALrK0N3hJaE+pikxtVux36HZJ wayFWshLzTQeV2pF5qFiIIOrWzACBIhGZmGjOZVE3oNzsYnajr7PfxqyqbRacQ== 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 4NxrhH1KNSzHSg; Wed, 18 Jan 2023 16:25:03 +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 30IGP3eM038257; Wed, 18 Jan 2023 16:25:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30IGP3u9038256; Wed, 18 Jan 2023 16:25:03 GMT (envelope-from git) Date: Wed, 18 Jan 2023 16:25:03 GMT Message-Id: <202301181625.30IGP3u9038256@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: 4c7aee8a7009 - stable/13 - rtw88: use #define for NL80211_BAND_2GHZ instead of hardcoded number 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 4c7aee8a700974218831d5ad1e04a6b4f42c7e2e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4c7aee8a700974218831d5ad1e04a6b4f42c7e2e commit 4c7aee8a700974218831d5ad1e04a6b4f42c7e2e Author: Bjoern A. Zeeb AuthorDate: 2023-01-13 01:05:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-01-18 13:26:32 +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. (cherry picked from commit 8aaefd0512daea0f9869cd2fe3cee9443d5fb6aa) --- 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;