linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Peter Große" <pegro@friiks.de>, linux-wireless@vger.kernel.org
Subject: Re: Setting TX power on a monitoring interface
Date: Sat, 09 Dec 2017 20:53:56 +0100	[thread overview]
Message-ID: <1512849236.26976.43.camel@sipsolutions.net> (raw)
In-Reply-To: <20171201183446.2c5f8504@fem-net.de> (sfid-20171201_183454_527148_F6A8C87B)

Hi,

(side note - I might reply faster if you don't drop me from Cc, since
then it goes to my inbox in addition to my list folder)

> > I meant to pass the &monitor_sdata.vif pointer instead of the real
> > monitor interface that's coming through cfg80211. The former is virtual
> > and has no netdev, but the diver is aware of it.
> 
> I'm not sure I get where to pass this to what. Do you mean in
> drv_bss_info_changed or ieee80211_set_tx_power?

Should be in ieee80211_set_tx_power, if the interface is you're getting
in (dev/sdata) is MONITOR. You need to do the right locking (or may
already have rtnl, check in nl80211.c) to get local->monitor_sdata, and
then reject the call if that is NULL or pass it through with that sdata
(or the vif from it)

> Assuming you meant ieee80211_set_tx_power, then I'd have to check whether wdev
> is a monitor interface and reject the configuration, if local->monitor_sdata
> doesn't exist?

Right.

> But in ieee80211_set_tx_power no vif pointers get handed around, so I'm
> confused. Sorry.

You have a wdev, that's equivalent. See the "if (wdev)" clause that
gets an sdata from the wdev, and then you have &sdata->vif as the vif.

johannes

  reply	other threads:[~2017-12-09 19:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 16:34 Setting TX power on a monitoring interface Peter Große
2017-11-27 11:43 ` Johannes Berg
2017-11-27 15:07   ` Peter Große
2017-12-01 14:49     ` Johannes Berg
2017-12-01 17:34       ` Peter Große
2017-12-09 19:53         ` Johannes Berg [this message]
2017-12-13 17:29           ` [PATCH] mac80211: Fix setting TX power on monitor interfaces Peter Große
2017-12-19  9:53             ` Johannes Berg
2017-12-19 19:25               ` Peter Große

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=1512849236.26976.43.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pegro@friiks.de \
    /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).