From patchwork Sat Jun 6 20:45:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 6560171 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EDC3EC0020 for ; Sat, 6 Jun 2015 20:58:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D4E2B2045B for ; Sat, 6 Jun 2015 20:58:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DABAE203A9 for ; Sat, 6 Jun 2015 20:58:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752982AbbFFUqa (ORCPT ); Sat, 6 Jun 2015 16:46:30 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:35598 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751488AbbFFUq2 (ORCPT ); Sat, 6 Jun 2015 16:46:28 -0400 Received: by wiga1 with SMTP id a1so50307099wig.0; Sat, 06 Jun 2015 13:46:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=bbHxDV7Hsbqes/OKkETxdSqWdvgXppORFUeZgwiy/94=; b=az8QxxHORQ4DTrM68Y1Qt2YZWAkKQvfxKs3XVHNk1NDAI00RQ4UM1j2nDDDVyfAHQ4 OVE7M2sSm6NTouMvX5pjnqnRvJFLusGNeh+eefak605TO8QDgFpYhQ2nYEl/XirD4svD iuSxYJWwzM9THyAVy1EfpbxA1OANiC5ARR+REYWzh1l1HLaZbdIuwUIFSw/ZadEo69gj PaC1U4G9POXwV9330cp+YhtOev881HL/wFGN5ky/gJYySXgvPYkPb3sOGWz11RxPFWeE 1opcG3K18lf0EpEkVSAYbRuU5HCTCLjxk3kcivXcgnhfeWAAM0jxUZ94yZJp8RrwXYbG 1HDg== X-Received: by 10.194.157.194 with SMTP id wo2mr17996943wjb.103.1433623586680; Sat, 06 Jun 2015 13:46:26 -0700 (PDT) Received: from linux-tdhb.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by mx.google.com with ESMTPSA id fm8sm830706wib.9.2015.06.06.13.46.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Jun 2015 13:46:25 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo , linux-wireless@vger.kernel.org Cc: Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Subject: [PATCH FIX] b43: fix support for 14e4:4321 PCI dev with BCM4321 chipset Date: Sat, 6 Jun 2015 22:45:59 +0200 Message-Id: <1433623559-25433-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It seems Broadcom released two devices with conflicting device id. There are for sure 14e4:4321 PCI devices with BCM4321 (N-PHY) chipset, they can be found in routers, e.g. Netgear WNR834Bv2. However, according to Broadcom public sources 0x4321 is also used for 5 GHz BCM4306 (G-PHY). It's unsure if they meant PCI device id, or "virtual" id (from SPROM). To distinguish these devices lets check PHY type (G vs. N). Signed-off-by: Rafa? Mi?ecki Cc: # 3.16+ --- Kalle: I'm aware it's quite late for a 4.1 fix, this bug was reported just today. I guess you can just take it for wireless-drivers-next and let stable guys handle it. --- drivers/net/wireless/b43/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index f409929..9556454 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -5361,6 +5361,10 @@ static void b43_supported_bands(struct b43_wldev *dev, bool *have_2ghz_phy, *have_5ghz_phy = true; return; case 0x4321: /* BCM4306 */ + /* There are 14e4:4321 PCI devs with 2.4 GHz BCM4321 (N-PHY) */ + if (dev->phy.type != B43_PHYTYPE_G) + break; + /* fall through */ case 0x4313: /* BCM4311 */ case 0x431a: /* BCM4318 */ case 0x432a: /* BCM4321 */