mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
linux: drop now upstream wifi: rtw88: rtw8821c: Fix rfe_option field width
This commit is contained in:
parent
e06be90c11
commit
b43819bf6d
@ -204,74 +204,3 @@ index 2a8336b1847a5..a10d6fef4ffaf 100644
|
||||
--
|
||||
2.39.2
|
||||
|
||||
|
||||
From: Sascha Hauer <s.hauer@pengutronix.de>
|
||||
To: linux-wireless <linux-wireless@vger.kernel.org>
|
||||
Cc: Hans Ulli Kroll <linux@ulli-kroll.de>,
|
||||
Larry Finger <Larry.Finger@lwfinger.net>,
|
||||
Pkshih <pkshih@realtek.com>, Tim K <tpkuester@gmail.com>,
|
||||
"Alex G ." <mr.nuke.me@gmail.com>,
|
||||
Nick Morrow <morrownr@gmail.com>,
|
||||
Viktor Petrenko <g0000ga@gmail.com>,
|
||||
Andreas Henriksson <andreas@fatal.se>,
|
||||
ValdikSS <iam@valdikss.org.ru>, kernel@pengutronix.de,
|
||||
stable@vger.kernel.org, Sascha Hauer <s.hauer@pengutronix.de>
|
||||
Subject: [PATCH 2/2] wifi: rtw88: rtw8821c: Fix rfe_option field width
|
||||
Date: Fri, 31 Mar 2023 14:10:54 +0200
|
||||
Message-Id: <20230331121054.112758-3-s.hauer@pengutronix.de>
|
||||
X-Mailer: git-send-email 2.39.2
|
||||
In-Reply-To: <20230331121054.112758-1-s.hauer@pengutronix.de>
|
||||
References: <20230331121054.112758-1-s.hauer@pengutronix.de>
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2
|
||||
X-SA-Exim-Mail-From: sha@pengutronix.de
|
||||
X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false
|
||||
X-PTX-Original-Recipient: linux-wireless@vger.kernel.org
|
||||
Precedence: bulk
|
||||
List-ID: <linux-wireless.vger.kernel.org>
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
|
||||
On my RTW8821CU chipset rfe_option reads as 0x22. Looking at the
|
||||
downstream driver suggests that the field width of rfe_option is 5 bit,
|
||||
so rfe_option should be masked with 0x1f.
|
||||
|
||||
Without this the rfe_option comparisons with 2 further down the
|
||||
driver evaluate as false when they should really evaluate as true.
|
||||
The effect is that 2G channels do not work.
|
||||
|
||||
rfe_option is also used as an array index into rtw8821c_rfe_defs[].
|
||||
rtw8821c_rfe_defs[34] (0x22) was added as part of adding USB support,
|
||||
likely because rfe_option reads as 0x22. As this now becomes 0x2,
|
||||
rtw8821c_rfe_defs[34] is no longer used and can be removed.
|
||||
|
||||
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
||||
---
|
||||
drivers/net/wireless/realtek/rtw88/rtw8821c.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.c b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
index 17f800f6efbd0..67efa58dd78ee 100644
|
||||
--- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
+++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
|
||||
@@ -47,7 +47,7 @@ static int rtw8821c_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)
|
||||
|
||||
map = (struct rtw8821c_efuse *)log_map;
|
||||
|
||||
- efuse->rfe_option = map->rfe_option;
|
||||
+ efuse->rfe_option = map->rfe_option & 0x1f;
|
||||
efuse->rf_board_option = map->rf_board_option;
|
||||
efuse->crystal_cap = map->xtal_k;
|
||||
efuse->pa_type_2g = map->pa_type;
|
||||
@@ -1537,7 +1537,6 @@ static const struct rtw_rfe_def rtw8821c_rfe_defs[] = {
|
||||
[2] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2),
|
||||
[4] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2),
|
||||
[6] = RTW_DEF_RFE(8821c, 0, 0),
|
||||
- [34] = RTW_DEF_RFE(8821c, 0, 0),
|
||||
};
|
||||
|
||||
static struct rtw_hw_reg rtw8821c_dig[] = {
|
||||
--
|
||||
2.39.2
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user