linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>,
	nbd@nbd.name, linux-wireless@vger.kernel.org,
	sean.wang@mediatek.com
Subject: Re: [PATCH] mt76: mt7921: allow chip reset during device restart
Date: Sun, 20 Jun 2021 11:44:23 +0300	[thread overview]
Message-ID: <87zgvlgc2g.fsf@codeaurora.org> (raw)
In-Reply-To: <YM3k2dm2HcW/J+FJ@lore-desk> (Lorenzo Bianconi's message of "Sat, 19 Jun 2021 14:36:41 +0200")

Lorenzo Bianconi <lorenzo.bianconi@redhat.com> writes:

>> Lorenzo Bianconi <lorenzo@kernel.org> writes:
>> 
>> > Disable chip full reset just during device probing but allow
>> > it during hw restart.
>> >
>> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>> 
>> [...]
>> 
>> > --- a/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h
>> > +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h
>> > @@ -160,7 +160,8 @@ struct mt7921_dev {
>> >  	u16 chainmask;
>> >  
>> >  	struct work_struct reset_work;
>> > -	bool hw_full_reset;
>> > +	bool hw_full_reset:1;
>> > +	bool hw_init_done:1;
>> 
>> Is there a specific reason why you use bitfields in a boolean? Looks
>> strange to me.
>
> Hi Kalle,
>
> nope, there is no specific reason, I have just reused the same approach used in
> mt76_queue_entry for skip_buf{0,1}.

Ah, I checked now and saw other uses of boolean bitfields elsewhere in
kernel as well, but this is the first time I saw about this. So I guess
this is then ok and saves few bytes. Learned something new again :)

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

      reply	other threads:[~2021-06-20  8:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 10:30 [PATCH] mt76: mt7921: allow chip reset during device restart Lorenzo Bianconi
2021-06-19 11:06 ` Kalle Valo
2021-06-19 12:36   ` Lorenzo Bianconi
2021-06-20  8:44     ` Kalle Valo [this message]

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=87zgvlgc2g.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=sean.wang@mediatek.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).