From 8e17d36381a119df346016dd2bd1c551988a583f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 3 Dec 2017 18:14:59 +0100 Subject: [PATCH] mt7603: remove some harmless WARN_ONs in rx path Discard affected packets instead. Should reduce the frequency of bogus bug reports Signed-off-by: Felix Fietkau --- mt7603_mac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mt7603_mac.c b/mt7603_mac.c index dfabdb434..4fca0a25a 100644 --- a/mt7603_mac.c +++ b/mt7603_mac.c @@ -326,7 +326,7 @@ mt7603_get_rate(struct mt7603_dev *dev, struct ieee80211_supported_band *sband, int i; if (cck) { - if (WARN_ON_ONCE(sband == &dev->mt76.sband_5g.sband)) + if (sband == &dev->mt76.sband_5g.sband) return 0; idx &= ~BIT(2); /* short preamble */ @@ -339,7 +339,6 @@ mt7603_get_rate(struct mt7603_dev *dev, struct ieee80211_supported_band *sband, return i; } - WARN_ON_ONCE(1); return 0; } @@ -422,7 +421,7 @@ mt7603_mac_fill_rx(struct mt7603_dev *dev, struct sk_buff *skb) status->encoding = RX_ENC_VHT; break; default: - WARN_ON(1); + return -EINVAL; } if (rxdg0 & MT_RXV1_HT_SHORT_GI)