[PATCHv2] ath10k : Fix channel survey dump
Channel active/busy time are showing incorrect(less than previous or sometimes zero) for successive survey dump command. example: Survey data from wlan0 frequency: 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 ms 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. Wrap around is taken care by FW. hardware used : QCA9984 firmware ver : ver 10.4-3.5.3-00057 Signed-off-by: Venkateswara Naralasetty --- v2: * updated commit log. drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index f068e2b..db93ab1 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6837,7 +6837,7 @@ ath10k_mac_update_bss_chan_survey(struct ath10k *ar, struct ieee80211_channel *channel) { int ret; - enum wmi_bss_survey_req_type type = WMI_BSS_SURVEY_REQ_TYPE_READ_CLEAR; + enum wmi_bss_survey_req_type type = WMI_BSS_SURVEY_REQ_TYPE_READ; lockdep_assert_held(&ar->conf_mutex); -- 2.7.4 ___ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
Re: [PATCHv2] ath10k : Fix channel survey dump
On 07/31/2018 05:11 AM, Venkateswara Naralasetty wrote: Channel active/busy time are showing incorrect(less than previous or sometimes zero) for successive survey dump command. example: Survey data from wlan0 frequency: 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 ms 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. Wrap around is taken care by FW. hardware used : QCA9984 firmware ver : ver 10.4-3.5.3-00057 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? Thanks, Ben Signed-off-by: Venkateswara Naralasetty --- v2: * updated commit log. drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index f068e2b..db93ab1 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6837,7 +6837,7 @@ ath10k_mac_update_bss_chan_survey(struct ath10k *ar, struct ieee80211_channel *channel) { int ret; - enum wmi_bss_survey_req_type type = WMI_BSS_SURVEY_REQ_TYPE_READ_CLEAR; + enum wmi_bss_survey_req_type type = WMI_BSS_SURVEY_REQ_TYPE_READ; lockdep_assert_held(&ar->conf_mutex); -- Ben Greear Candela Technologies Inc http://www.candelatech.com ___ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
RE: [PATCHv2] ath10k : Fix channel survey dump
> -Original Message- > From: ath10k On Behalf Of Ben > Greear > Sent: Tuesday, July 31, 2018 11:08 PM > To: Venkateswara Naralasetty ; > ath10k@lists.infradead.org > Cc: linux-wirel...@vger.kernel.org > Subject: Re: [PATCHv2] ath10k : Fix channel survey dump > > On 07/31/2018 05:11 AM, Venkateswara Naralasetty wrote: > > Channel active/busy time are showing incorrect(less than previous or > > sometimes zero) for successive survey dump command. > > > > example: > > Survey data from wlan0 > > frequency: 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 ms > > > > 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. Wrap around is > > taken care by FW. > > > > hardware used : QCA9984 > > firmware ver : ver 10.4-3.5.3-00057 > > Have you tested this on other firmwares? I am pretty sure that at least some > of them, probably 10.2, will have issues. > I have tested this change with firmware version 10.2.4-1.0-00036 (hw used QCA988x) as well it's working fine for me without any issues. > Maybe you could make this change specific to certain firmware that is known > to work with the change? > > Thanks, > Ben > > > > > Signed-off-by: Venkateswara Naralasetty > > --- > > v2: > > * updated commit log. > > > > drivers/net/wireless/ath/ath10k/mac.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/wireless/ath/ath10k/mac.c > > b/drivers/net/wireless/ath/ath10k/mac.c > > index f068e2b..db93ab1 100644 > > --- a/drivers/net/wireless/ath/ath10k/mac.c > > +++ b/drivers/net/wireless/ath/ath10k/mac.c > > @@ -6837,7 +6837,7 @@ ath10k_mac_update_bss_chan_survey(struct > ath10k *ar, > > struct ieee80211_channel *channel) { > > int ret; > > - enum wmi_bss_survey_req_type type = > WMI_BSS_SURVEY_REQ_TYPE_READ_CLEAR; > > + enum wmi_bss_survey_req_type type = > WMI_BSS_SURVEY_REQ_TYPE_READ; > > > > lockdep_assert_held(&ar->conf_mutex); > > > > > > > -- > Ben Greear > Candela Technologies Inc http://www.candelatech.com > > > ___ > ath10k mailing list > ath10k@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/ath10k ___ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
Re: [PATCHv2] ath10k : Fix channel survey dump
On 2018-08-01 00:03, Jasmine Strong wrote: On Tue, Jul 31, 2018 at 10:38 AM Ben Greear wrote: On 07/31/2018 05:11 AM, Venkateswara Naralasetty wrote: Channel active/busy time are showing incorrect(less than previous or sometimes zero) for successive survey dump command. example: Survey data from wlan0 frequency: 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 ms 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. Wrap around is taken care by FW. hardware used : QCA9984 firmware ver : ver 10.4-3.5.3-00057 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. 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 ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
Re: [PATCHv2] ath10k : Fix channel survey dump
On 08/08/2018 11:35 PM, Venkateswara Naralasetty wrote: On 2018-08-01 00:03, Jasmine Strong wrote: On Tue, Jul 31, 2018 at 10:38 AM Ben Greear wrote: On 07/31/2018 05:11 AM, Venkateswara Naralasetty wrote: Channel active/busy time are showing incorrect(less than previous or sometimes zero) for successive survey dump command. example: Survey data from wlan0 frequency: 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 ms 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. Wrap around is taken care by FW. hardware used : QCA9984 firmware ver : ver 10.4-3.5.3-00057 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. 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 ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
Re: [PATCHv2] ath10k : Fix channel survey dump
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 signature.asc Description: This is a digitally signed message part. ___ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k