Search Linux Wireless

Re: [PATCH 4/6] mt76: mt7921: introduce mt7921_wpdma_reinit_cond utility routine

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

 



From: Sean Wang <sean.wang@xxxxxxxxxxxx>

>> From: Sean Wang <sean.wang@xxxxxxxxxxxx>
>
>I guess here we should use my 'From' tag

That is my fault, I'll change it in the next version.

>
>Regards,
>Lorenzo
>
>>
>> Add mt7921_wpdma_reinit_cond to check dummy reg if driver needs to
>> reinitialized WPDMA after driver_own operation
>>
>> Co-developed-by: Leon Yen <leon.yen@xxxxxxxxxxxx>
>> Signed-off-by: Leon Yen <leon.yen@xxxxxxxxxxxx>
>> Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
>> Signed-off-by: Sean Wang <sean.wang@xxxxxxxxxxxx>
>> ---
>>  .../net/wireless/mediatek/mt76/mt76_connac.h  |  4 +++
>>  .../wireless/mediatek/mt76/mt7921/debugfs.c   | 13 ++++++++++
>>  .../net/wireless/mediatek/mt76/mt7921/dma.c   | 25 +++++++++++++++++++
>>  .../wireless/mediatek/mt76/mt7921/mt7921.h    |  6 +++++
>>  4 files changed, 48 insertions(+)
>>
>> diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac.h
>> b/drivers/net/wireless/mediatek/mt76/mt76_connac.h
>> index b811f3c410a1..3b5bff80a462 100644
>> --- a/drivers/net/wireless/mediatek/mt76/mt76_connac.h
>> +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac.h
>> @@ -58,6 +58,10 @@ struct mt76_connac_pm {
>>	struct delayed_work ps_work;
>>	unsigned long last_activity;
>>	unsigned long idle_timeout;
>> +
>> +	struct {
>> +		unsigned int lp_wake;
>> +	} stats;
>>  };
>>
>>  struct mt76_connac_coredump {
>> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c
>> b/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c
>> index 5a54cd8d2ce4..bd2aca654767 100644
>> --- a/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c
>> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/debugfs.c
>> @@ -256,6 +256,17 @@ mt7921_pm_get(void *data, u64 *val)
>>
>>  DEFINE_DEBUGFS_ATTRIBUTE(fops_pm, mt7921_pm_get, mt7921_pm_set,
>> "%lld\n");
>>
>> +static int
>> +mt7921_pm_stats(struct seq_file *s, void *data) {
>> +	struct mt7921_dev *dev = dev_get_drvdata(s->private);
>> +	struct mt76_connac_pm *pm = &dev->pm;
>> +
>> +	seq_printf(s, "low power wakes: %9d\n", pm->stats.lp_wake);
>> +
>> +	return 0;
>> +}
>> +
>>  static int
>>  mt7921_pm_idle_timeout_set(void *data, u64 val)  { @@ -322,6 +333,8
>> @@ int mt7921_init_debugfs(struct mt7921_dev *dev)
>>	debugfs_create_file("idle-timeout", 0600, dir, dev,
>>			    &fops_pm_idle_timeout);
>>	debugfs_create_file("chip_reset", 0600, dir, dev, &fops_reset);
>> +	debugfs_create_devm_seqfile(dev->mt76.dev, "runtime_pm_stats", dir,
>> +				    mt7921_pm_stats);
>>
>>	return 0;
>>  }
>> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/dma.c
>> b/drivers/net/wireless/mediatek/mt76/mt7921/dma.c
>> index 8c556ff3ae93..72f5704f8f11 100644
>> --- a/drivers/net/wireless/mediatek/mt76/mt7921/dma.c
>> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/dma.c
>> @@ -329,6 +329,31 @@ int mt7921_wpdma_reset(struct mt7921_dev *dev, bool force)
>>	return 0;
>>  }
>>
>
<snip>





[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