Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
* [PATCH v2 1/2] mac802154: don't warn on unsupported frames
@ 2016-07-25 15:46 Aristeu Rozanski
  2016-07-25 15:46 ` [PATCH v2 2/2] mac802154: use rate limited warnings for malformed frames Aristeu Rozanski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Aristeu Rozanski @ 2016-07-25 15:46 UTC (permalink / raw)
  To: linux-wpan
  Cc: Alexander Aring, Stefan Schmidt, Jukka Rissanen, Aristeu Rozanski

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(+)

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:
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-07-25 17:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-25 15:46 [PATCH v2 1/2] mac802154: don't warn on unsupported frames Aristeu Rozanski
2016-07-25 15:46 ` [PATCH v2 2/2] mac802154: use rate limited warnings for malformed frames Aristeu Rozanski
2016-07-25 16:19   ` Alexander Aring
2016-07-25 17:24   ` Marcel Holtmann
2016-07-25 16:19 ` [PATCH v2 1/2] mac802154: don't warn on unsupported frames Alexander Aring
2016-07-25 17:24 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox