_at_188556 breaks if_iwn and if_wpi

From: Olivier Smedts <olivier_at_gid0.org>
Date: Fri, 13 Feb 2009 13:56:37 +0100
Hello,

I can't buildkernel (with modules) because of the following error in sys/dev/iwn :

cc -O2 -pipe -march=native -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I_at_ -I_at_/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /work/src/sys/modules/iwn/../../dev/iwn/if_iwn.c
/work/src/sys/modules/iwn/../../dev/iwn/if_iwn.c: In function 'iwn_rx_intr':
/work/src/sys/modules/iwn/../../dev/iwn/if_iwn.c:1445: error: 'struct ieee80211com' has no member named 'ic_stats'
/work/src/sys/modules/iwn/../../dev/iwn/if_iwn.c:1455: error: 'struct ieee80211com' has no member named 'ic_stats'
/work/src/sys/modules/iwn/../../dev/iwn/if_iwn.c:1466: error: 'struct ieee80211com' has no member named 'ic_stats'
*** Error code 1

According to the commit message (http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/net80211/ieee80211.c?rev=1.64), ic_stats was never used, so I just removed it from if_iwn and if_wpi. See the attached patch.

Cheers

-- 
Olivier Smedts                                              _
                          ASCII ribbon campaign            ( )
e-mail: olivier_at_gid0.org - against HTML email & vCards      X
www: http://www.gid0.org - against proprietary attachments / \

 "Il y a seulement 10 sortes de gens dans le monde :
 ceux qui comprennent le binaire,
 et ceux qui ne le comprennent pas."

--- sys/dev/iwn/if_iwn.c.orig	2009-02-13 13:41:37.000000000 +0100
+++ sys/dev/iwn/if_iwn.c	2009-02-13 13:41:57.000000000 +0100
_at__at_ -1442,7 +1442,6 _at__at_
 	if (len < sizeof (struct ieee80211_frame)) {
 		DPRINTF(sc, IWN_DEBUG_RECV, "%s: frame too short: %d\n",
 		    __func__, len);
-		ic->ic_stats.is_rx_tooshort++;
 		ifp->if_ierrors++;
 		return;
 	}
_at__at_ -1452,7 +1451,6 _at__at_
 	if (mnew == NULL) {
 		DPRINTF(sc, IWN_DEBUG_ANY, "%s: no mbuf to restock ring\n",
 		    __func__);
-		ic->ic_stats.is_rx_nobuf++;
 		ifp->if_ierrors++;
 		return;
 	}
_at__at_ -1463,7 +1461,6 _at__at_
 		device_printf(sc->sc_dev,
 		    "%s: bus_dmamap_load failed, error %d\n", __func__, error);
 		m_freem(mnew);
-		ic->ic_stats.is_rx_nobuf++;	/* XXX need stat */
 		ifp->if_ierrors++;
 		return;
 	}
--- sys/dev/wpi/if_wpi.c.orig	2009-02-13 13:43:45.000000000 +0100
+++ sys/dev/wpi/if_wpi.c	2009-02-13 13:43:59.000000000 +0100
_at__at_ -1478,7 +1478,6 _at__at_
 	if (mnew == NULL) {
 		DPRINTFN(WPI_DEBUG_RX, ("%s: no mbuf to restock ring\n",
 		    __func__));
-		ic->ic_stats.is_rx_nobuf++;
 		ifp->if_ierrors++;
 		return;
 	}
_at__at_ -1489,7 +1488,6 _at__at_
 		device_printf(sc->sc_dev,
 		    "%s: bus_dmamap_load failed, error %d\n", __func__, error);
 		m_freem(mnew);
-		ic->ic_stats.is_rx_nobuf++;	/* XXX need stat */
 		ifp->if_ierrors++;
 		return;
 	}
Received on Fri Feb 13 2009 - 12:21:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:42 UTC