From patchwork Mon Jun 25 13:49:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 10486221 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 D87A7601D5 for ; Mon, 25 Jun 2018 13:50:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D095F1FE8A for ; Mon, 25 Jun 2018 13:50:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C409B2835B; Mon, 25 Jun 2018 13:50:29 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham 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 432D01FE8A for ; Mon, 25 Jun 2018 13:50:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755503AbeFYNu2 (ORCPT ); Mon, 25 Jun 2018 09:50:28 -0400 Received: from mail-bl2nam02on0067.outbound.protection.outlook.com ([104.47.38.67]:59520 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755500AbeFYNu1 (ORCPT ); Mon, 25 Jun 2018 09:50:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.onmicrosoft.com; s=selector1-analog-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kTM+7KGA4mtl2iEggTcNhbFqDQLdDaz3B63gkbWeTBc=; b=SvTubxu2ZbFR3Cirm8JI+KCqgpNwDwmrEW/4RjSPHAbXK2OffotaHcQVyGnBrUPiCy86W8CtY5h61iTIh+NuGvtGX9BT9cB58NJqROOnGOmG9rrP3lnaSEx2zIjUtTt93EZ1g+zZiSDM7AOdaNriHAEQTqb0eN+dUZq86Jh+pYc= Received: from MWHPR03CA0013.namprd03.prod.outlook.com (2603:10b6:300:117::23) by BY1PR0301MB1223.namprd03.prod.outlook.com (2a01:111:e400:510f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.884.22; Mon, 25 Jun 2018 13:50:24 +0000 Received: from BN1BFFO11FD002.protection.gbl (2a01:111:f400:7c10::1:100) by MWHPR03CA0013.outlook.office365.com (2603:10b6:300:117::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.884.21 via Frontend Transport; Mon, 25 Jun 2018 13:50:24 +0000 Authentication-Results: spf=pass (sender IP is 137.71.25.55) smtp.mailfrom=analog.com; osg.samsung.com; dkim=none (message not signed) header.d=none;osg.samsung.com; dmarc=bestguesspass action=none header.from=analog.com; Received-SPF: Pass (protection.outlook.com: domain of analog.com designates 137.71.25.55 as permitted sender) receiver=protection.outlook.com; client-ip=137.71.25.55; helo=nwd2mta1.analog.com; Received: from nwd2mta1.analog.com (137.71.25.55) by BN1BFFO11FD002.mail.protection.outlook.com (10.58.144.65) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.820.5 via Frontend Transport; Mon, 25 Jun 2018 13:50:23 +0000 Received: from NWD2HUBCAS7.ad.analog.com (nwd2hubcas7.ad.analog.com [10.64.69.107]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id w5PDoMOV007033 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 25 Jun 2018 06:50:22 -0700 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS7.ad.analog.com (10.64.69.107) with Microsoft SMTP Server id 14.3.301.0; Mon, 25 Jun 2018 09:50:22 -0400 Received: from saturn.analog.com ([10.50.1.244]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id w5PDoFNR004847; Mon, 25 Jun 2018 09:50:15 -0400 From: Alexandru Ardelean To: , , CC: Michael Hennerich , Alexandru Ardelean Subject: [PATCH] net: ieee802154: adf7242: Fix erroneous RX enable Date: Mon, 25 Jun 2018 16:49:51 +0300 Message-ID: <20180625134951.14227-1-alexandru.ardelean@analog.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-ADIRoutedOnPrem: True X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:137.71.25.55; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(346002)(396003)(39860400002)(39380400002)(2980300002)(438002)(199004)(189003)(426003)(54906003)(356003)(2906002)(7696005)(51416003)(107886003)(106002)(8676002)(305945005)(44832011)(1076002)(246002)(59450400001)(476003)(486006)(7636002)(2616005)(126002)(8936002)(6666003)(5660300001)(478600001)(36756003)(26005)(77096007)(1857600001)(2201001)(336012)(47776003)(53416004)(316002)(50226002)(106466001)(186003)(48376002)(16586007)(110136005)(50466002)(4326008)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0301MB1223; H:nwd2mta1.analog.com; FPR:; SPF:Pass; LANG:en; PTR:nwd2mail10.analog.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD002; 1:dYRLSqeds10JA4Gp9ghANInp7azzx7A8/IWYJI6DAPe10NE+CNKWxmIxMbprsPEq0BpqrNamWo/x8pmw0Oooq4VW3baRbGeQ+s+W/BJy3EN8tBxyXspY8Ezpys44tDx1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 311135ae-cb69-483f-9f31-08d5daa29946 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(4608076)(2017052603328)(7153060); SRVR:BY1PR0301MB1223; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1223; 3:ZwE0BjzA2/g75sZbFlFEJo1ymp+HEH9BmruSdxrD/DmOOgSpcimSkbrPkAeUI9ptrSCsmfC8THyeQ5DUNEJLQydu0ZLEx5rCjmI7Z0ctuMBpisCRXAQbIAQnBK9Qyrge2WKTsVAtkrBQIGDDCT5vOVrCANREaJTnB6ChTgPkQm2Mms3Hh1XseQzMQnCRdwFxA4loR68EEgv93eCt6AdXiNSlHa7FSHF8aOyb2LmWaQVVIjIFF11OAU3pbopZDW+5Qhucj+vS+Lf7EQDcG7DceaKsTkwwB2YleNtnaQ3I0mYcXTJ/03P2A3QfNQPI0C/PovLQfIpk4/5YRGpSfXQr3U5AODaqcrRbk7k/PwHLjOA=; 25:U4G14LkBzVCTguq1uLLM9kqmdaG/4mFczjvCBCIOvhv6p1QP1wcDfCfPU4CXW7AazNXikjTDYP2mmgXxkdb9RoQyVIAyejZZwdxeb+wu7AxYU1BknJLjJVhcM9XPT86M3Qo2RlYBL+LpC7NYP9hRzlqSWX2viYuwAHGuxXkczIcMEnfOmukNtedUv1Y0qiIkDvahzN0PISdZCYInUBnOG/0wu5menLLvFgzlGNSXloRGB/tlNNFQqB+Wwih8s6Lt6jNHC1ijIC9s48PYXnnuz5/XXxr7XkVW/o3SAzIMMZDjDCO2YPUIu4p6NNgCpLma3X8yrREDnO8DqobbY0VedA== X-MS-TrafficTypeDiagnostic: BY1PR0301MB1223: X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1223; 31:OE2uZXVyF+Qp7ON46T0BkDSO6yUmRtkxNE1xAIhQkJqvdlUWRnYAvU4ESQqiB8+RsFlG7G2Z7B+43U4AtoB0UhFA86oyUSnonvy+91gR+BoAK/nmZocwdZAwZOAonM7QNs8RDR1OXx7QH0AymEyANfJmTt2P1neaFr3pyETMioq6hvOcKcFB2u65mFOLA2xyrL2aT+6rCqM6iGvciItMTc+XXx4nseWfNAMnruAeLbQ=; 20:Y/Qk3yezMfFMMBLAu+Hvtlp0kAClvd/neL0nkPMzuqXLANQS9rxFxou//BrJwSEqqjF01VUKLaVUS8R41Yacx09KGiQ4dq/jN7gHB3tL/2cD8iVidfoHebN1swZ6G9kNcEHB6GQ6lVlOezmxw4mGNh/ILIJo+qlech2Gxql/8bSVbwVlkjCKRhWQL/NcpKyv2+hD8lukUy1dKZ0ORsrSoP+k3sxGY9xFAe+gHmjw5CSESf135z16soRBwswTqx+FOSN3V564um4+pwYxFHmcZEIlM/w9UssN4XejcUuztQMKlxLzvcHvLGXVhCc8dyQVzE+qsmhyJVWG0xGn4+JojfWsbQEoVGSQM5IHrHvrkbg4gCRUljypnKtZlm0XmkShsOqpveqx64NFwbPgflYA3/RWVy05FhyjHzwXnqF6TMLeLXqYaQEAGegy+/313M2qMSkq4zQYX/vTcS4sk8V4qqLYEJnrbpBC2NqJZtDJ9YYqqseMMGyy6gMPBDvkeWni X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(232431446821674); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93004095)(10201501046)(3002001)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:BY1PR0301MB1223; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0301MB1223; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1223; 4:KgzZy0Fl5YRvLAvyA4uFluTMKmkdLa3iQvMT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3tEBxojvVBQNcjV75IFKDAdPkgbbADODmTRxgxR8BXYYmq7Tl X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2018 13:50:23.2488 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 311135ae-cb69-483f-9f31-08d5daa29946 X-MS-Exchange-CrossTenant-Id: eaa689b4-8f87-40e0-9c6f-7228de4d754a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=eaa689b4-8f87-40e0-9c6f-7228de4d754a; Ip=[137.71.25.55]; Helo=[nwd2mta1.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB1223 Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Michael Hennerich Only enable RX mode if the netdev is opened. Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean --- drivers/net/ieee802154/adf7242.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ieee802154/adf7242.c b/drivers/net/ieee802154/adf7242.c index 3e85e9500233..0a240a3f7817 100644 --- a/drivers/net/ieee802154/adf7242.c +++ b/drivers/net/ieee802154/adf7242.c @@ -739,7 +739,10 @@ static int adf7242_channel(struct ieee802154_hw *hw, u8 page, u8 channel) adf7242_write_reg(lp, REG_CH_FREQ1, freq >> 8); adf7242_write_reg(lp, REG_CH_FREQ2, freq >> 16); - return adf7242_cmd(lp, CMD_RC_RX); + if (test_bit(FLAG_START, &lp->flags)) + return adf7242_cmd_rx(lp); + else + return adf7242_cmd(lp, CMD_RC_PHY_RDY); } static int adf7242_set_hw_addr_filt(struct ieee802154_hw *hw,