From 94b792220ca9c080f4d1da8060f4c892c1b3b025 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Wed, 29 Oct 2014 21:34:32 +0100 Subject: mac802154: add support for promiscuous mode This patch adds a new driver operation to bring the transceiver into promiscuous mode. Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann --- net/mac802154/driver-ops.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'net/mac802154/driver-ops.h') 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 */ -- cgit v1.2.3