Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1511905rwb; Thu, 8 Dec 2022 11:34:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf6kHNoXf5hAEsqNLDESxOVInVOYouS6hRcPCSB9y+3FauGUedg4D4sXI5lRvm+z0UwlDtYU X-Received: by 2002:a17:90a:c207:b0:219:c705:57ea with SMTP id e7-20020a17090ac20700b00219c70557eamr20648392pjt.126.1670528087701; Thu, 08 Dec 2022 11:34:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670528087; cv=none; d=google.com; s=arc-20160816; b=SezcnOo1T6TRrfRyuNzBhiwKujB/NsHNOeZWXn+YhDQ/KFImbXzlgyRjBnHfdCO1H1 enYRWCnkMspS13h8NDukCuB+joAKHSJ/8ttODKgjPPY0UXCj+xNlUkWjQyCQVRNcYfmj Za2cWoiDm4OOHnfBSKq8VmMYNpJsGlKWNMD+CFW+tH7vnMjyX5oQY/6Y4FJLMjd6/OSd xdL6Em5m65SJd4lsVFfpnZSOVMG3DSAPa3BHVCL0EssBeofT6CaW/JSiz+NxW4fFOy8V +0N/F6xCMQVk06En1hW5dS4ENDds+n7NGwvPz2Jel9qcckCBHGiPzgScY25Q7I2sovBA vQNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:from:cc:to :content-language:user-agent:mime-version:date:message-id :dkim-signature; bh=4NYG9lYEZ9wsyuwGTuamr3MpqAUVMVxHSEFMBUyZQg4=; b=Xid+Obj9DqWRBi5nZz2j1RJ4GUjWJF3jjsWOSzEYZKxmUUFA85lq5d75lMAFf7u039 r6wYw+9NHP4RrlsQUuC5mceBEDTboB85awPfilh4kNJ95T1Tq3Nfws6wFfIRo3eslLCi ukuhTa67sIPiVG8OQN0AR8p6n/8S6NqxPrl6+JeuwvGoghc71VNx/9dzZ2il0gJgk1A+ zn0Qi5ytKIwTI/wjeSj48d1h4o/FeBREMVqh6eEp/2YwANYTLx8iKSCNanVXQuOQX94T vGqZHV449X2/pCGu5fpYcbnjZaVx6wDrWOqOM6KEHY47OuXQDkCUn0gHhaBaoIMZilJP LZcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="m9UY/ppu"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bd5-20020a170902830500b0017c887295fbsi22491309plb.420.2022.12.08.11.34.36; Thu, 08 Dec 2022 11:34:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="m9UY/ppu"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229543AbiLHTca (ORCPT + 65 others); Thu, 8 Dec 2022 14:32:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbiLHTc3 (ORCPT ); Thu, 8 Dec 2022 14:32:29 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A7969E474 for ; Thu, 8 Dec 2022 11:32:28 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id c66so218304edf.5 for ; Thu, 08 Dec 2022 11:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=4NYG9lYEZ9wsyuwGTuamr3MpqAUVMVxHSEFMBUyZQg4=; b=m9UY/ppuM6so+aDHm+3TIwuNG7HnrZ3nIcDPo9V1AwCuSkmep2GCi6PfDDOXcWMyjw GIhZjgXZTyDVsaX9chD/htfVDFQdiwd3BJP13/sQj/ELrxyQ6309pqxaUjXKq6Zr+myA u1fALcmv+4XVfPzadmEctOhpe7mUXDrybcQtp2+woNTAngBw33V1wUEtvjYcIcQlUkh9 AFR+iVuyQ/Xp4rXMTKTI8AdrZoKYh3tMV/11HXQAUODiAvkK/ZQbkmmP3tvBbgPBcGDH 2GXAcPxs+Q+75EiqwC92o4R0/IW4aff19D0AGehn6eMpyF6oGo2yUtjxWOH6L69bQiah 4/QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=4NYG9lYEZ9wsyuwGTuamr3MpqAUVMVxHSEFMBUyZQg4=; b=z3llIwyxQHJYroQvvO95UsaRZ+/BB0Crz34+U9VoW4bbcz9V950FrmNH0fZmGdfy6I FPs/SKzUqwl6dk2tZtMt08Lcl7jDqlFZYOTboPqQo4d9jxqrG85ZUKDs7u1lwxAN4wrx 49UQh90pzNzdYlo020UpW7ZyIVlfNdttHmvbMHZCora/O0bTDYEG1AoxMXRMEjs0Fg91 NwKb3Oau0zVcxKkXqLb6dsu+WAdq/qCg2ANQ7XbvJ3Wrub53evHog0fnYAVqUYUuWK6O whtMbpcZvtN94iRLb8Gm0zZg/oGe5duzr+VBR5GpJ+YsK8pFJF7zjQ1G6bTFpzeDmD9z mCQA== X-Gm-Message-State: ANoB5pk0LPehpt0kJR7ejRWbGWMhTgiI+urYSpKWeD0WlLMLR3vvP2Cj 3xuEROzPwf1j9esqcVM0UZi9YlbSm78= X-Received: by 2002:aa7:c844:0:b0:461:9faf:6895 with SMTP id g4-20020aa7c844000000b004619faf6895mr2710687edt.16.1670527946592; Thu, 08 Dec 2022 11:32:26 -0800 (PST) Received: from [192.168.1.50] ([79.119.240.254]) by smtp.gmail.com with ESMTPSA id g3-20020aa7c843000000b0046c5baa1f58sm3682864edt.97.2022.12.08.11.32.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Dec 2022 11:32:25 -0800 (PST) Message-ID: <4368d585-11ec-d3c7-ec12-7f0afdcedfda@gmail.com> Date: Thu, 8 Dec 2022 21:32:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Content-Language: en-US To: "linux-wireless@vger.kernel.org" Cc: Jes Sorensen , Ping-Ke Shih From: Bitterblue Smith Subject: [PATCH 1/2] wifi: rtl8xxxu: Fix assignment to bit field priv->pi_enabled Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Just because priv->pi_enabled is only one bit doesn't mean it works like a bool. The value assigned to it loses all bits except bit 0, so only assign 0 or 1 to it. This affects the RTL8188FU, but fixing the assignment didn't make a difference for my device. Fixes: c888183b21f3 ("wifi: rtl8xxxu: Support new chip RTL8188FU") Signed-off-by: Bitterblue Smith --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c index 2c4f403ba68f..97e7ff7289fa 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c @@ -1122,7 +1122,7 @@ static void rtl8188fu_phy_iqcalibrate(struct rtl8xxxu_priv *priv, if (t == 0) { val32 = rtl8xxxu_read32(priv, REG_FPGA0_XA_HSSI_PARM1); - priv->pi_enabled = val32 & FPGA0_HSSI_PARM1_PI; + priv->pi_enabled = u32_get_bits(val32, FPGA0_HSSI_PARM1_PI); } /* save RF path */ -- 2.38.0