Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3420809rwi; Sun, 16 Oct 2022 10:30:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM74047GXeDbxewWVz801Z3gazRIZlpXeZrdqWBWN3hYIGes4SBkGLqhDucCI8f6INwpYZJD X-Received: by 2002:a17:902:be03:b0:178:6f5d:e979 with SMTP id r3-20020a170902be0300b001786f5de979mr8100197pls.163.1665941435213; Sun, 16 Oct 2022 10:30:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665941435; cv=none; d=google.com; s=arc-20160816; b=lYZDiarEUBqfqlrLS+0c1wO06PXWChsMMR3JwzCULFuJwshzMYVwB5wn3xqL3DYRsK Xw65BLymbRJKmRawfSZWr0wz6vi2P7dLGQa+Ob+zI4E9JJs8hyugVyAmScpKt/xemtFO TfrPTCzvmxy9VS0DMDO1WQZ6If/mKUdc7+FQGEeq99wVsaUIFYihBtmOxnbUSDsgHbRQ a2cNipbSaz+Ux7a45vyWLMG7rRtbP5kfPZdGVyuW9dFSeDOQP5fdkXEzrbuJwTKKSGkC /zuN9GUpW0RHlHjVZIsFJBDXedyu9OPmzXpZO3TFIJM6y1va1Vx0dImHwVuGVR4UeBMy R5ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=84YrzMdgD7pxeBiK4TEteGNtLOGIqh4JfD372CeCLgE=; b=neg5Z0zOG93E8d0iMsXsEhLhVkU7F+MBU4TqKImKZ+XU3Ty2WQXt0fnFPl1mqlyBve xTCA8jPn5V10pEfxw7mV2+3gJ5b0TFxu2iaXNLMK+9B1MBMD93cfrP04Wm4vMRupJ+3O KPRYqr3IHDZF4Kn93lOoXYXdrOvyCLZTg2Uxl8cjWtgXi3d0x5Sm1TA8O4xnhJkN9lnh QThUGQ0WfSoiZpgPBxAGYc1PBsyotzqT0XW/Bjyl2X9X0Un5m26cnbfnSn7NTtPmxG+m wrxHNWVsLeF5OTqIVz/zD+o0EAYx96L4fE6icEHxDaIWvaHjgbM0b7L3ip7FT/lmqCps maIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=B28zobae; 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 x194-20020a6331cb000000b004629b02a0d4si9900990pgx.525.2022.10.16.10.30.20; Sun, 16 Oct 2022 10:30:35 -0700 (PDT) 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=B28zobae; 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 S229572AbiJPR3o (ORCPT + 63 others); Sun, 16 Oct 2022 13:29:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbiJPR3m (ORCPT ); Sun, 16 Oct 2022 13:29:42 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 641E5140EC for ; Sun, 16 Oct 2022 10:29:41 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id k2so20335378ejr.2 for ; Sun, 16 Oct 2022 10:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=84YrzMdgD7pxeBiK4TEteGNtLOGIqh4JfD372CeCLgE=; b=B28zobae46h2v3zuuCOSKsrr/6yVwmw+N94urtJzdyWG6i0bwoCN0zEMhxUc0P++JK 7hA785647FVdKniMVakzGApVuiukuqhSoDHgyFmRxcHnFemn3sUIOp1+P7Vrv59lw7vr qNzm4xNhta99uLL4rxzxmyp0FhCPU7hDs1H7uTUpnBMDoKA06zcGEW/j7cSTnIl8if5V U41Alu/f73UBz6924d8Y56SBcEXt0Fj2HSNzskEen8X/9trenmW6iU9QAAjfpWC9sbz7 pLBOxipm8d+Ur/3hlhPsn0m4rKNwrQAWnkwl5Z07Roks1QJjC70mswGxB2BvQG4t4eqw M2lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=84YrzMdgD7pxeBiK4TEteGNtLOGIqh4JfD372CeCLgE=; b=T6qec81LTdjdOTxFTtybVj6iE0C7hCYHV+Bl4aD4mbJuycusOKgZGtYEyIvImi4OQb MRQChNdngNQ48pfNtGc99bn+V76i0NrnL/LgKrrvujblgtmIPYLuDd/NzNhHLQREeZLt ccpuD+vvy2aEB1FpkyI0UtGInv9tOtplrqL7wckcMO4pVPOr4LWsaGEXlEYd4EPlI5ki XjLb+1s/loRH4XMnYq/bsKnptZX1vrFU0HKfGMS9e6CmBFilKowwDWQaCX/n0wtB8qFy 8/9POp9aImlUNb0AkfD5S9SiaLzDT+4Csci/PZzrR4d07USLMZiFUEG1ddt2A5IwvucJ YOPg== X-Gm-Message-State: ACrzQf1pVBVQJ6DwKEiNOdQc7FgXhv21WbIs3R8KUhdScFIbg6SrD8F2 vmkC+WxaAcTxkpKvA16UbhE2R8WSQTg= X-Received: by 2002:a17:906:9745:b0:78d:480f:cee7 with SMTP id o5-20020a170906974500b0078d480fcee7mr5796259ejy.192.1665941379791; Sun, 16 Oct 2022 10:29:39 -0700 (PDT) Received: from [192.168.1.50] ([81.196.40.23]) by smtp.gmail.com with ESMTPSA id v24-20020aa7d658000000b00458f82462a5sm5725978edr.25.2022.10.16.10.29.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Oct 2022 10:29:39 -0700 (PDT) Message-ID: Date: Sun, 16 Oct 2022 20:29:33 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: [PATCH 3/5] wifi: rtl8xxxu: Recognise all possible chip cuts Content-Language: en-US From: Bitterblue Smith To: linux-wireless@vger.kernel.org Cc: Jes Sorensen References: <2b29b6d9-c17e-76d6-c32f-630f24b407b7@gmail.com> In-Reply-To: <2b29b6d9-c17e-76d6-c32f-630f24b407b7@gmail.com> 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 The chip cut, also known as the chip version, is a letter from A (0) to P (15). Recognise them all instead of printing "unknown" when it's greater than E. Signed-off-by: Bitterblue Smith --- .../wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index 2efc99896b96..a8914650815e 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -1573,31 +1573,16 @@ rtl8xxxu_set_spec_sifs(struct rtl8xxxu_priv *priv, u16 cck, u16 ofdm) static void rtl8xxxu_print_chipinfo(struct rtl8xxxu_priv *priv) { + static const char cuts[16] = "ABCDEFGHIJKLMNOP"; struct device *dev = &priv->udev->dev; - char *cut; + char cut = '?'; - switch (priv->chip_cut) { - case 0: - cut = "A"; - break; - case 1: - cut = "B"; - break; - case 2: - cut = "C"; - break; - case 3: - cut = "D"; - break; - case 4: - cut = "E"; - break; - default: - cut = "unknown"; - } + /* Currently always true: chip_cut is 4 bits. */ + if (priv->chip_cut <= 15) + cut = cuts[priv->chip_cut]; dev_info(dev, - "RTL%s rev %s (%s) %iT%iR, TX queues %i, WiFi=%i, BT=%i, GPS=%i, HI PA=%i\n", + "RTL%s rev %c (%s) %iT%iR, TX queues %i, WiFi=%i, BT=%i, GPS=%i, HI PA=%i\n", priv->chip_name, cut, priv->chip_vendor, priv->tx_paths, priv->rx_paths, priv->ep_tx_count, priv->has_wifi, priv->has_bluetooth, priv->has_gps, priv->hi_pa); -- 2.38.0