]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - net/mac802154/driver-ops.h
mac802154: add support for promiscuous mode
[mirror_ubuntu-jammy-kernel.git] / net / mac802154 / driver-ops.h
index 4b820cfeb538dac69ec1c3f493163b30578b267b..dfd29ffb8fee392074bb1d84b5e1861adfd71798 100644 (file)
@@ -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 */