diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2018-06-25 16:49:51 +0300 |
---|---|---|
committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2018-07-09 10:53:11 +0200 |
commit | 36d26d6b6208399070a9d7993534fef9fc26b1ba (patch) | |
tree | 73405ad42761f8a697f8fadbd4a9c3b044fa5a09 /drivers/net/ieee802154 | |
parent | 8f2fbc6c60ff213369e06a73610fc882a42fdf20 (diff) | |
download | linux-36d26d6b6208399070a9d7993534fef9fc26b1ba.tar.bz2 |
net: ieee802154: adf7242: Fix erroneous RX enable
Only enable RX mode if the netdev is opened.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r-- | drivers/net/ieee802154/adf7242.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ieee802154/adf7242.c b/drivers/net/ieee802154/adf7242.c index 64f1b1e77bc0..c3da43191f70 100644 --- a/drivers/net/ieee802154/adf7242.c +++ b/drivers/net/ieee802154/adf7242.c @@ -719,7 +719,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, |