From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH] ath10k: don't drop corrupted mgmt frames
Date: Tue, 25 Nov 2014 11:24:26 +0200 [thread overview]
Message-ID: <871tor1vlh.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQnk+40Pxkxfcu47Z-3j=8h2iMP8tKqXKf2GhAY3WkQxCw@mail.gmail.com> (Michal Kazior's message of "Tue, 25 Nov 2014 10:22:04 +0100")
Michal Kazior <michal.kazior@tieto.com> writes:
> On 25 November 2014 at 10:04, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>> Michal Kazior <michal.kazior@tieto.com> writes:
> [...]
>>> @@ -1394,12 +1396,19 @@ static bool ath10k_htt_rx_amsdu_allowed(struct ath10k *ar,
>>> return false;
>>> }
>>>
>>> + is_mgmt = !!(rxd->attention.flags &
>>> + __cpu_to_le32(RX_ATTENTION_FLAGS_MGMT_TYPE));
>>> + has_fcs_err = !!(rxd->attention.flags &
>>> + __cpu_to_le32(RX_ATTENTION_FLAGS_FCS_ERR));
>>
>> I think I asked this before in some other patch, but isn't '!!' operator
>> useless here? is_mgmt is a boolean so the compiler should convert it
>> correctly without '!!' anyway, right?
>
> If I remove `!!` I get:
>
> warning: incorrect type in assignment (different base types)
> expected bool [unsigned] [usertype] is_mgmt
> got restricted __le32
Oh. Sorry, my bad.
> I could do a temporary `u32 attention` to get rid of the `!!`. You
> want me to update it?
Please don't, this is fine.
--
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath10k: don't drop corrupted mgmt frames
Date: Tue, 25 Nov 2014 11:24:26 +0200 [thread overview]
Message-ID: <871tor1vlh.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQnk+40Pxkxfcu47Z-3j=8h2iMP8tKqXKf2GhAY3WkQxCw@mail.gmail.com> (Michal Kazior's message of "Tue, 25 Nov 2014 10:22:04 +0100")
Michal Kazior <michal.kazior@tieto.com> writes:
> On 25 November 2014 at 10:04, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>> Michal Kazior <michal.kazior@tieto.com> writes:
> [...]
>>> @@ -1394,12 +1396,19 @@ static bool ath10k_htt_rx_amsdu_allowed(struct ath10k *ar,
>>> return false;
>>> }
>>>
>>> + is_mgmt = !!(rxd->attention.flags &
>>> + __cpu_to_le32(RX_ATTENTION_FLAGS_MGMT_TYPE));
>>> + has_fcs_err = !!(rxd->attention.flags &
>>> + __cpu_to_le32(RX_ATTENTION_FLAGS_FCS_ERR));
>>
>> I think I asked this before in some other patch, but isn't '!!' operator
>> useless here? is_mgmt is a boolean so the compiler should convert it
>> correctly without '!!' anyway, right?
>
> If I remove `!!` I get:
>
> warning: incorrect type in assignment (different base types)
> expected bool [unsigned] [usertype] is_mgmt
> got restricted __le32
Oh. Sorry, my bad.
> I could do a temporary `u32 attention` to get rid of the `!!`. You
> want me to update it?
Please don't, this is fine.
--
Kalle Valo
next prev parent reply other threads:[~2014-11-25 9:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-24 14:34 [PATCH] ath10k: don't drop corrupted mgmt frames Michal Kazior
2014-11-24 14:34 ` Michal Kazior
2014-11-25 9:04 ` Kalle Valo
2014-11-25 9:04 ` Kalle Valo
2014-11-25 9:22 ` Michal Kazior
2014-11-25 9:22 ` Michal Kazior
2014-11-25 9:24 ` Kalle Valo [this message]
2014-11-25 9:24 ` Kalle Valo
2014-11-26 6:35 ` Kalle Valo
2014-11-26 6:35 ` Kalle Valo
2014-11-26 6:36 ` Kalle Valo
2014-11-26 6:36 ` Kalle Valo
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=871tor1vlh.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.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 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.