From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: linux-wireless@vger.kernel.org,
Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Subject: Re: [PATCH v2 01/12] mt76x02: introduce mt76x02_beacon.c
Date: Wed, 3 Apr 2019 13:48:46 +0200 [thread overview]
Message-ID: <20190403114845.GA13093@redhat.com> (raw)
In-Reply-To: <8253140b-5ea6-3498-6bfe-144bb86f5962@nbd.name>
On Wed, Apr 03, 2019 at 11:08:53AM +0200, Felix Fietkau wrote:
> On 2019-03-19 11:37, Stanislaw Gruszka wrote:
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
> > index ec94d612f53c..75dceeeed059 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
> > @@ -152,6 +152,21 @@ static void mt76x02_pre_tbtt_tasklet(unsigned long arg)
> > spin_unlock_bh(&q->lock);
> > }
> >
> > +void mt76x02e_init_beacon_config(struct mt76x02_dev *dev)
> > +{
> > + tasklet_init(&dev->pre_tbtt_tasklet, mt76x02_pre_tbtt_tasklet,
> > + (unsigned long)dev);
> > +
> > + /* Fire a pre-TBTT interrupt 8 ms before TBTT */
> > + mt76_rmw_field(dev, MT_INT_TIMER_CFG, MT_INT_TIMER_CFG_PRE_TBTT, 8 << 4);
> > + mt76_rmw_field(dev, MT_INT_TIMER_CFG, MT_INT_TIMER_CFG_GP_TIMER,
> > + MT_DFS_GP_INTERVAL);
> > + mt76_wr(dev, MT_INT_TIMER_EN, 0);
> > +
> > + mt76x02_init_beacon_config(dev);
> > +}
> > +EXPORT_SYMBOL_GPL(mt76x02e_init_beacon_config);
> > +
> > static int
> > mt76x02_init_tx_queue(struct mt76x02_dev *dev, struct mt76_sw_queue *q,
> > int idx, int n_desc)
> > @@ -230,8 +245,6 @@ int mt76x02_dma_init(struct mt76x02_dev *dev)
> > return -ENOMEM;
> >
> > tasklet_init(&dev->tx_tasklet, mt76x02_tx_tasklet, (unsigned long) dev);
> > - tasklet_init(&dev->pre_tbtt_tasklet, mt76x02_pre_tbtt_tasklet,
> > - (unsigned long)dev);
> Moving the tasklet init to mt76x02e_init_beacon_config can crash the
> kernel, because it leads to the tasklet being re-initialized on every
> reset. I will update that commit and move it back.
Ehh. Some further patches will not apply and will require to be modified.
Perhaps could be easer move mt76x02e_init_beacon_config() to
mt76x2_init_hardware() (or other proper function that is used only
once once during initialization). Or just apply fix on top of the set
as separate patch. Anyway I'm leaving that up to you. Thanks.
Stanislaw
next prev parent reply other threads:[~2019-04-03 11:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-19 10:37 [PATCH v2 00/12] mt76x02: AP support for USB with PS Stanislaw Gruszka
2019-03-19 10:37 ` [PATCH v2 01/12] mt76x02: introduce mt76x02_beacon.c Stanislaw Gruszka
2019-04-03 9:08 ` Felix Fietkau
2019-04-03 11:48 ` Stanislaw Gruszka [this message]
2019-04-03 11:53 ` Felix Fietkau
2019-03-19 10:37 ` [PATCH v2 02/12] mt76x02: add hrtimer for pre TBTT for USB Stanislaw Gruszka
2019-03-19 10:37 ` [PATCH v2 03/12] mt76x02: introduce beacon_ops Stanislaw Gruszka
2019-03-19 10:37 ` [PATCH v2 04/12] mt76x02u: implement beacon_ops Stanislaw Gruszka
2019-03-19 10:37 ` [PATCH v2 05/12] mt76x02: generalize some mmio beaconing functions Stanislaw Gruszka
2019-03-19 10:37 ` [PATCH v2 06/12] mt76x02u: add sta_ps Stanislaw Gruszka
2019-03-19 10:37 ` [PATCH v2 07/12] mt76x02: disable HW encryption for group frames Stanislaw Gruszka
2019-03-19 10:37 ` [PATCH v2 08/12] mt76x02u: implement pre TBTT work for USB Stanislaw Gruszka
2019-03-19 10:37 ` [PATCH v2 09/12] mt76x02: make beacon slots bigger " Stanislaw Gruszka
2019-03-19 10:37 ` [PATCH v2 10/12] mt76x02u: add mt76_release_buffered_frames Stanislaw Gruszka
2019-03-19 10:37 ` [PATCH v2 11/12] mt76: unify set_tim Stanislaw Gruszka
2019-03-19 10:37 ` [PATCH v2 12/12] mt76x02: enable AP mode for USB Stanislaw Gruszka
2019-03-24 7:23 ` [PATCH v2 00/12] mt76x02: AP support for USB with PS Felix Fietkau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190403114845.GA13093@redhat.com \
--to=sgruszka@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=nbd@nbd.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.