ath10k : Fix channel survey dump
Quoted 44 lines · Jasmine Strong
Quoted 28 lines · Ben Greear
Quoted 1 line · Venkateswara Naralasetty
Channel active/busy time are showing incorrect(less than previous
or
Quoted 16 lines
sometimes zero) for successive survey dump command.
example:
Survey data from wlan0frequency: 5180 MHz [in use] channel active time: 54995 ms channel busy time: 432 ms channel receive time: 0 ms channel transmit time: 59 ms Survey data from wlan0 frequency: 5180 MHz [in use] channel active time: 32592 ms channel busy time: 254 ms channel receive time: 0 ms channel transmit time: 0 msQuoted 3 lines
This patch fix this issue by assigning '
wmi_bss_survey_req_type' as 'WMI_BSS_SURVEY_REQ_TYPE_READ' which accumulate survey data in FW and send survey data to driver upon the driver request. Wraparound
Quoted 4 lines
is taken care by FW.
hardware used : QCA9984
firmware ver : ver 10.4-3.5.3-00057Quoted 6 lines
Have you tested this on other firmwares? I am pretty sure that at least
some of them, probably 10.2, will have issues.Maybe you could make this change specific to certain firmware that is known to work with the change?
There are bigger problems with it than that; even with firmwares that behave correctly,
this changes the behavior that a lot of upper-layer software depends upon, and will likely
make anything that actually uses the channel survey data misbehave.
Quoted 4 lines
It is therefore a breaking change for any device that actually implements ACS.
-J.
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.
Thanks,
Venkatesh.
_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
Quoted 45 lines · Venkateswara Naralasetty
Quoted 44 lines · Jasmine Strong
Quoted 28 lines · Ben Greear
Quoted 1 line · Venkateswara Naralasetty
Channel active/busy time are showing incorrect(less than previous
or
Quoted 16 lines
sometimes zero) for successive survey dump command.
example:
Survey data from wlan0frequency: 5180 MHz [in use] channel active time: 54995 ms channel busy time: 432 ms channel receive time: 0 ms channel transmit time: 59 ms Survey data from wlan0 frequency: 5180 MHz [in use] channel active time: 32592 ms channel busy time: 254 ms channel receive time: 0 ms channel transmit time: 0 msQuoted 3 lines
This patch fix this issue by assigning '
wmi_bss_survey_req_type' as 'WMI_BSS_SURVEY_REQ_TYPE_READ' which accumulate survey data in FW and send survey data to driver upon the driver request. Wraparound
Quoted 4 lines
is taken care by FW.
hardware used : QCA9984
firmware ver : ver 10.4-3.5.3-00057Quoted 6 lines
Have you tested this on other firmwares? I am pretty sure that at least
some of them, probably 10.2, will have issues.Maybe you could make this change specific to certain firmware that is known to work with the change?
There are bigger problems with it than that; even with firmwares that behave correctly,
this changes the behavior that a lot of upper-layer software depends upon, and will likely
make anything that actually uses the channel survey data misbehave.
Quoted 6 lines
Quoted 4 lines
It is therefore a breaking change for any device that actually implements ACS.
-J.
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.
Thanks,
Peter
_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
Quoted 10 lines · On Donnerstag, 9. August 2018 20:46:26 CEST Peter Oh wrote:
Quoted 4 lines
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_CLEARis handled differently fromWMI_BSS_SURVEY_REQ_TYPE_READand as Jasmine addressed, userspace apps that's counting onWMI_BSS_SURVEY_REQ_TYPE_READ_CLEARbehavior 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
_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k