All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Helmut Schaa <helmut.schaa@googlemail.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [RFC 2/2] mac80211: Copy tx'ed beacons to monitor mode
Date: Tue, 01 Sep 2015 17:53:52 +0200	[thread overview]
Message-ID: <1441122832.2441.11.camel@sipsolutions.net> (raw)
In-Reply-To: <1441102364-32516-3-git-send-email-helmut.schaa@googlemail.com> (sfid-20150901_121453_804705_AA6F5ECB)

On Tue, 2015-09-01 at 12:12 +0200, Helmut Schaa wrote:
> When debugging wireless powersave issues on the AP side it's quite helpful
> to see our own beacons that are transmitted by the hardware/driver. However,
> this is not that easy since beacons don't pass through the regular TX queues.
> 
> Preferably drivers would call ieee80211_tx_status also for tx'ed beacons
> but that's not always possible. Hence, just send a copy of each beacon
> generated by ieee80211_beacon_get_tim to monitor devices when they are
> getting fetched by the driver.

Generally looks fine.

> @@ -3519,6 +3522,13 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
>  > 	> if (tim_length)
>  > 	> 	> *tim_length = offs.tim_length;
>  
> +> 	> /* send a copy to monitor interfaces */
> +> 	> if (hw_to_local(hw)->monitors && (copy = skb_copy(bcn, GFP_ATOMIC))) {
> +> 	> 	> shift = ieee80211_vif_get_shift(vif);
> +> 	> 	> sband = hw->wiphy->bands[ieee80211_get_sdata_band(vif_to_sdata(vif))];
> +> 	> 	> ieee80211_tx_monitor(hw_to_local(hw), copy, sband, 1, shift, true);
> +> 	> }


I don't really like the assignment in the if much - you could move the
variable declarations into it though.

send_to_cooked should be false, since very old versions of hostapd use
that and would really not expect the beacons there

That has me wondering if we can start to think about removing cooked
monitor mode - does anyone know if we perhaps broke it accidentally
anyway? ;-)

johannes

      parent reply	other threads:[~2015-09-01 15:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-01 10:12 [RFC 0/2] Send own beacons to monitor interfaces Helmut Schaa
2015-09-01 10:12 ` [RFC 1/2] mac80211: Split sending tx'ed frames to monitor interfaces into its own function Helmut Schaa
2015-09-01 10:12 ` [RFC 2/2] mac80211: Copy tx'ed beacons to monitor mode Helmut Schaa
2015-09-01 14:04   ` Felix Fietkau
2015-09-01 14:30     ` Helmut Schaa
2015-09-01 15:53   ` 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=1441122832.2441.11.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=helmut.schaa@googlemail.com \
    --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 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.