Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-08 Thread Kan Yan
It is most likely just insufficient locking. active_txq_lock is per AC, can't protect local->aql_total_pending_airtime against racing conditions: void ieee80211_sta_update_pending_airtime(...) { spin_lock_bh(>active_txq_lock[ac]); ... local->aql_total_pending_airtime -=

[PATCH AUTOSEL 4.4 17/44] ath10k: wmi: disable softirq's while calling ieee80211_rx

2019-11-08 Thread Sasha Levin
From: Erik Stromdahl [ Upstream commit 37f62c0d5822f631b786b29a1b1069ab714d1a28 ] This is done in order not to trig the below warning in ieee80211_rx_napi: WARN_ON_ONCE(softirq_count() == 0); ieee80211_rx_napi requires that softirq's are disabled during execution. The High latency bus

[PATCH AUTOSEL 4.9 24/64] ath10k: wmi: disable softirq's while calling ieee80211_rx

2019-11-08 Thread Sasha Levin
From: Erik Stromdahl [ Upstream commit 37f62c0d5822f631b786b29a1b1069ab714d1a28 ] This is done in order not to trig the below warning in ieee80211_rx_napi: WARN_ON_ONCE(softirq_count() == 0); ieee80211_rx_napi requires that softirq's are disabled during execution. The High latency bus

[PATCH AUTOSEL 4.9 01/64] ath10k: fix kernel panic by moving pci flush after napi_disable

2019-11-08 Thread Sasha Levin
From: Tamizh chelvam [ Upstream commit bd1d395070cca4f42a93e520b0597274789274a4 ] When continuously running wifi up/down sequence, the napi poll can be scheduled after the CE buffers being freed by ath10k_pci_flush Steps: In a certain condition, during wifi down below scenario might occur.

[PATCH AUTOSEL 4.14 042/103] ath10k: wmi: disable softirq's while calling ieee80211_rx

2019-11-08 Thread Sasha Levin
From: Erik Stromdahl [ Upstream commit 37f62c0d5822f631b786b29a1b1069ab714d1a28 ] This is done in order not to trig the below warning in ieee80211_rx_napi: WARN_ON_ONCE(softirq_count() == 0); ieee80211_rx_napi requires that softirq's are disabled during execution. The High latency bus

[PATCH AUTOSEL 4.14 016/103] ath10k: limit available channels via DT ieee80211-freq-limit

2019-11-08 Thread Sasha Levin
From: Sven Eckelmann [ Upstream commit 34d5629d2ca89d847b7040762b87964c696c14da ] Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in the RX and TX path. These filtered channel can in theory still be used by the hardware but the signal strength is reduced so much that it

[PATCH AUTOSEL 4.14 003/103] ath10k: fix kernel panic by moving pci flush after napi_disable

2019-11-08 Thread Sasha Levin
From: Tamizh chelvam [ Upstream commit bd1d395070cca4f42a93e520b0597274789274a4 ] When continuously running wifi up/down sequence, the napi poll can be scheduled after the CE buffers being freed by ath10k_pci_flush Steps: In a certain condition, during wifi down below scenario might occur.

[PATCH AUTOSEL 4.19 092/205] ath10k: avoid possible memory access violation

2019-11-08 Thread Sasha Levin
From: "K.T.VIJAYAKUMAAR" [ Upstream commit 97c69a70dc2cecb2c3b96a66529e0082dabc2d2c ] array "ctl_power_table" access index "pream" is initialized with -1 and is raised as a static analysis tool issue. [drivers\net\wireless\ath\ath10k\wmi.c:4719] -> [drivers\net\wireless\ath\ath10k\wmi.c:4730]:

[PATCH AUTOSEL 4.19 094/205] ath10k: wmi: disable softirq's while calling ieee80211_rx

2019-11-08 Thread Sasha Levin
From: Erik Stromdahl [ Upstream commit 37f62c0d5822f631b786b29a1b1069ab714d1a28 ] This is done in order not to trig the below warning in ieee80211_rx_napi: WARN_ON_ONCE(softirq_count() == 0); ieee80211_rx_napi requires that softirq's are disabled during execution. The High latency bus

[PATCH AUTOSEL 4.19 029/205] ath10k: limit available channels via DT ieee80211-freq-limit

2019-11-08 Thread Sasha Levin
From: Sven Eckelmann [ Upstream commit 34d5629d2ca89d847b7040762b87964c696c14da ] Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in the RX and TX path. These filtered channel can in theory still be used by the hardware but the signal strength is reduced so much that it

[PATCH AUTOSEL 4.19 023/205] ath10k: skip resetting rx filter for WCN3990

2019-11-08 Thread Sasha Levin
From: Rakesh Pillai [ Upstream commit 58da3b42307061b71f2dcce2bd1185d578a3aa53 ] WCN3990 has the MAC_PCU_ADDR1 configured properly and hence it will not send spurious ack frames during boot up. Hence the reset_rx_filter workaround is not needed for WCN3990. Add a hw_param to indicate if

[PATCH AUTOSEL 4.19 003/205] ath10k: fix kernel panic by moving pci flush after napi_disable

2019-11-08 Thread Sasha Levin
From: Tamizh chelvam [ Upstream commit bd1d395070cca4f42a93e520b0597274789274a4 ] When continuously running wifi up/down sequence, the napi poll can be scheduled after the CE buffers being freed by ath10k_pci_flush Steps: In a certain condition, during wifi down below scenario might occur.

Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-08 Thread Johannes Berg
On Fri, 2019-11-08 at 12:10 +0100, Toke Høiland-Jørgensen wrote: > Right, bugger. I was thinking maybe there's a case where skbs can be > cloned (and retain the tx_time_est field) and then released twice? They could be cloned, but I don't see how that'd be while *inside* the stack and then they

Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-08 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > On Fri, 2019-11-08 at 11:56 +0100, Toke Høiland-Jørgensen wrote: >> Johannes Berg writes: >> >> > On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: >> > > >> > > +void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local, >> > > +

Re: [PATCH v6 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue

2019-11-08 Thread Johannes Berg
On Fri, 2019-11-08 at 12:01 +0100, Toke Høiland-Jørgensen wrote: > > My reasoning for doing it this way was that we have another set of APIs > dealing with airtime which doesn't do any shifting; so keeping the APIs > in the same unit (straight airtime) seemed less confusing. Fair enough. > We

Re: [PATCH v6 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue

2019-11-08 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: >> >> +if (info->tx_time_est) { >> +struct sta_info *sta = NULL, *s; >> +struct rhlist_head *tmp; >> + >> +rcu_read_lock(); >> + >> +

Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-08 Thread Johannes Berg
On Fri, 2019-11-08 at 11:56 +0100, Toke Høiland-Jørgensen wrote: > Johannes Berg writes: > > > On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: > > > > > > +void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local, > > > + struct

Re: [PATCH v6 2/4] mac80211: Import airtime calculation code from mt76

2019-11-08 Thread Johannes Berg
On Fri, 2019-11-08 at 11:55 +0100, Toke Høiland-Jørgensen wrote: > Johannes Berg writes: > > > On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: > > > From: Toke Høiland-Jørgensen > > > > > > Felix recently added code to calculate airtime of packets to the mt76 > > > driver.

Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-08 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: >> >> >> +void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local, >> + struct sta_info *sta, u8 ac, >> + u16

Re: [PATCH v6 2/4] mac80211: Import airtime calculation code from mt76

2019-11-08 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: >> From: Toke Høiland-Jørgensen >> >> Felix recently added code to calculate airtime of packets to the mt76 >> driver. Import this into mac80211 so we can use it for airtime queue limit >> calculations

Re: [PATCH V9 2/3] mac80211: add hw 80211 encapsulation offloading support

2019-11-08 Thread Johannes Berg
FWIW, I applied the first patch since it's just some preparation. Couple of questions on this. > +/** > + * ieee80211_set_hw_80211_encap - enable hardware encapsulation offloading. > + * > + * This function is used to notify mac80211 that a vif can be passed raw > 802.3. > + * The driver needs

Re: [PATCH v6 4/4] mac80211: Use Airtime-based Queue Limits (AQL) on packet dequeue

2019-11-08 Thread Johannes Berg
On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: > > + if (info->tx_time_est) { > + struct sta_info *sta = NULL, *s; > + struct rhlist_head *tmp; > + > + rcu_read_lock(); > + > + for_each_sta_info(local, hdr->addr1, s, tmp) { > +

Re: [PATCH v6 3/4] mac80211: Implement Airtime-based Queue Limit (AQL)

2019-11-08 Thread Johannes Berg
On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: > > > +void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local, > + struct sta_info *sta, u8 ac, > + u16 tx_airtime, bool tx_completed) >

Re: [PATCH v6 2/4] mac80211: Import airtime calculation code from mt76

2019-11-08 Thread Johannes Berg
On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: > From: Toke Høiland-Jørgensen > > Felix recently added code to calculate airtime of packets to the mt76 > driver. Import this into mac80211 so we can use it for airtime queue limit > calculations later. > > The airtime.c file is

Re: [PATCH v6 1/4] mac80211: Shrink the size of ack_frame_id to make room for tx_time_est

2019-11-08 Thread Johannes Berg
On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: > From: Toke Høiland-Jørgensen > > To implement airtime queue limiting, we need to keep a running account of > the estimated airtime of all skbs queued into the device. Do to this > correctly, we need to store the airtime estimate

Re: [PATCH] ath10k: add large size for BMI download data for SDIO

2019-11-08 Thread Kalle Valo
Wen Gong writes: > Download firmware time cost of SDIO is too long, it is about 480ms, > add large size 2048 bytes for BMI download for SDIO chip, its time > cost will reduced to 240ms. > > This will optimize the download firmware time cost. > > Tested with QCA6174 SDIO with firmware >

[PATCH v2] ath10k: add NL80211_FEATURE_ND_RANDOM_MAC_ADDR for NLO

2019-11-08 Thread Wen Gong
Add NL80211_FEATURE_ND_RANDOM_MAC_ADDR for NLO will enable the random mac address for netdetect case. iw command: iw phy0 wowlan enable net-detect net-detect randomize=AA:7B:A1:AC:B2:41/FF:FF:FF:FF:FF:FF interval 5000 delay 30 freqs 2412 matches ssid foo. After suspend, DUT will send probe request

[PATCH] ath10k: enable firmware log by default for sdio

2019-11-08 Thread Wen Gong
On SDIO chips the firmware log does not impact performance. To make it easier to debug firmware problems keep it enabled on the firmware. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00029. Signed-off-by: Wen Gong --- drivers/net/wireless/ath/ath10k/core.c | 12 1 file

Re: [PATCH] ath10k: disable cpuidle during downloading firmware.

2019-11-08 Thread Kalle Valo
Ikjoon Jang wrote: > Downloading ath10k firmware needs a large number of IOs and > cpuidle's miss predictions make it worse. In the worst case, > resume time can be three times longer than the average on sdio. > > This patch disables cpuidle during firmware downloading by > applying

Re: [PATCH] ath10k: fix potential issue of peer stats allocation

2019-11-08 Thread Kalle Valo
Zhi Chen wrote: > STA number was not restored if OOM happened. > > Tested: QCA9984 with firmware ver 10.4-3.9.0.1-00018 > Signed-off-by: Zhi Chen > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. 402838a05def ath10k: fix potential issue of peer stats

Re: [PATCH] ath10k: fix get invalid tx rate for Mesh metric

2019-11-08 Thread Kalle Valo
Miaoqing Pan wrote: > ath10k does not provide transmit rate info per MSDU > in tx completion, mark that as -1 so mac80211 > will ignore the rates. This fixes mac80211 update Mesh > link metric with invalid transmit rate info. > > Tested HW: QCA9984 > Tested FW: 10.4-3.9.0.2-00035 > >

Re: [PATCH 1/2] dt: bindings: add dt entry flag to skip SCM call for msa region

2019-11-08 Thread Kalle Valo
Govind Singh wrote: > Add boolean context flag to disable SCM call for statically > mapped msa region. > > Signed-off-by: Govind Singh > Signed-off-by: Kalle Valo I was wondering why there are no review comments from DT folks and then noticed that you didn't CC the devicetree list. Please

Re: [PATCH] ath10k: disable cpuidle during downloading firmware.

2019-11-08 Thread Kalle Valo
Ikjoon Jang writes: > On Thu, Nov 7, 2019 at 2:23 AM Kalle Valo wrote: >> >> Ikjoon Jang writes: >> >> > Downloading ath10k firmware needs a large number of IOs and >> > cpuidle's miss predictions make it worse. In the worst case, >> > resume time can be three times longer than the average on

Re: [PATCH] ath10k: disable cpuidle during downloading firmware.

2019-11-08 Thread Kalle Valo
Tom Psyborg writes: > On 06/11/2019, Kalle Valo wrote: >> Ikjoon Jang writes: >> >>> Downloading ath10k firmware needs a large number of IOs and >>> cpuidle's miss predictions make it worse. In the worst case, >>> resume time can be three times longer than the average on sdio. >>> >>> This