Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci iwm(4) workaround as ifp->if_hwdl can be set onl...



details:   https://anonhg.NetBSD.org/src/rev/8615fdd02cbd
branches:  trunk
changeset: 833071:8615fdd02cbd
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Fri Jun 08 11:18:23 2018 +0000

description:
iwm(4) workaround as ifp->if_hwdl can be set only once. Advised nonaka@n.o and ozaki-r@n.o, thanks.

To avoid for iwm(4) to set if_hwdl before loading firmware, use local address
as dummy. See sys/net/if.c::if_set_sadl().

diffstat:

 sys/dev/pci/if_iwm.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r d201996d2597 -r 8615fdd02cbd sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c      Fri Jun 08 11:09:24 2018 +0000
+++ b/sys/dev/pci/if_iwm.c      Fri Jun 08 11:18:23 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_iwm.c,v 1.81 2018/06/08 11:09:24 knakahara Exp $    */
+/*     $NetBSD: if_iwm.c,v 1.82 2018/06/08 11:18:23 knakahara Exp $    */
 /*     OpenBSD: if_iwm.c,v 1.148 2016/11/19 21:07:08 stsp Exp  */
 #define IEEE80211_NO_HT
 /*
@@ -106,7 +106,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.81 2018/06/08 11:09:24 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.82 2018/06/08 11:18:23 knakahara Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -8140,7 +8140,13 @@
 #if 0
        ieee80211_ifattach(ic);
 #else
-       ether_ifattach(ifp, NULL);      /* XXX */
+       /*
+        * XXX
+        * To avoid setting ifp->if_hwdl in if_set_sadl(), we fake
+        *  ic->ic_myaddr as local address.
+        */
+       ic->ic_myaddr[0] = 0x02;
+       ether_ifattach(ifp,  ic->ic_myaddr);    /* XXX */
 #endif
        /* Use common softint-based if_input */
        ifp->if_percpuq = if_percpuq_create(ifp);



Home | Main Index | Thread Index | Old Index