Search Linux Wireless

Re: [PATCH v2 01/12] mt76x02: introduce mt76x02_beacon.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019-04-03 13:48, Stanislaw Gruszka wrote:
> 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.
It was easy enough to fix up using git rebase. I've pushed the result to
my tree already.

- Felix



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux