From: Johannes Berg <johannes@sipsolutions.net>
To: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, kvalo@qca.qualcomm.com
Subject: Re: [PATCH] cfg80211: support TX error rate CQM
Date: Wed, 11 Jul 2012 22:13:30 +0200 [thread overview]
Message-ID: <1342037610.4464.9.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1342034458-3889-1-git-send-email-c_tpeder@qca.qualcomm.com>
On Wed, 2012-07-11 at 12:20 -0700, Thomas Pedersen wrote:
> Let the user configure serveral TX error conection quality monitoring
> parameters: % error rate, survey interval, and # of attempted packets.
>
> On exceeding the TX failure rate over the given interval, the driver
> will send a CQM notify event with the actual TX failure rate and
> packets attempted.
It seems useful to me to also send the interval, in case somebody else
is listening to the events or in case the interval was changed, etc.?
> + * @NL80211_ATTR_CQM_TXE_RATE: TX error rate in %. Minimum % of TX failures
> + * during the given %NL80211_ATTR_CQM_TXE_INTVL before an
> + * %NL80211_CMD_NOTIFY_CQM with reported %NL80211_ATTR_CQM_TXE_RATE and
> + * %NL80211_ATTR_CQM_TXE_PKTS is generated.
Is percentage fine-grained enough? I guess it is?
> + * @NL80211_ATTR_CQM_TXE_PKTS: number of TX attempts in a given
> + * %NL80211_ATTR_CQM_TXE_INTVL before %NL80211_ATTR_CQM_TXE_RATE is
> + * checked.
I'm not sure I'd say "TX attempts", that gets confusing, do you count
retries? I guess not. Maybe say "attempted packets" or something else
that includes TX too?
> + * @NL80211_ATTR_CQM_TXE_INTVL: interval in seconds. Specifies the periodic
> + * interval in which %NL80211_ATTR_CQM_TXE_PKTS and
> + * %NL80211_ATTR_CQM_TXE_RATE must be satisfied before generating an
> + * %NL80211_CMD_NOTIFY_CQM.
Should there be some ... sanity checking? Like ... can't set it to more
than, say, half an hour?
> + } else if (attrs[NL80211_ATTR_CQM_TXE_RATE] &&
> + attrs[NL80211_ATTR_CQM_TXE_PKTS] &&
> + attrs[NL80211_ATTR_CQM_TXE_INTVL]) {
> + u32 rate, pkts, intvl;
> + rate = nla_get_u32(attrs[NL80211_ATTR_CQM_TXE_RATE]);
> + pkts = nla_get_u32(attrs[NL80211_ATTR_CQM_TXE_PKTS]);
> + intvl = nla_get_u32(attrs[NL80211_ATTR_CQM_TXE_INTVL]);
> + err = nl80211_set_cqm_txe(info, rate, pkts, intvl);
You should probably check things here ... e.g. the percentage can't be
>100? :-)
Also it seems like there should be some way to *disable* it again that
you should document?
johannes
next prev parent reply other threads:[~2012-07-11 20:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 19:20 [PATCH] cfg80211: support TX error rate CQM Thomas Pedersen
2012-07-11 20:13 ` Johannes Berg [this message]
2012-07-12 3:05 ` Pedersen, Thomas
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=1342037610.4464.9.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=c_tpeder@qca.qualcomm.com \
--cc=kvalo@qca.qualcomm.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.