Handling user regdom hints while having intersected world regdom

2018-09-28 Thread Peter Große
Hi. When a setup has multiple wifi cards anounncing different regdoms, the regularitory subsystem stores an intersected world regdom using aplha2 "98". I wonder what the correct result should be, when I call "iw reg set 00" or with any other country code? Because in my system with multiple cards

[RFC v2 2/2] ath10k: reporting estimated tx airtime for fairness

2018-09-28 Thread Rajkumar Manoharan
Transmit airtime will be estimated from last tx rate used. Firmware report tx rate by peer stats. Airtime is computed on tx path and the same will be reported to mac80211 upon tx completion. Signed-off-by: Kan Yan Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/core.h |

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

2018-09-28 Thread Rajkumar Manoharan
ath10k maintains common txqs list for all stations. This txq management can be removed by migrating to mac80211 txq APIs and let mac80211 handle txqs reordering based on reported airtime. By doing this, txq fairness maintained in ath10k i.e processing N frames per txq is removed. By adapting to mac

Re: [RFC 2/2] ath10k: reporting estimated tx airtime for fairness

2018-09-28 Thread Ben Greear
On 09/28/2018 03:47 PM, Rajkumar Manoharan wrote: On 2018-09-28 12:57, Ben Greear wrote: On 09/28/2018 12:47 PM, Rajkumar Manoharan wrote: On 2018-09-28 08:25, Toke Høiland-Jørgensen wrote: So this just uses the calculated airtime based on rate and size? Wasn't there supposed to be an airtime

Re: [RFC 2/2] ath10k: reporting estimated tx airtime for fairness

2018-09-28 Thread Rajkumar Manoharan
On 2018-09-28 12:57, Ben Greear wrote: On 09/28/2018 12:47 PM, Rajkumar Manoharan wrote: On 2018-09-28 08:25, Toke Høiland-Jørgensen wrote: So this just uses the calculated airtime based on rate and size? Wasn't there supposed to be an airtime usage value reported by the firmware? :) Firmwa

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

2018-09-28 Thread Rajkumar Manoharan
On 2018-09-26 17:41, Rajkumar Manoharan wrote: @@ -4293,32 +4281,7 @@ static void ath10k_mac_op_tx(struct ieee80211_hw *hw, static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq) { - struct ath10k *ar = hw->priv

Re: [RFC 2/2] ath10k: reporting estimated tx airtime for fairness

2018-09-28 Thread Ben Greear
On 09/28/2018 12:47 PM, Rajkumar Manoharan wrote: On 2018-09-28 08:25, Toke Høiland-Jørgensen wrote: So this just uses the calculated airtime based on rate and size? Wasn't there supposed to be an airtime usage value reported by the firmware? :) Firmware interface changes are in progress. Air

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

2018-09-28 Thread Rajkumar Manoharan
On 2018-09-28 04:02, Toke Høiland-Jørgensen wrote: On 28 September 2018 12:47:51 CEST, Rajkumar Manoharan wrote: On 2018-09-28 03:35, Jonathan Morton wrote: On 28 Sep, 2018, at 1:19 pm, Rajkumar Manoharan wrote: This is going to break fairness; we only want to increase deficits when all sta

Re: [RFC 2/2] ath10k: reporting estimated tx airtime for fairness

2018-09-28 Thread Rajkumar Manoharan
On 2018-09-28 08:25, Toke Høiland-Jørgensen wrote: So this just uses the calculated airtime based on rate and size? Wasn't there supposed to be an airtime usage value reported by the firmware? :) Firmware interface changes are in progress. Airtime for sta/tid will be reported via htt tx-comp

Re: [RFC v4 2/2] ath10k: report tx rate using ieee80211_tx_rate_update()

2018-09-28 Thread Peter Oh
On 09/28/2018 12:10 PM, Peter Oh wrote: > > On 09/24/2018 12:10 AM, Anilkumar Kolli wrote: >> diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c >> b/drivers/net/wireless/ath/ath10k/htt_rx.c >> index f2405258a6d3..355c39a0486c 100644 >> --- a/drivers/net/wireless/ath/ath10k/htt_rx.c >> +++ b/

Re: [RFC v4 2/2] ath10k: report tx rate using ieee80211_tx_rate_update()

2018-09-28 Thread Peter Oh
On 09/24/2018 12:10 AM, Anilkumar Kolli wrote: > diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c > b/drivers/net/wireless/ath/ath10k/htt_rx.c > index f2405258a6d3..355c39a0486c 100644 > --- a/drivers/net/wireless/ath/ath10k/htt_rx.c > +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c > @@ -27

Re: pull-request: mac80211 2018-09-27

2018-09-28 Thread David Miller
From: Johannes Berg Date: Thu, 27 Sep 2018 13:18:50 +0200 > Here's another - unfortunately pretty large - set of fixes > for the current cycle. The changes are pretty simple or even > trivial though. > > Please pull and let me know if there's any problem. Pulled. If they are all legit fixes, h

Re: Problems and suggestions to the kernel module r8723bs

2018-09-28 Thread Larry Finger
On 9/28/18 5:02 AM, Simon Beginn wrote: That value means that the signal strength is way too low. One other possibility is that the chip has retained the setting and is not obeying the antenna number command. To check that, create a file (as root) named /etc/modprobe.d/50-r8723bs.conf, and add

Re: [RFC 2/2] ath10k: reporting estimated tx airtime for fairness

2018-09-28 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > Transmit airtime will be estimated from last tx rate used. > Firmware report tx rate by peer stats. Airtime is computed > on tx path and the same will be reported to mac80211 upon > tx completion. > > Signed-off-by: Kan Yan > Signed-off-by: Rajkumar Manoharan > ---

Re: Problem with sending pkt on a monitor port

2018-09-28 Thread Ben Greear
On 09/28/2018 12:14 AM, Johannes Berg wrote: Sorry, I'm a bit behind things ... It's actually created by mac80211, but only once, and not directly mapped to each vif seen by userspace - it's an internal construction. I'm not sure it matters, but ath10k firmware can also create a monitor vd

Re: How many null-data probes on connection loss?

2018-09-28 Thread Ben Greear
On 09/28/2018 12:19 AM, Johannes Berg wrote: On Thu, 2018-09-27 at 08:32 -0700, Ben Greear wrote: It seems though that if there's some noise or so on the channel you wouldn't be transmitting, so what kind of "network glitches" might affect this? AP going away unexpectedly for some time? I

Re: [PATCH 1/2] wireless-regdb: Sync FR with ETSI EN 301 893 V2.1.1 (2017-05)

2018-09-28 Thread Seth Forshee
On Mon, Sep 17, 2018 at 09:42:11AM +0200, Sven Eckelmann wrote: > The documents > https://www.etsi.org/deliver/etsi_en/301800_301899/301893/02.01.01_60/en_301893v020101p.pdf > and > https://www.anfr.fr/fileadmin/mediatheque/documents/controle/20171127ANFR_-_ficheRLAN_5GHz.pdf > show that the limits

Re: [PATCH 0/5] ath9k: FFT fixes and improvements

2018-09-28 Thread Tom Psyborg
compiles OK, no interfere with normal card operations (IBSS) so it should be merged. On 19/09/2018, Simon Wunderlich wrote: > During FFT evaluation on an AR9462 adapter, we noticed that there were > way less FFT samples received than we would expect. This patchset adds > some counters to be able

Re: [PATCH v3 00/24] add mt76x0e hw initialization support

2018-09-28 Thread Felix Fietkau
On 2018-09-28 13:38, Lorenzo Bianconi wrote: > Add hw initialization support for mt76x0e driver. > Remove usb dependency from generic init code (there is a > usb dependency in tx generic code not fixed yet). > Fix memory leak in mt76x0u_probe Merged, thanks. - Felix

[PATCH v3 13/24] mt76x0: init: remove duplicated initialization

2018-09-28 Thread Lorenzo Bianconi
Remove MT_HEADER_TRANS_CTRL_REG/MT_TSO_CTRL configuration since they are already initialized in mt76x0_init_mac_registers routine Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/mediat

[PATCH v3 18/24] mt76x0: pci: add hw initialization at bootstrap

2018-09-28 Thread Lorenzo Bianconi
Add mt76x0e_register_device routine in pci.c to initialize the device during hw probe. Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x0/init.c | 10 ++-- .../net/wireless/mediatek/mt76/mt76x0/pci.c | 47 ++- .../wireless/mediatek/mt76/mt76x02_eeprom.h

[PATCH v3 21/24] mt76x0: add ieee80211_ops ops pointer to mt76x0_alloc_device signature

2018-09-28 Thread Lorenzo Bianconi
Add ieee80211_ops ops pointer to mt76x0_alloc_device routine signature in order to specify mac80211 callbacks and remove usb dependency from mt76x0 generic code. Move mt76x0_ops callbacks in usb module in order to remove leftover usb dependency in mt76x0 generic code. Introduce mt76x0e_ops mac80211

[PATCH v3 23/24] mt76x0: eeprom: load eeprom data from mtd by default

2018-09-28 Thread Lorenzo Bianconi
Read eeprom data from mtd memory by default and fall-back to efuse if it fails Signed-off-by: Lorenzo Bianconi --- .../wireless/mediatek/mt76/mt76x0/eeprom.c| 56 ++- 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/eep

[PATCH v3 09/24] mt76x0: update initvals to latest version of vendor driver

2018-09-28 Thread Lorenzo Bianconi
Update mac/rf/dcoc initial values to latest version of vendor driver. Improve code readability Signed-off-by: Lorenzo Bianconi --- .../wireless/mediatek/mt76/mt76x0/initvals.h | 405 -- 1 file changed, 178 insertions(+), 227 deletions(-) diff --git a/drivers/net/wireless/mediat

[PATCH v3 24/24] mt76x0: usb: move mt76x0u_tx_prepare_skb in usb.c

2018-09-28 Thread Lorenzo Bianconi
Move mt76x0u_tx_prepare_skb routine in usb module in order to remove leftover usb dependency from generic code Signed-off-by: Lorenzo Bianconi --- .../wireless/mediatek/mt76/mt76x0/mt76x0.h| 8 +++ .../net/wireless/mediatek/mt76/mt76x0/tx.c| 23 --- .../net/wireless/

[PATCH v3 08/24] mt76: move mt76x2_wait_for_bbp in mt76x02-lib module

2018-09-28 Thread Lorenzo Bianconi
Move mt76x2_wait_for_bbp utility routine in mt76x02_util.h in order to be resued by mt76x0 driver. Morover rename it in mt76x02_wait_for_txrx_idle Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x02_util.h | 8 drivers/net/wireless/mediatek/mt76/mt76x2.h

[PATCH v3 22/24] mt76x0: pci: add mt76x0e_{start/stop} callbacks

2018-09-28 Thread Lorenzo Bianconi
Introduce mt76x0e_start and mt76x0e_stop mac80211 callbacks to start/stop device mac opening/closing the netdevice Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x0/pci.c | 34 +++ 1 file changed, 34 insertions(+) diff --git a/drivers/net/wireless/media

[PATCH v3 19/24] mt76x0: phy: set antenna parameter according to wireless band

2018-09-28 Thread Lorenzo Bianconi
Move mt76x0_ant_select routine in __mt76x0_phy_set_channel in order to configure antenna parameters according to the current wireless channel Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x0/phy.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions

[PATCH v3 20/24] mt76: move set_{tx,rx}_path routines in mt76x02-lib module

2018-09-28 Thread Lorenzo Bianconi
Move mt76x02_phy_set_rxpath and mt76x02_phy_tx_dac routines in mt76x02_phy.c since they are shared between mt76x2 and mt76x0 drivers. Moreover move chainmask variable from mt76x2/mt76x0 to mt76_dev data structure Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76.h |

[PATCH v3 17/24] mt76x0: usb: move initialization code in usb.c

2018-09-28 Thread Lorenzo Bianconi
Move usb initialization code in mt76x0-usb module in order to remove usb dependency from generic init code (not completed yet). Moreover fix a memory leak in usb probe if mt76x02_wait_for_mac fails Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x0/init.c | 54

[PATCH v3 15/24] mt76x0: init rx filter in mt76x0_init_hardware

2018-09-28 Thread Lorenzo Bianconi
Initialize rxfilter mask at bootstrap an not at mac start. This is a preliminary patch to share mt76x2_mac_start routine between mt76x2e and mt76x0e drivers Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 10 ++ drivers/net/wireless/mediatek/mt76/mt

[PATCH v3 11/24] mt76x0: usb: move mcu code in usb_mcu.c

2018-09-28 Thread Lorenzo Bianconi
Move usb mcu code in a dedicated source file in order to remove usb dependency from generic source files and improve code maintainability Signed-off-by: Lorenzo Bianconi --- .../wireless/mediatek/mt76/mt76x0/Makefile| 2 +- .../net/wireless/mediatek/mt76/mt76x0/mcu.h | 1 + .../net/wir

[PATCH v3 16/24] mt76: add mt76x02_mac_start routine

2018-09-28 Thread Lorenzo Bianconi
Introduce mt76x02_mac_start since the mac start code is shared between mt76x0e and mt76x2 drivers. Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 13 + drivers/net/wireless/mediatek/mt76/mt76x02_util.h | 1 + drivers/net/wireless/mediatek/mt7

[PATCH v3 14/24] mt76x0: init: remove MT_PBF_SYS_CTRL configuration in mt76x0_reset_csr_bbp

2018-09-28 Thread Lorenzo Bianconi
Remove MT_PBF_SYS_CTRL configuration in mt76x0_reset_csr_bbp since it is already initialized in mt76x0_init_mac_registers routine Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/

[PATCH v3 12/24] mt76x0: use mt76x02 utility routines in mt76x0 init code

2018-09-28 Thread Lorenzo Bianconi
Use mt76x02_wait_for_wpdma and mt76x02_wait_for_txrx_idle utility routines in mt76x0_init_hardware and mt76x0_mac_start and remove duplicated code Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x0/init.c | 19 ++- 1 file changed, 6 insertions(+), 13 delet

[PATCH v3 03/24] mt76: add mt76x02_dma_enable/mt76x02_dma_disable utility routines

2018-09-28 Thread Lorenzo Bianconi
Introduce mt76x02_dma_enable and mt76x02_dma_disable utility routines in order to be reused in mt76x0 mac configuration and remove duplicated code Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/Makefile | 2 +- .../net/wireless/mediatek/mt76/mt76x02_dma.h | 3 ++ ...

[PATCH v3 05/24] mt76: move queue initialization in mt76x02_mmio.c

2018-09-28 Thread Lorenzo Bianconi
Move mt76x02_dma_init, mt76x02_init_rx_queue and mt76x02_init_tx_queue routines in mt76x02-lib module in order to be reused by mt76x0 driver Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76.h | 4 +- .../net/wireless/mediatek/mt76/mt76x02_dma.h | 4 + .../net/wi

[PATCH v3 06/24] mt76: move mt76x02_beacon_offset in mt76x02_util.c

2018-09-28 Thread Lorenzo Bianconi
Move mt76x02_beacon_offset utility routine in mt76x02-lib module since it is shared between mt76x0 and mt76x2 driver and remove duplicated code. Moreover move beacon_offset data structure in mt76x02-lib module since it is shared between mt76x0 and mt76x2 drivers Signed-off-by: Lorenzo Bianconi --

[PATCH v3 07/24] mt76: mmio: add implementation of wr_rp and rd_rp

2018-09-28 Thread Lorenzo Bianconi
Introduce mmio implementation of mt76_mmio_rd_rp and mt76_mmio_wr_rp and remove mt76x2 duplicated code. mt76_mmio_{wr,rd}_rp allows to reuse mt76x0 init code adding mt76x0e support Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mmio.c | 26 +++ .../med

[PATCH v3 10/24] mt76x0: pci: move mcu code in pci_mcu.c

2018-09-28 Thread Lorenzo Bianconi
Move pci mcu code in a dedicated source file in order to improve maintainability and facilitate new device support development Signed-off-by: Lorenzo Bianconi --- .../wireless/mediatek/mt76/mt76x0/Makefile| 2 +- .../net/wireless/mediatek/mt76/mt76x0/mcu.h | 1 + .../net/wireless/media

[PATCH v3 01/24] mt76x0: use mt76_poll in mt76x0_set_wlan_state

2018-09-28 Thread Lorenzo Bianconi
Use mt76_poll utility routine in mt76x0_set_wlan_state to check if the PLL/XTAL is ready Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x0/init.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/m

[PATCH v3 04/24] mt76: move mt76x02_set_irq_mask in mt76x02_mmio.c

2018-09-28 Thread Lorenzo Bianconi
Move mt76x02_set_irq_mask, mt76x02_irq_enable and mt76x02_irq_disable in mt76x02-lib module in order to be reused by mt76x0 driver. Moreover move irq_lock and irqmask in mt76_mmio data structure Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mmio.c | 1 + drivers/net

[PATCH v3 00/24] add mt76x0e hw initialization support

2018-09-28 Thread Lorenzo Bianconi
Add hw initialization support for mt76x0e driver. Remove usb dependency from generic init code (there is a usb dependency in tx generic code not fixed yet). Fix memory leak in mt76x0u_probe Changes since v2: - rename mt76x02_wait_for_txrx_active in mt76x02_wait_for_txrx_idle Changes since v1: - r

[PATCH v3 02/24] mt76: move wait_for_wpdma in mt76x02_dma.h

2018-09-28 Thread Lorenzo Bianconi
Move wait_for_wpdma utility routine in mt76x02_dma.h in order to be reused by mt76x0 driver. Moreover add the possibility to specify the timeout value in wait_for_wpdma signature Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x02_dma.h | 10 ++ drivers/net/wir

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

2018-09-28 Thread Tony Chuang
> -Original Message- > From: Stanislaw Gruszka [mailto:sgrus...@redhat.com] > Sent: Friday, September 28, 2018 5:29 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 f

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

2018-09-28 Thread Toke Høiland-Jørgensen
On 28 September 2018 12:47:51 CEST, Rajkumar Manoharan wrote: >On 2018-09-28 03:35, Jonathan Morton wrote: >>> On 28 Sep, 2018, at 1:19 pm, Rajkumar Manoharan >>> wrote: >>> This is going to break fairness; we only want to increase deficits when all stations' deficits are ne

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

2018-09-28 Thread Rajkumar Manoharan
On 2018-09-28 03:35, Jonathan Morton wrote: On 28 Sep, 2018, at 1:19 pm, Rajkumar Manoharan wrote: This is going to break fairness; we only want to increase deficits when all stations' deficits are negative. Hence the two loops. Did you see any problems with those specifically? No. I didn'

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

2018-09-28 Thread Jonathan Morton
> On 28 Sep, 2018, at 1:19 pm, Rajkumar Manoharan > wrote: > >> This is going to break fairness; we only want to increase deficits when >> all stations' deficits are negative. Hence the two loops. Did you see >> any problems with those specifically? > > No. I didn't see any issue but the loop w

Re: [PATCH v2 08/24] mt76: move mt76x2_wait_for_bbp in mt76x02-lib module

2018-09-28 Thread Lorenzo Bianconi
> > On Fri, Sep 28, 2018 at 08:40:01AM +0200, Lorenzo Bianconi wrote: > > +static inline bool > > +mt76x02_wait_for_txrx_active(struct mt76_dev *dev) > > +{ > > + return __mt76_poll_msec(dev, MT_MAC_STATUS, > > + MT_MAC_STATUS_TX | MT_MAC_STATUS_RX, > > +

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

2018-09-28 Thread Rajkumar Manoharan
On 2018-09-28 02:58, Toke Høiland-Jørgensen wrote: Rajkumar Manoharan writes: On 2018-09-28 00:51, Toke Høiland-Jørgensen wrote: On 28 September 2018 07:29:03 CEST, Rajkumar Manoharan wrote: On 2018-09-26 17:09, Rajkumar Manoharan wrote: On 2018-09-26 02:22, Toke Høiland-Jørgensen wrote:

Re: Problems and suggestions to the kernel module r8723bs

2018-09-28 Thread Bastien Nocera
On Fri, 2018-09-28 at 12:02 +0200, Simon Beginn wrote: > > > > ccepted. Even if it had been correctly done, I would have NACKed > > it. > > Sry, would you reformulate this, please? I just can't > understand/determine what the word "NACKed" means in this situation > (Neither google or the raw t

Re: Problems and suggestions to the kernel module r8723bs

2018-09-28 Thread Simon Beginn
That value means that the signal strength is way too low. One other possibility is that the chip has retained the setting and is not obeying the antenna number command. To check that, create a file (as root) named /etc/modprobe.d/50-r8723bs.conf, and add a single line containing "options r8723b

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

2018-09-28 Thread Toke Høiland-Jørgensen
Rajkumar Manoharan writes: > On 2018-09-28 00:51, Toke Høiland-Jørgensen wrote: >> On 28 September 2018 07:29:03 CEST, Rajkumar Manoharan >> wrote: >>> On 2018-09-26 17:09, Rajkumar Manoharan wrote: On 2018-09-26 02:22, Toke Høiland-Jørgensen wrote: > Rajkumar Manoharan writes: >>> >>

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

2018-09-28 Thread Rajkumar Manoharan
On 2018-09-28 02:27, Rajkumar Manoharan wrote: On 2018-09-28 00:51, Toke Høiland-Jørgensen wrote: On 28 September 2018 07:29:03 CEST, Rajkumar Manoharan wrote: On 2018-09-26 17:09, Rajkumar Manoharan wrote: On 2018-09-26 02:22, Toke Høiland-Jørgensen wrote: Rajkumar Manoharan writes: :(

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

2018-09-28 Thread Stanislaw Gruszka
Hi On Fri, Sep 28, 2018 at 03:20:45AM +, Tony Chuang wrote: > > > + rtw_tx_pkt_info_update(rtwdev, &pkt_info, control, skb); > > > + if (rtw_hci_tx(rtwdev, &pkt_info, skb)) > > > + goto out; > > > + > > > + return; > > > + > > > +out: > > > + dev_kfree_skb_any(skb); > > This can be sim

[bug report] NFC: st21nfca: Fix some skb memory leaks

2018-09-28 Thread Dan Carpenter
Hello Christophe Ricard, The patch c490c557b67f: "NFC: st21nfca: Fix some skb memory leaks" from Jan 25, 2015, leads to the following static checker warning: drivers/nfc/st21nfca/core.c:742 st21nfca_hci_complete_target_discovered() warn: 'nfcid_skb' was already freed. drivers/nf

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

2018-09-28 Thread Rajkumar Manoharan
On 2018-09-28 00:51, Toke Høiland-Jørgensen wrote: On 28 September 2018 07:29:03 CEST, Rajkumar Manoharan wrote: On 2018-09-26 17:09, Rajkumar Manoharan wrote: On 2018-09-26 02:22, Toke Høiland-Jørgensen wrote: Rajkumar Manoharan writes: :( Yeah... I got confused with attached soft lockup

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

2018-09-28 Thread Stanislaw Gruszka
On Thu, Sep 27, 2018 at 10:40:44AM -0500, Larry Finger wrote: > On 9/27/18 8:50 AM, Stanislaw Gruszka wrote: > --snip > > > > > > +#define BIT_LEN_MASK_32(__bitlen) (0x >> (32 - (__bitlen))) > > > +#define BIT_OFFSET_LEN_MASK_32(__bitoffset, __bitlen) > > > \ > >

Re: [PATCH] mac80211: TDLS: fix skb queue/priority assignment

2018-09-28 Thread Toke Høiland-Jørgensen
Johannes Berg writes: > On Wed, 2018-09-05 at 14:50 +0200, Toke Høiland-Jørgensen wrote: > > (uh, sorry, bit late ...) > >> > The problem isn't so much how we handle it in mac80211 for the queueing, >> > but how we deal with things like A-MSDU and how we present it to the >> > driver ... for iwlw

Re: [PATCH v2 08/24] mt76: move mt76x2_wait_for_bbp in mt76x02-lib module

2018-09-28 Thread Stanislaw Gruszka
On Fri, Sep 28, 2018 at 08:40:01AM +0200, Lorenzo Bianconi wrote: > +static inline bool > +mt76x02_wait_for_txrx_active(struct mt76_dev *dev) > +{ > + return __mt76_poll_msec(dev, MT_MAC_STATUS, > + MT_MAC_STATUS_TX | MT_MAC_STATUS_RX, > +

[PATCH 11/18] iwlwifi: mvm: put HE SIG-B symbols/users data correctly

2018-09-28 Thread Luca Coelho
From: Johannes Berg As detected by Luca during code review when I move this in the next patch, the code here is putting the data into the wrong field (flags1 instead of flags2). Fix that. Fixes: e5721e3f770f ("iwlwifi: mvm: add radiotap data for HE") Reported-by: Luca Coelho Signed-off-by: Joha

[PATCH 14/18] iwlwifi: mvm: move HE-MU LTF_NUM parsing to he_phy_data parsing

2018-09-28 Thread Luca Coelho
From: Johannes Berg This code gets shorter if it doesn't have to check all the conditions, so move it to an appropriate place that has all of them validated already. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 35 ++--

[PATCH 12/18] iwlwifi: mvm: pull some he_phy_data decoding into a separate function

2018-09-28 Thread Luca Coelho
From: Johannes Berg Pull some of the decoding of he_phy_data into a separate function so we don't need to check over and over again if it's valid. While at it, fix the UL/DL bit reporting to be for all but trigger- based frames. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- dri

[PATCH 16/18] iwlwifi: mvm: add LDPC-XSYM to HE radiotap data

2018-09-28 Thread Luca Coelho
From: Johannes Berg Add information about the LDCP extra symbol segment to the HE data when applicable (not for trigger-based PPDUs). While at it, clean up the code for UL/DL a bit. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 16

[PATCH 13/18] iwlwifi: mvm: clean up HE radiotap RU allocation parsing

2018-09-28 Thread Luca Coelho
From: Johannes Berg Split the code out into a separate routine, and move that to be called inside the previously introduced iwl_mvm_decode_he_phy_data() function. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 166 ++

[PATCH 18/18] iwlwifi: mvm: set max TX/RX A-MPDU subframes to HE limit

2018-09-28 Thread Luca Coelho
From: Johannes Berg In mac80211, the default remains for HT, so set the limit to HE for our driver. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwi

[PATCH 15/18] iwlwifi: mvm: add TXOP to HE radiotap data

2018-09-28 Thread Luca Coelho
From: Johannes Berg We have this data available, so add it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/

[PATCH 17/18] iwlwifi: mvm: add more information to HE radiotap

2018-09-28 Thread Luca Coelho
From: Johannes Berg For SU/SU-ER/MU PPDUs we have spatial reuse. For those where it's relevant we also know the pre-FEC padding factor, PE disambiguity bit, beam change bit and doppler bit. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/rxm

[PATCH 10/18] iwlwifi: mvm: minor cleanups to HE radiotap code

2018-09-28 Thread Luca Coelho
From: Johannes Berg Remove a stray empty line, unbreak some lines that aren't really that long, and move on variable setting into the initializer to avoid initializing it twice. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 11 +++-

[PATCH 04/18] iwlwifi: dbg: split iwl_fw_error_dump to two functions

2018-09-28 Thread Luca Coelho
From: Sara Sharon Split iwl_fw_error_dump to two parts. The first part will dump the actual data, and second will do the file allocations, trans calls and actual file operations. This is done in order to enable reuse of the code for the new debug ini infrastructure. Signed-off-by: Sara Sharon

[PATCH 01/18] iwlwifi: mvm: check for n_profiles validity in EWRD ACPI

2018-09-28 Thread Luca Coelho
From: Luca Coelho When reading the profiles from the EWRD table in ACPI, we loop over the data and set it into our internal table. We use the number of profiles specified in ACPI without checking its validity, so if the ACPI table is corrupted and the number is larger than our array size, we wil

[PATCH 02/18] iwlwifi: dbg: move debug data to a struct

2018-09-28 Thread Luca Coelho
From: Sara Sharon The debug variables are bloating the iwl_fw struct. And the fields are out of order, missing docs and some are redundant. Clean this up. This serves as preparation for unionizing it for the new ini infra. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/n

[PATCH 09/18] iwlwifi: mvm: remove unnecessary overload variable

2018-09-28 Thread Luca Coelho
From: Johannes Berg This is equivalent to checking he_phy_data != HE_PHY_DATA_INVAL, which is already done in a number of places, so remove the extra 'overload' variable entirely. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 6 +++

[PATCH 08/18] iwlwifi: mvm: clear HW_RESTART_REQUESTED when stopping the interface

2018-09-28 Thread Luca Coelho
From: Emmanuel Grumbach Fix a bug that happens in the following scenario: 1) suspend without WoWLAN 2) mac80211 calls drv_stop because of the suspend 3) __iwl_mvm_mac_stop deallocates the aux station 4) during drv_stop the firmware crashes 5) iwlmvm: * sets IWL_MVM_STATUS_HW_RESTART_REQUE

[PATCH 07/18] iwlwifi: dbg: group trigger condition to helper function

2018-09-28 Thread Luca Coelho
From: Sara Sharon The triplet of get trigger, is trigger enabled and is trigger stopped repeats itself. Group them in a function to avoid code duplication. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 24 ++ .../net/wir

[PATCH 00/18] wlwifi: updates intended for v4.20 2018-09-28

2018-09-28 Thread Luca Coelho
From: Luca Coelho Hi, Here's the fifth set of patches intended for v4.20. It's the usual development, mostly focused on radiotap HE, debugging and bugfixes. The changes are: * Fix for a race condition that caused the FW to crash; * HE radiotap cleanup and improvements; * Reorder channel optim

[PATCH 05/18] iwlwifi: mvm: allow channel reorder optimization during scan

2018-09-28 Thread Luca Coelho
From: Ayala Beker Allow the FW to reorder HB channels and first scan HB channels with assumed APs, in order to reduce the scan duration. Currently enable it for all scan requests types. Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/api/scan.h

[PATCH 06/18] iwlwifi: dbg: dump memory in a helper function

2018-09-28 Thread Luca Coelho
From: Sara Sharon The code that dumps various memory types repeats itself. Move it to a function to avoid duplication. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 92 - 1 file changed, 34 insertions(+), 58 deleti

[PATCH 03/18] iwlwifi: dbg: refactor dump code to improve readability

2018-09-28 Thread Luca Coelho
From: Sara Sharon Add a macro to replace all the conditions checking for valid dump length. In addition, move the fifo len calculation to a helper function. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 158 1 fil

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

2018-09-28 Thread Toke Høiland-Jørgensen
On 28 September 2018 07:29:03 CEST, Rajkumar Manoharan wrote: >On 2018-09-26 17:09, Rajkumar Manoharan wrote: >> On 2018-09-26 02:22, Toke Høiland-Jørgensen wrote: >>> Rajkumar Manoharan writes: > >> :( Yeah... I got confused with attached soft lockup in ARM platform. >> >Toke, > >Cause for

Re: [PATCH v3 1/2] mac80211: invoke sw_scan if hw_scan returns EPERM

2018-09-28 Thread Johannes Berg
Hi, > Actually, we have missed this in code. Our module supports scanning on > both bands at the same time. Yeah, but we still have to support drivers that don't support this. > Thanks for the info. > And also we ran the scan on our dual band module by setting > "SINGLE_SCAN_ON_ALL_BANDS" flag i

Re: How many null-data probes on connection loss?

2018-09-28 Thread Johannes Berg
On Thu, 2018-09-27 at 08:32 -0700, Ben Greear wrote: > > It seems though that if there's some noise or so on the channel you > > wouldn't be transmitting, so what kind of "network glitches" might > > affect this? AP going away unexpectedly for some time? > > I am thinking that if the 'timeout' is

Re: [PATCH] mac80211: TDLS: fix skb queue/priority assignment

2018-09-28 Thread Johannes Berg
On Wed, 2018-09-05 at 14:50 +0200, Toke Høiland-Jørgensen wrote: (uh, sorry, bit late ...) > > The problem isn't so much how we handle it in mac80211 for the queueing, > > but how we deal with things like A-MSDU and how we present it to the > > driver ... for iwlwifi at least we'd really like to

Re: Problem with sending pkt on a monitor port

2018-09-28 Thread Johannes Berg
Sorry, I'm a bit behind things ... > > It's actually created by mac80211, but only once, and not directly > > mapped to each vif seen by userspace - it's an internal construction. > > I'm not sure it matters, but ath10k firmware can also create a monitor vdev > itself for certain reasons. (Maybe