From patchwork Thu Jul 28 17:24:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jouke Witteveen X-Patchwork-Id: 654373 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3s2RjF31SYz9t0h for ; Mon, 1 Aug 2016 01:49:20 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ladrR75o; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bTsyt-0000EH-Fu; Sun, 31 Jul 2016 15:48:47 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bSp3G-0003GK-95 for hostap@lists.infradead.org; Thu, 28 Jul 2016 17:24:55 +0000 Received: by mail-wm0-x244.google.com with SMTP id o80so12140937wme.0 for ; Thu, 28 Jul 2016 10:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=7cWJGkBRsFHsPqObN84TGcCuvf8zokIi/eQWSx5Hpok=; b=ladrR75oZEo70te8+jQBl5xIAsrjGdL8z6AXpDUl1E1uve7DlCCNHa4D1IsGcuYa+t xloc6QqlH5DUSnuM4myVsxOa4T4iB89aCHXIhM/6TglIVei2RLLcwPhTd0Dzz1ufNC9c VhTkgkdVj/BITaRVMGc+sM0mn1Gd/Nr3FWXXgVqvzumGxgynxve6Ce+Hv/mEdlksd12F S8HbULLcs1xevdViFOtTr0UF2q8MaGNGSyZXLj23IfZiySdixNFuCed9uEgHIRtnDkVr Xbx+eu7lKG7BMZGEDx16VRxvo96IqF/XsvGNpv8jRsbgNrjU9ZP3LSOxqXBeW7lrRe/V fHjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=7cWJGkBRsFHsPqObN84TGcCuvf8zokIi/eQWSx5Hpok=; b=jpAOAa5hflPDVAIPAQhqENM+5iM0EpAxGSiKjBH57RfeuTaWNAoZlwsD8oNe20vPIy u36DcSPkxlshQL5dv318gulRVvrMU/TfMjtelcombvb8cXNeoObKhximry6fmtI0wRPW 2GXxtbegn7hW1N1TmAjxryncsef6hop4km6M3nEJCFob4kBdQPZWAbRiTHq/lSjCi7CK 2YiC+lJ+FOGXH82Nau02jEIh4zI+ukB6CEO3Q6iOT+PTyaAtz/BKrrKNzSPdHMIFHFBR Zib/2ALX1NkG8ScccxQE5nE66JFIQzMiST9G++sOt+UhtmpL2utGHq7vBABS7GjGLqPS pnDQ== X-Gm-Message-State: ALyK8tKnEDHH5YSoaCZQfFwpKjX9Zvh41QaufTFGLsng45fnPfS75BOfNWo3yTmFj6kYNA== X-Received: by 10.28.228.132 with SMTP id b126mr62831021wmh.93.1469726671861; Thu, 28 Jul 2016 10:24:31 -0700 (PDT) Received: from Mindship-03 (195-241-141-29.ip.telfort.nl. [195.241.141.29]) by smtp.gmail.com with ESMTPSA id 207sm44380170wmb.7.2016.07.28.10.24.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jul 2016 10:24:31 -0700 (PDT) Date: Thu, 28 Jul 2016 19:24:26 +0200 From: Jouke Witteveen To: hostap@lists.infradead.org Subject: [PATCH] roboswitch: add support for BCM63xx Message-ID: <20160728172426.GA11505@Mindship-03> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.6.2 (2016-07-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160728_102454_502438_3CD9F1FB X-CRM114-Status: GOOD ( 12.97 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:244 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (j.witteveen[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Mailman-Approved-At: Sun, 31 Jul 2016 08:48:46 -0700 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org These devices do not properly identify themselves. Signed-off-by: Jouke Witteveen --- This is a very old patch that I had laying around but never submitted because I had no hardware to test it on. A while ago it was tested by Carl Lee , for whom it worked. Based on that and other publicly available RoboSwitch code, I expect this patch to be good. It will not break anything that currently works. src/drivers/driver_roboswitch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/drivers/driver_roboswitch.c b/src/drivers/driver_roboswitch.c index d3e0595..e8a5135 100644 --- a/src/drivers/driver_roboswitch.c +++ b/src/drivers/driver_roboswitch.c @@ -1,6 +1,6 @@ /* * WPA Supplicant - roboswitch driver interface - * Copyright (c) 2008-2009 Jouke Witteveen + * Copyright (c) 2008-2012 Jouke Witteveen * * This software may be distributed under the terms of the BSD license. * See README for more details. @@ -401,7 +401,9 @@ static void * wpa_driver_roboswitch_init(void *ctx, const char *ifname) os_free(drv); return NULL; } - if (if_mii(&drv->ifr)->phy_id != ROBO_PHY_ADDR) { + /* BCM63xx devices provide 0 here */ + if (if_mii(&drv->ifr)->phy_id != ROBO_PHY_ADDR && + if_mii(&drv->ifr)->phy_id != 0) { wpa_printf(MSG_INFO, "%s: Invalid phy address (not a " "RoboSwitch?)", __func__); os_free(drv);