Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1017042lql; Tue, 12 Mar 2024 05:17:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVLycX/H9IGUDVQ4iYYgVtln86BcxdpdxNz0w7C2Ot5I6GphoWKyVLoQtI5Q2xuAUwGvKYpbRTPrNIap3qegef4PJlGsjQtMhr9lv4Sug== X-Google-Smtp-Source: AGHT+IH5MAa+grRul1SK1ZJsr64TdzCsZnPVvp2F00APNB3U8YUctn5o25nqBJ9Ymps32HqNUDGq X-Received: by 2002:a05:620a:c07:b0:788:7a62:83de with SMTP id l7-20020a05620a0c0700b007887a6283demr1868411qki.8.1710245863381; Tue, 12 Mar 2024 05:17:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710245863; cv=pass; d=google.com; s=arc-20160816; b=ptqIYEKJLFlrncyGHWU9UohlqkA7FDW5hugI8G1UeRL2GTHThPZ8DwcXs+mTXSwZ32 W8P366wzwfKvLI9nFuh+1B6gFCfyc0q7bHvbBC9hWwSbgGas9DRXMnWIfCGT2Z1PuP2L blUzaHDZjGAxN9VyHvT4UCSX1bWFsbzgc0mTp7hH9Qn0ZiQzzGBz/1oXQgAjzjdw2Ub0 h7Uiy+qWv28P/TJFv5LnZcsJF0iMutEh7XrGGsGnXsotFXUabGzQuqdsrcTZyPD24hft 2tPCNndEh7Y5k/FPQYDcBWwQ3hKETXrbsAqYcVsUceD4IGuH/ffAJ/js8o+pHJproMse loqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=5Onh50EFB6Qa9xqDX1VQb3TDEpFv+Y0XCstJlAF2c8s=; fh=rkIxfIjFzB5Og97966ENSJbwrt8pkS9AnSY/zHDVTmQ=; b=K13fHrdd/iKO78/X8Ns6p3D/V+eWtR22PzwlzIMo46gHdDyfNTz0CiiYjBukry1YRC jkwLvZWFp3uUHX8m+8FMwxRksh+VDYLHmo3BKW9HL9H5VoCf9C7QDaQr/KnS/IC5OIiM SGCaQeGRShGivbsua36GWfTnL7RSzxnXNwZdMvLVIk4YFQlXfNS932EVg3hCzICFE1y0 9QV3I7hx0/f9p39JHnqLq8Oycwki5MIoep1ulYzqf4mSJZ3V7fk+3LsS0a+w9F1c1U6O 6BpkJsQ+Mpvj2KIzUiKX8fHF64Ul9J7c4T+yG4FNsKv9SjnyErA7G9J9qFNKXdCwSDwp mDmQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WAQkdPV1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-4609-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4609-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g5-20020a05620a13c500b007879457f066si6982909qkl.273.2024.03.12.05.17.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 05:17:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4609-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WAQkdPV1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-4609-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4609-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B832F1C22D8B for ; Tue, 12 Mar 2024 12:17:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DC9779DD3; Tue, 12 Mar 2024 12:17:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WAQkdPV1" X-Original-To: linux-wireless@vger.kernel.org Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEB4E7A155 for ; Tue, 12 Mar 2024 12:17:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710245838; cv=none; b=icK2DpPtKd/NoIwQzUPlwcC4JbETQDFX86zxD4ODmERgvbYEScrnRjFyLlnFt2RLMdhx1Q0Rym+tjahJcx2Hsreyxy6rf57pJa7J5qDgg0wFhQGEzOEBSwDMj/hAR70oImfhJ1MqlAlrNAFVKkeOLlOMA7Z9UAKKkrja9ek7aY0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710245838; c=relaxed/simple; bh=ox1OshzYtjXnwJZvax1HViW1meQ/xYn7K8HelkpWugc=; h=Message-ID:Date:MIME-Version:To:Cc:From:Subject:Content-Type; b=moVXuULHbqdNVOiWupBcm3T3A8yHw6sfNZ8BEsv/R0fJtkYjSOdNxbkIZh4bu6qX0wpbUNH2RewoKWw92FMyCaCg4QwC2ukAvOTY5yOq5Dh6MeFVeo2CmMvz/8mO7pqZfiX9iDbJMsO1uF9STX4VPGO7/MVzvWkNblHvV0bKqfY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WAQkdPV1; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4132a348546so12691915e9.1 for ; Tue, 12 Mar 2024 05:17:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710245835; x=1710850635; darn=vger.kernel.org; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=5Onh50EFB6Qa9xqDX1VQb3TDEpFv+Y0XCstJlAF2c8s=; b=WAQkdPV1HggJ8fI3Lhs2nth5pM/x0DtdRastgQvdbHBC1qfm4xBOzotR/nG9G59dZP f7DQAqqHcxDkHv7TFwh4ksuWm5pIcbmSwwvbAQS7kywpvj5ATjPsFP0DF8qa61/sTQh9 ANFhVbFdw/khCe725hRFEu4qbpdXiDqPbUhFjIuxpTBH2oObZO4rCj2/sVXIXF2DGOZM g3CAyzmPTlObMHGLQ8XyyLC3sr5w6A+de2kafUNQfh77CharwAJghVr8FAzV5y6hTVSF zA/2R3lZ5TcctcgVi0lKLvLofPBxhsyE9cjfMA0CWtjvxxtwsv7p8T07Z8cshpsItVtu 1JrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710245835; x=1710850635; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=5Onh50EFB6Qa9xqDX1VQb3TDEpFv+Y0XCstJlAF2c8s=; b=LNf9wACiWL4dl9T1SPDxClfC1Zee5+ri6Y78mrnihVibZYgBzUgpmZwjroNTD8hILo WYxitggNI21BCi/hEphcjiBV3YdplmM0RaO3UVDh/7ucZ6qorwWUxpwbfPyhHMPl3Plc bJcGWuhrHGwL/41QZxYTRBkyJAptj8ZYsezQhuyVILFNBa+MdYlxKZqqd+isXfiwsRLU wlxlBqjIpdDo6Jx2/AKyU5zLP3CpmHhoFKFOCfpMa0RBv2oarVIhwZ6csc2u8nbYAH8J 8Z82KbxiTWWZVZjH1HTn0xBNGfecxhtZu2Y+hloyHtGgTP4Cwu6KOD3xYcGuO+PKqX7L 6+lg== X-Gm-Message-State: AOJu0Yw2re7J7jPYkPk6wQ2JgWluIb0bcyhBcyESGsZJ10ZbnOCXl0cq kVckZFV/xdjN3a4X0X8OGeHZpYA2MiYCCGAS4qNni90AsPWXwReuP1p2nRIg X-Received: by 2002:a05:600c:19ca:b0:413:1258:82f with SMTP id u10-20020a05600c19ca00b004131258082fmr7844435wmq.1.1710245834883; Tue, 12 Mar 2024 05:17:14 -0700 (PDT) Received: from [192.168.1.50] ([79.119.240.211]) by smtp.gmail.com with ESMTPSA id bi6-20020a05600c3d8600b004133802cf8csm1889427wmb.38.2024.03.12.05.17.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Mar 2024 05:17:14 -0700 (PDT) Message-ID: <9995b805-ef8b-47c9-b176-ff540066039a@gmail.com> Date: Tue, 12 Mar 2024 14:17:13 +0200 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "linux-wireless@vger.kernel.org" Cc: Ping-Ke Shih , Larry Finger From: Bitterblue Smith Subject: [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Different channels have different TX power settings. rtl8192de is using the TX power setting from the wrong channel in the 5 GHz band because _rtl92c_phy_get_rightchnlplace expects an array which includes 2.4 GHz and 5 GHz channel numbers, but it's using an array which includes only the 5 GHz channel numbers. Use the array channel_all (defined in rtl8192de/phy.c) instead of the incorrect channel5g (defined in core.c). Tested only with rtl8192du, which will use the same TX power code. Signed-off-by: Bitterblue Smith --- drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c index d835a27429f0..56b5cd032a9a 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c @@ -892,8 +892,8 @@ static u8 _rtl92c_phy_get_rightchnlplace(u8 chnl) u8 place = chnl; if (chnl > 14) { - for (place = 14; place < ARRAY_SIZE(channel5g); place++) { - if (channel5g[place] == chnl) { + for (place = 14; place < ARRAY_SIZE(channel_all); place++) { + if (channel_all[place] == chnl) { place++; break; } -- 2.43.2