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

* [PATCH v2 2/2] mac802154: use rate limited warnings for malformed frames
  2016-07-25 15:46 [PATCH v2 1/2] mac802154: don't warn on unsupported frames Aristeu Rozanski
@ 2016-07-25 15:46 ` 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
  2 siblings, 2 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

v2: rediff on top of previous v2

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

diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index b978da0..4dcf6e1 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -109,8 +109,8 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata,
 	case IEEE802154_FC_TYPE_DATA:
 		return ieee802154_deliver_skb(skb);
 	default:
-		pr_warn("ieee802154: bad frame received (type = %d)\n",
-			mac_cb(skb)->type);
+		pr_warn_ratelimited("ieee802154: bad frame received "
+				    "(type = %d)\n", mac_cb(skb)->type);
 		goto fail;
 	}
 
-- 
1.8.3.1


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

* Re: [PATCH v2 1/2] mac802154: don't warn on unsupported frames
  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
  2 siblings, 0 replies; 6+ messages in thread
From: Alexander Aring @ 2016-07-25 16:19 UTC (permalink / raw)
  To: Aristeu Rozanski; +Cc: linux-wpan, Stefan Schmidt, Jukka Rissanen

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>

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

* Re: [PATCH v2 2/2] mac802154: use rate limited warnings for malformed frames
  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
  1 sibling, 0 replies; 6+ messages in thread
From: Alexander Aring @ 2016-07-25 16:19 UTC (permalink / raw)
  To: Aristeu Rozanski; +Cc: linux-wpan, Stefan Schmidt, Jukka Rissanen


Hi,

On 07/25/2016 05:46 PM, Aristeu Rozanski wrote:
> v2: rediff on top of previous v2
> 
> Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>

Acked-by: Alexander Aring <aar@pengutronix.de>

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

* Re: [PATCH v2 2/2] mac802154: use rate limited warnings for malformed frames
  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
  1 sibling, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2016-07-25 17:24 UTC (permalink / raw)
  To: Aristeu Rozanski
  Cc: linux-wpan, Alexander Aring, Stefan Schmidt, Jukka Rissanen

Hi Aristeu,

> v2: rediff on top of previous v2
> 
> Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
> ---
> net/mac802154/rx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


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

* Re: [PATCH v2 1/2] mac802154: don't warn on unsupported frames
  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 ` [PATCH v2 1/2] mac802154: don't warn on unsupported frames Alexander Aring
@ 2016-07-25 17:24 ` Marcel Holtmann
  2 siblings, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2016-07-25 17:24 UTC (permalink / raw)
  To: Aristeu Rozanski
  Cc: linux-wpan, Alexander Aring, Stefan Schmidt, Jukka Rissanen

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


^ permalink raw reply	[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