Re: [Make-wifi-fast] [PATCH RFC v4 3/4] mac80211: Add airtime accounting and scheduling to TXQs

2018-10-02 Thread Rajkumar Manoharan
On 2018-10-02 22:53, Rajkumar Manoharan wrote: Shouldn't have to call next_txq(). It should be as below. Anyway drv_wake_tx_queue is just an indication to driver and driver will always dequeue first node from list. diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 2dbfd1d8eb5f..74ac0b

Re: [PATCH 01/12] rtwlan: main files

2018-10-02 Thread Stanislaw Gruszka
On Wed, Oct 03, 2018 at 03:25:37AM +, Tony Chuang wrote: > Can I add you as Reviewed-by in RFCv2 ? Not yet :-) I'm going to review all (v2) patches in detail, not just first one, but this will take time. I'll post Reviewed-by tag when done and if I will have no remarks. > You helped me a lot

Re: [Make-wifi-fast] [PATCH RFC v4 3/4] mac80211: Add airtime accounting and scheduling to TXQs

2018-10-02 Thread Rajkumar Manoharan
On 2018-10-02 16:07, Rajkumar Manoharan wrote: On 2018-10-02 12:00, Toke Høiland-Jørgensen wrote: Rajkumar Manoharan writes: I noticed a race condition b/w sta cleanup and kick_airtime tasklet. How do you plan to exit kick_airtime gracefully during sta_cleanup? Ah, right, there's a lot of s

[PATCH 08/16] wireless: Replace spin_is_locked() with lockdep

2018-10-02 Thread Lance Roy
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Daniel Drake Cc: Ulrich Kunitz Cc: Kalle Valo Cc: "David S. Miller

Re: [PATCH 01/12] rtwlan: main files

2018-10-02 Thread Larry Finger
On 10/2/18 9:57 PM, Tony Chuang wrote: -Original Message- From: Larry Finger [mailto:larry.fin...@gmail.com] On Behalf Of Larry Finger Sent: Tuesday, October 02, 2018 11:24 PM To: Stanislaw Gruszka; Tony Chuang Cc: kv...@codeaurora.org; linux-wireless@vger.kernel.org; Pkshih; Andy Huan

RE: [PATCH 01/12] rtwlan: main files

2018-10-02 Thread Tony Chuang
> -Original Message- > From: Stanislaw Gruszka [mailto:sgrus...@redhat.com] > Sent: Tuesday, October 02, 2018 6:14 PM > To: Tony Chuang > Cc: kv...@codeaurora.org; larry.fin...@lwfinger.net; > linux-wireless@vger.kernel.org; Pkshih; Andy Huang > Subject: Re: [PATCH 01/12] rtwlan: main files

Re: [PATCH v2] ath10k: Add support for configuring management packet rate

2018-10-02 Thread Sriram R
On 2018-10-01 20:18, Kalle Valo wrote: Sriram R wrote: By default the firmware uses 1Mbps and 6Mbps rate for management packets in 2G and 5G bands respectively. But when the user selects different basic rates from the userspace, we need to send the management packets at the lowest basic rate

[PATCH] ath10k: Fix possible out of bound access of ath10k_rates array

2018-10-02 Thread Sriram R
While using 'ath10k_mac_get_rate_hw_value()' to obtain the hw value from the passed bitrate, there is a chance of out of bound array access when wrong bitrate is passed. This is fixed by comparing the bitrates within the correct size of the ath10k_rates array. Fixes commit f279294e9ee2 ("ath10k: a

RE: [PATCH 01/12] rtwlan: main files

2018-10-02 Thread Tony Chuang
> -Original Message- > From: Larry Finger [mailto:larry.fin...@gmail.com] On Behalf Of Larry Finger > Sent: Tuesday, October 02, 2018 11:24 PM > To: Stanislaw Gruszka; Tony Chuang > Cc: kv...@codeaurora.org; linux-wireless@vger.kernel.org; Pkshih; Andy > Huang > Subject: Re: [PATCH 01/12]

Re: pull-request: wireless-drivers 2018-10-01

2018-10-02 Thread David Miller
From: Kalle Valo Date: Mon, 01 Oct 2018 14:59:14 +0300 > here's a really small pull request to net tree for 4.19. More info below > and please let me know if there are any problems. Pulled, thank you.

Re: [Make-wifi-fast] [PATCH RFC v4 3/4] mac80211: Add airtime accounting and scheduling to TXQs

2018-10-02 Thread Rajkumar Manoharan
On 2018-10-02 12:00, Toke Høiland-Jørgensen wrote: Rajkumar Manoharan writes: I noticed a race condition b/w sta cleanup and kick_airtime tasklet. How do you plan to exit kick_airtime gracefully during sta_cleanup? Ah, right, there's a lot of stuff going on before we get to purge_txq. Hmm,

Re: [Make-wifi-fast] [PATCH RFC v4 3/4] mac80211: Add airtime accounting and scheduling to TXQs

2018-10-02 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > On 2018-10-02 01:22, Toke Høiland-Jørgensen wrote: >> Rajkumar Manoharan writes: >> Great! I'll fold in the rest, test it with ath9k and submit as a proper patch :) >>> Toke, >>> >>> I noticed a race condition b/w sta cleanup and kick_airtime

Re: pull-request: wireless-drivers-next 2018-10-02

2018-10-02 Thread David Miller
From: Kalle Valo Date: Tue, 02 Oct 2018 20:06:30 +0300 > here's the first pull request to net-next for 4.20. This is rather large > due to mt76 refactoring and me not being able to send the pull request > earlier, sorry about that. > > Most of this has been in linux-next for some time now so I'm

[PATCH 2/2] ath10k: Enable bundle tx compl for management frames in WCN3990

2018-10-02 Thread Rakesh Pillai
WCN3990 sends tx completion of multiple management frames bundled together in a single event, if the host driver exposes the support to handle this bundled tx completion event. This reduces the number of WMI events which are sent to the host driver by the target. Set the BUNDLE_TX_COMPL flag in th

[PATCH 1/2] ath10k: Handle bundled tx completion for managenent frames

2018-10-02 Thread Rakesh Pillai
WCN3990 supports sending tx completion for multiple management frames bundled together in a single event. Add support to handle the bundled tx completion event for WCN3990. Tested HW: WCN3990 Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1 Signed-off-by: Rakesh Pillai --- drivers/net/wireless/ath/

[PATCH 0/2] ath10k: Handle bundle tx completion for management pkts

2018-10-02 Thread Rakesh Pillai
WCN3990 sends the tx completion for management frames via wmi. The tx completion for the multiple management frames can also be bundled in a single wmi event and sent to the host driver. This reduces the number of WMI events sent to the host driver by the target. Enable the support in firmware to

[PATCH] ath10k: Set probe request oui during driver start

2018-10-02 Thread Rakesh Pillai
Currently the wmi command for setting probe request oui, needed for mac randomization, is sent during the mac register. At this time, during the driver init the wmi has already been detached. This can cause unexpected behavior since the firmware is already down and the wmi has been detached. Send

pull-request: wireless-drivers-next 2018-10-02

2018-10-02 Thread Kalle Valo
Hi Dave, here's the first pull request to net-next for 4.20. This is rather large due to mt76 refactoring and me not being able to send the pull request earlier, sorry about that. Most of this has been in linux-next for some time now so I'm hoping there should not be any nasty surprises, but plea

Re: [Make-wifi-fast] [PATCH RFC v4 3/4] mac80211: Add airtime accounting and scheduling to TXQs

2018-10-02 Thread Rajkumar Manoharan
On 2018-10-02 01:22, Toke Høiland-Jørgensen wrote: Rajkumar Manoharan writes: Great! I'll fold in the rest, test it with ath9k and submit as a proper patch :) Toke, I noticed a race condition b/w sta cleanup and kick_airtime tasklet. How do you plan to exit kick_airtime gracefully during s

Re: [PATCH 01/12] rtwlan: main files

2018-10-02 Thread Larry Finger
On 10/2/18 5:29 AM, Stanislaw Gruszka wrote: On Fri, Sep 28, 2018 at 11:32:41AM +, Tony Chuang wrote: if (rtw_hci_tx(rtwdev, &pkt_info, skb)) dev_kfree_skb_any(skb) just to remove 'return;' and out label. OK, but why not use ieee80211_free_txskb, should it be bett

Re: [RFC v2 1/2] ath10k: migrate to mac80211 txq scheduling

2018-10-02 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > On 2018-09-29 03:06, Toke Høiland-Jørgensen wrote: >> Rajkumar Manoharan writes: >> >>> - ath10k_htt_tx_txq_update(hw, f_txq); >>> + if (ret == -EBUSY) { >>> + ieee80211_txq_schedule_start(hw, ac); >>> + ieee80211_return_txq(hw, txq); >>> +

Re: [PATCH 01/12] rtwlan: main files

2018-10-02 Thread Stanislaw Gruszka
On Fri, Sep 28, 2018 at 11:32:41AM +, Tony Chuang wrote: > > if (rtw_hci_tx(rtwdev, &pkt_info, skb)) > > dev_kfree_skb_any(skb) > > > > just to remove 'return;' and out label. > > > OK, but why not use ieee80211_free_txskb, should it be better for mac80211? Yes, it is better

Re: [PATCH 01/12] rtwlan: main files

2018-10-02 Thread Stanislaw Gruszka
Hi On Tue, Oct 02, 2018 at 09:35:35AM +, Tony Chuang wrote: > > Hi Kale & Stanislaw, > > I am working on the driver code and making some changes that Stanislaw > have mentioned. And I expected that I will finish them tomorrow, what > should I do after I finished them? > > Should I send an R

RE: [PATCH 01/12] rtwlan: main files

2018-10-02 Thread Tony Chuang
Hi Kale & Stanislaw, I am working on the driver code and making some changes that Stanislaw have mentioned. And I expected that I will finish them tomorrow, what should I do after I finished them? Should I send an RFCv2, or start a new RFC for it ? Because our driver will be renamed from rtwlan

[PATCH 04/13] qtnfmac: do not initialize per-MAC data multiple times

2018-10-02 Thread Sergey Matyukevich OS
From: Igor Mitsyanko Several members of pwr-MAC structure are re-initialized several times together with per-VIF initialization. Fix that and simplify the code. Signed-off-by: Igor Mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/core.c | 23 +-- 1 file changed, 13 inse

[PATCH 06/13] qtnfmac: do not cancel scan in disconnect callback

2018-10-02 Thread Sergey Matyukevich OS
From: Igor Mitsyanko Do not cancel scan in disconnect callback. If there is an active scan, it will be cancelled by firmware, then host driver will be properly notified by event. Cancelling scan in disconnect callback occasionally may lead to the following race issue. Host is able to queue one s

[PATCH 05/13] qtnfmac: cleanup and unify command error handling

2018-10-02 Thread Sergey Matyukevich OS
Unify command error handling using qtnf_cmd_resp_result_decode function. Do not duplicate error messages in command handlers and cfg80211 callbacks: report 'cmd exec fail' only on control path internal failure. Remove redundant 'unlikely' macros. Signed-off-by: Sergey Matyukevich --- drivers/net

[PATCH 11/13] qtnfmac: add support for scan dwell time configuration

2018-10-02 Thread Sergey Matyukevich OS
Firmware supports scan dwell time tuning for various types of scans. Enable support for this feature: - advertise capability to configure channel dwell time to host - pass scan dwell parameters to wireless card in scan request Signed-off-by: Sergey Matyukevich --- drivers/net/wireless/quantenna/

[PATCH 12/13] qtnfmac: drop redundant data copy in control path

2018-10-02 Thread Sergey Matyukevich OS
Command responses and events from the firmware are copied twice in control path: at first in shm core (qtnf_shm_handle_new_data) and then in pcie bus drivers (qtnf_pcie_control_rx_callback). There is no need to copy this data twice, it can be done only once in rx callbacks. Signed-off-by: Sergey M

[PATCH 08/13] qtnfmac: pass supported extended capabilities to wiphy

2018-10-02 Thread Sergey Matyukevich OS
Driver retrieves information about supported extended capabilities from wireless card. However this information is not propagated further to Linux wireless core. Fix this by setting extended capabilities fields of wiphy structure. Signed-off-by: Sergey Matyukevich --- drivers/net/wireless/quante

[PATCH 13/13] qtnfmac: implement dump_station support for STA mode

2018-10-02 Thread Sergey Matyukevich OS
Current implementation of dump_station cfg80211 callback supports AP mode only. Add support for STA mode as well: by default in STA mode this callback is supposed to return AP on managed interface. Signed-off-by: Sergey Matyukevich --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 30 +

[PATCH 09/13] qtnfmac: drop error reports for out-of-bounds key indexes

2018-10-02 Thread Sergey Matyukevich OS
On disconnect wireless core attempts to remove all the supported keys. Following cfg80211_ops conventions, firmware returns -ENOENT code for the out-of-bound key indexes. This is a normal behavior, so no need to report errors for this case. Signed-off-by: Sergey Matyukevich --- drivers/net/wirel

[PATCH 01/13] qtnfmac: do not track STA states in driver

2018-10-02 Thread Sergey Matyukevich OS
Remove STA connection states tracking from driver. Leave it wireless core on host and to firmware. Signed-off-by: Sergey Matyukevich --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 59 +++ drivers/net/wireless/quantenna/qtnfmac/core.h | 7 --- drivers/net/wireles

[PATCH 07/13] qtnfmac: pass sgi rate info flag to wireless core

2018-10-02 Thread Sergey Matyukevich OS
SGI should be passed to wireless core as a part of rate structure. Otherwise wireless core performs incorrect rate calculation when SGI is enabled in hardware but not reported to host. Signed-off-by: Sergey Matyukevich --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 3 +++ 1 file changed

[PATCH 03/13] qtnfmac: request userspace to do OBSS scanning if FW can not

2018-10-02 Thread Sergey Matyukevich OS
From: Igor Mitsyanko In case firmware reports that it can not do OBSS scanning for 40MHz 2.4GHz channels itself, tell userpsace to do that instead by setting NL80211_FEATURE_NEED_OBSS_SCAN flag. Signed-off-by: Igor mitsyanko --- drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 3 +++ driver

[PATCH 10/13] qtnfmac: add support for scan flush

2018-10-02 Thread Sergey Matyukevich OS
Notify firmware to flush cache before scanning when needed. Signed-off-by: Sergey Matyukevich --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 6 ++ drivers/net/wireless/quantenna/qtnfmac/qlink.h | 1 + drivers/net/wireless/quantenna/qtnfmac/qlink_util.h | 8 3 files c

[PATCH 00/13] qtnfmac: fixes and cleanups for STA mode

2018-10-02 Thread Sergey Matyukevich OS
Hello Kalle and all, Here is the next patch set with fixes and cleanups for qtnfmac driver. This set mostly consists of multiple fixes and improvements for STA mode. The major changes include the following items: - fixes for 'iw' output: rates for enabled SGI, 'dump station' - expose more scan f

[PATCH 02/13] qtnfmac: generate local disconnect event in disconnect callback

2018-10-02 Thread Sergey Matyukevich OS
From: Igor Mitsyanko When cfg80211 disconnect callback is triggered and command is processed by firmware, disconnect event with local parameter set must be sent immediately. Indicating that it's a "local" event (not from AP) will help upper layers to process this event correctly. Signed-off-by:

Re: [Make-wifi-fast] [PATCH RFC v4 3/4] mac80211: Add airtime accounting and scheduling to TXQs

2018-10-02 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: >> Great! I'll fold in the rest, test it with ath9k and submit as a proper >> patch :) >> > Toke, > > I noticed a race condition b/w sta cleanup and kick_airtime tasklet. > How do you plan to exit kick_airtime gracefully during sta_cleanup? Ah, right, there's a lot o

Re: [PATCH 02/10] mt76: move mt76x02_rx_get_sta and mt76x02_rx_get_sta_wcid in mt76x02_util.c

2018-10-02 Thread Lorenzo Bianconi
> > EXPORT_SYMBOL_GPL(mt76x02_set_beacon_offsets); > > > > +struct mt76x02_sta * > > +mt76x02_rx_get_sta(struct mt76_dev *dev, u8 idx) > > +{ > > + struct mt76_wcid *wcid; > > + > > + if (idx >= ARRAY_SIZE(dev->wcid)) > > + return NULL; > > + > > + wcid = rcu_dereference(dev->wci

[PATCH 2/2] nl80211: use netlink policy validation function for elements

2018-10-02 Thread Johannes Berg
From: Johannes Berg Instead of open-coding a lot of calls to is_valid_ie_attr(), add this validation directly to the policy, now that we can. Signed-off-by: Johannes Berg --- net/wireless/nl80211.c | 122 +++-- 1 file changed, 46 insertions(+), 76 de

[PATCH 1/2] nl80211: use policy range validation where applicable

2018-10-02 Thread Johannes Berg
From: Johannes Berg Many range checks can be done in the policy, move them there. A few in mesh are added in the code (taken out of the macros) because they don't fit into the s16 range in the policy validation. Signed-off-by: Johannes Berg --- net/wireless/nl80211.c | 469 +++-

Re: [Make-wifi-fast] [PATCH RFC v4 3/4] mac80211: Add airtime accounting and scheduling to TXQs

2018-10-02 Thread Rajkumar Manoharan
On 2018-10-01 23:58, Rajkumar Manoharan wrote: Great! I'll fold in the rest, test it with ath9k and submit as a proper patch :) Toke, I noticed a race condition b/w sta cleanup and kick_airtime tasklet. How do you plan to exit kick_airtime gracefully during sta_cleanup? If kick_airtime tas