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: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

Reply via email to