From: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH v3 net-next 07/13] at86rf230: move RX_SAFE_MODE setting to hw_init
Date: Thu, 3 Jul 2014 00:20:49 +0200 [thread overview]
Message-ID: <1404339655-8456-8-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1404339655-8456-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
There is no need to set this bit in start callback which could be
called more than once.
Signed-off-by: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/net/ieee802154/at86rf230.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index 39c3c11..492fb7e 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -1010,13 +1010,8 @@ err:
static int
at86rf230_start(struct ieee802154_dev *dev)
{
- struct at86rf230_local *lp = dev->priv;
u8 rc;
- rc = at86rf230_write_subreg(lp, SR_RX_SAFE_MODE, 1);
- if (rc)
- return rc;
-
rc = at86rf230_state(dev, STATE_TX_ON);
if (rc)
return rc;
@@ -1300,6 +1295,10 @@ static int at86rf230_hw_init(struct at86rf230_local *lp)
if (rc)
return rc;
+ rc = at86rf230_write_subreg(lp, SR_RX_SAFE_MODE, 1);
+ if (rc)
+ return rc;
+
rc = at86rf230_write_subreg(lp, SR_IRQ_MASK, IRQ_TRX_END);
if (rc)
return rc;
--
2.0.1
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
next prev parent reply other threads:[~2014-07-02 22:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-02 22:20 [PATCH v3 net-next 00/13] at86rf230: rework driver implementation Alexander Aring
2014-07-02 22:20 ` [PATCH v3 net-next 01/13] mac802154: at86rf230: add hw flags and merge ops Alexander Aring
2014-07-02 22:20 ` [PATCH v3 net-next 05/13] at86rf230: add support for at86rf23x desense Alexander Aring
[not found] ` <1404339655-8456-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-07-02 22:20 ` [PATCH v3 net-next 02/13] at86rf230: add regmap support Alexander Aring
2014-07-02 22:20 ` [PATCH v3 net-next 03/13] at86rf230: rework detect device handling Alexander Aring
2014-07-02 22:20 ` [PATCH v3 net-next 04/13] at86rf230: remove is212 and add driver data Alexander Aring
2014-07-02 22:20 ` [PATCH v3 net-next 06/13] at86rf230: rework transmit and receive handling Alexander Aring
2014-07-02 22:20 ` Alexander Aring [this message]
2014-07-02 22:20 ` [PATCH v3 net-next 08/13] at86rf230: rework irq_pol setting Alexander Aring
2014-07-02 22:20 ` [PATCH v3 net-next 09/13] at86rf230: rework state change and start/stop Alexander Aring
2014-07-02 22:20 ` [PATCH v3 net-next 11/13] at86rf230: add timing for channel switch Alexander Aring
2014-07-02 22:20 ` [PATCH v3 net-next 13/13] at86rf230: add new author Alexander Aring
2014-07-02 22:20 ` [PATCH v3 net-next 10/13] at86rf230: rework reset to trx_off state change Alexander Aring
2014-07-02 22:20 ` [PATCH v3 net-next 12/13] at86rf230: add sleep cycle timing Alexander Aring
2014-07-08 4:29 ` [PATCH v3 net-next 00/13] at86rf230: rework driver implementation David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1404339655-8456-8-git-send-email-alex.aring@gmail.com \
--to=alex.aring-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).