From: Alexander Aring <alex.aring@gmail.com>
To: linux-wpan@vger.kernel.org
Cc: kernel@pengutronix.de, mkl@pengutronix.de,
Alexander Aring <alex.aring@gmail.com>
Subject: [PATCH bluetooth-next 1/3] mac802154: cleanup concurrent check
Date: Thu, 26 Mar 2015 12:46:28 +0100 [thread overview]
Message-ID: <1427370390-31302-1-git-send-email-alex.aring@gmail.com> (raw)
This patch cleanups the checking of different mac phy depended values by
handling depended mac settings per hw support flag in one condition.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
net/mac802154/iface.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index 9b8e264..3f6a3fe 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -174,24 +174,16 @@ ieee802154_check_mac_settings(struct ieee802154_local *local,
}
if (local->hw.flags & IEEE802154_HW_AFILT) {
- if (wpan_dev->pan_id != nwpan_dev->pan_id)
- return -EBUSY;
-
- if (wpan_dev->short_addr != nwpan_dev->short_addr)
- return -EBUSY;
-
- if (wpan_dev->extended_addr != nwpan_dev->extended_addr)
+ if (wpan_dev->pan_id != nwpan_dev->pan_id ||
+ wpan_dev->short_addr != nwpan_dev->short_addr ||
+ wpan_dev->extended_addr != nwpan_dev->extended_addr)
return -EBUSY;
}
if (local->hw.flags & IEEE802154_HW_CSMA_PARAMS) {
- if (wpan_dev->min_be != nwpan_dev->min_be)
- return -EBUSY;
-
- if (wpan_dev->max_be != nwpan_dev->max_be)
- return -EBUSY;
-
- if (wpan_dev->csma_retries != nwpan_dev->csma_retries)
+ if (wpan_dev->min_be != nwpan_dev->min_be ||
+ wpan_dev->max_be != nwpan_dev->max_be ||
+ wpan_dev->csma_retries != nwpan_dev->csma_retries)
return -EBUSY;
}
--
2.3.4
next reply other threads:[~2015-03-26 11:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-26 11:46 Alexander Aring [this message]
2015-03-26 11:46 ` [PATCH bluetooth-next 2/3] at86rf230: remove unnecessary spinlock Alexander Aring
2015-03-27 18:22 ` Marcel Holtmann
2015-03-26 11:46 ` [PATCH bluetooth-next 3/3] at86rf230: fix is_tx while error handling Alexander Aring
2015-03-26 11:54 ` Marc Kleine-Budde
2015-03-26 12:06 ` Alexander Aring
2015-03-26 15:01 ` Marcel Holtmann
2015-03-27 18:22 ` Marcel Holtmann
2015-03-27 18:22 ` [PATCH bluetooth-next 1/3] mac802154: cleanup concurrent check Marcel Holtmann
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=1427370390-31302-1-git-send-email-alex.aring@gmail.com \
--to=alex.aring@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-wpan@vger.kernel.org \
--cc=mkl@pengutronix.de \
/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