summaryrefslogtreecommitdiffstats
path: root/include/net/cfg802154.h
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-11-17 02:20:54 -0500
committerMarcel Holtmann <marcel@holtmann.org>2014-11-17 03:49:17 -0500
commitcb41c8dd01d74d091618f72e28f0282f064a9f0a (patch)
treeb81251728589e0f91f90f17fde0799687b3841e8 /include/net/cfg802154.h
parentb821ecd4c8a0b3b1fc1bdd191bb7d555d818cafe (diff)
ieee802154: rename and move WPAN_NUM_ defines
This patch moves the 802.15.4 constraints WPAN_NUM_ defines into "net/ieee802154.h" which should contain all necessary 802.15.4 related information. Also rename these defines to a common name which is IEEE802154_MAX_CHANNEL and IEEE802154_MAX_PAGE. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/cfg802154.h')
-rw-r--r--include/net/cfg802154.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index 507ac9d3d38a..228f1f7668f7 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -17,20 +17,13 @@
17#ifndef __NET_CFG802154_H 17#ifndef __NET_CFG802154_H
18#define __NET_CFG802154_H 18#define __NET_CFG802154_H
19 19
20#include <linux/ieee802154.h>
20#include <linux/netdevice.h> 21#include <linux/netdevice.h>
21#include <linux/mutex.h> 22#include <linux/mutex.h>
22#include <linux/bug.h> 23#include <linux/bug.h>
23 24
24#include <net/nl802154.h> 25#include <net/nl802154.h>
25 26
26/* According to the IEEE 802.15.4 stadard the upper most significant bits of
27 * the 32-bit channel bitmaps shall be used as an integer value to specify 32
28 * possible channel pages. The lower 27 bits of the channel bit map shall be
29 * used as a bit mask to specify channel numbers within a channel page.
30 */
31#define WPAN_NUM_CHANNELS 27
32#define WPAN_NUM_PAGES 32
33
34struct wpan_phy; 27struct wpan_phy;
35 28
36struct cfg802154_ops { 29struct cfg802154_ops {
@@ -81,7 +74,7 @@ struct wpan_phy {
81 */ 74 */
82 u8 current_channel; 75 u8 current_channel;
83 u8 current_page; 76 u8 current_page;
84 u32 channels_supported[32]; 77 u32 channels_supported[IEEE802154_MAX_PAGE + 1];
85 s8 transmit_power; 78 s8 transmit_power;
86 u8 cca_mode; 79 u8 cca_mode;
87 80