From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: <ath10k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath10k: don't drop corrupted mgmt frames
Date: Tue, 25 Nov 2014 11:04:12 +0200 [thread overview]
Message-ID: <87egsr1wj7.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1416839648-31803-1-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Mon, 24 Nov 2014 15:34:08 +0100")
Michal Kazior <michal.kazior@tieto.com> writes:
> --- a/drivers/net/wireless/ath/ath10k/htt_rx.c
> +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
> @@ -1381,6 +1381,8 @@ static bool ath10k_htt_rx_amsdu_allowed(struct ath10k *ar,
> {
> struct sk_buff *msdu;
> struct htt_rx_desc *rxd;
> + bool is_mgmt;
> + bool has_fcs_err;
>
> msdu = skb_peek(amsdu);
> rxd = (void *)msdu->data - sizeof(*rxd);
> @@ -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?
--
Kalle Valo
WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH] ath10k: don't drop corrupted mgmt frames
Date: Tue, 25 Nov 2014 11:04:12 +0200 [thread overview]
Message-ID: <87egsr1wj7.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1416839648-31803-1-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Mon, 24 Nov 2014 15:34:08 +0100")
Michal Kazior <michal.kazior@tieto.com> writes:
> --- a/drivers/net/wireless/ath/ath10k/htt_rx.c
> +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
> @@ -1381,6 +1381,8 @@ static bool ath10k_htt_rx_amsdu_allowed(struct ath10k *ar,
> {
> struct sk_buff *msdu;
> struct htt_rx_desc *rxd;
> + bool is_mgmt;
> + bool has_fcs_err;
>
> msdu = skb_peek(amsdu);
> rxd = (void *)msdu->data - sizeof(*rxd);
> @@ -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?
--
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2014-11-25 9:04 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 [this message]
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
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=87egsr1wj7.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.