aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/net/cfg802154.h7
-rw-r--r--include/net/ieee802154_netdev.h4
-rw-r--r--include/net/mac802154.h5
3 files changed, 13 insertions, 3 deletions
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index 7f713acfa106..6ee2618ac78a 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -56,6 +56,11 @@ struct cfg802154_ops {
struct wpan_dev *wpan_dev, bool mode);
};
+struct wpan_phy_cca {
+ enum nl802154_cca_modes mode;
+ enum nl802154_cca_opts opt;
+};
+
struct wpan_phy {
struct mutex pib_lock;
@@ -76,7 +81,7 @@ struct wpan_phy {
u8 current_page;
u32 channels_supported[IEEE802154_MAX_PAGE + 1];
s8 transmit_power;
- u8 cca_mode;
+ struct wpan_phy_cca cca;
__le64 perm_extended_addr;
diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h
index 83bb8a73d23c..94a297052442 100644
--- a/include/net/ieee802154_netdev.h
+++ b/include/net/ieee802154_netdev.h
@@ -28,6 +28,8 @@
#include <linux/skbuff.h>
#include <linux/ieee802154.h>
+#include <net/cfg802154.h>
+
struct ieee802154_sechdr {
#if defined(__LITTLE_ENDIAN_BITFIELD)
u8 level:3,
@@ -337,7 +339,7 @@ struct ieee802154_mac_params {
s8 frame_retries;
bool lbt;
- u8 cca_mode;
+ struct wpan_phy_cca cca;
s32 cca_ed_level;
};
diff --git a/include/net/mac802154.h b/include/net/mac802154.h
index c823d910b46c..850647811749 100644
--- a/include/net/mac802154.h
+++ b/include/net/mac802154.h
@@ -20,6 +20,8 @@
#include <linux/ieee802154.h>
#include <linux/skbuff.h>
+#include <net/cfg802154.h>
+
/* General MAC frame format:
* 2 bytes: Frame Control
* 1 byte: Sequence Number
@@ -212,7 +214,8 @@ struct ieee802154_ops {
unsigned long changed);
int (*set_txpower)(struct ieee802154_hw *hw, int db);
int (*set_lbt)(struct ieee802154_hw *hw, bool on);
- int (*set_cca_mode)(struct ieee802154_hw *hw, u8 mode);
+ int (*set_cca_mode)(struct ieee802154_hw *hw,
+ const struct wpan_phy_cca *cca);
int (*set_cca_ed_level)(struct ieee802154_hw *hw,
s32 level);
int (*set_csma_params)(struct ieee802154_hw *hw,