Re: [PATCH v2] iwlwifi: mvm: enable sending HE_AIR_SNIFFER command via debugfs

2018-09-27 Thread Luciano Coelho
On Fri, 2018-09-28 at 08:23 +0300, Luca Coelho wrote: > From: Shaul Triebitz > > In order to receive TB (Trigger Based) PPDU in monitor mode, > the Driver must send the HE_AIR_SNIFFER_CONFIG_CMD host command. > Enable that via debugfs. > > Signed-off-by: Liad Kaufman > Signed-off-by: Ido Yariv

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

2018-09-27 Thread Rajkumar Manoharan
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 the soft lockup exposed in multi client scenario is due to mixed order of

[PATCH v2] iwlwifi: mvm: enable sending HE_AIR_SNIFFER command via debugfs

2018-09-27 Thread Luca Coelho
From: Shaul Triebitz In order to receive TB (Trigger Based) PPDU in monitor mode, the Driver must send the HE_AIR_SNIFFER_CONFIG_CMD host command. Enable that via debugfs. Signed-off-by: Liad Kaufman Signed-off-by: Ido Yariv Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho --- In

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

2018-09-27 Thread Tony Chuang
Stanislaw, Thanks a lot to point them some, some of them I have not even noticed! > -Original Message- > From: Stanislaw Gruszka [mailto:sgrus...@redhat.com] > Sent: Thursday, September 27, 2018 9:51 PM > To: Tony Chuang > Cc: kv...@codeaurora.org; larry.fin...@lwfinger.net; >

[PATCH] cfg80211: fix use-after-free in reg_process_hint()

2018-09-27 Thread Yu Zhao
reg_process_hint_country_ie() can free regulatory_request and return REG_REQ_ALREADY_SET. We shouldn't use regulatory_request after it's called. KASAN error was observed when this happens. BUG: KASAN: use-after-free in reg_process_hint+0x839/0x8aa [cfg80211] Read of size 4 at addr

Re: [PATCH 4.19] iwlwifi: 1000: set the TFD queue size

2018-09-27 Thread Kalle Valo
Luca Coelho wrote: > From: Pavel Machek > > .max_tfd_queue_size was ommited for 1000 card serries leading to oops in > swiotlb. > > Fixes: 7b3e42ea2ead ("iwlwifi: support multiple tfd queue max sizes for > different devices") > Tested-by: Randy Dunlap > Signed-off-by: Pavel Machek >

[PATCH] mac80211: Improve connection-loss probing.

2018-09-27 Thread greearb
From: Ben Greear This makes the mlme code probe multiple times spread out across the time-out period instead of lots of probes all at once. It also makes the ap-probe and the nullfunc probe logic act similarly, which allows us to remove some code. Signed-off-by: Ben Greear ---

[PATCH] b43: fix spelling mistake "hw_registred" -> "hw_registered"

2018-09-27 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake struct field name, rename it. Signed-off-by: Colin Ian King --- drivers/net/wireless/broadcom/b43/b43.h | 2 +- drivers/net/wireless/broadcom/b43/main.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git

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

2018-09-27 Thread Larry Finger
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) \ + (BIT_LEN_MASK_32(__bitlen) << (__bitoffset)) +#define

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

2018-09-27 Thread Ben Greear
On 09/27/2018 12:12 AM, Johannes Berg wrote: On Wed, 2018-09-26 at 15:21 -0700, Ben Greear wrote: Now only 4 retries per frame, but it seems mac80211 is all 5 of its null-data probes within a few miliseconds. Is that expected, or should there be a bit more pause between each of the probe

Re: [PATCH] mt76: fix building without CONFIG_MT76x0U

2018-09-27 Thread kbuild test robot
://github.com/0day-ci/linux/commits/Arnd-Bergmann/mt76-fix-building-without-CONFIG_MT76x0U/20180927-101346 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master config: i386-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce

Re: Problems and suggestions to the kernel module r8723bs

2018-09-27 Thread Larry Finger
On 9/27/18 3:33 AM, Simon Beginn wrote: Use the following command to get the baseline values: Done - aand nothing changes (The access point has a strength of -60dB on my desk). Well maybe the manufacturer has two antennas builtin. Yay - sorry for that. That value means that the signal

Re: [PATCH 19/26] mt76x0: pci: add hw initialization at bootstrap

2018-09-27 Thread Lorenzo Bianconi
> On Thu, Sep 27, 2018 at 11:01:48AM +0200, Lorenzo Bianconi wrote: > > Add mt76x0e_register_device routine in pci_init.c > > to initialize the device during hw probe. > > > > Signed-off-by: Lorenzo Bianconi > > --- > > .../wireless/mediatek/mt76/mt76x0/Makefile| 2 +- > >

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

2018-09-27 Thread Lorenzo Bianconi
On Sep 27, Stanislaw Gruszka wrote: > On Thu, Sep 27, 2018 at 11:01:37AM +0200, Lorenzo Bianconi wrote: > > Move mt76x2_wait_for_bbp utility routine in mt76x02_util.h > > in order to be resued by mt76x0 driver > > > > Signed-off-by: Lorenzo Bianconi > > --- > > +static inline bool

Re: [PATCH 06/26] mt76: move mt76x02_beacon_offset in mt76x02_core.c

2018-09-27 Thread Lorenzo Bianconi
> On Thu, Sep 27, 2018 at 11:01:35AM +0200, Lorenzo Bianconi wrote: > > 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

Re: [PATCH 15/26] mt76x0: init: reset beacon offset during bootstrap

2018-09-27 Thread Lorenzo Bianconi
On Sep 27, Felix Fietkau wrote: > On 2018-09-27 11:01, Lorenzo Bianconi wrote: > > Add beacon offset reset in mt76x0e_init_hardware routine > > > > Signed-off-by: Lorenzo Bianconi > > --- > > drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 8 +++- > > 1 file changed, 7 insertions(+), 1

Re: [PATCH 15/26] mt76x0: init: reset beacon offset during bootstrap

2018-09-27 Thread Lorenzo Bianconi
On Sep 27, Stanislaw Gruszka wrote: > On Thu, Sep 27, 2018 at 11:01:44AM +0200, Lorenzo Bianconi wrote: > > Add beacon offset reset in mt76x0e_init_hardware routine > > > > Signed-off-by: Lorenzo Bianconi > > --- > > drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 8 +++- > > 1 file

Re: [PATCH 17/26] mt76: add mt76x02_mac_start routine

2018-09-27 Thread Lorenzo Bianconi
> On Thu, Sep 27, 2018 at 11:01:46AM +0200, Lorenzo Bianconi wrote: > > enum mt76x02_cipher_type > > mt76x02_mac_get_key_info(struct ieee80211_key_conf *key, u8 *key_data) > > @@ -520,3 +522,16 @@ void mt76x02_mac_setaddr(struct mt76_dev *dev, u8 > > *addr) > >

[PATCH v2 1/2] brcmfmac: reduce timeout for action frame scan

2018-09-27 Thread Chi-Hsien Lin
From: Chung-Hsien Hsu Finding a common channel to send an action frame out is required for some action types. Since a loop with several scan retry is used to find the channel, a short wait time could be considered for each attempt. This patch reduces the wait time from 1500 to 450 msec for each

[PATCH v2 0/2] brcmfmac: WFA p2p certification fixes

2018-09-27 Thread Chi-Hsien Lin
Fixes for WFA p2p certification 5.1.19 and 5.1.20 failures. Changes since v1: Update cover letter subject Chung-Hsien Hsu (2): brcmfmac: reduce timeout for action frame scan brcmfmac: fix full timeout waiting for action frame on-channel tx

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

2018-09-27 Thread Jouni Malinen
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 only when the TA of the frame matches the MAC address of the peer irrespective of FCS error. It

[PATCH v2 2/2] brcmfmac: fix full timeout waiting for action frame on-channel tx

2018-09-27 Thread Chi-Hsien Lin
From: Chung-Hsien Hsu The driver sends an action frame down and waits for a completion signal triggered by the received BRCMF_E_ACTION_FRAME_OFF_CHAN_COMPLETE event to continue the process. However, the action frame could be transmitted either on the current channel or on an off channel. For the

Re: [PATCH 0/2] WFA p2p certification fixes

2018-09-27 Thread Chi-Hsien Lin
This is submitted to linux-firmware by mistake. It should have been sent to linux-wireless only. Please discard it. Sorry for the inconvenience. I'll submit v2 to linux-wireless list only. On 09/27/2018 5:44, Chi-Hsien Lin wrote: > Fixes for WFA p2p certification 5.1.19 and 5.1.20 failures. >

Re: [PATCH 25/26] mt76: move eeprom_load routines in mt76x02_eeprom.c

2018-09-27 Thread Lorenzo Bianconi
> On 2018-09-27 11:01, Lorenzo Bianconi wrote: > > Move mt76x02_eeprom_load, mt76x02_check_eeprom, > > mt76x02_apply_cal_free_data and mt76x02_has_cal_free_data > > in mt76x02-lib module since they will be used to load > > mt76x0e eeprom data > > > > Signed-off-by: Lorenzo Bianconi > This patch

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

2018-09-27 Thread Stanislaw Gruszka
Hi, Below is some more detailed review of first patch (with mostly nitpicks). On Fri, Sep 21, 2018 at 02:03:56PM +0800, yhchu...@realtek.com wrote: > +static void rtw_ops_tx(struct ieee80211_hw *hw, > +struct ieee80211_tx_control *control, > +struct

[RFC] cfg80211: add peer measurement with FTM API

2018-09-27 Thread Johannes Berg
From: Johannes Berg * TODO - complete nl80211_pmsr_send_ftm_res() - address FIXME comments - implement socket closing cleanup code etc. - implement delete-dumped-data - ...? Signed-off-by: Johannes Berg --- include/net/cfg80211.h | 240 ++

[PATCH] nl80211: remove nl80211_prepare_wdev_dump() skb argument

2018-09-27 Thread Johannes Berg
From: Johannes Berg nl80211_prepare_wdev_dump() is using the output skb to look up the network namespace, but this isn't really necessary, it can just as well use the input skb which is available as cb->skb, the sk is the same anyway. Therefore, remove the redundant argument. Signed-off-by:

[PATCH][staging-next] staging: wilc1000: fix incorrect allocation size for structure

2018-09-27 Thread Colin King
From: Colin Ian King Currently the allocation for str_vals is for the sizeof the pointer rather than the size of the structure. Fix this. Detected by smatch "wilc_wlan_cfg_init() error: not allocating enough data 392 vs 8" Fixes: acceb12a9f8b ("staging: wilc1000: refactor code to avoid static

Re: [RFC 0/4] mt76x0: phy/rf fixups for PCIe

2018-09-27 Thread Felix Fietkau
On 2018-09-27 10:37, Stanislaw Gruszka wrote: > This is RFC for now, especially I'm interesting if patch 3 and 4 > is direction we should go. > > This is on top of Lorenzo github mt7610ev5 branch. Looks good to me. Thanks, - Felix

Re: [PATCH 25/26] mt76: move eeprom_load routines in mt76x02_eeprom.c

2018-09-27 Thread Felix Fietkau
On 2018-09-27 11:01, Lorenzo Bianconi wrote: > Move mt76x02_eeprom_load, mt76x02_check_eeprom, > mt76x02_apply_cal_free_data and mt76x02_has_cal_free_data > in mt76x02-lib module since they will be used to load > mt76x0e eeprom data > > Signed-off-by: Lorenzo Bianconi This patch should be

Re: [PATCH 19/26] mt76x0: pci: add hw initialization at bootstrap

2018-09-27 Thread Stanislaw Gruszka
On Thu, Sep 27, 2018 at 11:01:48AM +0200, Lorenzo Bianconi wrote: > Add mt76x0e_register_device routine in pci_init.c > to initialize the device during hw probe. > > Signed-off-by: Lorenzo Bianconi > --- > .../wireless/mediatek/mt76/mt76x0/Makefile| 2 +- >

Re: [PATCH 17/26] mt76: add mt76x02_mac_start routine

2018-09-27 Thread Stanislaw Gruszka
On Thu, Sep 27, 2018 at 11:01:46AM +0200, Lorenzo Bianconi wrote: > 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_mac.c | 15 +++ >

Re: [PATCH 15/26] mt76x0: init: reset beacon offset during bootstrap

2018-09-27 Thread Felix Fietkau
On 2018-09-27 11:01, Lorenzo Bianconi wrote: > Add beacon offset reset in mt76x0e_init_hardware routine > > Signed-off-by: Lorenzo Bianconi > --- > drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git

Re: [PATCH 15/26] mt76x0: init: reset beacon offset during bootstrap

2018-09-27 Thread Stanislaw Gruszka
On Thu, Sep 27, 2018 at 11:01:44AM +0200, Lorenzo Bianconi wrote: > Add beacon offset reset in mt76x0e_init_hardware routine > > Signed-off-by: Lorenzo Bianconi > --- > drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff

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

2018-09-27 Thread Stanislaw Gruszka
On Thu, Sep 27, 2018 at 11:01:37AM +0200, Lorenzo Bianconi wrote: > Move mt76x2_wait_for_bbp utility routine in mt76x02_util.h > in order to be resued by mt76x0 driver > > Signed-off-by: Lorenzo Bianconi > --- > +static inline bool mt76x02_wait_for_bbp(struct mt76_dev *dev) > +{ > + return

Re: [PATCH 06/26] mt76: move mt76x02_beacon_offset in mt76x02_core.c

2018-09-27 Thread Stanislaw Gruszka
On Thu, Sep 27, 2018 at 11:01:35AM +0200, Lorenzo Bianconi wrote: > 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

[PATCH 1/2] brcmfmac: reduce timeout for action frame scan

2018-09-27 Thread Chi-Hsien Lin
From: Chung-Hsien Hsu Finding a common channel to send an action frame out is required for some action types. Since a loop with several scan retry is used to find the channel, a short wait time could be considered for each attempt. This patch reduces the wait time from 1500 to 450 msec for each

[PATCH 2/2] brcmfmac: fix full timeout waiting for action frame on-channel tx

2018-09-27 Thread Chi-Hsien Lin
From: Chung-Hsien Hsu The driver sends an action frame down and waits for a completion signal triggered by the received BRCMF_E_ACTION_FRAME_OFF_CHAN_COMPLETE event to continue the process. However, the action frame could be transmitted either on the current channel or on an off channel. For the

[PATCH 0/2] WFA p2p certification fixes

2018-09-27 Thread Chi-Hsien Lin
Fixes for WFA p2p certification 5.1.19 and 5.1.20 failures. Chung-Hsien Hsu (2): brcmfmac: reduce timeout for action frame scan brcmfmac: fix full timeout waiting for action frame on-channel tx .../net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 26 --

Re: [PATCH 2/2] nl80211: Fix possible Spectre-v1 for CQM RSSI thresholds

2018-09-27 Thread Johannes Berg
On Thu, 2018-09-27 at 07:26 +0900, Masashi Honma wrote: > On 2018/09/26 18:23, Johannes Berg wrote:> I applied the first patch in > the seies, but I don't understand why this > > patch should be necessary. > > > > The value of i isn't controlled by the user, so it shouldn't need to be > >

Re: [RFC 1/4] mt76x0: print BBP version only for debug

2018-09-27 Thread Stanislaw Gruszka
On Thu, Sep 27, 2018 at 11:34:39AM +0200, Lorenzo Bianconi wrote: > Please drop the comment, it is a different register. Maybe we can Too late :-) > generalize mt76x02_wait_for_mac instead? Seems BBP(CORE,0) is not used by mt76x2, so merging it into mt76x02 is not correct. Thanks Stanislaw

Re: [RFC 1/4] mt76x0: print BBP version only for debug

2018-09-27 Thread Stanislaw Gruszka
On Thu, Sep 27, 2018 at 11:26:30AM +0200, Lorenzo Bianconi wrote: > > 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

Re: [RFC 1/4] mt76x0: print BBP version only for debug

2018-09-27 Thread Lorenzo Bianconi
> > > 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 > >

Re: [RFC 1/4] mt76x0: print BBP version only for debug

2018-09-27 Thread Lorenzo Bianconi
> 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 >

[PATCH 26/26] mt76x0: introduce mt76x0{e,u}_eeprom_init routines

2018-09-27 Thread Lorenzo Bianconi
Add mt76x0e_eeprom_init/mt76x0u_eeprom_init routines to initialize pci/usb eeprom and move eeprom init shared code between pci and usb drivers in mt76x0_eeprom_init Signed-off-by: Lorenzo Bianconi --- .../wireless/mediatek/mt76/mt76x0/eeprom.c| 19 +++

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

2018-09-27 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 01/26] mt76x0: use mt76_poll in mt76x0_set_wlan_state

2018-09-27 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

[PATCH 22/26] mt76x0: add ieee80211_ops ops pointer to mt76x0_alloc_device signature

2018-09-27 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

[PATCH 23/26] mt76x0: pci: add mt76x0e_start callback

2018-09-27 Thread Lorenzo Bianconi
Introduce mt76x0e_start mac80211 callback to start device mac opening the netdevice Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x0/pci_init.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/pci_init.c

[PATCH 25/26] mt76: move eeprom_load routines in mt76x02_eeprom.c

2018-09-27 Thread Lorenzo Bianconi
Move mt76x02_eeprom_load, mt76x02_check_eeprom, mt76x02_apply_cal_free_data and mt76x02_has_cal_free_data in mt76x02-lib module since they will be used to load mt76x0e eeprom data Signed-off-by: Lorenzo Bianconi --- .../wireless/mediatek/mt76/mt76x02_eeprom.c | 152 +

[PATCH 19/26] mt76x0: pci: add hw initialization at bootstrap

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

[PATCH 24/26] mt76x0: pci: add mt76x0e_stop callback

2018-09-27 Thread Lorenzo Bianconi
Introduce mt76x0e_stop mac80211 callback to stop device mac closing the netdevice Signed-off-by: Lorenzo Bianconi --- .../wireless/mediatek/mt76/mt76x0/pci_init.c| 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/pci_init.c

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

2018-09-27 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 +++

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

2018-09-27 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

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

2018-09-27 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.c | 51

[PATCH 06/26] mt76: move mt76x02_beacon_offset in mt76x02_core.c

2018-09-27 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 18/26] mt76x0: usb: move initialization code in usb_init.c

2018-09-27 Thread Lorenzo Bianconi
Move usb initialization code in a mt76x0 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 --- .../wireless/mediatek/mt76/mt76x0/Makefile| 2 +-

[PATCH 04/26] mt76: move mt76x02_set_irq_mask in mt76x02_core.c

2018-09-27 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/Makefile | 3 +-

[PATCH 17/26] mt76: add mt76x02_mac_start routine

2018-09-27 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_mac.c | 15 +++ drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 1 +

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

2018-09-27 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 ++

[PATCH 16/26] mt76x0: init rx filter in mt76x0_init_hardware

2018-09-27 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 ++

[PATCH 20/26] mt76x0: phy: set antenna parameter according to wireless band

2018-09-27 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

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

2018-09-27 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

[PATCH 13/26] mt76x0: init: remove duplicated initialization

2018-09-27 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

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

2018-09-27 Thread Lorenzo Bianconi
Move mt76x2_wait_for_bbp utility routine in mt76x02_util.h in order to be resued by mt76x0 driver Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x02_util.h | 7 +++ drivers/net/wireless/mediatek/mt76/mt76x2.h | 7 ---

[PATCH 15/26] mt76x0: init: reset beacon offset during bootstrap

2018-09-27 Thread Lorenzo Bianconi
Add beacon offset reset in mt76x0e_init_hardware routine Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c

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

2018-09-27 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 +

[PATCH 00/26] add mt76x0e hw initialization support

2018-09-27 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 Lorenzo Bianconi (26): mt76x0: use mt76_poll in mt76x0_set_wlan_state mt76: move wait_for_wpdma in

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

2018-09-27 Thread Lorenzo Bianconi
Use mt76x02_wait_for_wpdma and mt76x02_wait_for_mac 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

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

2018-09-27 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 +

[PATCH 05/26] mt76: move queue initialization in mt76x02_dma.c

2018-09-27 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.c | 87

Re: Problems and suggestions to the kernel module r8723bs

2018-09-27 Thread Simon Beginn
Use the following command to get the baseline values: Done - aand nothing changes (The access point has a strength of -60dB on my desk). Well maybe the manufacturer has two antennas builtin. Yay - sorry for that. In dmesg Yep, too late. I've already installed the necessary firmware-files.

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

2018-09-27 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

[RFC 1/4] mt76x0: print BBP version only for debug

2018-09-27 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

[RFC 3/4] mt76: allow to identify bus

2018-09-27 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

[RFC 0/4] mt76x0: phy/rf fixups for PCIe

2018-09-27 Thread Stanislaw Gruszka
This is RFC for now, especially I'm interesting if patch 3 and 4 is direction we should go. This is on top of Lorenzo github mt7610ev5 branch. Stanislaw Gruszka (4): mt76x0: print BBP version only for debug mt76x0: correct RF access via RF_CSR regiser. mt76: allow to identify bus

[RFC 2/4] mt76x0: correct RF access via RF_CSR regiser.

2018-09-27 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

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

2018-09-27 Thread Johannes Berg
On Wed, 2018-09-26 at 15:21 -0700, Ben Greear wrote: > > Now only 4 retries per frame, but it seems mac80211 is all 5 of its > null-data probes within a few miliseconds. Is that expected, or should > there be a bit more pause between each of the probe requests to better > weather periodic