Re: feedback on mainlining wilc1000 staging driver

2018-10-04 Thread Kalle Valo
Ajay Singh writes: >> > I have submitted a patch series for wilc1000 driver, single file >> > per patch and its based on wireless-drivers-next. >> > I hope its done correctly, please provide inputs so we can >> > address and make this driver ready for mainline. >> >> Thanks, I see it in

Re: feedback on mainlining wilc1000 staging driver

2018-10-04 Thread Ajay Singh
Hi Kalle, On Thu, 4 Oct 2018 15:27:57 +0300 Kalle Valo wrote: > Ajay Singh writes: > > > Hi Kalle, > > > > On Thu, 23 Aug 2018 16:37:45 +0530 > > Kalle Valo wrote: > > > >> Ajay Singh writes: > >> > >> >> >>> We need help to review and identify if there are any pending > >> >> >>> items

Re: [PATCH 0/5] rt2800mmio txdone/interrupts/flush rework

2018-10-04 Thread Tomislav Požega
Hi As suspected this changeset causes throughput regression. Below screenshots show iperf test from MS150N (RF5370) device connected to RT3070 adapter running AP mode: This is with standard openwrt build without any rt2x00 changes:

[PATCH v2 09/10] mt76: unify rxwi parsing between mt76x2 and mt76x0 drivers

2018-10-04 Thread Lorenzo Bianconi
Unify rxwi parsing between mt76x2 and mt76x0. Remove the following routines: - mt76x0_phy_get_rssi - mt76x0_queue_rx_skb - mt76x0_mac_process_rx Moreover remove mt76x2/common.c and mt76x0/mac.h since are empty files Enable CCMP PN sw validation Signed-off-by: Lorenzo Bianconi ---

[PATCH v2 08/10] mt76: move mt76x02_mac_process_rx in mt76x02-lib module

2018-10-04 Thread Lorenzo Bianconi
Move mt76x02_mac_process_rx utility routine in mt76x02-lib in order to by reused by mt76x0 driver for rxwi parsing. Add stream number check in mt76x02_mac_process_rx since mt76x0 chipsets are 1x1:1 Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x02_mac.c | 105

[PATCH v2 06/10] mt76x2: move mt76x2_dev in mt76x02_util.h

2018-10-04 Thread Lorenzo Bianconi
Move mt76x2_dev in mt76x02_util.h and rename it in mt76x02_dev in order to be shared between mt76x2 and mt76x0 driver Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x02_dfs.h | 140 + .../net/wireless/mediatek/mt76/mt76x02_util.h | 69 +

[PATCH v2 03/10] mt76x0: mac: use sta ewma estimation for rssi tracking

2018-10-04 Thread Lorenzo Bianconi
Use shared mt76x02 utility routines for rssi tracking. Moreover remove no longer used con_mon_lock spinlock and following variable: - ap_bssid - bcn_freq_off - bcn_phy_mode - avg_rssi Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x0/init.c | 1 -

[PATCH v2 07/10] mt76x0: merge mt76x0_dev in mt76x02_dev

2018-10-04 Thread Lorenzo Bianconi
Merge mt76x0_dev data structure in mt76x02_dev one and remove duplicated code. Remove unused definition in mt76x0.h. Moreover merge mt76x0_caldata and mt76x02_rx_freq_cal data structures. This is a preliminary patch for rxwi unification. Signed-off-by: Lorenzo Bianconi ---

[PATCH v2 04/10] mt76x0: remove unused variable in mt76x0_dev

2018-10-04 Thread Lorenzo Bianconi
Remove no longer used mac_lock spinlock and data array in mt76x0_dev data structure Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 1 - drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 5 - 2 files changed, 6 deletions(-) diff --git

[PATCH v2 10/10] mt76: move mt76x02_tx in mt76x02-lib module

2018-10-04 Thread Lorenzo Bianconi
Move mt76x02_tx shared routine in mt76x02-lib module and remove duplicated code. Moreover remove mt76x0/tx.c since it is an empty file Signed-off-by: Lorenzo Bianconi --- .../wireless/mediatek/mt76/mt76x0/Makefile| 2 +- .../wireless/mediatek/mt76/mt76x0/mt76x0.h| 4 --

[PATCH v2 01/10] mt76: move mt76x02_phy_get_min_avg_rssi in mt76x02_phy.c

2018-10-04 Thread Lorenzo Bianconi
Move mt76x02_phy_get_min_avg_rssi in mt76x02-lib module since it will be used by mt76x0 driver in order to unify rxwi parsing Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x02_phy.c | 48 +++ .../net/wireless/mediatek/mt76/mt76x02_phy.h | 1 +

[PATCH v2 00/10] unify rxwi parsing between mt76x0 and mt76x2 drivers

2018-10-04 Thread Lorenzo Bianconi
Merge mt76x0_dev and mt76x2_dev in mt76x02_dev and remove duplicated code. Move mt76x02_mac_process_rx routine in mt76x02-lib module in order to unify rxwi parsing between mt76x0 and mt76x2 drivers. Move mt76x02_tx in mt76x02-lib module and remove duplicated code Changes since v1: - make

[PATCH v2 05/10] mt76x0: remove hw_atomic_mutex mutex in mt76x0_dev

2018-10-04 Thread Lorenzo Bianconi
Remove hw_atomic_mutex mutex in mt76x0_dev data structure since mt76x0_phy_set_channel is already protected by mt76_dev mutex while mt76x0_chip_onoff is used just at device probe or cleanup Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x0/init.c| 5 -

[PATCH v2 02/10] mt76: move mt76x02_rx_get_sta and mt76x02_rx_get_sta_wcid in mt76x02_util.h

2018-10-04 Thread Lorenzo Bianconi
Move mt76x02_rx_get_sta and mt76x02_rx_get_sta_wcid utility routines in mt76x02-lib module since it will be used by mt76x0 driver in order to unify rxwi parsing Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x02_util.h | 29 +

Flag for detecting 802.11r Fast BSS Transition support

2018-10-04 Thread Matthew Wang
Hi, I'm wondering if there is a flag for detecting firmware/driver support for FT. It seems like checking for SME support is a pretty good proxy for this, but there is a non-mac80211 driver that can do FT as well (ath/wil6210). It would be great if anyone knows of a feature flag specifically for

Re: [PATCH] nl80211: Add per peer statistics to compute FCS error rate

2018-10-04 Thread bankita
On 2018-10-01 15:49, Johannes Berg wrote: On Thu, 2018-09-27 at 18:01 +0300, Jouni Malinen wrote: From: Ankita Bajaj Add support for drivers to report the total number of MPDUs received and the number of MPDUs received with an FCS error from a specific peer. These counters will be incremented

Re: ath9k and 16 VAP interfaces?

2018-10-04 Thread Ben Greear
Hello, I'm finally getting around to trying this. One thing, the second patch won't compile due to missing ath9k_set_moredata method. I see it is implemented here:

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

2018-10-04 Thread Larry Finger
On 10/4/18 8:42 AM, Stanislaw Gruszka wrote: On Thu, Oct 04, 2018 at 03:39:55PM +0300, Kalle Valo wrote: Can we put the configuration file in the firmware directory? Should we package them into binary files? Or just put the raw data. We can test the performance for it. After we got the result,

Re: [RFC v3 09/12] rtw88: chip files

2018-10-04 Thread Stanislaw Gruszka
On Wed, Oct 03, 2018 at 07:20:56PM +0800, yhchu...@realtek.com wrote: > +static int rtw8822b_mac_init(struct rtw_dev *rtwdev) > +{ > + u32 value32; > + > + rtw_write8(rtwdev, REG_SLOT, WLAN_SLOT_TIME); > + rtw_write8(rtwdev, REG_PIFS, WLAN_PIFS_TIME); > + rtw_write32(rtwdev,

Re: [RFC v3 08/12] rtw88: debug files

2018-10-04 Thread Stanislaw Gruszka
On Wed, Oct 03, 2018 at 07:20:55PM +0800, yhchu...@realtek.com wrote: > +static int rtw_debugfs_get_rsvd_page(struct seq_file *m, void *v) > +{ > + struct rtw_debugfs_priv *debugfs_priv = m->private; > + struct rtw_dev *rtwdev = debugfs_priv->rtwdev; > + u8 page_size =

Re: [RFC v3 07/12] rtw88: phy files

2018-10-04 Thread Stanislaw Gruszka
On Wed, Oct 03, 2018 at 07:20:54PM +0800, yhchu...@realtek.com wrote: > +void rtw_phy_cfg_bb(struct rtw_dev *rtwdev, const struct rtw_table *tbl, > + u32 addr, u32 data) > +{ > + if (addr == 0xfe) > + msleep(50); > + else if (addr == 0xfd) > +

Re: [RFC v2 02/12] rtw88: core files

2018-10-04 Thread Stanislaw Gruszka
On Thu, Oct 04, 2018 at 01:42:35PM +0200, Stanislaw Gruszka wrote: > On Wed, Oct 03, 2018 at 04:02:18PM +0800, yhchu...@realtek.com wrote: > > +static void rtw_restore_port_cfg(struct rtw_dev *rtwdev) > > +{ > > + struct rtw_vif *rtwvif; > > + u32 config = ~0; > > + > > + rcu_read_lock(); >

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

2018-10-04 Thread Stanislaw Gruszka
On Thu, Oct 04, 2018 at 03:39:55PM +0300, Kalle Valo wrote: > >> Can we put the configuration file in the firmware directory? > >> Should we package them into binary files? Or just put the raw data. > >> > >> We can test the performance for it. After we got the result, we will make > >> a

Re: [RFC v2 03/12] rtw88: hci files

2018-10-04 Thread Stanislaw Gruszka
On Thu, Oct 04, 2018 at 03:02:13PM +0200, Stanislaw Gruszka wrote: > > + WARN(flag, "DBI write fail"); > We always print WARN, there is other return point in this function. > > > +static void rtw_mdio_write(struct rtw_dev *rtwdev, u8 addr, u16 data, bool > > g1) > > > + WARN(wflag, "MDIO

Re: [RFC v2 04/12] rtw88: trx files

2018-10-04 Thread Stanislaw Gruszka
On Wed, Oct 03, 2018 at 04:02:20PM +0800, yhchu...@realtek.com wrote: > +static void rtw_rx_rssi_add(struct rtw_dev *rtwdev, > + struct rtw_rx_pkt_stat *pkt_stat, > + struct ieee80211_hdr *hdr) > +{ > + struct ieee80211_vif *vif; > + struct

Re: [RFC v2 03/12] rtw88: hci files

2018-10-04 Thread Stanislaw Gruszka
On Wed, Oct 03, 2018 at 04:02:19PM +0800, yhchu...@realtek.com wrote: > +static inline u32 > +rtw_read_rf(struct rtw_dev *rtwdev, enum rtw_rf_path rf_path, > + u32 addr, u32 mask) > +{ > + unsigned long flags; > + u32 val; > + > + spin_lock_irqsave(>rf_lock, flags); > + val

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

2018-10-04 Thread Kalle Valo
Larry Finger writes: > 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;

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

2018-10-04 Thread Kalle Valo
Larry Finger writes: > 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, _info, skb)) dev_kfree_skb_any(skb) just to remove 'return;' and out label. >>> >>> >>> OK, but why not use

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

2018-10-04 Thread Kalle Valo
Stanislaw Gruszka writes: > 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 01/12] rtwlan: main files

2018-10-04 Thread Kalle Valo
Tony Chuang writes: > 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 ? Like

Re: feedback on mainlining wilc1000 staging driver

2018-10-04 Thread Kalle Valo
Ajay Singh writes: > Hi Kalle, > > On Thu, 23 Aug 2018 16:37:45 +0530 > Kalle Valo wrote: > >> Ajay Singh writes: >> >> >> >>> We need help to review and identify if there are any pending >> >> >>> items for wilc1000 driver, so we can address those issues and >> >> >>> make it ready to move

Re: [PATCH v2] mt76x0: init: remove unnecessary configurations

2018-10-04 Thread Felix Fietkau
On 2018-10-01 16:20, Lorenzo Bianconi wrote: > Remove leftover configuration for legacy devices in > mt76x0_init_mac_registers routine. Moreover remove > unnecessary msleep delay > > Signed-off-by: Lorenzo Bianconi Merged, thanks. - Felix

[RFC 4/7] mt76: use mt76x02_dev instead of mt76_dev in mt76x02_usb_mcu.c

2018-10-04 Thread Lorenzo Bianconi
Use mt76x02_dev data structure as reference in mt76x02_usb_mcu.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi --- .../wireless/mediatek/mt76/mt76x0/usb_mcu.c | 7 +++-- .../net/wireless/mediatek/mt76/mt76x02_usb.h | 6 ++--- .../wireless/mediatek/mt76/mt76x02_usb_mcu.c | 27

[RFC 6/7] mt76: use mt76x02_dev instead of mt76_dev in mt76x02_txrx.c

2018-10-04 Thread Lorenzo Bianconi
Use mt76x02_dev data structure as reference in mt76x02_txrx.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x02.h | 4 ++-- .../net/wireless/mediatek/mt76/mt76x02_mac.c | 5 ++--- .../net/wireless/mediatek/mt76/mt76x02_txrx.c | 22

[RFC 3/7] mt76: use mt76x02_dev instead of mt76_dev in mt76x02_util.c

2018-10-04 Thread Lorenzo Bianconi
Use mt76x02_dev data structure as reference in mt76x02_util.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x0/init.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02.h | 4 +- .../net/wireless/mediatek/mt76/mt76x02_util.c | 137

[RFC 5/7] mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mac.c

2018-10-04 Thread Lorenzo Bianconi
Use mt76x02_dev data structure as reference in mt76x02_mac.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi --- .../wireless/mediatek/mt76/mt76x0/eeprom.c| 3 +- drivers/net/wireless/mediatek/mt76/mt76x02.h | 2 +- .../net/wireless/mediatek/mt76/mt76x02_mac.c | 124

[RFC 7/7] mt76: use mt76x02_dev instead of mt76_dev in mt76x02_eeprom.c

2018-10-04 Thread Lorenzo Bianconi
Use mt76x02_dev data structure as reference in mt76x02_eeprom.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi --- .../wireless/mediatek/mt76/mt76x0/eeprom.c| 50 ++-- .../net/wireless/mediatek/mt76/mt76x0/pci.c | 2 +- .../net/wireless/mediatek/mt76/mt76x0/phy.c | 2 +-

[RFC 0/7] use mt76x02_dev instead of mt76_dev as reference

2018-10-04 Thread Lorenzo Bianconi
Use mt76x02_dev data structure as reference in mt76x02 code instead of mt76_dev one Lorenzo Bianconi (7): mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mcu.c mt76: use mt76x02_dev instead of mt76_dev in mt76x02_phy.c mt76: use mt76x02_dev instead of mt76_dev in mt76x02_util.c mt76:

[RFC 1/7] mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mcu.c

2018-10-04 Thread Lorenzo Bianconi
Use mt76x02_dev data structure as reference in mt76x02_mcu.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x0/init.c | 2 +- .../net/wireless/mediatek/mt76/mt76x0/pci.c | 2 +- .../net/wireless/mediatek/mt76/mt76x0/phy.c | 24 +++---

[RFC 2/7] mt76: use mt76x02_dev instead of mt76_dev in mt76x02_phy.c

2018-10-04 Thread Lorenzo Bianconi
Use mt76x02_dev data structure as reference in mt76x02_phy.c instead of mt76_dev Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt76x0/phy.c | 8 +- .../net/wireless/mediatek/mt76/mt76x02_phy.c | 89 +-- .../net/wireless/mediatek/mt76/mt76x02_phy.h | 8

Re: [RFC v2 02/12] rtw88: core files

2018-10-04 Thread Stanislaw Gruszka
On Wed, Oct 03, 2018 at 04:02:18PM +0800, yhchu...@realtek.com wrote: > +static void rtw_restore_port_cfg(struct rtw_dev *rtwdev) > +{ > + struct rtw_vif *rtwvif; > + u32 config = ~0; > + > + rcu_read_lock(); > + list_for_each_entry(rtwvif, >vif_list, list) list_for_each_entry_rcu

Re: [PATCH 0/4] unify txwi parsing between mt76x0 and mt76x2 drivers

2018-10-04 Thread Felix Fietkau
On 2018-10-01 18:58, Lorenzo Bianconi wrote: > Move mt76x02_mac_write_txwi routine in mt76x02-lib module in order to > unify txwi parsing between mt76x0 and mt76x2 drivers. > For rxwi unification we need to merge mt76x2_dev and mt76x0_dev in > mt76x02_dev and remove duplicated code Merged, thanks.

Re: [RFC v2 06/12] rtw88: fw and efuse files

2018-10-04 Thread Stanislaw Gruszka
Hi On Wed, Oct 03, 2018 at 04:02:22PM +0800, yhchu...@realtek.com wrote: > +void rtw_fw_do_iqk(struct rtw_dev *rtwdev, struct rtw_iqk_para *para) > +{ > + u8 h2c_pkt[H2C_PKT_SIZE] = {0}; Not sure if '= {0}' work as expected for arrays, you want to nulify first byte or whole h2c_pkt ? >

Re: [PATCH 0/3] fix mt76x0u driver hw stop sequence

2018-10-04 Thread Felix Fietkau
On 2018-10-03 12:52, Lorenzo Bianconi wrote: > Fix two issue introduced in mt76x0u driver with latest rework to > share hw initialization between mt760 and mt76x2 drivers Merged, thanks. - Felix

[PATCH 4/5] mt76x0: correct RF reg pairs write for PCIe

2018-10-04 Thread Stanislaw Gruszka
We have to use RF CSR method for PCIe. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c

[PATCH 1/5] mt76x0: print BBP version only for debug

2018-10-04 Thread Stanislaw Gruszka
Use dev_dbg to print BBP version. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c index

[PATCH 2/5] mt76x0: correct RF access via RF_CSR regiser.

2018-10-04 Thread Stanislaw Gruszka
PCIe version don't use MCU for RF regsisters access. We need to correct RF CSR method to support up to 127 RF registers. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 6 ++ drivers/net/wireless/mediatek/mt76/mt76x02_regs.h | 4 ++-- 2 files

[PATCH 5/5] mt76x0: use bus helper to identify rf access method

2018-10-04 Thread Stanislaw Gruszka
Use mt76_is_usb() to identify RF access method instead of MT76_STATE_MCU_RUNNING flag and add warning since MCU has to be initialized before we can access RF registers via MCU. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 8 ++-- 1 file changed, 6

[PATCH 3/5] mt76: allow to identify bus

2018-10-04 Thread Stanislaw Gruszka
Add helpers to identify bus type. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mmio.c | 1 + drivers/net/wireless/mediatek/mt76/mt76.h | 9 + drivers/net/wireless/mediatek/mt76/usb.c | 1 + 3 files changed, 11 insertions(+) diff --git

[PATCH 0/5] mt76x0: phy/rf fixups for PCIe

2018-10-04 Thread Stanislaw Gruszka
Changes since RFC: - regbase on top of mt76x02_dev change - add patch to choose single reg RF access via mt76_is_usb() Stanislaw Gruszka (5): mt76x0: print BBP version only for debug mt76x0: correct RF access via RF_CSR regiser. mt76: allow to identify bus mt76x0: correct RF reg pairs

[PATCH] iw: fix the beacon average signal parsing

2018-10-04 Thread Emmanuel Grumbach
NL80211_STA_INFO_BEACON_SIGNAL_AVG is parsed as a u8, but it should be casted to a int8_t before being printed. Change-Id: Ieb6fab3b803d8ea82819a450f07cc4b537d8de8b Signed-off-by: Emmanuel Grumbach --- station.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/station.c