From patchwork Tue May 11 03:42:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 434137 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp3439966jao; Mon, 10 May 2021 20:42:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNUYwMosPmQEbBEmkvJhQNQ1/rT5AphwoK9RHGLh5DYLASnPoVRsAHA/py/0oVsyIAq9fk X-Received: by 2002:a05:6402:2050:: with SMTP id bc16mr33260333edb.179.1620704541113; Mon, 10 May 2021 20:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620704541; cv=none; d=google.com; s=arc-20160816; b=Cb8w+VSaK6fdgn4bHcvRYzpgilJWZ34hbml2SNhqt/Hnmri/zNn9MEf/9LEAhdnOrU JUxp3XeRBAAAErfKwo2xG7yFu7urOafZFfdgOMe7jSRGJyv8BqT4cRjJSOdA3BP1gC4W WH/vV22E+/clpi6Z/WnS0CXqoPbz3NhSrXbpzvNWdjVIkGvUvlvtL8y56HBzQ/S+TaML rpu0TYN0vBSglPH1bkcsu9llfUxRT67LT0+mOgAg46C9wBkWlKlc2KOzEfsTwZrUwWk6 473GcYc72p1nX2t4h9hcIISdeKb9oCGdqdcNqQIenEUrWmLp1TpVZwyuMtb6ja9jRq7Z wJZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WdE9t6AmVYsc7qbeJt2oisp2K6VvAlMUDquiVUm3KJc=; b=deNxIRQtnm12D7x/YtkPDTNrL9eSu8+2AxqzXN33U/XZzW7MNSlm7/Hbn5Xj8DSE9W U7tGY7h7tjtYCvo1BR1/prHRHPlnlgniHHunPZanRl6Phyw9DpzBSGzISUJbrCQeovxv lm52dkmpwxf/tqLxssnKbh8p3+65YgpCbfc4fCzUfPH77IFCuD2PbzrrASHBcVXEFCsl FkN345I38agECTSXyoKknu29eBdgpHEUvMowVDp8ISyGii41vmm4dW27GhKh7/wcmqZt VqETIyElQI2WmrzsMtgsN1QqjToGlXHaxb3Tv/a60gQpCXegMJevsJFSQx1kin9sFUNV XI1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ne10si1908913ejc.543.2021.05.10.20.42.20; Mon, 10 May 2021 20:42:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230096AbhEKDnZ (ORCPT + 2 others); Mon, 10 May 2021 23:43:25 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2688 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229465AbhEKDnY (ORCPT ); Mon, 10 May 2021 23:43:24 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FfNvt56gkz1BKbl; Tue, 11 May 2021 11:39:38 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Tue, 11 May 2021 11:42:07 +0800 From: Zhen Lei To: Kalle Valo , "David S . Miller" , Jakub Kicinski , Andrew Lunn , linux-wireless , b43-dev , netdev CC: Zhen Lei Subject: [PATCH v2 1/1] b43: phy_n: Delete some useless TODO code Date: Tue, 11 May 2021 11:42:03 +0800 Message-ID: <20210511034203.4122-2-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20210511034203.4122-1-thunder.leizhen@huawei.com> References: <20210511034203.4122-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org These TODO empty code are added by commit 9442e5b58edb ("b43: N-PHY: partly implement SPUR workaround"). It's been more than a decade now. I don't think anyone who wants to perfect this workaround can follow this TODO tip exactly. Instead, it limits them to new thinking. Remove it will be better. No functional change. By the way, this helps reduce some binary code size. Before: text data bss dec hex 74472 9967 0 84439 149d7 After: text data bss dec hex 74408 9919 0 84327 14967 Signed-off-by: Zhen Lei --- drivers/net/wireless/broadcom/b43/phy_n.c | 47 ----------------------- 1 file changed, 47 deletions(-) -- 2.26.0.106.g9fadedd diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c b/drivers/net/wireless/broadcom/b43/phy_n.c index 665b737fbb0d820..cf3ccf4ddfe7230 100644 --- a/drivers/net/wireless/broadcom/b43/phy_n.c +++ b/drivers/net/wireless/broadcom/b43/phy_n.c @@ -4592,58 +4592,11 @@ static void b43_nphy_spur_workaround(struct b43_wldev *dev) { struct b43_phy_n *nphy = dev->phy.n; - u8 channel = dev->phy.channel; - int tone[2] = { 57, 58 }; - u32 noise[2] = { 0x3FF, 0x3FF }; - B43_WARN_ON(dev->phy.rev < 3); if (nphy->hang_avoid) b43_nphy_stay_in_carrier_search(dev, 1); - if (nphy->gband_spurwar_en) { - /* TODO: N PHY Adjust Analog Pfbw (7) */ - if (channel == 11 && b43_is_40mhz(dev)) { - ; /* TODO: N PHY Adjust Min Noise Var(2, tone, noise)*/ - } else { - ; /* TODO: N PHY Adjust Min Noise Var(0, NULL, NULL)*/ - } - /* TODO: N PHY Adjust CRS Min Power (0x1E) */ - } - - if (nphy->aband_spurwar_en) { - if (channel == 54) { - tone[0] = 0x20; - noise[0] = 0x25F; - } else if (channel == 38 || channel == 102 || channel == 118) { - if (0 /* FIXME */) { - tone[0] = 0x20; - noise[0] = 0x21F; - } else { - tone[0] = 0; - noise[0] = 0; - } - } else if (channel == 134) { - tone[0] = 0x20; - noise[0] = 0x21F; - } else if (channel == 151) { - tone[0] = 0x10; - noise[0] = 0x23F; - } else if (channel == 153 || channel == 161) { - tone[0] = 0x30; - noise[0] = 0x23F; - } else { - tone[0] = 0; - noise[0] = 0; - } - - if (!tone[0] && !noise[0]) { - ; /* TODO: N PHY Adjust Min Noise Var(1, tone, noise)*/ - } else { - ; /* TODO: N PHY Adjust Min Noise Var(0, NULL, NULL)*/ - } - } - if (nphy->hang_avoid) b43_nphy_stay_in_carrier_search(dev, 0); }