summaryrefslogtreecommitdiff
path: root/include/net/cfg802154.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/cfg802154.h')
-rw-r--r--include/net/cfg802154.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index 23abd08a310a..37abc1603285 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -94,6 +94,18 @@ struct wpan_phy_cca {
enum nl802154_cca_opts opt;
};
+static inline bool
+wpan_phy_cca_cmp(const struct wpan_phy_cca *a, const struct wpan_phy_cca *b)
+{
+ if (a->mode != b->mode)
+ return false;
+
+ if (a->mode == NL802154_CCA_ENERGY_CARRIER)
+ return a->opt == b->opt;
+
+ return true;
+}
+
struct wpan_phy {
struct mutex pib_lock;