All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Schmidt <stefan@osg.samsung.com>
To: Alexander Aring <aar@pengutronix.de>, linux-wpan@vger.kernel.org
Cc: kernel@pengutronix.de
Subject: Re: [PATCHv4 bluetooth-next 8/8] fakelb: allow to run as monitor
Date: Fri, 8 Jul 2016 13:25:00 +0200	[thread overview]
Message-ID: <7da07761-0a09-bca0-7668-d97230637d87@osg.samsung.com> (raw)
In-Reply-To: <20160706213231.23058-9-aar@pengutronix.de>

Hello.


On 06/07/16 23:32, Alexander Aring wrote:
> For my RIOT-OS in userspace experiments I need to create a fakelb
> monitor interface. The fakelb doesn't filter anything on L2 and is a
> purely raw interface. Because nl802154 checks on promiscuous mode which
> need to supported by creating monitors this patch adds some no-op
> promiscuous mode setting and the promiscuous flag.
>
> Signed-off-by: Alexander Aring<aar@pengutronix.de>
> ---
>   drivers/net/ieee802154/fakelb.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/drivers/net/ieee802154/fakelb.c b/drivers/net/ieee802154/fakelb.c
> index 860d4ae..0becf0a 100644
> --- a/drivers/net/ieee802154/fakelb.c
> +++ b/drivers/net/ieee802154/fakelb.c
> @@ -112,6 +112,12 @@ static void fakelb_hw_stop(struct ieee802154_hw *hw)
>   	write_unlock_bh(&fakelb_ifup_phys_lock);
>   }
>   
> +static int
> +fakelb_set_promiscuous_mode(struct ieee802154_hw *hw, const bool on)
> +{
> +	return 0;
> +}
> +
>   static const struct ieee802154_ops fakelb_ops = {
>   	.owner = THIS_MODULE,
>   	.xmit_async = fakelb_hw_xmit,
> @@ -119,6 +125,7 @@ static const struct ieee802154_ops fakelb_ops = {
>   	.set_channel = fakelb_hw_channel,
>   	.start = fakelb_hw_start,
>   	.stop = fakelb_hw_stop,
> +	.set_promiscuous_mode = fakelb_set_promiscuous_mode,
>   };
>   
>   /* Number of dummy devices to be set up by this module. */
> @@ -174,6 +181,7 @@ static int fakelb_add_one(struct device *dev)
>   	hw->phy->current_channel = 13;
>   	phy->channel = hw->phy->current_channel;
>   
> +	hw->flags = IEEE802154_HW_PROMISCUOUS;
>   	hw->parent = dev;
>   
>   	err = ieee802154_register_hw(hw);


Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>

regards
Stefan Schmidt

  reply	other threads:[~2016-07-08 11:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 21:32 [PATCHv4 bluetooth-next 0/8] ieee802154: pending/new fixes and cleanup/features Alexander Aring
2016-07-06 21:32 ` [PATCHv4 bluetooth-next 1/8] ieee802154: add ieee802154_skb_dst_pan helper Alexander Aring
2016-07-06 21:32 ` [PATCHv4 bluetooth-next 2/8] ieee802154: add ieee802154_skb_src_pan helper Alexander Aring
2016-07-06 21:32 ` [PATCHv4 bluetooth-next 3/8] ieee802154: 6lowpan: fix intra pan id check Alexander Aring
2016-07-23 11:03   ` Alexander Aring
2016-07-25  6:31     ` Alexander Aring
2016-07-26 11:24       ` Michael Richardson
2016-07-26 11:24     ` Michael Richardson
2016-07-06 21:32 ` [PATCHv4 bluetooth-next 4/8] ieee802154: fix skb get fc on big endian Alexander Aring
2016-07-06 21:32 ` [PATCHv4 bluetooth-next 5/8] 6lowpan: ndisc: set invalid unicast short addr to unspec Alexander Aring
2016-07-06 21:32 ` [PATCHv4 bluetooth-next 6/8] atusb: don't change csma settings while set channel Alexander Aring
2016-07-06 21:32 ` [PATCHv4 bluetooth-next 7/8] ieee802154: cleanup WARN_ON for fc fetch Alexander Aring
2016-07-08 11:23   ` Stefan Schmidt
2016-07-06 21:32 ` [PATCHv4 bluetooth-next 8/8] fakelb: allow to run as monitor Alexander Aring
2016-07-08 11:25   ` Stefan Schmidt [this message]
2016-07-08 11:24 ` [PATCHv4 bluetooth-next 0/8] ieee802154: pending/new fixes and cleanup/features Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7da07761-0a09-bca0-7668-d97230637d87@osg.samsung.com \
    --to=stefan@osg.samsung.com \
    --cc=aar@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-wpan@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.