From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: <linux-wireless@vger.kernel.org>
Cc: "Luis R. Rodriguez" <lrodriguez@atheros.com>,
Christian Lamparter <chunkeey@web.de>
Subject: [RFT] ar9170: downgrade BUG_ON() on unexpected mdpu
Date: Thu, 13 Aug 2009 19:01:35 -0700 [thread overview]
Message-ID: <1250215295-11253-1-git-send-email-lrodriguez@atheros.com> (raw)
If someone pulls the harware out while RX'ing a lot of traffic
I would funky data may be passed, BUG_ON() seems pretty extreme
so lets just drop the frame as we do when the length does not
meet our criteria for processing.
Cc: Christian Lamparter <chunkeey@web.de>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
This one depends on my previous patch.
drivers/net/wireless/ath/ar9170/main.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index 75c317d..0bbbc36 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -1068,8 +1068,11 @@ static void ar9170_handle_mpdu(struct ar9170 *ar, u8 *buf, int len)
break;
default:
- BUG_ON(1);
- break;
+ if (ar9170_nag_limiter(ar))
+ printk(KERN_ERR "%s: rx'd unexpected "
+ "type of MPDU.\n",
+ wiphy_name(ar->hw->wiphy));
+ return;
}
if (unlikely(mpdu_len < FCS_LEN))
--
1.6.3.3
next reply other threads:[~2009-08-14 2:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-14 2:01 Luis R. Rodriguez [this message]
2009-08-14 9:50 ` [RFT] ar9170: downgrade BUG_ON() on unexpected mdpu Christian Lamparter
2009-08-14 15:30 ` Luis R. Rodriguez
2009-08-14 17:11 ` 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=1250215295-11253-1-git-send-email-lrodriguez@atheros.com \
--to=lrodriguez@atheros.com \
--cc=chunkeey@web.de \
--cc=linux-wireless@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).