Linux wireless drivers development
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: Peter Oh <peter.oh@bowerswilkins.com>
Cc: "Venkateswara Naralasetty" <vnaralas@codeaurora.org>,
	"Jasmine Strong" <jas@eero.com>,
	"Ben Greear" <greearb@candelatech.com>,
	ath10k <ath10k@lists.infradead.org>,
	linux-wireless@vger.kernel.org,
	"Johannes Berg" <johannes@sipsolutions.net>,
	"Felix Fietkau" <nbd@nbd.name>,
	"Helmut Schaa" <helmut.schaa@googlemail.com>,
	"Michał Kazior" <kazikcz@gmail.com>
Subject: Re: [PATCHv2] ath10k : Fix channel survey dump
Date: Fri, 10 Aug 2018 00:26:43 +0200	[thread overview]
Message-ID: <11036966.yxZ1zVvfjs@sven-edge> (raw)
In-Reply-To: <619039a5-3b30-b49d-dc85-9ccfa4403251@bowerswilkins.com>

[-- Attachment #1: Type: text/plain, Size: 2074 bytes --]

On Donnerstag, 9. August 2018 20:46:26 CEST Peter Oh wrote:
> > In ath9k driver also survey data being accumulated in driver and send 
> > survey data to user space is accumulated one. same thing we are 
> > implementing in FW(with WMI request type WMI_BSS_SURVEY_REQ_TYPE_READ) 
> > instead of doing it in driver.
> It seems you're changing the behavior, not fixing a bug.
> WMI_BSS_SURVEY_REQ_TYPE_READ_CLEAR is handled differently from 
> WMI_BSS_SURVEY_REQ_TYPE_READ and as Jasmine addressed, userspace apps 
> that's counting on WMI_BSS_SURVEY_REQ_TYPE_READ_CLEAR behavior will be 
> broken their functions with your change.
> This means this patch will break backward compatibility.

Sounds to me like a bug when there is a driver independent API but two 
incompatible implementations:

* one driver using accumulated values over time
* one driver using non-accumulated values which are reset after each read to 0

Especially because there is already software which expects the accumulated 
values and which has no way to find out whether the just received data is now
accumulated or not. And it is also quite bad to have non-accumulated (ath10k's 
read+clear) data when multiple programs need to gather this data at the same 
time.

@Felix, @Johannes: Should &struct ieee80211_ops->get_survey/
NL80211_CMD_GET_SURVEY return "accumulated" channel utilizations values or 
clear the counters on each read? Might have missed the relevant phrase in 
include/uapi/linux/nl80211.h, include/net/cfg80211.h or
include/net/mac80211.h - so feel free to just point me to the already
existing documentation.


Btw. the same author also tried to implement the "accumulated data" behavior 
for get_survey in cfg80211 when a driver only supports read+clear:
https://patchwork.kernel.org/patch/10417673/

And here the earlier attempt (changing it from read_clear to read): 
https://patchwork.kernel.org/patch/9701459/ - the answer from Felix suggests 
that the accumulated values would be correct for the channel utilization 
related info in struct survey_info.

Kind regards,
	Sven


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-08-10  0:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-09  6:35 [PATCHv2] ath10k : Fix channel survey dump Venkateswara Naralasetty
2018-08-09 18:46 ` Peter Oh
2018-08-09 22:26   ` Sven Eckelmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-07-31 12:11 Venkateswara Naralasetty
2018-07-31 17:37 ` Ben Greear
2018-07-31 18:33   ` Jasmine Strong
2018-08-01  8:47   ` Venkateswara Naralasetty

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=11036966.yxZ1zVvfjs@sven-edge \
    --to=sven@narfation.org \
    --cc=ath10k@lists.infradead.org \
    --cc=greearb@candelatech.com \
    --cc=helmut.schaa@googlemail.com \
    --cc=jas@eero.com \
    --cc=johannes@sipsolutions.net \
    --cc=kazikcz@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    --cc=peter.oh@bowerswilkins.com \
    --cc=vnaralas@codeaurora.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