From owner-freebsd-wireless@FreeBSD.ORG Tue Jul 23 15:33:17 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4B176D3A for ; Tue, 23 Jul 2013 15:33:17 +0000 (UTC) (envelope-from cg@cgross.info) Received: from alpha.kreiz-it.fr (alpha.kreiz-it.fr [178.32.219.166]) by mx1.freebsd.org (Postfix) with ESMTP id F157C24BF for ; Tue, 23 Jul 2013 15:33:16 +0000 (UTC) Received: from DirTech (lnr56-1-82-246-51-185.fbx.proxad.net [82.246.51.185]) by alpha.kreiz-it.fr (Postfix) with ESMTPSA id F2BFC63A for ; Tue, 23 Jul 2013 17:33:14 +0200 (CEST) From: "Cedric GROSS" To: Subject: IWN Review split 1 Date: Tue, 23 Jul 2013 17:33:12 +0200 Message-ID: <009001ce87b9$f2b104f0$d8130ed0$@info> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0091_01CE87CA.B639D4F0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac6HufEMv455nstnTbaXWBNgiKXSYg== Content-Language: fr X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2013 15:33:17 -0000 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--