From patchwork Sat Nov 11 17:05:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 10054441 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B2E5660632 for ; Sat, 11 Nov 2017 17:05:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2F96299C0 for ; Sat, 11 Nov 2017 17:05:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 97EE929AF7; Sat, 11 Nov 2017 17:05:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54E1129AED for ; Sat, 11 Nov 2017 17:05:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751709AbdKKRFo (ORCPT ); Sat, 11 Nov 2017 12:05:44 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:54015 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751590AbdKKRFm (ORCPT ); Sat, 11 Nov 2017 12:05:42 -0500 Received: by mail-lf0-f67.google.com with SMTP id l23so14207019lfk.10; Sat, 11 Nov 2017 09:05:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=wp3WOEnBT8KOJheOQ8lZTH2Br7esZl2ZnK1X/D2TaK4=; b=T+ZO4MlfHJGcmGJbF7DRP9qYE/0/EEKKkaBlaO8Yu4279A/4UlEBUbxwUBLDmW9spv /dnNuOZp1GsizBVQKu2cDs5VaMCzMfPZlFDEZn+ArLRv+JSe+BBvoVuWMwMsvK/6qqeq fRdj6ym9p7sSVvDnCCVhIA9sfCAH0EXwUXLFIwhc+/YH8SikvJZ+rfet701gA0mNebYN rXCP8FeMA5siGoHYBIUgON/L5c+ceo6dWXxyr2US9WBDGn+vCaNvwSv2O4d1QxAAdCYz BPyMNGttGhMbTYL4rw4qPEvA9jWr8OpMdNjN9LvT7y9E8FFdnpqXTgBf/mDR01t5/IpB 06jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=wp3WOEnBT8KOJheOQ8lZTH2Br7esZl2ZnK1X/D2TaK4=; b=OfnshY3gpa6Pk+vxOfPDaFuAtKlUrRyOyTeEK91Bx2DCG63LSJZprGjZY18kFy6b6Y sx2grXkYuMQodyoaED1biSSssNJbIqsjryixqIbHouxSMwzfcZ4t8gz+qkzHzmRPeRgZ N4ROAD0+XopqXCaNLuWLAK8SzxDZQJRKCOsrROulczNLm5xCoawwyzx1cr6F9GPfUYTn upuOUUNTQAeVBxLw6hHr1ngj0Mw4ECeJ3EgG5w8SqluIijU6fIlRmNWIWF2vAs4e0sIw SWANu0Dq2LuSv9RUcZZwDHeSDFhEkU+m/L2Oa+L1ikmjwJrU7kPy//UwdpLianBPNQIf ydUw== X-Gm-Message-State: AJaThX7XaCJcDaQYPTuMxoz4ETkkgrwbti6K9s8g43hIZyDcUWqw2Kxy C9HB6qFbwOHD8EQU8by3Amo= X-Google-Smtp-Source: AGs4zMYo11+6aYOdEKv1D+xpINns7Ag2aan7LvqOvSwc6ktISvnfwlpORz4oSZU+JJFOyT8E+Qg5Gg== X-Received: by 10.25.156.66 with SMTP id f63mr1304240lfe.194.1510419940241; Sat, 11 Nov 2017 09:05:40 -0800 (PST) Received: from xi.terra (c-c0bae655.07-184-6d6c6d4.cust.bredbandsbolaget.se. [85.230.186.192]) by smtp.gmail.com with ESMTPSA id s88sm2306590lje.40.2017.11.11.09.05.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Nov 2017 09:05:39 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.89) (envelope-from ) id 1eDZE0-0001bG-E0; Sat, 11 Nov 2017 18:05:45 +0100 From: Johan Hovold To: Eugene Krasnikov Cc: Kalle Valo , wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable , Loic Poulain Subject: [PATCH] wcn36xx: fix iris child-node lookup Date: Sat, 11 Nov 2017 18:05:32 +0100 Message-Id: <20171111170532.6110-1-johan@kernel.org> X-Mailer: git-send-email 2.15.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. To make things worse, the parent mmio node was also prematurely freed. Fixes: fd52bdae9ab0 ("wcn36xx: Disable 5GHz for wcn3620") Cc: stable # 4.14 Cc: Loic Poulain Signed-off-by: Johan Hovold --- drivers/net/wireless/ath/wcn36xx/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index 71812a2dd513..f7d228b5ba93 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -1233,7 +1233,7 @@ static int wcn36xx_platform_get_resources(struct wcn36xx *wcn, } /* External RF module */ - iris_node = of_find_node_by_name(mmio_node, "iris"); + iris_node = of_get_child_by_name(mmio_node, "iris"); if (iris_node) { if (of_device_is_compatible(iris_node, "qcom,wcn3620")) wcn->rf_id = RF_IRIS_WCN3620;