[PATCH 5/5] mt76x2: initialize fall-back rate registers

2018-12-07 Thread Stanislaw Gruszka
Initialize MT_LG_FBK_CFG{0,1} and MT_VHT_HT_FBK_CFG{0,1} registers. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h b/drivers/net/wireless

[PATCH 4/5] mt76x2: initialize fall-back rate registers

2018-12-07 Thread Stanislaw Gruszka
Initialize MT_LG_FBK_CFG{0,1} and MT_VHT_HT_FBK_CFG0 registers. MT_VHT_HT_FBK_CFG1 was already configured. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x2/init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2

[PATCH 3/5] mt76x02: set protection according to ht operation element

2018-12-07 Thread Stanislaw Gruszka
Configure protection based on information that are provided to us either by remote AP or by hostapd via HT operation IE. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 83 +++ drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 2

[PATCH 1/5] mt76x02: do not set protection on set_rts_threshold callback

2018-12-07 Thread Stanislaw Gruszka
Use set_rts_threshold calback to enable/disable threshold only for legacy traffic. Protection for HT and VHT traffic is defined by HT operation element and it's provided by remote AP or by hostapd. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 16

[PATCH 2/5] mt76x02: fixup MT_PROT_RATE_* defines

2018-12-07 Thread Stanislaw Gruszka
On new mt76 chips, phy mode is configured by last 3 bits of rate value. Hence OFDM bit is marked by 0x2000 instead of 0x4000. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_regs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers

Re: [RFC/RFT 1/4] mt76x02: configure basic rates and fallback on STA mode

2018-12-07 Thread Stanislaw Gruszka
On Thu, Nov 08, 2018 at 05:02:14PM +0100, Felix Fietkau wrote: > >> > + if (changed & BSS_CHANGED_BASIC_RATES && > >> > + vif->type == NL80211_IFTYPE_STATION) { > >> > + mt76_wr(dev, MT_LEGACY_BASIC_RATE, info->basic_rates); It's a bit hard to interpret how vendor

Re: [PATCH 2/2] mt76: dma: add rx buffer recycle support

2018-12-06 Thread Stanislaw Gruszka
On Wed, Dec 05, 2018 at 04:17:31PM +0100, Lorenzo Bianconi wrote: > > On Wed, Dec 05, 2018 at 11:37:33AM +0100, Lorenzo Bianconi wrote: > > > > > > > > Add support for recycling rx buffers if they are not forwarded > > > > to network stack instead of reallocate them from scratch > > > > > > > >

Re: [PATCH 2/2] mt76: dma: add rx buffer recycle support

2018-12-05 Thread Stanislaw Gruszka
On Wed, Dec 05, 2018 at 11:37:33AM +0100, Lorenzo Bianconi wrote: > > > > Add support for recycling rx buffers if they are not forwarded > > to network stack instead of reallocate them from scratch > > > > Signed-off-by: Lorenzo Bianconi > > --- > > Felix, > > could you please drop this patch

Re: [RFC/RFT 3/4] mt76x02: do not set protection on set_rts_threshold callback

2018-12-04 Thread Stanislaw Gruszka
On Tue, Dec 04, 2018 at 11:45:09AM +0100, Stanislaw Gruszka wrote: > Only OFDM_PROT_CFG is configured there based on legacy proto > value. I'm not sure how handle CCK_PROT_CFG. > > > > - mt76_rmw(dev, MT_MM20_PROT_CFG, > > > - MT_PROT_CFG_CTRL | M

Re: [RFC/RFT 3/4] mt76x02: do not set protection on set_rts_threshold callback

2018-12-04 Thread Stanislaw Gruszka
gt; should be determined by HT capabilities and applied to any HT > > frames. > > > > Signed-off-by: Stanislaw Gruszka > > --- > > drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 16 +--- > > drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 2 +-

Re: rt2800 tx frame dropping issue.

2018-12-04 Thread Stanislaw Gruszka
Hi Daniel On Mon, Dec 03, 2018 at 03:44:46PM -0600, Daniel Santos wrote: > I almost managed to get that patch in a build to send to somebody who > can reproduce the error in abundance, but they have 15 different people > hammer the router to do it and we ended up sending them a few other >

Re: [PATCH v2 00/13] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips

2018-11-30 Thread Stanislaw Gruszka
s on a single device. > > Based on the reasons mentioned before, we implemented rtw88. It had many > authors, they are listed here alphabetically: > > Ping-Ke Shih > Tzu-En Huang > Yan-Hsuan Chuang For the series: Reviewed-by: Stanislaw Gruszka

Re: [PATCH] mt76: handle protocol error to proper deinit rx_tasklet

2018-11-26 Thread Stanislaw Gruszka
On Sat, Nov 24, 2018 at 10:25:52AM +0100, Lorenzo Bianconi wrote: > > During removal of usb dongle, noticed many unhandled rx urb > > below. This this patch, make it possible and early completion > > of the rx tasklet. > > > > mt76x2u 1-3.4.3.1.2:1.0: rx urb failed: -71 > > mt76x2u

Re: rt2800 tx frame dropping issue.

2018-11-26 Thread Stanislaw Gruszka
On Fri, Nov 23, 2018 at 08:45:54PM +0100, Johannes Berg wrote: > On Tue, 2018-11-20 at 15:20 -0600, Daniel Santos wrote: > > > I believe I have the answer as to why we're getting frames after we stop > > the queue. I had a little chat about this in #kernelnewbies and some > > other devs believe

Re: [PATCH 2/5] mt76x02: initalize mutli bss mode by default

2018-11-09 Thread Stanislaw Gruszka
On Fri, Nov 09, 2018 at 02:31:31PM +0100, Lorenzo Bianconi wrote: > > > > Anyway I think, to support MAC address change, we should not filter > > based on MAC address, but maybe only on BSSID ? > > > > Thanks > > Stanislaw > > You can create the interface with a given mac address > > # iw phy

Re: [PATCH 1/5] mt76x02: correct set bssid for STA

2018-11-09 Thread Stanislaw Gruszka
On Fri, Nov 09, 2018 at 01:50:51PM +0100, Lorenzo Bianconi wrote: > > On 2018-11-09 12:09, Lorenzo Bianconi wrote: > > >> Use MT_MAC_APC_BSSID0_H_EN bit to indicatate we are > > >> setting BSSID for STA. > > >> > > >> Signed-off-by: Stan

Re: [PATCH 4/5] mt76x02: minor beaconing init changes

2018-11-09 Thread Stanislaw Gruszka
On Fri, Nov 09, 2018 at 12:33:32PM +0100, Lorenzo Bianconi wrote: > > Disable BEACON timer during init and remove interrupt registers > > initalization form generic conde since they are PCIe specific. > > > > Since the timer is actually disabled (MT_INT_TIMER_EN set to 0) and > we just set the

Re: [PATCH 2/5] mt76x02: initalize mutli bss mode by default

2018-11-09 Thread Stanislaw Gruszka
On Fri, Nov 09, 2018 at 12:26:51PM +0100, Lorenzo Bianconi wrote: > > @@ -52,9 +52,6 @@ static int mt76x2u_add_interface(struct ieee80211_hw *hw, > > struct mt76x02_dev *dev = hw->priv; > > unsigned int idx = 8; > > > > - if (!ether_addr_equal(dev->mt76.macaddr, vif->addr)) > > -

Re: [PATCH 1/5] mt76x02: correct set bssid for STA

2018-11-09 Thread Stanislaw Gruszka
On Fri, Nov 09, 2018 at 12:09:50PM +0100, Lorenzo Bianconi wrote: > > Use MT_MAC_APC_BSSID0_H_EN bit to indicatate we are > > setting BSSID for STA. > > > > Signed-off-by: Stanislaw Gruszka > > --- > > drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 12

[PATCH v2] mt76: remove wait argument from mt76x02_mcu_calibrate

2018-11-09 Thread Stanislaw Gruszka
We always wait for CMD_CALIBRATION_OP mcu message, but wait argument is used for do additional MT_MCU_COM_REG0 register operations, which are needed for mt76x2e devices and we can use appropriate check instead of wait argument. Signed-off-by: Stanislaw Gruszka --- v2: use MT_MCU_COM_REG0

[PATCH 5/5] mt76x02: remove no longer actual comment

2018-11-09 Thread Stanislaw Gruszka
Remove comment about one configurable BSSID registers since we utilize AP-Client feature now. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76

[PATCH 3/5] mt76x2u: use common mt76x02_add_interface

2018-11-09 Thread Stanislaw Gruszka
There is no need anymore to use custom add interface function for mt76x02u. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02.h | 2 -- drivers/net/wireless/mediatek/mt76/mt76x02_util.c| 6 +++--- drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c

[PATCH 1/5] mt76x02: correct set bssid for STA

2018-11-09 Thread Stanislaw Gruszka
Use MT_MAC_APC_BSSID0_H_EN bit to indicatate we are setting BSSID for STA. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c b

[PATCH 2/5] mt76x02: initalize mutli bss mode by default

2018-11-09 Thread Stanislaw Gruszka
Configure multi bss mode by default on all devices. That mean we use MAC address for MT_MAC_BSSID_DW and use MT_MAC_APC_BSSID for configuree bssid for each vif. This is separe from beaconing as we can have for example 2 STA vifs, so do not mix bssid init and beacon init. Signed-off-by: Stanislaw

[PATCH 0/5] mt76x02: bssid setup corrections for STA

2018-11-09 Thread Stanislaw Gruszka
Minor MBSS and beaconing fixups. On top of: "mt76x2u: init: remove mt76x2u_init_beacon_offsets routine" Stanislaw Gruszka (5): mt76x02: correct set bssid for STA mt76x02: initalize mutli bss mode by default mt76x2u: use common mt76x02_add_interface mt76x02: minor beaconing in

[PATCH 4/5] mt76x02: minor beaconing init changes

2018-11-09 Thread Stanislaw Gruszka
Disable BEACON timer during init and remove interrupt registers initalization form generic conde since they are PCIe specific. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 7 +++ drivers/net/wireless/mediatek/mt76/mt76x02_util.c| 11

Re: [RFC/RFT 2/4] mt76x02: reserve wcid 0 for global traffic

2018-11-08 Thread Stanislaw Gruszka
clear if this > > is needed, but this is how vendor driver assign wcid's in STA mode. > > This should be harmless for mt76x2. > > > > Signed-off-by: Stanislaw Gruszka > > --- > > drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 6 +- > > 1 file ch

Re: [RFC/RFT 1/4] mt76x02: configure basic rates and fallback on STA mode

2018-11-08 Thread Stanislaw Gruszka
register use values from vendor driver, which > > are different for mt76x0 and mt76x2 . > > > > Signed-off-by: Stanislaw Gruszka > > --- > > drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 12 > > 1 file changed, 12 insertions(+) > >

[RFC/RFT 2/4] mt76x02: reserve wcid 0 for global traffic

2018-11-08 Thread Stanislaw Gruszka
e harmless for mt76x2. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c index 2b

[RFC/RFT 4/4] mt76x02: set protection according to ht capabilities

2018-11-08 Thread Stanislaw Gruszka
Use information about protection that mac80211 provide to us. Used protection should be part of ht capabilites that either remote AP provde to us in STA mode or is set in hostapd.conf in ht_capab option. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 58

[RFC/RFT 3/4] mt76x02: do not set protection on set_rts_threshold callback

2018-11-08 Thread Stanislaw Gruszka
Use set_rts_threshold calback to enable/disable threshold only for legacy traffic. RTS/CTS threshold for HT TXOP make make no sense to me since used protection (RTS/CTS , CTS-to-self or none) should be determined by HT capabilities and applied to any HT frames. Signed-off-by: Stanislaw Gruszka

[RFC/RFT 1/4] mt76x02: configure basic rates and fallback on STA mode

2018-11-08 Thread Stanislaw Gruszka
-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c index 87ce6a51fb05..2be4b527477f 100644 --- a/drivers/net

[RFC/RFT 0/4] restore some old mt76x0u behaviour

2018-11-08 Thread Stanislaw Gruszka
and do not cause any harm on different setup (AP mode , mt76x2u, mt76x0e), but I did not test them in those setups. Stanislaw Gruszka (4): mt76x02: configure basic rates and fallback on STA mode mt76x02: reserve wcid 0 for global mt76x02: do not set protection on set_rts_threshold callback

Re: [PATCH] mt76: introduce mt76x02_config_mac_addr_list routine

2018-11-07 Thread Stanislaw Gruszka
On Tue, Nov 06, 2018 at 11:49:12PM +0100, Lorenzo Bianconi wrote: > Add mt76x02_config_mac_addr_list routine in order to set > the mac address list supported by the driver. Initialize > wiphy->addresses/n_addresses for mt76x0e driver > > Signed-off-by: Lorenzo Bianconi > --- >

Re: [PATCH 2/3] mt76x0: phy: introduce tssi calibration support

2018-11-02 Thread Stanislaw Gruszka
(cc Mediatek.com engineers) On Mon, Oct 29, 2018 at 10:31:24PM +0100, Lorenzo Bianconi wrote: > Run mt76x0 tssi calibration process if enabled in eeprom data. > Perform calibration procedure every 4s I just checked the Mediatek vendor drivers for both MT7610E (at github

Re: [PATCH 2/4] mt76: remove wait argument from mt76x02_mcu_calibrate

2018-11-02 Thread Stanislaw Gruszka
On Thu, Nov 01, 2018 at 06:29:01PM +0100, Felix Fietkau wrote: > On 2018-10-26 14:00, Stanislaw Gruszka wrote: > > We always wait for CMD_CALIBRATION_OP mcu message, but wait argument is used > > for do additioanl MT_MCU_COM_REG0 register operations, which are needed > > fo

[PATCH v3 2/2] mt76x02: assure we update gain after scan

2018-11-01 Thread Stanislaw Gruszka
Assure that after we initialize dev->cal.low_gain to -1 this will cause update gain calibration. Otherwise this might or might not happen depending on value of second bit of low_gain and values read from registers in mt76x02_phy_adjust_vga_gain(). Signed-off-by: Stanislaw Gruszka --- driv

[PATCH v3 1/2] mt76x02: run calibration after scanning

2018-11-01 Thread Stanislaw Gruszka
("mt76x0: phy: do not run calibration during channel switch") Signed-off-by: Stanislaw Gruszka --- v1 -> v2: only queue cal work with 0 delay v2 -> v3: - do not check for assoc, check init gain was done - do not init agc gain for any channel in mt76x0 drivers/net/wireless/mediatek/m

Re: [PATCH v2] mt76x0: run calibration after scanning

2018-10-31 Thread Stanislaw Gruszka
On Wed, Oct 31, 2018 at 02:11:26PM +0100, Stanislaw Gruszka wrote: > If we are associated and scanning is performed, sw_scan_complete callback > is done after we get back to operating channel, so we do not perform > queue cal work. Fix this queue cal work from sw_scan_complete(). >

[PATCH v2] mt76x0: run calibration after scanning

2018-10-31 Thread Stanislaw Gruszka
n during channel switch") Signed-off-by: Stanislaw Gruszka --- v1 -> v2: only queue cal work with 0 delay an reset dev->cal.low_gain drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_ut

[PATCH] mt76x0: do not overwrite other MT_BBP(AGC, 8) fields

2018-10-31 Thread Stanislaw Gruszka
2 one") Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c index ba98814ae47d..88dd0aa7e

Re: [PATCH] mt76x0: use band parameter for LC calibration

2018-10-30 Thread Stanislaw Gruszka
On Thu, Oct 25, 2018 at 06:18:33PM +0200, Stanislaw Gruszka wrote: > We use always 1 as band parameter for MCU_CAL_LC, this break 2GHz, > we should use 0 for this band instead. > > Patch fixes problems happened sometimes when try to associate with 2GHz > AP and manifest by er

Re: [PATCH] mt76x0: run calibration after scanning

2018-10-30 Thread Stanislaw Gruszka
On Mon, Oct 29, 2018 at 11:16:53AM +0100, Stanislaw Gruszka wrote: > If we are associated and scanning is performed , sw_scan_complete callback > is done after we get back to operating channel, so we do not perform > phy calibration and queue cal work. Fix this by run calibra

Re: [PATCH] mt76x0: run calibration after scanning

2018-10-30 Thread Stanislaw Gruszka
On Mon, Oct 29, 2018 at 04:25:31PM +0200, Kalle Valo wrote: > Stanislaw Gruszka writes: > > > If we are associated and scanning is performed , sw_scan_complete callback > > is done after we get back to operating channel, so we do not perform > > phy calibration

[PATCH] mt76x0: run calibration after scanning

2018-10-29 Thread Stanislaw Gruszka
uring channel switch") Signed-off-by: Stanislaw Gruszka --- This is for 4.20 drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 19 +++ drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 2 ++ drivers/net/wireless/mediatek/mt76/mt76x0/pci.c| 2 +- drivers/ne

Re: [PATCH 4/4] mt76: add support for reporting tx status with skb

2018-10-27 Thread Stanislaw Gruszka
On Thu, Oct 25, 2018 at 06:55:41PM +0200, Felix Fietkau wrote: > + struct mt76_tx_cb *cb = mt76_tx_skb_cb(skb); > + u8 done = MT_TX_CB_DMA_DONE | MT_TX_CB_TXS_DONE; can be "const u8 done = ..." > +mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid, > +

[PATCH 4/4] mt76: remove wait argument from mt76x02_mcu_set_radio_state

2018-10-26 Thread Stanislaw Gruszka
Remove wait argument from mt76x02_mcu_set_radio_state and newer wait for response when sending CMD_POWER_SAVING_OP mcu command. Note this change behaviour for PCIe devices, but the change is in align with vendor driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76

[PATCH 3/4] mt76: remove wait argument from mt76x02_mcu_function_select

2018-10-26 Thread Stanislaw Gruszka
. But the change is in align with vendor driver. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/init.c| 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02_mcu.c| 12 +++- drivers/net/wireless

[PATCH 0/4] mt76: mcu api clenups

2018-10-26 Thread Stanislaw Gruszka
Simplify mcu api and wait for response for mcu commands the same as vendor driver. This is on top of: [PATCH] mt76x0: use band parameter for LC calibration Stanislaw Gruszka (4): mt76: remove mcu_msg_alloc mt76: remove wait argument from mt76x02_mcu_calibrate mt76: remove wait argument

[PATCH 1/4] mt76: remove mcu_msg_alloc

2018-10-26 Thread Stanislaw Gruszka
We almost always use patter like this: skb = mt76_mcu_msg_alloc(dev, , sizeof(msg)); return mt76_mcu_send_msg(dev, skb, CMD_FUN_SET_OP, wait_resp); This is not needed, we can allocate skb in mcu_send_msg routine. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek

[PATCH 2/4] mt76: remove wait argument from mt76x02_mcu_calibrate

2018-10-26 Thread Stanislaw Gruszka
We always wait for CMD_CALIBRATION_OP mcu message, but wait argument is used for do additioanl MT_MCU_COM_REG0 register operations, which are needed for MMIO devices and we can use mt76_is_mmio() check instead of wait argument. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek

[PATCH] mt76x0: use band parameter for LC calibration

2018-10-25 Thread Stanislaw Gruszka
oduce mt76x0_phy_calirate routine") Signed-off-by: Stanislaw Gruszka --- This is for 4.20. drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/p

Re: [PATCH] iwlwifi: pcie: align licensing to dual GPL/BSD

2018-10-24 Thread Stanislaw Gruszka
rski > - Joonwoo Park > - Kirtika Ruchandani > - Rajat Jain > - Stanislaw Gruszka > remaining in the code today. > > Note that > - I myself was working for Intel and for any possibly code >that might be before my employment there give permission > - W

Re: [PATCH v4 4/8] rt2800: fix registers init for MT7620

2018-10-20 Thread Stanislaw Gruszka
On Fri, Oct 19, 2018 at 04:21:09PM +0200, Tom Psyborg wrote: > On 19/10/2018, Stanislaw Gruszka wrote: > > > > I tried to do this, but somehow after update BUILD1 image into device > > my configuration was wiped out :-( and I have to reconfigure the > > device no

MT7630E firmware and Mediatek support

2018-10-19 Thread Stanislaw Gruszka
Hello MediaTek I plan to submit this firmware to linux-firwmare git tree: https://github.com/neurobin/MT7630E/tree/release/firmware/Wi-FI to add support for MT7630E with mt76/mt76x0 driver, is this ok ? I would also ask if Mediatek can provide some support for us to have their WiFi products

Re: [PATCH v4 4/8] rt2800: fix registers init for MT7620

2018-10-19 Thread Stanislaw Gruszka
On Wed, Oct 17, 2018 at 03:25:58PM +0200, Tom Psyborg wrote: > On 16/10/2018, Stanislaw Gruszka wrote: > > On Tue, Oct 16, 2018 at 01:32:18PM +0200, Tom Psyborg wrote: > >> I am sending you two builds privately so please check if there are any > >> differences betwee

Re: [PATCH 1/2] mt76: mt76x0: reduce duplication in setting rf bandwidth parameters

2018-10-19 Thread Stanislaw Gruszka
On Thu, Oct 18, 2018 at 04:16:44PM +0200, Felix Fietkau wrote: > Remove initval table with duplicated registers and driver specific flags > in favor of a function that sets the registers directly There are few problems with this patch: MT_RF(7, 77) is missing and band is not taken directly from

[PATCH v2] mt76x0: antenna select corrections

2018-10-18 Thread Stanislaw Gruszka
MT7630E workable with mt76x0e driver and do not cause any problems on MT7610U for me. Signed-off-by: Stanislaw Gruszka Acked-by: Lorenzo Bianconi --- v1 -> v2: - fix clear of BIT(14) instead of BIT(15) in MT_CMB_CTRL - do not clear BIT(1) in MT_COEXCFG3 drivers/net/wireless/mediatek/mt76/mt7

Re: [PATCH] mt76x0: antenna select corrections

2018-10-18 Thread Stanislaw Gruszka
On Thu, Oct 18, 2018 at 11:40:56AM +0200, Stanislaw Gruszka wrote: > On GPL realeased driver for MT7610U ( mt7610u_wifi_sta_v3002_dpo_2013091 ) > it's like this: > > CoexCfg3 &= ~(BIT5 | BIT4 | BIT3 | BIT2 | BIT1); > Does your SDK do something diffrent ? Ok I can see

Re: [PATCH] mt76x0: antenna select corrections

2018-10-18 Thread Stanislaw Gruszka
On Thu, Oct 18, 2018 at 11:28:19AM +0200, Lorenzo Bianconi wrote: > > On Thu, Oct 18, 2018 at 11:13:36AM +0200, Lorenzo Bianconi wrote: > > > > static void mt76x0_phy_ant_select(struct mt76x02_dev *dev) > > > > { > > > > - struct ieee80211_channel *chan = dev->mt76.chandef.chan; > > > > -

Re: [PATCH] mt76x0: antenna select corrections

2018-10-18 Thread Stanislaw Gruszka
On Thu, Oct 18, 2018 at 11:13:36AM +0200, Lorenzo Bianconi wrote: > > static void mt76x0_phy_ant_select(struct mt76x02_dev *dev) > > { > > - struct ieee80211_channel *chan = dev->mt76.chandef.chan; > > - > > - /* single antenna mode */ > > - if (chan->band == NL80211_BAND_2GHZ) { > > -

Re: [PATCH] mt76: usb: fix static tracepoints

2018-10-18 Thread Stanislaw Gruszka
On Thu, Oct 18, 2018 at 10:13:51AM +0200, Lorenzo Bianconi wrote: > On Oct 18, Stanislaw Gruszka wrote: > > On Thu, Oct 18, 2018 at 12:35:32AM +0200, Lorenzo Bianconi wrote: > > > Add submit_urb and rx_urb static tracepoints in mt76-usb module. > > >

Re: wireless workshop (was: Re: Announcing Netdev 0x13 conference)

2018-10-18 Thread Stanislaw Gruszka
On Tue, Oct 09, 2018 at 12:28:23PM +0200, Johannes Berg wrote: > Kalle and I have (more or less) decided to propose a wireless workshop > for Netdev 0x13. > > In order to gauge interest and plan room size, can you reply (privately > if you like) if this would work for you and you'd (want to)

[PATCH] mt76x0: antenna select corrections

2018-10-18 Thread Stanislaw Gruszka
MT7630E workable with mt76x0e driver and do not cause any problems on MT7610U for me. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c| 52 -- .../net/wireless/mediatek/mt76/mt76x02_eeprom.h| 10 ++--- 2 files changed, 44 insertions

Re: [PATCH] mt76: usb: fix static tracepoints

2018-10-18 Thread Stanislaw Gruszka
On Thu, Oct 18, 2018 at 12:35:32AM +0200, Lorenzo Bianconi wrote: > Add submit_urb and rx_urb static tracepoints in mt76-usb module. > Move trace_mac_txstat_fetch in mt76x02_mac_load_tx_status routine > in order to be available to usb drivers. Moreover remove > no longer used mt76x0/trace.{c,h} >

Re: [RFC 4/9] mt76x0: pci: add pre_tbtt_tasklet support

2018-10-17 Thread Stanislaw Gruszka
On Tue, Oct 16, 2018 at 11:23:26PM +0200, Lorenzo Bianconi wrote: > Enable/disable pre_tbtt_tasklet in mt76x0 driver in order > to add AP support Is there some USB limitation that disallow tho do this for USB as well? Or perhaps this is easer for now do this for PCI devices and add AP support for

Re: [PATCH v4 4/8] rt2800: fix registers init for MT7620

2018-10-16 Thread Stanislaw Gruszka
Hello On Tue, Oct 16, 2018 at 01:32:18PM +0200, Tom Psyborg wrote: > I am sending you two builds privately so please check if there are any > differences between the two builds and report back. Thanks. I extracted rt2800lib.ko module from provided images, did disassembly via:

Re: [PATCH v4 4/8] rt2800: fix registers init for MT7620

2018-10-16 Thread Stanislaw Gruszka
On Tue, Oct 16, 2018 at 01:19:52PM +0200, Felix Fietkau wrote: > > I have no idea how this could be related. But I think I found > > somewhat reasonable explenation where the problem is. > > I think below code : > > > > if (a || b || c) { > > CODE1(); > > } else if (c) { > >

Re: [RFC v4 05/13] rtw88: mac files

2018-10-16 Thread Stanislaw Gruszka
On Sat, Oct 13, 2018 at 05:00:37PM +0800, yhchu...@realtek.com wrote: > + buf = kmalloc(size, GFP_KERNEL); > + memcpy(buf, data, size); Error check and it could be replaced by kmemdup. Regards Stanislaw

Re: [RFC v4 00/13] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips

2018-10-16 Thread Stanislaw Gruszka
s on a single device. > > Based on the reasons mentioned before, we implemented rtw88. It had many > authors, they are listed here alphabetically: > > Ping-Ke Shih > Tzu-En Huang > Yan-Hsuan Chuang For the series: Reviewed-by: Stanislaw Gruszka

Re: [RFC v4 06/13] rtw88: fw and efuse files

2018-10-16 Thread Stanislaw Gruszka
On Sat, Oct 13, 2018 at 05:00:38PM +0800, yhchu...@realtek.com wrote: > +rtw_beacon_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif) > +{ > + struct sk_buff *skb_new; > + > + if (vif->type != NL80211_IFTYPE_AP && > + vif->type != NL80211_IFTYPE_ADHOC && > +

Re: [PATCH v4 4/8] rt2800: fix registers init for MT7620

2018-10-16 Thread Stanislaw Gruszka
On Fri, Oct 12, 2018 at 12:48:07PM +0200, Tom Psyborg wrote: > chip version support exist in daniel's tree since a long time ago. so > don't disable registers initialization but try to upstream his > changes. Where is this patch ? I can not find it. Thanks Stanislaw

Re: [PATCH v4 4/8] rt2800: fix registers init for MT7620

2018-10-16 Thread Stanislaw Gruszka
On Fri, Oct 12, 2018 at 02:41:41PM +0200, Tom Psyborg wrote: > On 12/10/2018, Stanislaw Gruszka wrote: > > On Fri, Oct 12, 2018 at 02:20:07PM +0200, Tom Psyborg wrote: > >> > On upstream tree where this patch is intended > >> > additional registers where

Re: [PATCH v4 4/8] rt2800: fix registers init for MT7620

2018-10-16 Thread Stanislaw Gruszka
On Sat, Oct 13, 2018 at 12:46:54PM +0300, Kalle Valo wrote: > No '#if 0', please. If the code is not needed you can remove it, it's > available from git history anyway if it's needed later. Plase drop this patch, other patches from the set can be applied without it. Thanks Stanislaw

[PATCH] mt76x0: do not perform MCU calibration for MT7630

2018-10-16 Thread Stanislaw Gruszka
Driver works better for MT7630 without MCU calibration, which looks like it can hangs the firmware. Vendor driver do not perform it for MT7630 as well. Signed-off-by: Stanislaw Gruszka --- This is on top of: https://marc.info/?l=linux-wireless=153960591116586=2 drivers/net/wireless/mediatek

Re: [PATCH] mt76x0: phy: unify calibration between mt76x0u and mt76x0e

2018-10-16 Thread Stanislaw Gruszka
On Mon, Oct 15, 2018 at 02:18:05PM +0200, Lorenzo Bianconi wrote: > Align phy calibration logic between mt76x0u and mt76x0e drivers > This patch improves connection stability with low SNR > > Signed-off-by: Lorenzo Bianconi Tested-by: Stanislaw Gruszka

Re: [PATCH 04/13] mt76x0: pci: introduce mt76x0_phy_calirate routine

2018-10-12 Thread Stanislaw Gruszka
On Fri, Oct 12, 2018 at 12:16:20PM +0200, Lorenzo Bianconi wrote: > Add mt76x0_phy_calirate routine in order to perform > phy calibration for mt76x0e devices. > @@ -671,9 +713,14 @@ int mt76x0_phy_set_channel(struct mt76x02_dev *dev, > /* Vendor driver don't do it */ > /*

Re: [PATCH v4 4/8] rt2800: fix registers init for MT7620

2018-10-12 Thread Stanislaw Gruszka
On Fri, Oct 12, 2018 at 02:20:07PM +0200, Tom Psyborg wrote: > > On upstream tree where this patch is intended > > additional registers where never programmed as proper branch > > were never used, because of additional check in RT5390 branch. > > > > on my hardware additional registers were

Re: [PATCH v4 4/8] rt2800: fix registers init for MT7620

2018-10-12 Thread Stanislaw Gruszka
Please stop top-posting. On Fri, Oct 12, 2018 at 01:51:00PM +0200, Tom Psyborg wrote: > it will cause regression on other devices How exactly ? On upstream tree where this patch is intended additional registers where never programmed as proper branch were never used, because of additional check

Re: [PATCH v4 6/8] rt2800: enable TX_PIN_CFG_RFRX_EN only for MT7620

2018-10-12 Thread Stanislaw Gruszka
On Fri, Oct 12, 2018 at 12:52:13PM +0200, Tom Psyborg wrote: > is there some specific reason to read TX_PIN_CFG register on RT6352, > rather than just null it before programming in tx values like in other > chips? I don't remember the details, but Daniel explained that tere are some bits in the

Re: [PATCH v4 4/8] rt2800: fix registers init for MT7620

2018-10-12 Thread Stanislaw Gruszka
On Fri, Oct 12, 2018 at 12:48:07PM +0200, Tom Psyborg wrote: > chip version support exist in daniel's tree since a long time ago. so > don't disable registers initialization but try to upstream his > changes. I do not see reason for for blocking this change because some other changes are not

[PATCH v4 8/8] rt2800: comment and simplify AGC init for RT6352

2018-10-12 Thread Stanislaw Gruszka
We do not need separate lines for calculating register values. Also add comment that value is different than in vendor driver. Suggested-by: Daniel Golle Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 9 ++--- 1 file changed, 6 insertions(+), 3

[PATCH v4 3/8] rt2x00: update TX_SW_CFG2 value

2018-10-12 Thread Stanislaw Gruszka
From: Tomislav Požega Use default value of TX_SW_CFG2 register that is in charge of LNA timings. Works for somewhat higher RX throughput. Signed-off-by: Tomislav Požega --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v4 6/8] rt2800: enable TX_PIN_CFG_RFRX_EN only for MT7620

2018-10-12 Thread Stanislaw Gruszka
The TX_PIN_CFG_RFRX_EN bit was not set on other devices than MT7620, restore old behavaviour since setting this bit maight not be correct for older devices. Fixes: 41977e86c984 ("rt2x00: add support for MT7620") Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/r

[PATCH v4 2/8] rt2x00: remove confusing AGC register

2018-10-12 Thread Stanislaw Gruszka
From: Tomislav Požega Register 66 was causing issues on RT6352 if set to the same value as in MTK driver. With 1c reg value device was working fine in both HT20 and HT40 modes. Signed-off-by: Tomislav Požega Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c

[PATCH v4 7/8] rt2800: remove unneeded RT6352 check

2018-10-12 Thread Stanislaw Gruszka
Remove rt2x00_rt(rt2x00dev, RT6352)) check from rt2800_config_channel_rf53xx() which is not called for RT6352 devices. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless

[PATCH v4 5/8] rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band

2018-10-12 Thread Stanislaw Gruszka
Do not enable TX_PIN_CFG_LNA_PE_A* bits for 2.4GHz band and vice versa TX_PIN_CFG_LNA_PE_G* bits for 5GHz. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/net

[PATCH v4 1/8] rt2x00: remove unneeded check

2018-10-12 Thread Stanislaw Gruszka
From: Tomislav Požega Remove band check from rf53xx channel config routine since all chips using it are single band. Signed-off-by: Tomislav Požega Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 103 - 1 file changed, 50

[PATCH v4 0/8] rt2800: register programing tweaks and clean ups

2018-10-12 Thread Stanislaw Gruszka
v3 -> v4: - do not program addition registers for MT7620 - fix RT6362 typo v2 -> v3: - fix wrongly applied hunk during rebase - add SoB Stanislaw Gruszka (5): rt2800: fix registers init for MT7620 rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band rt2800: enable TX_PIN_CFG_RFRX_E

[PATCH v4 4/8] rt2800: fix registers init for MT7620

2018-10-12 Thread Stanislaw Gruszka
There is duplicated 'if (rt2x00_rt(rt2x00dev, RT6352))' entry that causes we do not perform register initialization for RT6352 (MT7620 SOCs) in correct branch. Fix this and disable registers initialization that is specific to particular MT7620 revision. Signed-off-by: Stanislaw Gruszka

Re: [PATCH v3 4/4] rt2800: fix registers init for MT7620

2018-10-12 Thread Stanislaw Gruszka
On Thu, Oct 11, 2018 at 02:39:25PM +0200, Tom Psyborg wrote: > so this is RX test where I assume your 7265 card is sending data. is > that HT20 or HT40 mode and do you get regression on TX too? > > can you try same case 2 test but with registers set to: > > TX_SW_CFG0, 0x0401 > TX_SW_CFG1,

Re: [PATCH 0/4] rt2800: more register programing tweaks

2018-10-11 Thread Stanislaw Gruszka
On Wed, Oct 10, 2018 at 05:46:16PM +0200, Stanislaw Gruszka wrote: > This is on top of previous post: > https://marc.info/?l=linux-wireless=153908617400582=2 > > Stanislaw Gruszka (4): > rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band > rt2800: enable TX_PIN_CFG_RFRX_

Re: [PATCH v3 1/4] rt2x00: remove unneeded check

2018-10-11 Thread Stanislaw Gruszka
Kalle, plese drop this set it has to be reworked. Thanks Stanislaw

Re: [PATCH v3 4/4] rt2800: fix registers init for MT7620

2018-10-11 Thread Stanislaw Gruszka
On Wed, Oct 10, 2018 at 10:03:12PM +0200, Tom Psyborg wrote: > ok, that is strange. do you see any performance differences without > TX_SW_CFG regs? iperf test is a good pointer. > > this was a problem on xiaomi mini with old DD trunk builds on 4.4 > kernel and LEDE builds from last year. i ain't

[PATCH 4/4] rt2800: comment and simplify AGC init for RT6352

2018-10-10 Thread Stanislaw Gruszka
We do not need separate lines for calculating register values. Also add comment that value is different than in vendor driver. Suggested-by: Daniel Golle Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 9 ++--- 1 file changed, 6 insertions(+), 3

[PATCH 1/4] rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band

2018-10-10 Thread Stanislaw Gruszka
Do not enable TX_PIN_CFG_LNA_PE_A* bits for 2.4GHz band and vice versa TX_PIN_CFG_LNA_PE_G* bits for 5GHz. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/net

[PATCH 2/4] rt2800: enable TX_PIN_CFG_RFRX_EN only for MT7620

2018-10-10 Thread Stanislaw Gruszka
The TX_PIN_CFG_RFRX_EN bit was not set on other devices than MT7620, restore old behavaviour since setting this bit maight not be correct for older devices. Fixes: 41977e86c984 ("rt2x00: add support for MT7620") Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/r

[PATCH 0/4] rt2800: more register programing tweaks

2018-10-10 Thread Stanislaw Gruszka
This is on top of previous post: https://marc.info/?l=linux-wireless=153908617400582=2 Stanislaw Gruszka (4): rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band rt2800: enable TX_PIN_CFG_RFRX_EN only for MT7620 rt2800: remove unneeded RT6352 check rt2800: comment and simplify AGC init

[PATCH 3/4] rt2800: remove unneeded RT6352 check

2018-10-10 Thread Stanislaw Gruszka
Remove rt2x00_rt(rt2x00dev, RT6352)) check from rt2800_config_channel_rf53xx() which is not called for RT6352 devices. Signed-off-by: Stanislaw Gruszka --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless

Re: [PATCH v3 4/4] rt2800: fix registers init for MT7620

2018-10-10 Thread Stanislaw Gruszka
On Wed, Oct 10, 2018 at 04:11:12PM +0200, Tom Psyborg wrote: > case 1: > > } else if (rt2x00_rt(rt2x00dev, RT5390) || > rt2x00_rt(rt2x00dev, RT5392)) { > rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x0404); > rt2800_register_write(rt2x00dev,

  1   2   3   4   5   6   7   8   >