linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Helmut Schaa <helmut.schaa@googlemail.com>
To: Paul Stewart <pstew@google.com>
Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net
Subject: Re: [PATCH 2/2] mac80211: Add support for CQM tx bitrate monitoring
Date: Thu, 21 Oct 2010 14:02:43 +0200	[thread overview]
Message-ID: <201010211402.43857.helmut.schaa@googlemail.com> (raw)
In-Reply-To: <20101021035501.77DBF20423@glenhelen.mtv.corp.google.com>

Am Donnerstag 21 Oktober 2010 schrieb Paul Stewart:
> Add state, work proc and debugging parameters for monitoring
> transmit-rate changes.
> 
> Signed-off-by: Paul Stewart <pstew@google.com>
> ---

[...]

> diff --git a/net/mac80211/status.c b/net/mac80211/status.c
> index 3153c19..564aa2e 100644
> --- a/net/mac80211/status.c
> +++ b/net/mac80211/status.c
> @@ -154,6 +154,24 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
>  		}
>  
>  		ieee80211_queue_work(&local->hw, &local->recalc_smps);
> +	} else if (ieee80211_is_data(mgmt->frame_control) &&
> +		   sdata->vif.type == NL80211_IFTYPE_STATION) {
> +		struct ieee80211_if_managed *ifmgd;
> +		ifmgd = &sta->sdata->u.mgd;
> +		if (ifmgd->cqm_bitrate_thold != 0 &&
> +		    (ifmgd->last_cqm_tx_rate.idx != sta->last_tx_rate.idx ||
> +		     (ifmgd->last_cqm_tx_rate.flags &
> +		      (IEEE80211_TX_RC_MCS | IEEE80211_TX_RC_40_MHZ_WIDTH |
> +		       IEEE80211_TX_RC_SHORT_GI)) !=
> +		     (sta->last_tx_rate.flags &
> +		      (IEEE80211_TX_RC_MCS | IEEE80211_TX_RC_40_MHZ_WIDTH |
> +		       IEEE80211_TX_RC_SHORT_GI)) ||
> +		     sdata->u.mgd.last_cqm_bitrate == 0)) {
> +			ifmgd->last_cqm_tx_rate = sta->last_tx_rate;
> +			ifmgd->tx_bitrate_changed = true;
> +			ieee80211_queue_work(&local->hw,
> +					     &ifmgd->bitrate_notify_work);
> +		}
>  	}
>  }

Not sure but wouldn't that trigger a lot of unnecessary processing when a rate
gets probed by the rc algortihm? You might want to filter out probe frames
based on IEEE80211_TX_CTL_RATE_CTRL_PROBE as otherwise you could end up with
sending a huge number of events to userspace ...

Helmut

  reply	other threads:[~2010-10-21 12:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21  3:49 [PATCH 2/2] mac80211: Add support for CQM tx bitrate monitoring Paul Stewart
2010-10-21 12:02 ` Helmut Schaa [this message]
2010-10-21 15:58   ` Paul Stewart
2010-11-09 21:40     ` John W. Linville
2010-11-09 23:36       ` Paul Stewart
  -- strict thread matches above, loose matches on Subject: below --
2010-10-14 21:40 Paul Stewart
2010-10-15  5:21 ` Paul Stewart
2010-10-15  5:53   ` Johannes Berg
2010-10-15 16:08     ` Paul Stewart

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=201010211402.43857.helmut.schaa@googlemail.com \
    --to=helmut.schaa@googlemail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pstew@google.com \
    /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).