linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: arwelle@cert.org
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC] mac80211_hwsim: Adds parameter use_hwsim_mon which can be used to disable hwism0
Date: Mon, 02 Nov 2015 13:24:54 +0100	[thread overview]
Message-ID: <1446467094.3205.14.camel@sipsolutions.net> (raw)
In-Reply-To: <1446239145-21119-1-git-send-email-arwelle@cert.org>

On Fri, 2015-10-30 at 17:05 -0400, arwelle@cert.org wrote:
> From: Adam Welle <arwelle@cert.org>
> 
> A new parameter, use_hwsim_mon has been created to implement new 
> functionalilty. use_hwsim_mon defaults to true so that normal 
> operation remains the same. When set to false, the hwsim0 device is 
> not created. This value is also checked before calling functions 
> which would transmit data to the hwsim0 device.

I understand the use case (since you explained it to me off-list), but
I don't think I want to apply this since in almost all cases having
hwsim0 around but unused isn't actually harmful.

FWIW,

> -	mac80211_hwsim_monitor_rx(hw, skb, channel);
> +	if (use_hwsim_mon)
> +		mac80211_hwsim_monitor_rx(hw, skb, channel);

Had I wanted to apply this, I'd probably have insisted to move the
check into the function instead of outside of it, since that leaves no
chances of getting it wrong when changing the code in the future.

johannes

      reply	other threads:[~2015-11-02 12:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 21:05 [RFC] mac80211_hwsim: Adds parameter use_hwsim_mon which can be used to disable hwism0 arwelle
2015-11-02 12:24 ` Johannes Berg [this message]

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=1446467094.3205.14.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arwelle@cert.org \
    --cc=linux-wireless@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).