From dda889ac57d8e5b46bb1b1ecf53c17a18481c7c8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Imre=20Vad=C3=A1sz?= Date: Sun, 30 Oct 2016 17:52:48 +0100 Subject: [PATCH] if_iwm - Ignore IWM_DEBUG_LOG_MSG notifications. * Firmware versions 21 and 22 generate some IWM_DEBUG_LOG_MSG notifications, which seem to be harmless. Avoid spamming the system log with "frame ... UNHANDLED (this should not happen)" messages. * While there fix nitpicks. Use iwm_rx_packet_len() inline function. Move iwm_lar_disable tunable out of #ifdef __DragonFly__. --- sys/dev/netif/iwm/if_iwm.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sys/dev/netif/iwm/if_iwm.c b/sys/dev/netif/iwm/if_iwm.c index d78af921e4..164e4e1e7b 100644 --- a/sys/dev/netif/iwm/if_iwm.c +++ b/sys/dev/netif/iwm/if_iwm.c @@ -418,13 +418,13 @@ static int iwm_detach(device_t); #if defined(__DragonFly__) static int iwm_msi_enable = 1; -static int iwm_lar_disable = 0; TUNABLE_INT("hw.iwm.msi.enable", &iwm_msi_enable); -TUNABLE_INT("hw.iwm.lar.disable", &iwm_lar_disable); - #endif +static int iwm_lar_disable = 0; +TUNABLE_INT("hw.iwm.lar.disable", &iwm_lar_disable); + /* * Firmware parser. */ @@ -5203,7 +5203,7 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m) "rx packet qid=%d idx=%d type=%x\n", qid & ~0x80, pkt->hdr.idx, code); - len = le32toh(pkt->len_n_flags) & IWM_FH_RSCSR_FRAME_SIZE_MSK; + len = iwm_rx_packet_len(pkt); len += sizeof(uint32_t); /* account for status word */ nextoff = offset + roundup2(len, IWM_FH_RSCSR_FRAME_ALIGN); @@ -5441,6 +5441,13 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m) break; } + /* + * Firmware versions 21 and 22 generate some DEBUG_LOG_MSG + * messages. Just ignore them for now. + */ + case IWM_DEBUG_LOG_MSG: + break; + case IWM_MCAST_FILTER_CMD: break; -- 2.11.4.GIT