Date: Tue, 23 Jul 2013 17:33:12 +0200 From: "Cedric GROSS" <cg@cgross.info> To: <freebsd-wireless@freebsd.org> Subject: IWN Review split 1 Message-ID: <009001ce87b9$f2b104f0$d8130ed0$@info>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. ------=_NextPart_000_0091_01CE87CA.B639D4F0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello there, As discuss this morning on Efnet, here is the first small patch for IWN. This one add an hint value for early debugging IWN. Early debug feature will start printing information from attach function and further. After attachment, debug verbosity is controlled by sysctl value. Cedric ------=_NextPart_000_0091_01CE87CA.B639D4F0 Content-Type: application/octet-stream; name="hint_debug.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="hint_debug.patch" Index: amd64/conf/NOTES =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- amd64/conf/NOTES (revision 253573) +++ amd64/conf/NOTES (working copy) @@ -319,6 +319,7 @@ device ipw # Intel 2100 wireless NICs.=0A= device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs.=0A= device iwn # Intel 4965/1000/5000/6000 wireless NICs.=0A= +#hint.iwn.0.debug=3D"0xFFFFFFFF" # Activating early debug feature for = iwn=0A= device mlx4ib # Mellanox ConnectX HCA InfiniBand=0A= device mlxen # Mellanox ConnectX HCA Ethernet=0A= device mthca # Mellanox HCA InfiniBand=0A= Index: dev/iwn/if_iwn.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- dev/iwn/if_iwn.c (revision 253573) +++ dev/iwn/if_iwn.c (working copy) @@ -113,6 +113,9 @@ { 0x8086, 0x423b, "Intel WiMAX/WiFi Link 5350" },=0A= { 0x8086, 0x423c, "Intel WiMAX/WiFi Link 5150" },=0A= { 0x8086, 0x423d, "Intel WiMAX/WiFi Link 5150" },=0A= + { 0x8086, 0x0887, "Intel Centrino Wireless-N 2230"},=0A= + { 0x8086, 0x0888, "Intel Centrino Wireless-N 2230"},=0A= +=0A= { 0, 0, NULL }=0A= };=0A= =0A= @@ -442,8 +445,20 @@ uint32_t reg;=0A= int i, error, result;=0A= uint8_t macaddr[IEEE80211_ADDR_LEN];=0A= + int debug_level;=0A= =0A= sc->sc_dev =3D dev;=0A= + =0A= + sc->sc_debug =3D 0;=0A= +#ifdef IWN_DEBUG=0A= + if (resource_int_value(device_get_name(sc->sc_dev),=0A= + device_get_unit(sc->sc_dev), "debug",=0A= + &debug_level) =3D=3D 0) {=0A= + device_printf(sc->sc_dev, "Setting early debug level to 0x%08x\n",=0A= + debug_level);=0A= + sc->sc_debug=3Ddebug_level;=0A= + }=0A= +#endif=0A= =0A= /*=0A= * Get the offset of the PCI Express Capability Structure in PCI=0A= @@ -848,9 +863,9 @@ struct sysctl_oid *tree =3D device_get_sysctl_tree(sc->sc_dev);=0A= =0A= #ifdef IWN_DEBUG=0A= - sc->sc_debug =3D 0;=0A= +=0A= SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,=0A= - "debug", CTLFLAG_RW, &sc->sc_debug, 0, "control debugging = printfs");=0A= + "debug", CTLFLAG_RW, &sc->sc_debug, sc->sc_debug, "control = debugging printfs");=0A= #endif=0A= }=0A= =0A= Index: i386/conf/NOTES =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- i386/conf/NOTES (revision 253573) +++ i386/conf/NOTES (working copy) @@ -614,6 +614,7 @@ device ipw # Intel 2100 wireless NICs.=0A= device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs.=0A= device iwn # Intel 4965/1000/5000/6000 wireless NICs.=0A= +#hint.iwn.0.debug=3D"0xFFFFFFFF" # Activating early debug feature for = iwn=0A= # Hint for the i386-only ISA front-end of le(4).=0A= hint.le.0.at=3D"isa"=0A= hint.le.0.port=3D"0x280"=0A= ------=_NextPart_000_0091_01CE87CA.B639D4F0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?009001ce87b9$f2b104f0$d8130ed0$>