Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: linux-wpan@vger.kernel.org
Cc: kernel@pengutronix.de, Alexander Aring <alex.aring@gmail.com>
Subject: [PATCH bluetooth-next 2/8] mac802154: cleanup address filtering flags
Date: Sat,  6 Jun 2015 17:30:47 +0200	[thread overview]
Message-ID: <1433604653-9585-3-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1433604653-9585-1-git-send-email-alex.aring@gmail.com>

This patch changes the address filtering flags to enums and setting the
flag values with the BIT macro. Additional this patch changes the
commenting style for matching usual kernel style.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 include/net/mac802154.h | 31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/include/net/mac802154.h b/include/net/mac802154.h
index 80a9e60..845e4f8 100644
--- a/include/net/mac802154.h
+++ b/include/net/mac802154.h
@@ -31,18 +31,29 @@
  */
 #define MAC802154_FRAME_HARD_HEADER_LEN		(2 + 1 + 20 + 14)
 
-/* The following flags are used to indicate changed address settings from
+/**
+ * enum ieee802154_hw_addr_filt_flags - hardware address filtering flags
+ *
+ * The following flags are used to indicate changed address settings from
  * the stack to the hardware.
+ *
+ * @IEEE802154_AFILT_SADDR_CHANGED: Indicates that the short address will be
+ *	change.
+ *
+ * @IEEE802154_AFILT_IEEEADDR_CHANGED: Indicates that the extended address
+ *	will be change.
+ *
+ * @IEEE802154_AFILT_PANID_CHANGED: Indicates that the pan id will be change.
+ *
+ * @IEEE802154_AFILT_PANC_CHANGED: Indicates that the address filter will
+ *	do frame address filtering as a pan coordinator.
  */
-
-/* indicates that the Short Address changed */
-#define IEEE802154_AFILT_SADDR_CHANGED		0x00000001
-/* indicates that the IEEE Address changed */
-#define IEEE802154_AFILT_IEEEADDR_CHANGED	0x00000002
-/* indicates that the PAN ID changed */
-#define IEEE802154_AFILT_PANID_CHANGED		0x00000004
-/* indicates that PAN Coordinator status changed */
-#define IEEE802154_AFILT_PANC_CHANGED		0x00000008
+enum ieee802154_hw_addr_filt_flags {
+	IEEE802154_AFILT_SADDR_CHANGED		= BIT(1),
+	IEEE802154_AFILT_IEEEADDR_CHANGED	= BIT(2),
+	IEEE802154_AFILT_PANID_CHANGED		= BIT(3),
+	IEEE802154_AFILT_PANC_CHANGED		= BIT(4),
+};
 
 struct ieee802154_hw_addr_filt {
 	__le16	pan_id;		/* Each independent PAN selects a unique
-- 
2.4.1


  parent reply	other threads:[~2015-06-06 15:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-06 15:30 [PATCH bluetooth-next 0/8] mac802154: several cleanups Alexander Aring
2015-06-06 15:30 ` [PATCH bluetooth-next 1/8] mac802154: remove unneeded vif struct Alexander Aring
2015-06-07  2:36   ` Varka Bhadram
2015-06-06 15:30 ` Alexander Aring [this message]
2015-06-06 15:30 ` [PATCH bluetooth-next 3/8] mac802154: remove aack hw flag Alexander Aring
2015-06-06 19:49   ` Stefan Schmidt
2015-06-07  2:46   ` Varka Bhadram
2015-06-06 15:30 ` [PATCH bluetooth-next 4/8] mac802154: cleanup ieee802154 hardware flags Alexander Aring
2015-06-06 15:30 ` [PATCH bluetooth-next 5/8] mac802154: remove unused hw_filt attribute Alexander Aring
2015-06-06 15:30 ` [PATCH bluetooth-next 6/8] mac802154: rearrange attribute in ieee802154_hw Alexander Aring
2015-06-06 15:30 ` [PATCH bluetooth-next 7/8] mac802154: add missing structure comments Alexander Aring
2015-06-06 15:30 ` [PATCH bluetooth-next 8/8] mac802154: change pan_coord type to bool Alexander Aring
2015-06-07  3:23 ` [PATCH bluetooth-next 0/8] mac802154: several cleanups Varka Bhadram
2015-06-07  7:15 ` 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=1433604653-9585-3-git-send-email-alex.aring@gmail.com \
    --to=alex.aring@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-wpan@vger.kernel.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