summaryrefslogtreecommitdiffstats
path: root/include/net/mac802154.h
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-06-06 17:30:47 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-06-07 09:13:32 +0200
commit6b70a43c7e0202cf285c864bc9f20f607c42e432 (patch)
tree2963019fddaa28767839144f255cb31e27e34757 /include/net/mac802154.h
parented65963ba0a2bdc330b1d7183f930d1c6a0a6685 (diff)
downloadlinux-6b70a43c7e0202cf285c864bc9f20f607c42e432.tar.gz
linux-6b70a43c7e0202cf285c864bc9f20f607c42e432.tar.bz2
linux-6b70a43c7e0202cf285c864bc9f20f607c42e432.zip
mac802154: cleanup address filtering flags
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> Reviewed-by: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/mac802154.h')
-rw-r--r--include/net/mac802154.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/include/net/mac802154.h b/include/net/mac802154.h
index 80a9e60ceb0c..845e4f88a33e 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