diff mbox

[v2,1/2] mac802154: don't warn on unsupported frames

Message ID 1469461601-656-1-git-send-email-arozansk@redhat.com (mailing list archive)
State Accepted
Headers show

Commit Message

'arozansk@redhat.com' July 25, 2016, 3:46 p.m. UTC
Just because we don't support certain types of frames yet doesn't mean
we have to flood the message log with warnings about "invalid" frames.

v2: get rid of stats update, some of them were wrong, others might change in
    the future

Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
---
 net/mac802154/rx.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Alexander Aring July 25, 2016, 4:19 p.m. UTC | #1
Hi,

On 07/25/2016 05:46 PM, Aristeu Rozanski wrote:
> Just because we don't support certain types of frames yet doesn't mean
> we have to flood the message log with warnings about "invalid" frames.
> 
> v2: get rid of stats update, some of them were wrong, others might change in
>     the future
> 
> Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>

Acked-by: Alexander Aring <aar@pengutronix.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marcel Holtmann July 25, 2016, 5:24 p.m. UTC | #2
Hi Aristeu,

> Just because we don't support certain types of frames yet doesn't mean
> we have to flood the message log with warnings about "invalid" frames.
> 
> v2: get rid of stats update, some of them were wrong, others might change in
>    the future
> 
> Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
> ---
> net/mac802154/rx.c | 5 +++++
> 1 file changed, 5 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel

--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index 446e130..b978da0 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -101,6 +101,11 @@  ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata,
 	sdata->dev->stats.rx_bytes += skb->len;
 
 	switch (mac_cb(skb)->type) {
+	case IEEE802154_FC_TYPE_BEACON:
+	case IEEE802154_FC_TYPE_ACK:
+	case IEEE802154_FC_TYPE_MAC_CMD:
+		goto fail;
+
 	case IEEE802154_FC_TYPE_DATA:
 		return ieee802154_deliver_skb(skb);
 	default: