diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-10-29 16:34:32 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-10-29 18:07:45 -0400 |
commit | 94b792220ca9c080f4d1da8060f4c892c1b3b025 (patch) | |
tree | 2cb60c0d4cb578c203577ae5538521188913505e /net/mac802154 | |
parent | c8fc84ed60f0ec85ab71f6026add1523523e4bd5 (diff) |
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 <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r-- | net/mac802154/driver-ops.h | 13 |
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, | |||
210 | return local->ops->set_frame_retries(&local->hw, max_frame_retries); | 210 | return local->ops->set_frame_retries(&local->hw, max_frame_retries); |
211 | } | 211 | } |
212 | 212 | ||
213 | static inline int drv_set_promiscuous_mode(struct ieee802154_local *local, | ||
214 | const bool on) | ||
215 | { | ||
216 | might_sleep(); | ||
217 | |||
218 | if (!local->ops->set_promiscuous_mode) { | ||
219 | WARN_ON(1); | ||
220 | return -EOPNOTSUPP; | ||
221 | } | ||
222 | |||
223 | return local->ops->set_promiscuous_mode(&local->hw, on); | ||
224 | } | ||
225 | |||
213 | #endif /* __MAC802154_DRVIER_OPS */ | 226 | #endif /* __MAC802154_DRVIER_OPS */ |