* pull request: mt76 2019-05-01
From: Felix Fietkau @ 2019-05-01 11:05 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless
Hi Kalle,
here's my first pull request for 5.2
- Felix
The following changes since commit e3037485c68ec1a299ff41160d8fedbd4abc29b9:
rtw88: new Realtek 802.11ac driver (2019-04-30 19:43:37 +0300)
are available in the Git repository at:
https://github.com/nbd168/wireless tags/mt76-for-kvalo-2019-05-01
for you to fetch changes up to 4d2a6f7b4e17ede86be46013d114d58adaca5631:
mt76: mt7603: dynamically alloc mcu req in mt7603_mcu_set_eeprom (2019-05-01 13:04:00 +0200)
----------------------------------------------------------------
mt76 patches for 5.2
* share more code across drivers
* new driver for MT7615 chipsets
* rework DMA API
* tx/rx performance optimizations
* use NAPI for tx cleanup on mt76x02
* AP mode support for USB devices
* USB stability fixes
* tx power handling fixes for 76x2
* endian fixes
----------------------------------------------------------------
Felix Fietkau (11):
mt76: fix tx power issues
mt76: use readl/writel instead of ioread32/iowrite32
mt76: use mac80211 txq scheduling
mt76: reduce locking in mt76_dma_tx_cleanup
mt76: store wcid tx rate info in one u32 reduce locking
mt76: move tx tasklet to struct mt76_dev
mt76: only schedule txqs from the tx tasklet
mt76: mt76x02: use napi polling for tx cleanup
mt76: mt76x02: remove irqsave/restore in locking for tx status fifo
mt76: mt7603: fix initialization of max rx length
mt76: mt7615: use sizeof instead of sizeof_field
Lorenzo Bianconi (35):
mt76: mmio: move mt76x02_set_irq_mask in mt76 module
mt76: dma: move mt76x02_init_{tx,rx}_queue in mt76 module
mt76: remove mt76_queue dependency from tx_queue_skb function pointer
mt76: remove mt76_queue dependency from tx_prepare_skb function pointer
mt76: remove mt76_queue dependency from tx_complete_skb function pointer
mt76: introduce mt76_sw_queue data structure
mt76: introduce mt76_txq_id field in mt76_queue_entry
mt76: move mt76x02_insert_hdr_pad in mt76-core module
mt76: mmio: move mt76_insert_hdr_pad in mt76_dma_tx_queue_skb
mt76: move skb dma mapping before running tx_prepare_skb
mt76: introduce mt76_tx_info data structure
mt76: dma: add static qualifier to mt76_dma_tx_queue_skb
mt7603: remove mt7603_mcu_init routine
mt7603: core: do not use magic numbers in mt7603_reg_map
mt76: usb: reduce code indentation in mt76u_alloc_tx
mt76: introduce mt76_free_device routine
mt76: move mac_work in mt76_dev
mt76: usb: reduce locking in mt76u_tx_tasklet
mt76: set txwi_size according to the driver value
mt76: add skb pointer to mt76_tx_info
mt76: dma: introduce skb field in mt76_txwi_cache
mt76: dma: add skb check for dummy pointer
mt76: mt7603: remove query from mt7603_mcu_msg_send signature
mt76: mt7603: use standard signature for mt7603_mcu_msg_send
mt76: mt7603: initialize mt76_mcu_ops data structure
mt76: introduce mt76_mcu_restart macro
mt76: mt7603: init mcu_restart function pointer
mt76: mt7603: run __mt76_mcu_send_msg in mt7603_mcu_send_firmware
mt76: mt7603: report firmware version using ethtool
mt76: move beacon_int in mt76_dev
mt76: move beacon_mask in mt76_dev
mt76: move pre_tbtt_tasklet in mt76_dev
mt76: mt7603: enable/disable pre_tbtt_tasklet in mt7603_set_channel
mt76: do not enable/disable pre_tbtt_tasklet in scan_start/scan_complete
mt76: mt7603: dynamically alloc mcu req in mt7603_mcu_set_eeprom
Ryder Lee (6):
mt76: add mac80211 driver for MT7615 PCIe-based chipsets
mt76: add unlikely() for dma_mapping_error() check
mt76: use macro for sn and seq_ctrl conversion
MAINTAINERS: update entry for mt76 wireless driver
mt76: fix endianness sparse warnings
mt76: add TX/RX antenna pattern capabilities
Stanislaw Gruszka (28):
mt76x02: introduce mt76x02_beacon.c
mt76x02: add hrtimer for pre TBTT for USB
mt76x02: introduce beacon_ops
mt76x02u: implement beacon_ops
mt76x02: generalize some mmio beaconing functions
mt76x02u: add sta_ps
mt76x02: disable HW encryption for group frames
mt76x02u: implement pre TBTT work for USB
mt76x02: make beacon slots bigger for USB
mt76x02u: add mt76_release_buffered_frames
mt76: unify set_tim
mt76x02: enable AP mode for USB
mt76usb: change mt76u_submit_buf
mt76: remove rx_page_lock
mt76usb: change mt76u_fill_rx_sg arguments
mt76usb: use usb_dev private data
mt76usb: remove mt76u_buf redundant fileds
mt76usb: move mt76u_buf->done to queue entry
mt76usb: remove mt76u_buf and use urb directly
mt76usb: remove MT_RXQ_MAIN queue from mt76u_urb_alloc
mt76usb: resue mt76u_urb_alloc for tx
mt76usb: remove unneded sg_init_table
mt76usb: allocate urb and sg as linear data
mt76usb: remove queue variable from rx_tasklet
mt76: mt76x02u: remove bogus stop on suspend
mt76usb: fix tx/rx stop
mt76: mt76x02: remove bogus mutex usage
mt76: usb: use EP max packet aligned buffer sizes for rx
kbuild test robot (1):
mt76: mt76x02: mt76x02_poll_tx() can be static
MAINTAINERS | 2 +
drivers/net/wireless/mediatek/mt76/Kconfig | 1 +
drivers/net/wireless/mediatek/mt76/Makefile | 3 +-
drivers/net/wireless/mediatek/mt76/agg-rx.c | 2 +-
drivers/net/wireless/mediatek/mt76/debugfs.c | 7 +-
drivers/net/wireless/mediatek/mt76/dma.c | 164 +++++-----
drivers/net/wireless/mediatek/mt76/dma.h | 2 +
drivers/net/wireless/mediatek/mt76/mac80211.c | 41 ++-
drivers/net/wireless/mediatek/mt76/mmio.c | 17 +-
drivers/net/wireless/mediatek/mt76/mt76.h | 119 ++++---
drivers/net/wireless/mediatek/mt76/mt7603/beacon.c | 35 +-
drivers/net/wireless/mediatek/mt76/mt7603/core.c | 19 +-
drivers/net/wireless/mediatek/mt76/mt7603/dma.c | 39 +--
drivers/net/wireless/mediatek/mt76/mt7603/init.c | 12 +-
drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 54 ++--
drivers/net/wireless/mediatek/mt76/mt7603/main.c | 34 +-
drivers/net/wireless/mediatek/mt76/mt7603/mcu.c | 116 ++++---
drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h | 23 +-
drivers/net/wireless/mediatek/mt76/mt7603/regs.h | 4 +
drivers/net/wireless/mediatek/mt76/mt7615/Kconfig | 7 +
drivers/net/wireless/mediatek/mt76/mt7615/Makefile | 5 +
drivers/net/wireless/mediatek/mt76/mt7615/dma.c | 205 ++++++++++++
drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c | 98 ++++++
drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h | 18 ++
drivers/net/wireless/mediatek/mt76/mt7615/init.c | 229 ++++++++++++++
drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 775 +++++++++++++++++++++++++++++++++++++++++++++
drivers/net/wireless/mediatek/mt76/mt7615/mac.h | 300 ++++++++++++++++++
drivers/net/wireless/mediatek/mt76/mt7615/main.c | 499 +++++++++++++++++++++++++++++
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 1655 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
drivers/net/wireless/mediatek/mt76/mt7615/mcu.h | 520 ++++++++++++++++++++++++++++++
drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h | 195 ++++++++++++
drivers/net/wireless/mediatek/mt76/mt7615/pci.c | 150 +++++++++
drivers/net/wireless/mediatek/mt76/mt7615/regs.h | 203 ++++++++++++
drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 8 +-
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 26 +-
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 49 +--
drivers/net/wireless/mediatek/mt76/mt76x02.h | 44 ++-
drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c | 286 +++++++++++++++++
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 185 ++---------
drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 4 +-
drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 266 +++++++---------
drivers/net/wireless/mediatek/mt76/mt76x02_regs.h | 5 +-
drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c | 29 +-
drivers/net/wireless/mediatek/mt76/mt76x02_usb.h | 12 +-
drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 188 ++++++++++-
drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 107 +------
drivers/net/wireless/mediatek/mt76/mt76x2/init.c | 12 +-
drivers/net/wireless/mediatek/mt76/mt76x2/pci.c | 3 +-
drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c | 6 +-
drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c | 27 +-
drivers/net/wireless/mediatek/mt76/mt76x2/phy.c | 6 +-
drivers/net/wireless/mediatek/mt76/mt76x2/usb.c | 14 +-
drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c | 5 +-
drivers/net/wireless/mediatek/mt76/mt76x2/usb_main.c | 19 +-
drivers/net/wireless/mediatek/mt76/tx.c | 148 ++++-----
drivers/net/wireless/mediatek/mt76/usb.c | 379 ++++++++++++----------
57 files changed, 6283 insertions(+), 1100 deletions(-)
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/Kconfig
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/Makefile
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/dma.c
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/init.c
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/mac.c
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/mac.h
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/main.c
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/mcu.h
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/pci.c
create mode 100644 drivers/net/wireless/mediatek/mt76/mt7615/regs.h
create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_beacon.c
^ permalink raw reply
* Re: [PATCH] mac80211: fix possible deadlock in TX path
From: Toke Høiland-Jørgensen @ 2019-04-30 7:49 UTC (permalink / raw)
To: Erik Stromdahl, johannes, davem, linux-wireless, linux-kernel
Cc: Erik Stromdahl
In-Reply-To: <20190427204155.14211-1-erik.stromdahl@gmail.com>
Erik Stromdahl <erik.stromdahl@gmail.com> writes:
> This patch fixes a possible deadlock when updating the TX statistics
> (when calling into ieee80211_tx_stats()) from ieee80211_tx_dequeue().
So is this the fix for the issue with TX scheduling you reported
earlier? :)
-Toke
^ permalink raw reply
* Re: [RFC/RFT] mac80211: Switch to a virtual time-based airtime scheduler
From: Toke Høiland-Jørgensen @ 2019-04-30 10:39 UTC (permalink / raw)
To: Yibo Zhao
Cc: make-wifi-fast, linux-wireless, Felix Fietkau, Rajkumar Manoharan,
Kan Yan, linux-wireless-owner
In-Reply-To: <a9bfcb131944fafb838ab5cd448e7da2@codeaurora.org>
Yibo Zhao <yiboz@codeaurora.org> writes:
> On 2019-04-21 05:15, Toke Høiland-Jørgensen wrote:
>> Yibo Zhao <yiboz@codeaurora.org> writes:
>>
>>> On 2019-04-11 19:24, Toke Høiland-Jørgensen wrote:
>>>> Yibo Zhao <yiboz@codeaurora.org> writes:
>>>>
>>>>> On 2019-04-10 18:40, Toke Høiland-Jørgensen wrote:
>>>>>> Yibo Zhao <yiboz@codeaurora.org> writes:
>>>>>>
>>>>>>> On 2019-04-10 04:41, Toke Høiland-Jørgensen wrote:
>>>>>>>> Yibo Zhao <yiboz@codeaurora.org> writes:
>>>>>>>>
>>>>>>>>> On 2019-04-04 16:31, Toke Høiland-Jørgensen wrote:
>>>>>>>>>> Yibo Zhao <yiboz@codeaurora.org> writes:
>>>>>>>>>>
>>>>>>>>>>> On 2019-02-16 01:05, Toke Høiland-Jørgensen wrote:
>>>>>>>>>>>> This switches the airtime scheduler in mac80211 to use a
>>>>>>>>>>>> virtual
>>>>>>>>>>>> time-based
>>>>>>>>>>>> scheduler instead of the round-robin scheduler used before.
>>>>>>>>>>>> This
>>>>>>>>>>>> has
>>>>>>>>>>>> a
>>>>>>>>>>>> couple of advantages:
>>>>>>>>>>>>
>>>>>>>>>>>> - No need to sync up the round-robin scheduler in
>>>>>>>>>>>> firmware/hardware
>>>>>>>>>>>> with
>>>>>>>>>>>> the round-robin airtime scheduler.
>>>>>>>>>>>>
>>>>>>>>>>>> - If several stations are eligible for transmission we can
>>>>>>>>>>>> schedule
>>>>>>>>>>>> both of
>>>>>>>>>>>> them; no need to hard-block the scheduling rotation until
>>>>>>>>>>>> the
>>>>>>>>>>>> head
>>>>>>>>>>>> of
>>>>>>>>>>>> the
>>>>>>>>>>>> queue has used up its quantum.
>>>>>>>>>>>>
>>>>>>>>>>>> - The check of whether a station is eligible for transmission
>>>>>>>>>>>> becomes
>>>>>>>>>>>> simpler (in ieee80211_txq_may_transmit()).
>>>>>>>>>>>>
>>>>>>>>>>>> The drawback is that scheduling becomes slightly more
>>>>>>>>>>>> expensive,
>>>>>>>>>>>> as
>>>>>>>>>>>> we
>>>>>>>>>>>> need
>>>>>>>>>>>> to maintain an rbtree of TXQs sorted by virtual time. This
>>>>>>>>>>>> means
>>>>>>>>>>>> that
>>>>>>>>>>>> ieee80211_register_airtime() becomes O(logN) in the number of
>>>>>>>>>>>> currently
>>>>>>>>>>>> scheduled TXQs. However, hopefully this number rarely grows
>>>>>>>>>>>> too
>>>>>>>>>>>> big
>>>>>>>>>>>> (it's
>>>>>>>>>>>> only TXQs currently backlogged, not all associated stations),
>>>>>>>>>>>> so
>>>>>>>>>>>> it
>>>>>>>>>>>> shouldn't be too big of an issue.
>>>>>>>>>>>>
>>>>>>>>>>>> @@ -1831,18 +1830,32 @@ void
>>>>>>>>>>>> ieee80211_sta_register_airtime(struct
>>>>>>>>>>>> ieee80211_sta *pubsta, u8 tid,
>>>>>>>>>>>> {
>>>>>>>>>>>> struct sta_info *sta = container_of(pubsta, struct
>>>>>>>>>>>> sta_info,
>>>>>>>>>>>> sta);
>>>>>>>>>>>> struct ieee80211_local *local = sta->sdata->local;
>>>>>>>>>>>> + struct ieee80211_txq *txq = sta->sta.txq[tid];
>>>>>>>>>>>> u8 ac = ieee80211_ac_from_tid(tid);
>>>>>>>>>>>> - u32 airtime = 0;
>>>>>>>>>>>> + u64 airtime = 0, weight_sum;
>>>>>>>>>>>> +
>>>>>>>>>>>> + if (!txq)
>>>>>>>>>>>> + return;
>>>>>>>>>>>>
>>>>>>>>>>>> if (sta->local->airtime_flags & AIRTIME_USE_TX)
>>>>>>>>>>>> airtime += tx_airtime;
>>>>>>>>>>>> if (sta->local->airtime_flags & AIRTIME_USE_RX)
>>>>>>>>>>>> airtime += rx_airtime;
>>>>>>>>>>>>
>>>>>>>>>>>> + /* Weights scale so the unit weight is 256 */
>>>>>>>>>>>> + airtime <<= 8;
>>>>>>>>>>>> +
>>>>>>>>>>>> spin_lock_bh(&local->active_txq_lock[ac]);
>>>>>>>>>>>> +
>>>>>>>>>>>> sta->airtime[ac].tx_airtime += tx_airtime;
>>>>>>>>>>>> sta->airtime[ac].rx_airtime += rx_airtime;
>>>>>>>>>>>> - sta->airtime[ac].deficit -= airtime;
>>>>>>>>>>>> +
>>>>>>>>>>>> + weight_sum = local->airtime_weight_sum[ac] ?:
>>>>>>>>>>>> sta->airtime_weight;
>>>>>>>>>>>> +
>>>>>>>>>>>> + local->airtime_v_t[ac] += airtime / weight_sum;
>>> Hi Toke,
>>>
>>> I was porting this version of ATF design to my ath10k platform and
>>> found
>>> my old kernel version not supporting 64bit division. I'm wondering if
>>> it
>>> is necessary to use u64 for airtime and weight_sum here though I can
>>> find a solution for it. I think u32 might be enough. For airtime,
>>> u32_max / 256 = 7182219 us(718 ms). As for weight_sum, u32_max / 8092
>>> us
>>> = 130490, meaning we can support more than 130000 nodes with airtime
>>> weight 8092 us.
>>
>> As Felix said, we don't really want divides in the fast path at all.
>> And
>> since the divisors are constant, we should be able to just pre-compute
>> reciprocals and turn the whole thing into multiplications...
>>
>>> Another finding was when I configured two 11ac STAs with different
>>> airtime weight, such as 256 and 1024 meaning ratio is 1:4, the
>>> throughput ratio was not roughly matching the ratio. Could you please
>>> share your results? I am not sure if it is due to platform difference.
>>
>> Hmm, I tested them with ath9k where things seemed to work equivalently
>> to the DRR. Are you testing the same hardware with that? Would be a
>> good
>> baseline.
>>
>> I am on vacation until the end of the month, but can share my actual
>> test results once I get back...
> Hi Toke,
> I saw your commit in hostapd in
> http://patchwork.ozlabs.org/patch/1059334/
>
> For dynamic and limit mode described in above hostapd patch, do I need
> to change any code in this kernel patch or any other patches am I
> missing?
Nope, the kernel just exposes the API to set weights, hostapd does
everything else :)
> After a quick look at the hostapd patch, I guess all the efforts for
> both modes are done in hostapd. Correct me if I am wrong. :)
You are quite right!
-Toke
^ permalink raw reply
* Re: [PATCH v9 00/14] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips
From: Greg KH @ 2019-05-01 8:42 UTC (permalink / raw)
To: Kalle Valo
Cc: Stanislaw Gruszka, yhchuang, linux-wireless, johannes, pkshih,
tehuang, Larry.Finger, briannorris
In-Reply-To: <20190501081935.GB15425@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 2638 bytes --]
On Wed, May 01, 2019 at 10:19:35AM +0200, Greg KH wrote:
> On Wed, May 01, 2019 at 10:09:34AM +0300, Kalle Valo wrote:
> > Greg KH <gregkh@linuxfoundation.org> writes:
> >
> > > On Tue, Apr 30, 2019 at 07:47:13PM +0300, Kalle Valo wrote:
> > >> Stanislaw Gruszka <sgruszka@redhat.com> writes:
> > >>
> > >> > On Tue, Apr 30, 2019 at 03:40:02PM +0300, Kalle Valo wrote:
> > >> >> > From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> > >> >> >
> > >> >> > This is a new mac80211 driver for Realtek 802.11ac wireless network chips.
> > >> >> > rtw88 now supports RTL8822BE/RTL8822CE now, with basic station mode
> > >> >> > functionalities. The firmware for both can be found at linux-firmware.
> > >> >>
> > >> >> This looks very good now. I did a quick review of the driver and had few
> > >> >> netpicks but nothing really blocking applying this. So I have now
> > >> >> combined these patches into one big patch and pushed it to the pending
> > >> >> branch:
> > >> >>
> > >> >> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=pending&id=284d1e4e3311cfe67c1c57ccc275ff0f5666aeea
> > >> >>
> > >> >> I appreciate if people could do a quick check and make sure that I
> > >> >> didn't do anything stupid when folding the patches.
> > >> >
> > >> > I've build pending branch and done few quick tests on Realtek
> > >> > 8822CE device. Everything works ok.
> > >>
> > >> Thanks so much for this, I now feel much more comfortable merging it :)
> > >>
> > >> So this is manually applied to wireless-drivers-next:
> > >>
> > >> e3037485c68e rtw88: new Realtek 802.11ac driver
> > >>
> > >> And it should be in tomorrow's linux-next build, let's see what kind of
> > >> reports we get. Greg, feel free to delete the corresponding staging
> > >> driver from your tree (I forgot the name of the driver already).
> > >
> > > I'll be glad to do so if someone also tells me what the driver's name is
> > > as well, I don't remember either :)
> >
> > I checked it now, the directory is drivers/staging/rtlwifi. Here's the
> > commit adding the upstream driver, in case you need that in the commit
> > log:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?id=e3037485c68ec1a299ff41160d8fedbd4abc29b9
>
> Thanks for this, now dropped from my tree (with the exception of 2 .h
> files which a different driver used, and I'll clean that up as well with
> a later patch.)
Attached below are the 2 follow-on patches that I have applied that
clean up the remaining .h rtlwifi files, and then move them into the
location where they are used.
thanks,
greg k-h
[-- Attachment #2: 0001-staging-rtlwifi-strip-down-phydm-.h-files.patch --]
[-- Type: text/plain, Size: 11391 bytes --]
From 8a90bdcb64a9e3732279bb6d9f5054dd6ce3dfbd Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Wed, 1 May 2019 10:37:13 +0200
Subject: [PATCH 1/2] staging: rtlwifi: strip down phydm .h files
The phydm .h files are used by another driver, but not all of the
defines are used, so strip them down to their basic necessities before
we move them out of this directory.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/rtlwifi/phydm/phydm_reg.h | 118 --------------
.../rtlwifi/phydm/phydm_regdefine11n.h | 153 +-----------------
2 files changed, 2 insertions(+), 269 deletions(-)
diff --git a/drivers/staging/rtlwifi/phydm/phydm_reg.h b/drivers/staging/rtlwifi/phydm/phydm_reg.h
index 562c1199d669..e3ae006487ba 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_reg.h
+++ b/drivers/staging/rtlwifi/phydm/phydm_reg.h
@@ -11,130 +11,12 @@
* Larry Finger <Larry.Finger@lwfinger.net>
*
*****************************************************************************/
-/* ************************************************************
- * File Name: odm_reg.h
- *
- * Description:
- *
- * This file is for general register definition.
- *
- *
- * *************************************************************/
#ifndef __HAL_ODM_REG_H__
#define __HAL_ODM_REG_H__
-/*
- * Register Definition
- */
-
-/* MAC REG */
-#define ODM_BB_RESET 0x002
-#define ODM_DUMMY 0x4fe
-#define RF_T_METER_OLD 0x24
-#define RF_T_METER_NEW 0x42
-
#define ODM_EDCA_VO_PARAM 0x500
#define ODM_EDCA_VI_PARAM 0x504
#define ODM_EDCA_BE_PARAM 0x508
#define ODM_EDCA_BK_PARAM 0x50C
-#define ODM_TXPAUSE 0x522
-
-/* LTE_COEX */
-#define REG_LTECOEX_CTRL 0x07C0
-#define REG_LTECOEX_WRITE_DATA 0x07C4
-#define REG_LTECOEX_READ_DATA 0x07C8
-#define REG_LTECOEX_PATH_CONTROL 0x70
-
-/* BB REG */
-#define ODM_FPGA_PHY0_PAGE8 0x800
-#define ODM_PSD_SETTING 0x808
-#define ODM_AFE_SETTING 0x818
-#define ODM_TXAGC_B_6_18 0x830
-#define ODM_TXAGC_B_24_54 0x834
-#define ODM_TXAGC_B_MCS32_5 0x838
-#define ODM_TXAGC_B_MCS0_MCS3 0x83c
-#define ODM_TXAGC_B_MCS4_MCS7 0x848
-#define ODM_TXAGC_B_MCS8_MCS11 0x84c
-#define ODM_ANALOG_REGISTER 0x85c
-#define ODM_RF_INTERFACE_OUTPUT 0x860
-#define ODM_TXAGC_B_MCS12_MCS15 0x868
-#define ODM_TXAGC_B_11_A_2_11 0x86c
-#define ODM_AD_DA_LSB_MASK 0x874
-#define ODM_ENABLE_3_WIRE 0x88c
-#define ODM_PSD_REPORT 0x8b4
-#define ODM_R_ANT_SELECT 0x90c
-#define ODM_CCK_ANT_SELECT 0xa07
-#define ODM_CCK_PD_THRESH 0xa0a
-#define ODM_CCK_RF_REG1 0xa11
-#define ODM_CCK_MATCH_FILTER 0xa20
-#define ODM_CCK_RAKE_MAC 0xa2e
-#define ODM_CCK_CNT_RESET 0xa2d
-#define ODM_CCK_TX_DIVERSITY 0xa2f
-#define ODM_CCK_FA_CNT_MSB 0xa5b
-#define ODM_CCK_FA_CNT_LSB 0xa5c
-#define ODM_CCK_NEW_FUNCTION 0xa75
-#define ODM_OFDM_PHY0_PAGE_C 0xc00
-#define ODM_OFDM_RX_ANT 0xc04
-#define ODM_R_A_RXIQI 0xc14
-#define ODM_R_A_AGC_CORE1 0xc50
-#define ODM_R_A_AGC_CORE2 0xc54
-#define ODM_R_B_AGC_CORE1 0xc58
-#define ODM_R_AGC_PAR 0xc70
-#define ODM_R_HTSTF_AGC_PAR 0xc7c
-#define ODM_TX_PWR_TRAINING_A 0xc90
-#define ODM_TX_PWR_TRAINING_B 0xc98
-#define ODM_OFDM_FA_CNT1 0xcf0
-#define ODM_OFDM_PHY0_PAGE_D 0xd00
-#define ODM_OFDM_FA_CNT2 0xda0
-#define ODM_OFDM_FA_CNT3 0xda4
-#define ODM_OFDM_FA_CNT4 0xda8
-#define ODM_TXAGC_A_6_18 0xe00
-#define ODM_TXAGC_A_24_54 0xe04
-#define ODM_TXAGC_A_1_MCS32 0xe08
-#define ODM_TXAGC_A_MCS0_MCS3 0xe10
-#define ODM_TXAGC_A_MCS4_MCS7 0xe14
-#define ODM_TXAGC_A_MCS8_MCS11 0xe18
-#define ODM_TXAGC_A_MCS12_MCS15 0xe1c
-
-/* RF REG */
-#define ODM_GAIN_SETTING 0x00
-#define ODM_CHANNEL 0x18
-#define ODM_RF_T_METER 0x24
-#define ODM_RF_T_METER_92D 0x42
-#define ODM_RF_T_METER_88E 0x42
-#define ODM_RF_T_METER_92E 0x42
-#define ODM_RF_T_METER_8812 0x42
-#define REG_RF_TX_GAIN_OFFSET 0x55
-
-/* ant Detect Reg */
-#define ODM_DPDT 0x300
-
-/* PSD Init */
-#define ODM_PSDREG 0x808
-
-/* 92D path Div */
-#define PATHDIV_REG 0xB30
-#define PATHDIV_TRI 0xBA0
-
-/*
- * Bitmap Definition
- */
-
-#define BIT_FA_RESET BIT(0)
-
-#define REG_OFDM_0_XA_TX_IQ_IMBALANCE 0xC80
-#define REG_OFDM_0_ECCA_THRESHOLD 0xC4C
-#define REG_FPGA0_XB_LSSI_READ_BACK 0x8A4
-#define REG_FPGA0_TX_GAIN_STAGE 0x80C
-#define REG_OFDM_0_XA_AGC_CORE1 0xC50
-#define REG_OFDM_0_XB_AGC_CORE1 0xC58
-#define REG_A_TX_SCALE_JAGUAR 0xC1C
-#define REG_B_TX_SCALE_JAGUAR 0xE1C
-
-#define REG_AFE_XTAL_CTRL 0x0024
-#define REG_AFE_PLL_CTRL 0x0028
-#define REG_MAC_PHY_CTRL 0x002C
-
-#define RF_CHNLBW 0x18
#endif
diff --git a/drivers/staging/rtlwifi/phydm/phydm_regdefine11n.h b/drivers/staging/rtlwifi/phydm/phydm_regdefine11n.h
index 765e0a0c8c7b..565996828cab 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_regdefine11n.h
+++ b/drivers/staging/rtlwifi/phydm/phydm_regdefine11n.h
@@ -15,188 +15,39 @@
#ifndef __ODM_REGDEFINE11N_H__
#define __ODM_REGDEFINE11N_H__
-/* 2 RF REG LIST */
-#define ODM_REG_RF_MODE_11N 0x00
-#define ODM_REG_RF_0B_11N 0x0B
-#define ODM_REG_CHNBW_11N 0x18
-#define ODM_REG_T_METER_11N 0x24
-#define ODM_REG_RF_25_11N 0x25
-#define ODM_REG_RF_26_11N 0x26
-#define ODM_REG_RF_27_11N 0x27
-#define ODM_REG_RF_2B_11N 0x2B
-#define ODM_REG_RF_2C_11N 0x2C
-#define ODM_REG_RXRF_A3_11N 0x3C
-#define ODM_REG_T_METER_92D_11N 0x42
-#define ODM_REG_T_METER_88E_11N 0x42
-
-/* 2 BB REG LIST */
-/* PAGE 8 */
-#define ODM_REG_BB_CTRL_11N 0x800
-#define ODM_REG_RF_PIN_11N 0x804
-#define ODM_REG_PSD_CTRL_11N 0x808
#define ODM_REG_TX_ANT_CTRL_11N 0x80C
-#define ODM_REG_BB_PWR_SAV5_11N 0x818
-#define ODM_REG_CCK_RPT_FORMAT_11N 0x824
-#define ODM_REG_CCK_RPT_FORMAT_11N_B 0x82C
#define ODM_REG_RX_DEFAULT_A_11N 0x858
-#define ODM_REG_RX_DEFAULT_B_11N 0x85A
-#define ODM_REG_BB_PWR_SAV3_11N 0x85C
#define ODM_REG_ANTSEL_CTRL_11N 0x860
#define ODM_REG_RX_ANT_CTRL_11N 0x864
#define ODM_REG_PIN_CTRL_11N 0x870
-#define ODM_REG_BB_PWR_SAV1_11N 0x874
-#define ODM_REG_ANTSEL_PATH_11N 0x878
-#define ODM_REG_BB_3WIRE_11N 0x88C
#define ODM_REG_SC_CNT_11N 0x8C4
-#define ODM_REG_PSD_DATA_11N 0x8B4
-#define ODM_REG_CCX_PERIOD_11N 0x894
-#define ODM_REG_NHM_TH9_TH10_11N 0x890
-#define ODM_REG_CLM_11N 0x890
-#define ODM_REG_NHM_TH3_TO_TH0_11N 0x898
-#define ODM_REG_NHM_TH7_TO_TH4_11N 0x89c
-#define ODM_REG_NHM_TH8_11N 0xe28
-#define ODM_REG_CLM_READY_11N 0x8b4
-#define ODM_REG_CLM_RESULT_11N 0x8d0
-#define ODM_REG_NHM_CNT_11N 0x8d8
-
-/* For struct acs_info, Jeffery, 2014-12-26 */
-#define ODM_REG_NHM_CNT7_TO_CNT4_11N 0x8dc
-#define ODM_REG_NHM_CNT9_TO_CNT8_11N 0x8d0
-#define ODM_REG_NHM_CNT10_TO_CNT11_11N 0x8d4
-/* PAGE 9 */
-#define ODM_REG_BB_CTRL_PAGE9_11N 0x900
-#define ODM_REG_DBG_RPT_11N 0x908
-#define ODM_REG_BB_TX_PATH_11N 0x90c
#define ODM_REG_ANT_MAPPING1_11N 0x914
-#define ODM_REG_ANT_MAPPING2_11N 0x918
-#define ODM_REG_EDCCA_DOWN_OPT_11N 0x948
-#define ODM_REG_RX_DFIR_MOD_97F 0x948
-/* PAGE A */
#define ODM_REG_CCK_ANTDIV_PARA1_11N 0xA00
-#define ODM_REG_CCK_ANT_SEL_11N 0xA04
#define ODM_REG_CCK_CCA_11N 0xA0A
#define ODM_REG_CCK_ANTDIV_PARA2_11N 0xA0C
-#define ODM_REG_CCK_ANTDIV_PARA3_11N 0xA10
-#define ODM_REG_CCK_ANTDIV_PARA4_11N 0xA14
-#define ODM_REG_CCK_FILTER_PARA1_11N 0xA22
-#define ODM_REG_CCK_FILTER_PARA2_11N 0xA23
-#define ODM_REG_CCK_FILTER_PARA3_11N 0xA24
-#define ODM_REG_CCK_FILTER_PARA4_11N 0xA25
-#define ODM_REG_CCK_FILTER_PARA5_11N 0xA26
-#define ODM_REG_CCK_FILTER_PARA6_11N 0xA27
-#define ODM_REG_CCK_FILTER_PARA7_11N 0xA28
-#define ODM_REG_CCK_FILTER_PARA8_11N 0xA29
#define ODM_REG_CCK_FA_RST_11N 0xA2C
#define ODM_REG_CCK_FA_MSB_11N 0xA58
#define ODM_REG_CCK_FA_LSB_11N 0xA5C
#define ODM_REG_CCK_CCA_CNT_11N 0xA60
#define ODM_REG_BB_PWR_SAV4_11N 0xA74
-/* PAGE B */
+
#define ODM_REG_LNA_SWITCH_11N 0xB2C
-#define ODM_REG_PATH_SWITCH_11N 0xB30
-#define ODM_REG_RSSI_CTRL_11N 0xB38
-#define ODM_REG_CONFIG_ANTA_11N 0xB68
-#define ODM_REG_RSSI_BT_11N 0xB9C
-#define ODM_REG_RXCK_RFMOD 0xBB0
-#define ODM_REG_EDCCA_DCNF_97F 0xBC0
-/* PAGE C */
#define ODM_REG_OFDM_FA_HOLDC_11N 0xC00
-#define ODM_REG_BB_RX_PATH_11N 0xC04
-#define ODM_REG_TRMUX_11N 0xC08
-#define ODM_REG_OFDM_FA_RSTC_11N 0xC0C
-#define ODM_REG_DOWNSAM_FACTOR_11N 0xC10
-#define ODM_REG_RXIQI_MATRIX_11N 0xC14
-#define ODM_REG_TXIQK_MATRIX_LSB1_11N 0xC4C
#define ODM_REG_IGI_A_11N 0xC50
-#define ODM_REG_ANTDIV_PARA2_11N 0xC54
-#define ODM_REG_IGI_B_11N 0xC58
-#define ODM_REG_ANTDIV_PARA3_11N 0xC5C
-#define ODM_REG_L1SBD_PD_CH_11N 0XC6C
-#define ODM_REG_BB_PWR_SAV2_11N 0xC70
-#define ODM_REG_BB_AGC_SET_2_11N 0xc74
-#define ODM_REG_RX_OFF_11N 0xC7C
-#define ODM_REG_TXIQK_MATRIXA_11N 0xC80
-#define ODM_REG_TXIQK_MATRIXB_11N 0xC88
-#define ODM_REG_TXIQK_MATRIXA_LSB2_11N 0xC94
-#define ODM_REG_TXIQK_MATRIXB_LSB2_11N 0xC9C
-#define ODM_REG_RXIQK_MATRIX_LSB_11N 0xCA0
#define ODM_REG_ANTDIV_PARA1_11N 0xCA4
-#define ODM_REG_SMALL_BANDWIDTH_11N 0xCE4
#define ODM_REG_OFDM_FA_TYPE1_11N 0xCF0
-/* PAGE D */
+
#define ODM_REG_OFDM_FA_RSTD_11N 0xD00
-#define ODM_REG_BB_RX_ANT_11N 0xD04
-#define ODM_REG_BB_ATC_11N 0xD2C
#define ODM_REG_OFDM_FA_TYPE2_11N 0xDA0
#define ODM_REG_OFDM_FA_TYPE3_11N 0xDA4
#define ODM_REG_OFDM_FA_TYPE4_11N 0xDA8
-#define ODM_REG_RPT_11N 0xDF4
-/* PAGE E */
-#define ODM_REG_TXAGC_A_6_18_11N 0xE00
-#define ODM_REG_TXAGC_A_24_54_11N 0xE04
-#define ODM_REG_TXAGC_A_1_MCS32_11N 0xE08
-#define ODM_REG_TXAGC_A_MCS0_3_11N 0xE10
-#define ODM_REG_TXAGC_A_MCS4_7_11N 0xE14
-#define ODM_REG_TXAGC_A_MCS8_11_11N 0xE18
-#define ODM_REG_TXAGC_A_MCS12_15_11N 0xE1C
-#define ODM_REG_EDCCA_DCNF_11N 0xE24
-#define ODM_REG_TAP_UPD_97F 0xE24
-#define ODM_REG_FPGA0_IQK_11N 0xE28
-#define ODM_REG_PAGE_B1_97F 0xE28
-#define ODM_REG_TXIQK_TONE_A_11N 0xE30
-#define ODM_REG_RXIQK_TONE_A_11N 0xE34
-#define ODM_REG_TXIQK_PI_A_11N 0xE38
-#define ODM_REG_RXIQK_PI_A_11N 0xE3C
-#define ODM_REG_TXIQK_11N 0xE40
-#define ODM_REG_RXIQK_11N 0xE44
-#define ODM_REG_IQK_AGC_PTS_11N 0xE48
-#define ODM_REG_IQK_AGC_RSP_11N 0xE4C
-#define ODM_REG_BLUETOOTH_11N 0xE6C
-#define ODM_REG_RX_WAIT_CCA_11N 0xE70
-#define ODM_REG_TX_CCK_RFON_11N 0xE74
-#define ODM_REG_TX_CCK_BBON_11N 0xE78
-#define ODM_REG_OFDM_RFON_11N 0xE7C
-#define ODM_REG_OFDM_BBON_11N 0xE80
-#define ODM_REG_TX2RX_11N 0xE84
-#define ODM_REG_TX2TX_11N 0xE88
-#define ODM_REG_RX_CCK_11N 0xE8C
-#define ODM_REG_RX_OFDM_11N 0xED0
-#define ODM_REG_RX_WAIT_RIFS_11N 0xED4
-#define ODM_REG_RX2RX_11N 0xED8
-#define ODM_REG_STANDBY_11N 0xEDC
-#define ODM_REG_SLEEP_11N 0xEE0
-#define ODM_REG_PMPD_ANAEN_11N 0xEEC
-/* PAGE F */
-#define ODM_REG_PAGE_F_RST_11N 0xF14
-#define ODM_REG_IGI_C_11N 0xF84
-#define ODM_REG_IGI_D_11N 0xF88
-#define ODM_REG_CCK_CRC32_ERROR_CNT_11N 0xF84
-#define ODM_REG_CCK_CRC32_OK_CNT_11N 0xF88
-#define ODM_REG_HT_CRC32_CNT_11N 0xF90
-#define ODM_REG_OFDM_CRC32_CNT_11N 0xF94
-/* 2 MAC REG LIST */
-#define ODM_REG_BB_RST_11N 0x02
#define ODM_REG_ANTSEL_PIN_11N 0x4C
-#define ODM_REG_EARLY_MODE_11N 0x4D0
-#define ODM_REG_RSSI_MONITOR_11N 0x4FE
-#define ODM_REG_EDCA_VO_11N 0x500
-#define ODM_REG_EDCA_VI_11N 0x504
-#define ODM_REG_EDCA_BE_11N 0x508
-#define ODM_REG_EDCA_BK_11N 0x50C
-#define ODM_REG_TXPAUSE_11N 0x522
#define ODM_REG_RESP_TX_11N 0x6D8
-#define ODM_REG_ANT_TRAIN_PARA1_11N 0x7b0
-#define ODM_REG_ANT_TRAIN_PARA2_11N 0x7b4
-/* DIG Related */
#define ODM_BIT_IGI_11N 0x0000007F
-#define ODM_BIT_CCK_RPT_FORMAT_11N BIT(9)
-#define ODM_BIT_BB_RX_PATH_11N 0xF
-#define ODM_BIT_BB_TX_PATH_11N 0xF
-#define ODM_BIT_BB_ATC_11N BIT(11)
#endif
--
2.21.0
[-- Attachment #3: 0002-staging-rtlwifi-move-remaining-phydm-.h-files.patch --]
[-- Type: text/plain, Size: 2135 bytes --]
From adc7af464ceba1962c2eb875a97f4d3bd82fbc5f Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Wed, 1 May 2019 10:40:10 +0200
Subject: [PATCH 2/2] staging: rtlwifi: move remaining phydm .h files
The rtl8188eu driver uses the phydm .h files from the rtlwifi driver,
but now that the rtlwifi driver is gone, it's silly to have a whole
directory for just 2 .h files. So move these files into the rtl8188eu
driver's directory so that it can be self-contained.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/rtl8188eu/include/odm_precomp.h | 4 ++--
.../staging/{rtlwifi/phydm => rtl8188eu/include}/phydm_reg.h | 0
.../{rtlwifi/phydm => rtl8188eu/include}/phydm_regdefine11n.h | 0
3 files changed, 2 insertions(+), 2 deletions(-)
rename drivers/staging/{rtlwifi/phydm => rtl8188eu/include}/phydm_reg.h (100%)
rename drivers/staging/{rtlwifi/phydm => rtl8188eu/include}/phydm_regdefine11n.h (100%)
diff --git a/drivers/staging/rtl8188eu/include/odm_precomp.h b/drivers/staging/rtl8188eu/include/odm_precomp.h
index 6efddc8f1675..df096c37f5eb 100644
--- a/drivers/staging/rtl8188eu/include/odm_precomp.h
+++ b/drivers/staging/rtl8188eu/include/odm_precomp.h
@@ -24,12 +24,12 @@
#include "odm.h"
#include "odm_hwconfig.h"
#include "odm_debug.h"
-#include "../../rtlwifi/phydm/phydm_regdefine11n.h"
+#include "phydm_regdefine11n.h"
#include "hal8188e_rate_adaptive.h" /* for RA,Power training */
#include "rtl8188e_hal.h"
-#include "../../rtlwifi/phydm/phydm_reg.h"
+#include "phydm_reg.h"
#include "odm_rtl8188e.h"
diff --git a/drivers/staging/rtlwifi/phydm/phydm_reg.h b/drivers/staging/rtl8188eu/include/phydm_reg.h
similarity index 100%
rename from drivers/staging/rtlwifi/phydm/phydm_reg.h
rename to drivers/staging/rtl8188eu/include/phydm_reg.h
diff --git a/drivers/staging/rtlwifi/phydm/phydm_regdefine11n.h b/drivers/staging/rtl8188eu/include/phydm_regdefine11n.h
similarity index 100%
rename from drivers/staging/rtlwifi/phydm/phydm_regdefine11n.h
rename to drivers/staging/rtl8188eu/include/phydm_regdefine11n.h
--
2.21.0
^ permalink raw reply related
* Re: [PATCH v9 00/14] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips
From: Greg KH @ 2019-05-01 8:19 UTC (permalink / raw)
To: Kalle Valo
Cc: Stanislaw Gruszka, yhchuang, linux-wireless, johannes, pkshih,
tehuang, Larry.Finger, briannorris
In-Reply-To: <87muk6odld.fsf@kamboji.qca.qualcomm.com>
On Wed, May 01, 2019 at 10:09:34AM +0300, Kalle Valo wrote:
> Greg KH <gregkh@linuxfoundation.org> writes:
>
> > On Tue, Apr 30, 2019 at 07:47:13PM +0300, Kalle Valo wrote:
> >> Stanislaw Gruszka <sgruszka@redhat.com> writes:
> >>
> >> > On Tue, Apr 30, 2019 at 03:40:02PM +0300, Kalle Valo wrote:
> >> >> > From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> >> >> >
> >> >> > This is a new mac80211 driver for Realtek 802.11ac wireless network chips.
> >> >> > rtw88 now supports RTL8822BE/RTL8822CE now, with basic station mode
> >> >> > functionalities. The firmware for both can be found at linux-firmware.
> >> >>
> >> >> This looks very good now. I did a quick review of the driver and had few
> >> >> netpicks but nothing really blocking applying this. So I have now
> >> >> combined these patches into one big patch and pushed it to the pending
> >> >> branch:
> >> >>
> >> >> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=pending&id=284d1e4e3311cfe67c1c57ccc275ff0f5666aeea
> >> >>
> >> >> I appreciate if people could do a quick check and make sure that I
> >> >> didn't do anything stupid when folding the patches.
> >> >
> >> > I've build pending branch and done few quick tests on Realtek
> >> > 8822CE device. Everything works ok.
> >>
> >> Thanks so much for this, I now feel much more comfortable merging it :)
> >>
> >> So this is manually applied to wireless-drivers-next:
> >>
> >> e3037485c68e rtw88: new Realtek 802.11ac driver
> >>
> >> And it should be in tomorrow's linux-next build, let's see what kind of
> >> reports we get. Greg, feel free to delete the corresponding staging
> >> driver from your tree (I forgot the name of the driver already).
> >
> > I'll be glad to do so if someone also tells me what the driver's name is
> > as well, I don't remember either :)
>
> I checked it now, the directory is drivers/staging/rtlwifi. Here's the
> commit adding the upstream driver, in case you need that in the commit
> log:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?id=e3037485c68ec1a299ff41160d8fedbd4abc29b9
Thanks for this, now dropped from my tree (with the exception of 2 .h
files which a different driver used, and I'll clean that up as well with
a later patch.)
Note, the diffstat involved here shows that a "proper" Linux driver that
is merged into the kernel tree follows the rule-of-thumb that I have
consistently seen over time. An in-tree driver that has been reviewed
properly is 33% of the size of an "out of tree" driver. It's always
nice to see users benefit from properly developed drivers like this.
thanks,
greg k-h
^ permalink raw reply
* Re: carl9170 crash
From: Kalle Valo @ 2019-05-01 7:19 UTC (permalink / raw)
To: whiteheadm; +Cc: Christian Lamparter, linux-wireless
In-Reply-To: <CAP8WD_bTvWWTeh6BP_qgByiuWLbSN==CTBY1KD-v8XpWZkf_Rw@mail.gmail.com>
tedheadster <tedheadster@gmail.com> writes:
> I am getting this crash for the carl9170 in recent kernels, though I
> have not yet bisected it. It hangs the networking system completely
> (ifconfig -a never returns) and it prevents a reboot. I have to use
> sysrq-b to 'cleanly' reboot the system.
>
> I can apply and test any patches.
What was the last working version?
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH v9 00/14] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips
From: Kalle Valo @ 2019-05-01 7:09 UTC (permalink / raw)
To: Greg KH
Cc: Stanislaw Gruszka, yhchuang, linux-wireless, johannes, pkshih,
tehuang, Larry.Finger, briannorris
In-Reply-To: <20190430174234.GA16336@kroah.com>
Greg KH <gregkh@linuxfoundation.org> writes:
> On Tue, Apr 30, 2019 at 07:47:13PM +0300, Kalle Valo wrote:
>> Stanislaw Gruszka <sgruszka@redhat.com> writes:
>>
>> > On Tue, Apr 30, 2019 at 03:40:02PM +0300, Kalle Valo wrote:
>> >> > From: Yan-Hsuan Chuang <yhchuang@realtek.com>
>> >> >
>> >> > This is a new mac80211 driver for Realtek 802.11ac wireless network chips.
>> >> > rtw88 now supports RTL8822BE/RTL8822CE now, with basic station mode
>> >> > functionalities. The firmware for both can be found at linux-firmware.
>> >>
>> >> This looks very good now. I did a quick review of the driver and had few
>> >> netpicks but nothing really blocking applying this. So I have now
>> >> combined these patches into one big patch and pushed it to the pending
>> >> branch:
>> >>
>> >> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=pending&id=284d1e4e3311cfe67c1c57ccc275ff0f5666aeea
>> >>
>> >> I appreciate if people could do a quick check and make sure that I
>> >> didn't do anything stupid when folding the patches.
>> >
>> > I've build pending branch and done few quick tests on Realtek
>> > 8822CE device. Everything works ok.
>>
>> Thanks so much for this, I now feel much more comfortable merging it :)
>>
>> So this is manually applied to wireless-drivers-next:
>>
>> e3037485c68e rtw88: new Realtek 802.11ac driver
>>
>> And it should be in tomorrow's linux-next build, let's see what kind of
>> reports we get. Greg, feel free to delete the corresponding staging
>> driver from your tree (I forgot the name of the driver already).
>
> I'll be glad to do so if someone also tells me what the driver's name is
> as well, I don't remember either :)
I checked it now, the directory is drivers/staging/rtlwifi. Here's the
commit adding the upstream driver, in case you need that in the commit
log:
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?id=e3037485c68ec1a299ff41160d8fedbd4abc29b9
--
Kalle Valo
^ permalink raw reply
* carl9170 crash
From: tedheadster @ 2019-05-01 2:46 UTC (permalink / raw)
To: Christian Lamparter, linux-wireless
Christian,
I am getting this crash for the carl9170 in recent kernels, though I
have not yet bisected it. It hangs the networking system completely
(ifconfig -a never returns) and it prevents a reboot. I have to use
sysrq-b to 'cleanly' reboot the system.
I can apply and test any patches.
usbcore: registered new interface driver carl9170
usb 1-1: driver API: 1.9.9 2016-02-15 [1-1]
usb 1-1: firmware API: 1.9.6 2012-07-07
ath: EEPROM regdomain: 0x3a
ath: EEPROM indicates we should expect a direct regpair map
ath: Country alpha2 being used: BM
ath: Regpair used: 0x3a
PREEMPT
CPU: 0 PID: 44 Comm: kworker/0:2 Not tainted 5.1.0-rc7.pentiumii-laptop #1446
Workqueue: events request_firmware_work_func
EIP: nl80211_send_wiphy+0x558/0x1a58 [cfg80211]
Code: 0f 85 73 02 00 00 80 7f 16 00 75 0c 80 7f 2c 00 0f 84 a4 00 00
00 eb 6a 8d 47 19 ba 03 00 00 00 50 b9 10 00 00 00 8b 75 bc c9 <f0> e8
2a ae 81 f8 5a cd c0 0f 85 5d 14 00 00 4d b7 4f 14 ba 04 00
EAX: c891205d EBX: c4a76000 ECX: 00000010 EDX: 00000003
ESI: c76fa5a0 EDI: c8912044 EBP: c036de14 ESP: c036ddd4
DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010202
CR0: 80050033 CR2: b716c540 CR3: 07618000 CR4: 00000290
Call Trace:
? nl80211_notify_wiphy+0x52/0x84 [cfg80211]
wiphy_register+0x303/0x624 [cfg80211]
? ieee80211_register_hw+0x325/0x94a [mac80211]
? __kmalloc+0x8c/0x9c
? ieee80211_cs_list_valid+0xb/0x31 [mac80211]
ieee80211_register_hw+0x68f/0x94a [mac80211]
? ath_reg_apply_radar_flags.isra.4+0xb/0x62 [ath]
? ath_reg_apply_world_flags+0xa/0xba [ath]
? ath_regd_init+0xd8/0xec [ath]
? carl9170_op_bss_info_changed+0x16a/0x16a [carl9170]
carl9170_register+0x1f5/0x36d [carl9170]
? carl9170_register+0x1f5/0x36d [carl9170]
carl9170_usb_firmware_step2+0x226/0x251 [carl9170]
request_firmware_work_func+0x2a/0x51
process_one_work+0x134/0x260
worker_thread+0x18b/0x24a
kthread+0xcd/0xcf
? cancel_delayed_work_sync+0x14/0x14
? kthread_create_worker_on_cpu+0x1c/0x1c
ret_from_fork+0x19/0x24
Modules linked in: carl9170 mac80211 ath cfg80211 r8169 realtek libphy
rfkill uhci_hcd ehci_pci ehci_hcd pcmcia usbcore i2c_piix4 i2c_core
usb_common yenta_socket pcmcia_rsrc pcmcia_core autofs4
---[ end trace dbf0bc816dabbb51 ]---
EIP: nl80211_send_wiphy+0x558/0x1a58 [cfg80211]
Code: 0f 85 73 02 00 00 80 7f 16 00 75 0c 80 7f 2c 00 0f 84 a4 00 00
00 eb 6a 8d 47 19 ba 03 00 00 00 50 b9 10 00 00 00 8b 75 bc c9 <f0> e8
2a ae 81 f8 5a cd c0 0f 85 5d 14 00 00 4d b7 4f 14 ba 04 00
EAX: c891205d EBX: c4a76000 ECX: 00000010 EDX: 00000003
ESI: c76fa5a0 EDI: c8912044 EBP: c036de14 ESP: c15b02b8
DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010202
CR0: 80050033 CR2: b7271500 CR3: 0770f000 CR4: 00000290
r8169 0000:06:00.0 enp6s0: Link is Up - 1Gbps/Full - flow control rx/tx
- Matthew Whitehead
^ permalink raw reply
* Re: [PATCH v9 00/14] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips
From: Greg KH @ 2019-04-30 17:42 UTC (permalink / raw)
To: Kalle Valo
Cc: Stanislaw Gruszka, yhchuang, linux-wireless, johannes, pkshih,
tehuang, Larry.Finger, briannorris
In-Reply-To: <87v9yvo2y6.fsf@kamboji.qca.qualcomm.com>
On Tue, Apr 30, 2019 at 07:47:13PM +0300, Kalle Valo wrote:
> Stanislaw Gruszka <sgruszka@redhat.com> writes:
>
> > On Tue, Apr 30, 2019 at 03:40:02PM +0300, Kalle Valo wrote:
> >> > From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> >> >
> >> > This is a new mac80211 driver for Realtek 802.11ac wireless network chips.
> >> > rtw88 now supports RTL8822BE/RTL8822CE now, with basic station mode
> >> > functionalities. The firmware for both can be found at linux-firmware.
> >>
> >> This looks very good now. I did a quick review of the driver and had few
> >> netpicks but nothing really blocking applying this. So I have now
> >> combined these patches into one big patch and pushed it to the pending
> >> branch:
> >>
> >> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=pending&id=284d1e4e3311cfe67c1c57ccc275ff0f5666aeea
> >>
> >> I appreciate if people could do a quick check and make sure that I
> >> didn't do anything stupid when folding the patches.
> >
> > I've build pending branch and done few quick tests on Realtek
> > 8822CE device. Everything works ok.
>
> Thanks so much for this, I now feel much more comfortable merging it :)
>
> So this is manually applied to wireless-drivers-next:
>
> e3037485c68e rtw88: new Realtek 802.11ac driver
>
> And it should be in tomorrow's linux-next build, let's see what kind of
> reports we get. Greg, feel free to delete the corresponding staging
> driver from your tree (I forgot the name of the driver already).
I'll be glad to do so if someone also tells me what the driver's name is
as well, I don't remember either :)
thanks,
greg k-h
^ permalink raw reply
* Re: pull-request: wireless-drivers 2019-04-30
From: Kalle Valo @ 2019-04-30 16:55 UTC (permalink / raw)
To: David Miller; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20190430.120117.1616322040923778364.davem@davemloft.net>
David Miller <davem@davemloft.net> writes:
> From: Kalle Valo <kvalo@codeaurora.org>
> Date: Tue, 30 Apr 2019 18:10:01 +0300
>
>> here's one more pull request to net tree for 5.1, more info below.
>>
>> Also note that this pull conflicts with net-next. And I want to emphasie
>> that it's really net-next, so when you pull this to net tree it should
>> go without conflicts. Stephen reported the conflict here:
>>
>> https://lkml.kernel.org/r/20190429115338.5decb50b@canb.auug.org.au
>>
>> In iwlwifi oddly commit 154d4899e411 adds the IS_ERR_OR_NULL() in
>> wireless-drivers but commit c9af7528c331 removes the whole check in
>> wireless-drivers-next. The fix is easy, just drop the whole check for
>> mvmvif->dbgfs_dir in iwlwifi/mvm/debugfs-vif.c, it's unneeded anyway.
>>
>> As usual, please let me know if you have any problems.
>
> Pulled, thanks Kalle.
Great, thanks.
> Thanks for the conflict resolution information, it is very helpful.
>
> However, can you put it into the merge commit text next time as well?
> I cut and pasted it in there when I pulled this stuff in.
A good idea, I'll do that. Just to be sure, do you mean that I should
add it only with conflicts between net and net-next (like in this case)?
Or should I add it everytime I see a conflict, for example between
wireless-drivers-next and net-next? I hope my question is not too
confusing...
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH v9 00/14] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips
From: Kalle Valo @ 2019-04-30 16:47 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: yhchuang, linux-wireless, johannes, pkshih, tehuang, Larry.Finger,
briannorris, gregkh
In-Reply-To: <20190430155808.GA3019@redhat.com>
Stanislaw Gruszka <sgruszka@redhat.com> writes:
> On Tue, Apr 30, 2019 at 03:40:02PM +0300, Kalle Valo wrote:
>> > From: Yan-Hsuan Chuang <yhchuang@realtek.com>
>> >
>> > This is a new mac80211 driver for Realtek 802.11ac wireless network chips.
>> > rtw88 now supports RTL8822BE/RTL8822CE now, with basic station mode
>> > functionalities. The firmware for both can be found at linux-firmware.
>>
>> This looks very good now. I did a quick review of the driver and had few
>> netpicks but nothing really blocking applying this. So I have now
>> combined these patches into one big patch and pushed it to the pending
>> branch:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=pending&id=284d1e4e3311cfe67c1c57ccc275ff0f5666aeea
>>
>> I appreciate if people could do a quick check and make sure that I
>> didn't do anything stupid when folding the patches.
>
> I've build pending branch and done few quick tests on Realtek
> 8822CE device. Everything works ok.
Thanks so much for this, I now feel much more comfortable merging it :)
So this is manually applied to wireless-drivers-next:
e3037485c68e rtw88: new Realtek 802.11ac driver
And it should be in tomorrow's linux-next build, let's see what kind of
reports we get. Greg, feel free to delete the corresponding staging
driver from your tree (I forgot the name of the driver already).
--
Kalle Valo
^ permalink raw reply
* Re: pull-request: wireless-drivers 2019-04-30
From: David Miller @ 2019-04-30 16:01 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <8736lzpm0m.fsf@kamboji.qca.qualcomm.com>
From: Kalle Valo <kvalo@codeaurora.org>
Date: Tue, 30 Apr 2019 18:10:01 +0300
> here's one more pull request to net tree for 5.1, more info below.
>
> Also note that this pull conflicts with net-next. And I want to emphasie
> that it's really net-next, so when you pull this to net tree it should
> go without conflicts. Stephen reported the conflict here:
>
> https://lkml.kernel.org/r/20190429115338.5decb50b@canb.auug.org.au
>
> In iwlwifi oddly commit 154d4899e411 adds the IS_ERR_OR_NULL() in
> wireless-drivers but commit c9af7528c331 removes the whole check in
> wireless-drivers-next. The fix is easy, just drop the whole check for
> mvmvif->dbgfs_dir in iwlwifi/mvm/debugfs-vif.c, it's unneeded anyway.
>
> As usual, please let me know if you have any problems.
Pulled, thanks Kalle.
Thanks for the conflict resolution information, it is very helpful.
However, can you put it into the merge commit text next time as well?
I cut and pasted it in there when I pulled this stuff in.
Thanks!
^ permalink raw reply
* Re: [PATCH v9 00/14] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips
From: Stanislaw Gruszka @ 2019-04-30 15:58 UTC (permalink / raw)
To: Kalle Valo
Cc: yhchuang, linux-wireless, johannes, pkshih, tehuang, Larry.Finger,
briannorris, gregkh
In-Reply-To: <87sgtzwtst.fsf@purkki.adurom.net>
On Tue, Apr 30, 2019 at 03:40:02PM +0300, Kalle Valo wrote:
> > From: Yan-Hsuan Chuang <yhchuang@realtek.com>
> >
> > This is a new mac80211 driver for Realtek 802.11ac wireless network chips.
> > rtw88 now supports RTL8822BE/RTL8822CE now, with basic station mode
> > functionalities. The firmware for both can be found at linux-firmware.
>
> This looks very good now. I did a quick review of the driver and had few
> netpicks but nothing really blocking applying this. So I have now
> combined these patches into one big patch and pushed it to the pending
> branch:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=pending&id=284d1e4e3311cfe67c1c57ccc275ff0f5666aeea
>
> I appreciate if people could do a quick check and make sure that I
> didn't do anything stupid when folding the patches.
I've build pending branch and done few quick tests on Realtek
8822CE device. Everything works ok.
> I'm planning to
> apply this to master branch still today evening so that it makes to
> tomorrow's linux-next build, and I can get it to net-next before the
> merge window starts on Sunday.
Yay! Great :-)
Stanislaw
^ permalink raw reply
* [PATCH] mt76: mt7603: dynamically alloc mcu req in mt7603_mcu_set_eeprom
From: Lorenzo Bianconi @ 2019-04-30 15:17 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless
In-Reply-To: <cover.1556637012.git.lorenzo@kernel.org>
Do not allocate mcu requests on the stack in mt7603_mcu_set_eeprom
in order to avoid the following warning:
Warning: the frame size of 1032 bytes is larger than 1024 bytes
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
.../net/wireless/mediatek/mt76/mt7603/mcu.c | 30 ++++++++++++-------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
index 766d968671b3..6357b5658a32 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
@@ -354,24 +354,34 @@ int mt7603_mcu_set_eeprom(struct mt7603_dev *dev)
u8 buffer_mode;
u8 len;
u8 pad[2];
- struct req_data data[255];
- } req = {
+ } req_hdr = {
.buffer_mode = 1,
.len = ARRAY_SIZE(req_fields) - 1,
};
- u8 *eep = (u8 *)dev->mt76.eeprom.data;
- int i;
+ const int size = 0xff * sizeof(struct req_data);
+ u8 *req, *eep = (u8 *)dev->mt76.eeprom.data;
+ int i, ret, len = sizeof(req_hdr) + size;
+ struct req_data *data;
- BUILD_BUG_ON(ARRAY_SIZE(req_fields) > ARRAY_SIZE(req.data));
+ BUILD_BUG_ON(ARRAY_SIZE(req_fields) * sizeof(*data) > size);
+
+ req = kmalloc(len, GFP_KERNEL);
+ if (!req)
+ return -ENOMEM;
+ memcpy(req, &req_hdr, sizeof(req_hdr));
+ data = (struct req_data *)(req + sizeof(req_hdr));
+ memset(data, 0, size);
for (i = 0; i < ARRAY_SIZE(req_fields); i++) {
- req.data[i].addr = cpu_to_le16(req_fields[i]);
- req.data[i].val = eep[req_fields[i]];
- req.data[i].pad = 0;
+ data[i].addr = cpu_to_le16(req_fields[i]);
+ data[i].val = eep[req_fields[i]];
}
- return __mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_EFUSE_BUFFER_MODE,
- &req, sizeof(req), true);
+ ret = __mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_EFUSE_BUFFER_MODE,
+ req, len, true);
+ kfree(req);
+
+ return ret;
}
static int mt7603_mcu_set_tx_power(struct mt7603_dev *dev)
--
2.20.1
^ permalink raw reply related
* pull-request: wireless-drivers 2019-04-30
From: Kalle Valo @ 2019-04-30 15:10 UTC (permalink / raw)
To: David Miller; +Cc: linux-wireless, netdev, linux-kernel
Hi Dave,
here's one more pull request to net tree for 5.1, more info below.
Also note that this pull conflicts with net-next. And I want to emphasie
that it's really net-next, so when you pull this to net tree it should
go without conflicts. Stephen reported the conflict here:
https://lkml.kernel.org/r/20190429115338.5decb50b@canb.auug.org.au
In iwlwifi oddly commit 154d4899e411 adds the IS_ERR_OR_NULL() in
wireless-drivers but commit c9af7528c331 removes the whole check in
wireless-drivers-next. The fix is easy, just drop the whole check for
mvmvif->dbgfs_dir in iwlwifi/mvm/debugfs-vif.c, it's unneeded anyway.
As usual, please let me know if you have any problems.
Kalle
The following changes since commit 614c70f35cd77a9af8e2ca841dcdb121cec3068f:
bnx2x: fix spelling mistake "dicline" -> "decline" (2019-04-15 17:23:09 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git tags/wireless-drivers-for-davem-2019-04-30
for you to fetch changes up to 7a0f8ad5ff6323dd8badfeb01d338db146569976:
Merge ath-current from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git (2019-04-29 19:33:33 +0300)
----------------------------------------------------------------
wireless-drivers fixes for 5.1
Third set of fixes for 5.1.
iwlwifi
* fix an oops when creating debugfs entries
* fix bug when trying to capture debugging info while in rfkill
* prevent potential uninitialized memory dumps into debugging logs
* fix some initialization parameters for AX210 devices
* fix an oops with non-MSIX devices
* fix an oops when we receive a packet with bogus lengths
* fix a bug that prevented 5350 devices from working
* fix a small merge damage from the previous series
mwifiex
* fig regression with resume on SDIO
ath10k
* fix locking problem with crashdump
* fix warnings during suspend and resume
----------------------------------------------------------------
Brian Norris (1):
ath10k: perform crash dump collection in workqueue
Douglas Anderson (1):
mwifiex: Make resume actually do something useful again on SDIO cards
Emmanuel Grumbach (1):
iwlwifi: fix driver operation for 5350
Greg Kroah-Hartman (1):
iwlwifi: mvm: properly check debugfs dentry before using it
Johannes Berg (1):
iwlwifi: mvm: don't attempt debug collection in rfkill
Kalle Valo (3):
Merge tag 'iwlwifi-for-kalle-2019-04-19' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixes
Merge tag 'iwlwifi-for-kalle-2019-04-28' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixes
Merge ath-current from git://git.kernel.org/.../kvalo/ath.git
Luca Coelho (2):
iwlwifi: mvm: check for length correctness in iwl_mvm_create_skb()
iwlwifi: mvm: fix merge damage in iwl_mvm_vif_dbgfs_register()
Rafael J. Wysocki (1):
ath10k: Drop WARN_ON()s that always trigger during system resume
Shahar S Matityahu (2):
iwlwifi: don't panic in error path on non-msix systems
iwlwifi: dbg_ini: check debug TLV type explicitly
Shaul Triebitz (1):
iwlwifi: cfg: use family 22560 based_params for AX210 family
drivers/net/wireless/ath/ath10k/ce.c | 2 +-
drivers/net/wireless/ath/ath10k/core.c | 1 +
drivers/net/wireless/ath/ath10k/core.h | 3 +++
drivers/net/wireless/ath/ath10k/coredump.c | 6 ++---
drivers/net/wireless/ath/ath10k/mac.c | 4 ++--
drivers/net/wireless/ath/ath10k/pci.c | 24 +++++++++++++++----
drivers/net/wireless/ath/ath10k/pci.h | 2 ++
drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 2 +-
drivers/net/wireless/intel/iwlwifi/cfg/5000.c | 3 ++-
drivers/net/wireless/intel/iwlwifi/fw/file.h | 15 +++++++-----
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 3 ++-
.../net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 3 +--
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 +++-
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +-
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 28 ++++++++++++++++++----
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 19 ++++++++++-----
drivers/net/wireless/marvell/mwifiex/sdio.c | 2 +-
17 files changed, 88 insertions(+), 35 deletions(-)
^ permalink raw reply
* Re: [PATCH] ath10k: add peer id check in ath10k_peer_find_by_id
From: Kalle Valo @ 2019-04-30 14:25 UTC (permalink / raw)
To: Wen Gong
Cc: Nicolas Boichat, Claire Chang, linux-wireless@vger.kernel.org,
ath10k@lists.infradead.org, Wen Gong
In-Reply-To: <7d528d143ae14de2a489c6986f71ac45@aptaiexm02f.ap.qualcomm.com>
Wen Gong <wgong@qti.qualcomm.com> writes:
>> -----Original Message-----
>> From: ath10k <ath10k-bounces@lists.infradead.org> On Behalf Of Kalle Valo
>> Sent: Tuesday, April 30, 2019 5:37 PM
>> To: Nicolas Boichat <drinkcat@chromium.org>
>> Cc: Claire Chang <tientzu@chromium.org>; linux-wireless@vger.kernel.org;
>> ath10k@lists.infradead.org; Wen Gong <wgong@codeaurora.org>
>> Subject: [EXT] Re: [PATCH] ath10k: add peer id check in
>> ath10k_peer_find_by_id
>> >> --- a/drivers/net/wireless/ath/ath10k/txrx.c
>> >> +++ b/drivers/net/wireless/ath/ath10k/txrx.c
>> >> @@ -157,6 +157,9 @@ struct ath10k_peer
>> *ath10k_peer_find_by_id(struct ath10k *ar, int peer_id)
>> >> {
>> >> struct ath10k_peer *peer;
>> >>
>> >> + if (peer_id >= sizeof(peer->peer_ids) * BITS_PER_BYTE)
>> >
>> > I'd use >= BITS_PER_TYPE(peer->peer_ids).
>>
>> Nice, I didn't know about that. Wen, please submit v2 using this.
>>
>> --
>> Kalle Valo
> Yes,
> I have send v2 yesterday:
> [PATCH v2] ath10k: add peer id check in ath10k_peer_find_by_id
Ok, I didn't notice that yet. But in general it's good practise to reply
to review comments and let the reviewer (and others) know if you agree
with the comment or not. For example, in this case you could have said
to Nicolas: "Ok, I'll send v2".
--
Kalle Valo
^ permalink raw reply
* [PATCH v3] mt76: add TX/RX antenna pattern capabilities
From: Ryder Lee @ 2019-04-30 13:55 UTC (permalink / raw)
To: Lorenzo Bianconi, Felix Fietkau
Cc: Roy Luo, YF Luo, Yiwei Chung, Sean Wang, linux-wireless,
linux-mediatek, linux-kernel, Ryder Lee
Announce antenna pattern cap to adapt PHY and baseband settings.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
Changes since v3:
- Move these flags to common code.
Changes since v2:
- Add a prefix mt76 in the title.
---
drivers/net/wireless/mediatek/mt76/mac80211.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 851caabbecda..26a336ef86c5 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -214,6 +214,8 @@ mt76_init_sband(struct mt76_dev *dev, struct mt76_sband *msband,
vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC |
IEEE80211_VHT_CAP_RXSTBC_1 |
IEEE80211_VHT_CAP_SHORT_GI_80 |
+ IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN |
+ IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN |
(3 << IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT);
return 0;
--
2.18.0
^ permalink raw reply related
* Re: [RFC/RFT 7/7] rt2800: do not enable watchdog by default
From: Kalle Valo @ 2019-04-30 13:25 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: linux-wireless, Tomislav Požega, Daniel Golle, Felix Fietkau,
Mathias Kresin
In-Reply-To: <1556535270-3551-8-git-send-email-sgruszka@redhat.com>
Stanislaw Gruszka <sgruszka@redhat.com> writes:
> Make watchdog disabled by default and add module parameter to enable it.
>
> User will have to create file in /etc/modprobe.d/ with
>
> options rt2800lib watchdog=1
>
> to enable the watchdog or load "rt2800lib watchdog=1" module manually
> before loading rt2800{soc,pci,usb} module.
>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
[...]
> +static bool modparam_watchdog;
> +module_param_named(watchdog, modparam_watchdog, bool, S_IRUGO);
> +MODULE_PARM_DESC(watchdog, "Enable watchdog.");
You could describe a bit more what this watchdog does and that it's in
driver (or at least I assume so).
--
Kalle Valo
^ permalink raw reply
* [PATCH v3 3/3] mt76: do not enable/disable pre_tbtt_tasklet in scan_start/scan_complete
From: Lorenzo Bianconi @ 2019-04-30 13:12 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sgruszka
In-Reply-To: <cover.1556629547.git.lorenzo@kernel.org>
Do not enable/disable pre_tbtt_tasklet tasklet in
mt76x02_sw_scan/mt76x02_sw_scan_complete since it is already done
setting the operating channel. Do run tbtt_tasklet while the device is
offchannel
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 3 +++
drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 3 +++
drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 5 -----
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
index 8f899b8aa9fe..7b7163bc3b62 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
@@ -30,6 +30,9 @@ static void mt76x02_pre_tbtt_tasklet(unsigned long arg)
struct sk_buff *skb;
int i;
+ if (mt76_hw(dev)->conf.flags & IEEE80211_CONF_OFFCHANNEL)
+ return;
+
mt76x02_resync_beacon_timer(dev);
ieee80211_iterate_active_interfaces_atomic(mt76_hw(dev),
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
index 5b6ac1b364e1..6b89f7eab26c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
@@ -178,6 +178,9 @@ static void mt76x02u_pre_tbtt_work(struct work_struct *work)
if (!dev->mt76.beacon_mask)
return;
+ if (mt76_hw(dev)->conf.flags & IEEE80211_CONF_OFFCHANNEL)
+ return;
+
mt76x02_resync_beacon_timer(dev);
ieee80211_iterate_active_interfaces(mt76_hw(dev),
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
index 12724e96b290..ad5323447ed4 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
@@ -593,8 +593,6 @@ void mt76x02_sw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
{
struct mt76x02_dev *dev = hw->priv;
- if (mt76_is_mmio(dev))
- tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
set_bit(MT76_SCANNING, &dev->mt76.state);
}
EXPORT_SYMBOL_GPL(mt76x02_sw_scan);
@@ -605,9 +603,6 @@ void mt76x02_sw_scan_complete(struct ieee80211_hw *hw,
struct mt76x02_dev *dev = hw->priv;
clear_bit(MT76_SCANNING, &dev->mt76.state);
- if (mt76_is_mmio(dev))
- tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
-
if (dev->cal.gain_init_done) {
/* Restore AGC gain and resume calibration after scanning. */
dev->cal.low_gain = -1;
--
2.20.1
^ permalink raw reply related
* [PATCH v3 2/3] mt76: mt7603: enable/disable pre_tbtt_tasklet in mt7603_set_channel
From: Lorenzo Bianconi @ 2019-04-30 13:12 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sgruszka
In-Reply-To: <cover.1556629547.git.lorenzo@kernel.org>
Disable pre_tbtt_tasklet tasklet before setting the operating channel.
Enable/disable beacon_timer in mt7603_set_channel
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7603/beacon.c | 3 +++
drivers/net/wireless/mediatek/mt76/mt7603/main.c | 8 ++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
index f3e7406e731f..58e68fbdbf75 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
@@ -72,6 +72,9 @@ void mt7603_pre_tbtt_tasklet(unsigned long arg)
struct sk_buff *skb;
int i, nframes;
+ if (mt76_hw(dev)->conf.flags & IEEE80211_CONF_OFFCHANNEL)
+ return;
+
data.dev = dev;
__skb_queue_head_init(&data.q);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/main.c b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
index be5d43050100..0a0334dc40d5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
@@ -133,10 +133,12 @@ mt7603_set_channel(struct mt7603_dev *dev, struct cfg80211_chan_def *def)
bool failed = false;
cancel_delayed_work_sync(&dev->mt76.mac_work);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
mutex_lock(&dev->mt76.mutex);
set_bit(MT76_RESET, &dev->mt76.state);
+ mt7603_beacon_set_timer(dev, -1, 0);
mt76_set_channel(&dev->mt76);
mt7603_mac_stop(dev);
@@ -186,8 +188,12 @@ mt7603_set_channel(struct mt7603_dev *dev, struct cfg80211_chan_def *def)
mt7603_init_edcca(dev);
out:
+ if (!(mt76_hw(dev)->conf.flags & IEEE80211_CONF_OFFCHANNEL))
+ mt7603_beacon_set_timer(dev, -1, dev->mt76.beacon_int);
mutex_unlock(&dev->mt76.mutex);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
+
if (failed)
mt7603_mac_work(&dev->mt76.mac_work.work);
@@ -535,7 +541,6 @@ mt7603_sw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct mt7603_dev *dev = hw->priv;
set_bit(MT76_SCANNING, &dev->mt76.state);
- mt7603_beacon_set_timer(dev, -1, 0);
}
static void
@@ -544,7 +549,6 @@ mt7603_sw_scan_complete(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
struct mt7603_dev *dev = hw->priv;
clear_bit(MT76_SCANNING, &dev->mt76.state);
- mt7603_beacon_set_timer(dev, -1, dev->mt76.beacon_int);
}
static void
--
2.20.1
^ permalink raw reply related
* [PATCH v3 1/3] mt76: move pre_tbtt_tasklet in mt76_dev
From: Lorenzo Bianconi @ 2019-04-30 13:12 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sgruszka
In-Reply-To: <cover.1556629547.git.lorenzo@kernel.org>
Move pre_tbtt_tasklet tasklet in mt76_dev data structure since
it is used by all drivers
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt76.h | 1 +
drivers/net/wireless/mediatek/mt76/mt7603/core.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7603/init.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt7603/main.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h | 2 --
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt76x02.h | 1 -
drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 12 ++++++------
drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c | 4 ++--
12 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index f1f56d24e8fc..8ecbf81a906f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -469,6 +469,7 @@ struct mt76_dev {
u8 antenna_mask;
u16 chainmask;
+ struct tasklet_struct pre_tbtt_tasklet;
int beacon_int;
u8 beacon_mask;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/core.c b/drivers/net/wireless/mediatek/mt76/mt7603/core.c
index 0d06ff67ce44..37e5644b45ef 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/core.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/core.c
@@ -27,7 +27,7 @@ irqreturn_t mt7603_irq_handler(int irq, void *dev_instance)
mt76_wr(dev, MT_HW_INT_STATUS(3), hwintr);
if (hwintr & MT_HW_INT3_PRE_TBTT0)
- tasklet_schedule(&dev->pre_tbtt_tasklet);
+ tasklet_schedule(&dev->mt76.pre_tbtt_tasklet);
if ((hwintr & MT_HW_INT3_TBTT0) && dev->mt76.csa_complete)
mt76_csa_finish(&dev->mt76);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/init.c b/drivers/net/wireless/mediatek/mt76/mt7603/init.c
index 46ac23e2d0b7..78cdbb70e178 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/init.c
@@ -515,7 +515,7 @@ int mt7603_register_device(struct mt7603_dev *dev)
spin_lock_init(&dev->ps_lock);
INIT_DELAYED_WORK(&dev->mt76.mac_work, mt7603_mac_work);
- tasklet_init(&dev->pre_tbtt_tasklet, mt7603_pre_tbtt_tasklet,
+ tasklet_init(&dev->mt76.pre_tbtt_tasklet, mt7603_pre_tbtt_tasklet,
(unsigned long)dev);
/* Check for 7688, which only has 1SS */
@@ -574,7 +574,7 @@ int mt7603_register_device(struct mt7603_dev *dev)
void mt7603_unregister_device(struct mt7603_dev *dev)
{
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
mt76_unregister_device(&dev->mt76);
mt7603_mcu_exit(dev);
mt7603_dma_cleanup(dev);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
index 02e18b976de5..6d506e34c3ee 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
@@ -1279,7 +1279,7 @@ static void mt7603_mac_watchdog_reset(struct mt7603_dev *dev)
mt76_txq_schedule_all(&dev->mt76);
tasklet_disable(&dev->mt76.tx_tasklet);
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
napi_disable(&dev->mt76.napi[0]);
napi_disable(&dev->mt76.napi[1]);
@@ -1328,7 +1328,7 @@ static void mt7603_mac_watchdog_reset(struct mt7603_dev *dev)
tasklet_enable(&dev->mt76.tx_tasklet);
tasklet_schedule(&dev->mt76.tx_tasklet);
- tasklet_enable(&dev->pre_tbtt_tasklet);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
mt7603_beacon_set_timer(dev, -1, beacon_int);
napi_enable(&dev->mt76.napi[0]);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/main.c b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
index 9be9ae02103e..be5d43050100 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
@@ -294,9 +294,9 @@ mt7603_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
if (changed & (BSS_CHANGED_BEACON_ENABLED | BSS_CHANGED_BEACON_INT)) {
int beacon_int = !!info->enable_beacon * info->beacon_int;
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
mt7603_beacon_set_timer(dev, mvif->idx, beacon_int);
- tasklet_enable(&dev->pre_tbtt_tasklet);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
}
mutex_unlock(&dev->mt76.mutex);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
index cc20a0cbed8d..fa64bbaab0d2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
@@ -140,8 +140,6 @@ struct mt7603_dev {
u32 reset_test;
unsigned int reset_cause[__RESET_CAUSE_MAX];
-
- struct tasklet_struct pre_tbtt_tasklet;
};
extern const struct mt76_driver_ops mt7603_drv_ops;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
index 0eeccc3b529d..4585e1b756c2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
@@ -213,7 +213,7 @@ mt76x0e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
static void mt76x0e_cleanup(struct mt76x02_dev *dev)
{
clear_bit(MT76_STATE_INITIALIZED, &dev->mt76.state);
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
mt76x0_chip_onoff(dev, false, false);
mt76x0e_stop_hw(dev);
mt76x02_dma_cleanup(dev);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02.h b/drivers/net/wireless/mediatek/mt76/mt76x02.h
index a679914e4551..687bd14b2d77 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02.h
@@ -91,7 +91,6 @@ struct mt76x02_dev {
struct sk_buff *rx_head;
struct napi_struct tx_napi;
- struct tasklet_struct pre_tbtt_tasklet;
struct delayed_work cal_work;
struct delayed_work wdt_work;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
index 4e0f8aed4603..8f899b8aa9fe 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
@@ -68,9 +68,9 @@ static void mt76x02_pre_tbtt_tasklet(unsigned long arg)
static void mt76x02e_pre_tbtt_enable(struct mt76x02_dev *dev, bool en)
{
if (en)
- tasklet_enable(&dev->pre_tbtt_tasklet);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
else
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
}
static void mt76x02e_beacon_enable(struct mt76x02_dev *dev, bool en)
@@ -198,7 +198,7 @@ int mt76x02_dma_init(struct mt76x02_dev *dev)
tasklet_init(&dev->mt76.tx_tasklet, mt76x02_tx_tasklet,
(unsigned long) dev);
- tasklet_init(&dev->pre_tbtt_tasklet, mt76x02_pre_tbtt_tasklet,
+ tasklet_init(&dev->mt76.pre_tbtt_tasklet, mt76x02_pre_tbtt_tasklet,
(unsigned long)dev);
spin_lock_init(&dev->txstatus_fifo_lock);
@@ -285,7 +285,7 @@ irqreturn_t mt76x02_irq_handler(int irq, void *dev_instance)
}
if (intr & MT_INT_PRE_TBTT)
- tasklet_schedule(&dev->pre_tbtt_tasklet);
+ tasklet_schedule(&dev->mt76.pre_tbtt_tasklet);
/* send buffered multicast frames now */
if (intr & MT_INT_TBTT) {
@@ -449,7 +449,7 @@ static void mt76x02_watchdog_reset(struct mt76x02_dev *dev)
ieee80211_stop_queues(dev->mt76.hw);
set_bit(MT76_RESET, &dev->mt76.state);
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
tasklet_disable(&dev->mt76.tx_tasklet);
napi_disable(&dev->tx_napi);
@@ -508,7 +508,7 @@ static void mt76x02_watchdog_reset(struct mt76x02_dev *dev)
napi_enable(&dev->tx_napi);
napi_schedule(&dev->tx_napi);
- tasklet_enable(&dev->pre_tbtt_tasklet);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
for (i = 0; i < ARRAY_SIZE(dev->mt76.napi); i++) {
napi_enable(&dev->mt76.napi[i]);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
index 227c360165b0..12724e96b290 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c
@@ -594,7 +594,7 @@ void mt76x02_sw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct mt76x02_dev *dev = hw->priv;
if (mt76_is_mmio(dev))
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
set_bit(MT76_SCANNING, &dev->mt76.state);
}
EXPORT_SYMBOL_GPL(mt76x02_sw_scan);
@@ -606,7 +606,7 @@ void mt76x02_sw_scan_complete(struct ieee80211_hw *hw,
clear_bit(MT76_SCANNING, &dev->mt76.state);
if (mt76_is_mmio(dev))
- tasklet_enable(&dev->pre_tbtt_tasklet);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
if (dev->cal.gain_init_done) {
/* Restore AGC gain and resume calibration after scanning. */
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c
index 90c1a0489294..71aea2832644 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_init.c
@@ -300,7 +300,7 @@ void mt76x2_stop_hardware(struct mt76x02_dev *dev)
void mt76x2_cleanup(struct mt76x02_dev *dev)
{
tasklet_disable(&dev->dfs_pd.dfs_tasklet);
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
mt76x2_stop_hardware(dev);
mt76x02_dma_cleanup(dev);
mt76x02_mcu_cleanup(dev);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
index ab716957b8ba..e416eee6a306 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c
@@ -59,7 +59,7 @@ mt76x2_set_channel(struct mt76x02_dev *dev, struct cfg80211_chan_def *chandef)
mt76_set_channel(&dev->mt76);
- tasklet_disable(&dev->pre_tbtt_tasklet);
+ tasklet_disable(&dev->mt76.pre_tbtt_tasklet);
tasklet_disable(&dev->dfs_pd.dfs_tasklet);
mt76x2_mac_stop(dev, true);
@@ -73,7 +73,7 @@ mt76x2_set_channel(struct mt76x02_dev *dev, struct cfg80211_chan_def *chandef)
mt76x2_mac_resume(dev);
tasklet_enable(&dev->dfs_pd.dfs_tasklet);
- tasklet_enable(&dev->pre_tbtt_tasklet);
+ tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
clear_bit(MT76_RESET, &dev->mt76.state);
--
2.20.1
^ permalink raw reply related
* [PATCH v3 0/3] mt76: move common beacon code in mt76 module
From: Lorenzo Bianconi @ 2019-04-30 13:12 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sgruszka
Move beacon data structures shared between mt76x02 and mt7603 drivers
in mt76_dev.
Enable/disable pre_tbtt_tasklet tasklet in mt7603_set_channel
Changes since v2:
- remove patch 2/5 and 3/5 since already applied
- do not run tbtt tasklet while offchannel
Changes since v1:
- added new patch: 'mt76: do not enable/disable pre_tbtt_tasklet in
scan_start/scan_complete'
Lorenzo Bianconi (3):
mt76: move pre_tbtt_tasklet in mt76_dev
mt76: mt7603: enable/disable pre_tbtt_tasklet in mt7603_set_channel
mt76: do not enable/disable pre_tbtt_tasklet in
scan_start/scan_complete
drivers/net/wireless/mediatek/mt76/mt76.h | 1 +
.../net/wireless/mediatek/mt76/mt7603/beacon.c | 3 +++
drivers/net/wireless/mediatek/mt76/mt7603/core.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7603/init.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt7603/main.c | 12 ++++++++----
.../net/wireless/mediatek/mt76/mt7603/mt7603.h | 2 --
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt76x02.h | 1 -
drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 15 +++++++++------
.../net/wireless/mediatek/mt76/mt76x02_usb_core.c | 3 +++
drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 5 -----
.../net/wireless/mediatek/mt76/mt76x2/pci_init.c | 2 +-
.../net/wireless/mediatek/mt76/mt76x2/pci_main.c | 4 ++--
14 files changed, 33 insertions(+), 27 deletions(-)
--
2.20.1
^ permalink raw reply
* Re: [PATCH v9 04/14] rtw88: trx files
From: Kalle Valo @ 2019-04-30 12:45 UTC (permalink / raw)
To: yhchuang
Cc: linux-wireless, johannes, pkshih, tehuang, Larry.Finger, sgruszka,
briannorris, gregkh
In-Reply-To: <1555653004-1795-5-git-send-email-yhchuang@realtek.com>
<yhchuang@realtek.com> writes:
> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
>
> trx files for Realtek 802.11ac wireless network chips
>
> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
[...]
> --- /dev/null
> +++ b/drivers/net/wireless/realtek/rtw88/rx.h
> @@ -0,0 +1,41 @@
> +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
> +/* Copyright(c) 2018-2019 Realtek Corporation
> + */
> +
> +#ifndef __RTW_RX_H_
> +#define __RTW_RX_H_
> +
> +#define GET_RX_DESC_PHYST(rxdesc) \
> + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), BIT(26))
> +#define GET_RX_DESC_ICV_ERR(rxdesc) \
> + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), BIT(15))
> +#define GET_RX_DESC_CRC32(rxdesc) \
> + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), BIT(14))
> +#define GET_RX_DESC_SWDEC(rxdesc) \
> + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), BIT(27))
> +#define GET_RX_DESC_C2H(rxdesc) \
> + le32_get_bits(*((__le32 *)(rxdesc) + 0x02), BIT(28))
> +#define GET_RX_DESC_PKT_LEN(rxdesc) \
> + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), GENMASK(13, 0))
> +#define GET_RX_DESC_DRV_INFO_SIZE(rxdesc) \
> + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), GENMASK(19, 16))
> +#define GET_RX_DESC_SHIFT(rxdesc) \
> + le32_get_bits(*((__le32 *)(rxdesc) + 0x00), GENMASK(25, 24))
> +#define GET_RX_DESC_RX_RATE(rxdesc) \
> + le32_get_bits(*((__le32 *)(rxdesc) + 0x03), GENMASK(6, 0))
> +#define GET_RX_DESC_MACID(rxdesc) \
> + le32_get_bits(*((__le32 *)(rxdesc) + 0x01), GENMASK(6, 0))
> +#define GET_RX_DESC_PPDU_CNT(rxdesc) \
> + le32_get_bits(*((__le32 *)(rxdesc) + 0x02), GENMASK(30, 29))
> +#define GET_RX_DESC_TSFL(rxdesc) \
> + le32_get_bits(*((__le32 *)(rxdesc) + 0x05), GENMASK(31, 0))
I'm not really fond of these "byte macros" or whatever they should be
called, you use these a lot in rtw88 but I have seen the same usage also
other drivers. The upstream way of doing this is to create a struct,
which also acts as a documentation, and you can pass it around different
functions. And the GENMASK()s are defined close the struct.
Also you could change these defines to static inline functions, which
take the struct as a pointer, and that you get type checking from the
compiler. And that way you would get rid of that ugly casting as well.
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH v9 00/14] rtw88: mac80211 driver for Realtek 802.11ac wireless network chips
From: Kalle Valo @ 2019-04-30 12:40 UTC (permalink / raw)
To: yhchuang
Cc: linux-wireless, johannes, pkshih, tehuang, Larry.Finger, sgruszka,
briannorris, gregkh
In-Reply-To: <1555653004-1795-1-git-send-email-yhchuang@realtek.com>
<yhchuang@realtek.com> writes:
> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
>
> This is a new mac80211 driver for Realtek 802.11ac wireless network chips.
> rtw88 now supports RTL8822BE/RTL8822CE now, with basic station mode
> functionalities. The firmware for both can be found at linux-firmware.
This looks very good now. I did a quick review of the driver and had few
netpicks but nothing really blocking applying this. So I have now
combined these patches into one big patch and pushed it to the pending
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=pending&id=284d1e4e3311cfe67c1c57ccc275ff0f5666aeea
I appreciate if people could do a quick check and make sure that I
didn't do anything stupid when folding the patches. I'm planning to
apply this to master branch still today evening so that it makes to
tomorrow's linux-next build, and I can get it to net-next before the
merge window starts on Sunday.
Yan-Hsuan, during review you have received very good comments from a lot
of folks, I recommend you go through all of them and send fixes as
follow up patches. I can then apply them after the merge window.
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH v9 01/14] rtw88: main files
From: Kalle Valo @ 2019-04-30 12:16 UTC (permalink / raw)
To: yhchuang
Cc: linux-wireless, johannes, pkshih, tehuang, Larry.Finger, sgruszka,
briannorris, gregkh
In-Reply-To: <1555653004-1795-2-git-send-email-yhchuang@realtek.com>
<yhchuang@realtek.com> writes:
> From: Yan-Hsuan Chuang <yhchuang@realtek.com>
>
> main files for Realtek 802.11ac wireless network chips
>
> Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
[...]
> +static inline u8 *get_hdr_bssid(struct ieee80211_hdr *hdr)
> +{
> + __le16 fc = hdr->frame_control;
> + u8 *bssid;
> +
> + if (ieee80211_has_tods(fc))
> + bssid = hdr->addr1;
> + else if (ieee80211_has_fromds(fc))
> + bssid = hdr->addr2;
> + else
> + bssid = hdr->addr3;
> +
> + return bssid;
> +}
I wonder should something like this be in include/linux/ieee80211.h?
--
Kalle Valo
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox