[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180823075007.180828636@linuxfoundation.org>
Date: Thu, 23 Aug 2018 09:54:46 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Michael Hennerich <michael.hennerich@...log.com>,
Alexandru Ardelean <alexandru.ardelean@...log.com>,
Stefan Schmidt <stefan@...enfreihafen.org>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH 4.17 220/324] net: ieee802154: adf7242: Fix erroneous RX enable
4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Hennerich <michael.hennerich@...log.com>
[ Upstream commit 36d26d6b6208399070a9d7993534fef9fc26b1ba ]
Only enable RX mode if the netdev is opened.
Signed-off-by: Michael Hennerich <michael.hennerich@...log.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.com>
Signed-off-by: Stefan Schmidt <stefan@...enfreihafen.org>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/net/ieee802154/adf7242.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/drivers/net/ieee802154/adf7242.c
+++ b/drivers/net/ieee802154/adf7242.c
@@ -719,7 +719,10 @@ static int adf7242_channel(struct ieee80
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,
Powered by blists - more mailing lists