summaryrefslogtreecommitdiffstats
path: root/net/mac802154/driver-ops.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac802154/driver-ops.h')
-rw-r--r--net/mac802154/driver-ops.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac802154/driver-ops.h b/net/mac802154/driver-ops.h
index 4b820cfeb538..dfd29ffb8fee 100644
--- a/net/mac802154/driver-ops.h
+++ b/net/mac802154/driver-ops.h
@@ -210,4 +210,17 @@ static inline int drv_set_max_frame_retries(struct ieee802154_local *local,
return local->ops->set_frame_retries(&local->hw, max_frame_retries);
}
+static inline int drv_set_promiscuous_mode(struct ieee802154_local *local,
+ const bool on)
+{
+ might_sleep();
+
+ if (!local->ops->set_promiscuous_mode) {
+ WARN_ON(1);
+ return -EOPNOTSUPP;
+ }
+
+ return local->ops->set_promiscuous_mode(&local->hw, on);
+}
+
#endif /* __MAC802154_DRVIER_OPS */