From patchwork Mon Jul 25 15:46:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "'arozansk@redhat.com'" X-Patchwork-Id: 9245979 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C963F60869 for ; Mon, 25 Jul 2016 15:46:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBE5026223 for ; Mon, 25 Jul 2016 15:46:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0FB427569; Mon, 25 Jul 2016 15:46:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67AF126D08 for ; Mon, 25 Jul 2016 15:46:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752108AbcGYPqt (ORCPT ); Mon, 25 Jul 2016 11:46:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36457 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752835AbcGYPqs (ORCPT ); Mon, 25 Jul 2016 11:46:48 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7D28F46213; Mon, 25 Jul 2016 15:46:48 +0000 (UTC) Received: from napanee.usersys.redhat.com (dhcp-17-12.bos.redhat.com [10.18.17.12]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6PFkl8l003368; Mon, 25 Jul 2016 11:46:47 -0400 Received: by napanee.usersys.redhat.com (Postfix, from userid 1000) id 5CF91C0801; Mon, 25 Jul 2016 11:46:47 -0400 (EDT) From: Aristeu Rozanski To: linux-wpan@vger.kernel.org Cc: Alexander Aring , Stefan Schmidt , Jukka Rissanen , Aristeu Rozanski Subject: [PATCH v2 1/2] mac802154: don't warn on unsupported frames Date: Mon, 25 Jul 2016 11:46:40 -0400 Message-Id: <1469461601-656-1-git-send-email-arozansk@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 25 Jul 2016 15:46:48 +0000 (UTC) Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Alexander Aring --- 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: