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>
index | next in thread | raw e-mail
[-- Attachment #1 --]
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
[-- Attachment #2 --]
Index: amd64/conf/NOTES
===================================================================
--- amd64/conf/NOTES (revision 253573)
+++ amd64/conf/NOTES (working copy)
@@ -319,6 +319,7 @@
device ipw # Intel 2100 wireless NICs.
device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs.
device iwn # Intel 4965/1000/5000/6000 wireless NICs.
+#hint.iwn.0.debug="0xFFFFFFFF" # Activating early debug feature for iwn
device mlx4ib # Mellanox ConnectX HCA InfiniBand
device mlxen # Mellanox ConnectX HCA Ethernet
device mthca # Mellanox HCA InfiniBand
Index: dev/iwn/if_iwn.c
===================================================================
--- 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" },
{ 0x8086, 0x423c, "Intel WiMAX/WiFi Link 5150" },
{ 0x8086, 0x423d, "Intel WiMAX/WiFi Link 5150" },
+ { 0x8086, 0x0887, "Intel Centrino Wireless-N 2230"},
+ { 0x8086, 0x0888, "Intel Centrino Wireless-N 2230"},
+
{ 0, 0, NULL }
};
@@ -442,8 +445,20 @@
uint32_t reg;
int i, error, result;
uint8_t macaddr[IEEE80211_ADDR_LEN];
+ int debug_level;
sc->sc_dev = dev;
+
+ sc->sc_debug = 0;
+#ifdef IWN_DEBUG
+ if (resource_int_value(device_get_name(sc->sc_dev),
+ device_get_unit(sc->sc_dev), "debug",
+ &debug_level) == 0) {
+ device_printf(sc->sc_dev, "Setting early debug level to 0x%08x\n",
+ debug_level);
+ sc->sc_debug=debug_level;
+ }
+#endif
/*
* Get the offset of the PCI Express Capability Structure in PCI
@@ -848,9 +863,9 @@
struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev);
#ifdef IWN_DEBUG
- sc->sc_debug = 0;
+
SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
- "debug", CTLFLAG_RW, &sc->sc_debug, 0, "control debugging printfs");
+ "debug", CTLFLAG_RW, &sc->sc_debug, sc->sc_debug, "control debugging printfs");
#endif
}
Index: i386/conf/NOTES
===================================================================
--- i386/conf/NOTES (revision 253573)
+++ i386/conf/NOTES (working copy)
@@ -614,6 +614,7 @@
device ipw # Intel 2100 wireless NICs.
device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs.
device iwn # Intel 4965/1000/5000/6000 wireless NICs.
+#hint.iwn.0.debug="0xFFFFFFFF" # Activating early debug feature for iwn
# Hint for the i386-only ISA front-end of le(4).
hint.le.0.at="isa"
hint.le.0.port="0x280"
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?009001ce87b9$f2b104f0$d8130ed0$>
