NetBSD Problem Report #51797

From ryo_on@yk.rim.or.jp  Sun Jan  8 08:49:11 2017
Return-Path: <ryo_on@yk.rim.or.jp>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 0E5887A234
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  8 Jan 2017 08:49:11 +0000 (UTC)
Message-Id: <3txBm26zS2z2K1rkR@mail.SiriusCloud.jp>
Date: Sun, 08 Jan 2017 17:49:07 +0900
From: ryoon@NetBSD.org
Reply-To: ryoon@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: iwm(4) does not work after if_iwm.c rev. 1.45
X-Send-Pr-Version: 3.95

>Number:         51797
>Category:       kern
>Synopsis:       iwm(4) does not work after if_iwm.c rev. 1.45
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    nonaka
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 08 08:50:00 +0000 2017
>Closed-Date:    Sun Jan 22 04:32:02 +0000 2017
>Last-Modified:  Sun Jan 22 04:32:02 +0000 2017
>Originator:     Ryo ONODERA
>Release:        NetBSD 7.99.56
>Organization:

>Environment:


System: NetBSD brownie 7.99.56 NetBSD 7.99.56 (DTRACE7) #79: Sat Jan 7 09:46:55 JST 2017 ryo_on@brownie:/usr/world/7.99/amd64/obj/sys/arch/amd64/compile/DTRACE7 amd64
Architecture: x86_64
Machine: amd64
>Description:
Rev. 1.45 of if_iwm.c and related changes break iwm(4) functionality
on Toshiba dynabook R63/PS laptop.

$ pcictl pci0 list | grep -i wireless
002:00:0: Intel Dual Band Wireless AC 7265 (miscellaneous network, revision 0x59)

$ pcictl pci0 list | grep -i wireless
002:00:0: Intel Dual Band Wireless AC 7265 (miscellaneous network, revision 0x59)

After wpa_supplicant invocation for .11g access point
iwm0: fatal firmware error
iwm0: device timeout
iwm0: device timeout

And cannot detect access point.

Rev. 1.51
https://mail-index.netbsd.org/source-changes/2017/01/08/msg080657.html
also does not work on my laptop.

>How-To-Repeat:
Run NetBSD/amd64 current on Toshiba dynabook R63/PS.
>Fix:
I have no idea.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->nonaka@netbsd.org
Responsible-Changed-By: nonaka@NetBSD.org
Responsible-Changed-When: Sun, 08 Jan 2017 09:18:44 +0000
Responsible-Changed-Why:
take


From: Kimihiro Nonaka <nonakap@gmail.com>
To: "gnats-bugs@netbsd.org" <gnats-bugs@netbsd.org>
Cc: kern-bug-people@netbsd.org, 
	"gnats-admin@netbsd.org" <gnats-admin@netbsd.org>, "netbsd-bugs@netbsd.org" <netbsd-bugs@netbsd.org>
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Sun, 8 Jan 2017 18:22:37 +0900

 > $ pcictl pci0 list | grep -i wireless
 > 002:00:0: Intel Dual Band Wireless AC 7265 (miscellaneous network, revision 0x59)

 Could you send a full dmesg?


 Regards,
 -- 
 Kimihiro Nonaka

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: nonakap@gmail.com
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Sun, 08 Jan 2017 18:48:11 +0900 (JST)

 Hi,

 From: Kimihiro Nonaka <nonakap@gmail.com>, Date: Sun, 8 Jan 2017 18:22:37 +0900

 >> $ pcictl pci0 list | grep -i wireless
 >> 002:00:0: Intel Dual Band Wireless AC 7265 (miscellaneous network, revision 0x59)
 > 
 > Could you send a full dmesg?

 Here is full dmesg with if_iwm.c rev. 1.51.

 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
     The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
     The Regents of the University of California.  All rights reserved.

 NetBSD 7.99.56 (DTRACE7) #1: Sun Jan  8 18:43:08 JST 2017
 	ryo_on@brownie:/usr/world/7.99/amd64/obj/sys/arch/amd64/compile/DTRACE7
 total memory = 8103 MB
 avail memory = 7847 MB
 cpu_rng: RDSEED
 rnd: seeded with 128 bits
 timecounter: Timecounters tick every 10.000 msec
 Kernelized RAIDframe activated
 running cgd selftest aes-xts-256 aes-xts-512 done
 timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
 TOSHIBA dynabook R63/PS (PRB63PS-NDC)
 mainbus0 (root)
 ACPI: RSDP 0x00000000000F0030 000014 (v00 TOSHIB)
 ACPI: RSDT 0x00000000D90ED000 000068 (v01 TOSHIB A0096    00000003      01000013)
 ACPI: FACP 0x00000000D90EC000 00010C (v05 TOSHIB A0096    00000003 LOHR 0000005F)
 ACPI: DSDT 0x00000000D90CF000 01264F (v02 TOSHIB A0096    20150216 INTL 20130927)
 ACPI: FACS 0x00000000D9099000 000040
 ACPI: HPET 0x00000000D90EB000 000038 (v01 TOSHIB A0096    00000001 LOHR 0000005F)
 ACPI: APIC 0x00000000D90EA000 0000BC (v01 TOSHIB A0096    00000001 LOHR 0000005F)
 ACPI: MCFG 0x00000000D90E9000 00003C (v01 TOSHIB A0096    00000001 LOHR 0000005F)
 ACPI: ASF! 0x00000000D90E8000 0000A0 (v32 TOSHIB A0096    00000001 LOHR 0000005F)
 ACPI: TCPA 0x00000000D90E7000 000032 (v02 TOSHIB A0096    00000000 LOHR 0000005F)
 ACPI: BOOT 0x00000000D90E6000 000028 (v01 TOSHIB A0096    00000000 LOHR 0000005F)
 ACPI: MSDM 0x00000000D90E5000 000055 (v03 TOSHIB A0096    00000000 LOHR 0000005F)
 ACPI: SLIC 0x00000000D90E4000 000176 (v01 TOSHIB A0096    00000000 LOHR 0000005F)
 ACPI: DBGP 0x00000000D90E3000 000034 (v01 TOSHIB A0096    00000000 LOHR 0000005F)
 ACPI: SSDT 0x00000000D90CE000 0003F9 (v02 TOSHIB SataAhci 00001000 INTL 20130927)
 ACPI: SSDT 0x00000000D90C8000 00060D (v02 TOSHIB MacUniq2 00001000 INTL 20130927)
 ACPI: SSDT 0x00000000D90C7000 0005E6 (v02 PmRef  Cpu0Ist  00003000 INTL 20130927)
 ACPI: SSDT 0x00000000D90C6000 000B60 (v02 CpuRef CpuSsdt  00003000 INTL 20130927)
 ACPI: SSDT 0x00000000D90C4000 0012DF (v02 SaSsdt SaSsdt   00003000 INTL 20130927)
 ACPI: DMAR 0x00000000D90C3000 0000D8 (v01 INTEL  BDW      00000001 INTL 00000001)
 ACPI: FPDT 0x00000000D90E2000 000044 (v01 TOSHIB A0096    00000000 LOHR 0000005F)
 ACPI: Executed 9 blocks of module-level executable AML code
 ACPI: Executed 2 blocks of module-level executable AML code
 ACPI: 6 ACPI AML tables successfully acquired and loaded
 ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 0x20, 40 pins
 cpu0 at mainbus0 apid 0
 cpu0: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, id 0x306d4
 cpu1 at mainbus0 apid 1
 cpu1: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, id 0x306d4
 cpu2 at mainbus0 apid 2
 cpu2: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, id 0x306d4
 cpu3 at mainbus0 apid 3
 cpu3: Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz, id 0x306d4
 acpi0 at mainbus0: Intel ACPICA 20160930
 acpi0: X/RSDT: OemId <TOSHIB,A0096   ,00000003>, AslId <    ,01000013>
 acpi0: MCFG: segment 0, bus 0-63, address 0x00000000f8000000
 ACPI: Dynamic OEM Table Load:
 ACPI: SSDT 0xFFFFFE821F6DE008 0003D3 (v02 PmRef  Cpu0Cst  00003001 INTL 20130927)
 ACPI: Dynamic OEM Table Load:
 ACPI: SSDT 0xFFFFFE810E7AC808 0005AA (v02 PmRef  ApIst    00003000 INTL 20130927)
 ACPI: Dynamic OEM Table Load:
 ACPI: SSDT 0xFFFFFE810E6B31C8 000119 (v02 PmRef  ApCst    00003000 INTL 20130927)
 acpi0: SCI interrupting at int 9
 timecounter: Timecounter "ACPI-Safe" frequency 3579545 Hz quality 900
 hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
 timecounter: Timecounter "hpet0" frequency 14318180 Hz quality 2000
 acpivga0 at acpi0 (GFX0): ACPI Display Adapter
 acpiout0 at acpivga0 (DDC1, 0x0400): ACPI Display Output Device
 acpiout0: brightness levels: [0-100]
 acpiout1 at acpivga0 (DDC2, 0x0300): ACPI Display Output Device
 acpiout2 at acpivga0 (DDC3, 0x0301): ACPI Display Output Device
 acpiout3 at acpivga0 (DDC4, 0x0302): ACPI Display Output Device
 acpiout4 at acpivga0 (DDC5, 0x0303): ACPI Display Output Device
 acpiout5 at acpivga0 (DDC6, 0x0006): ACPI Display Output Device
 acpiout6 at acpivga0 (DDC7, 0x0007): ACPI Display Output Device
 acpiout7 at acpivga0 (DDC8, 0x0008): ACPI Display Output Device
 acpiout8 at acpivga0 (DDC9, 0x0009): ACPI Display Output Device
 acpiout9 at acpivga0 (DDCA, 0x000a): ACPI Display Output Device
 acpiout10 at acpivga0 (DDCB, 0x000b): ACPI Display Output Device
 acpiout11 at acpivga0 (DDCC, 0x000c): ACPI Display Output Device
 acpiout12 at acpivga0 (DDCD, 0x000d): ACPI Display Output Device
 acpiout13 at acpivga0 (DDCE, 0x000e): ACPI Display Output Device
 acpiout14 at acpivga0 (DDCF, 0x000f): ACPI Display Output Device
 acpivga0: unknown output device acpiout5
 acpivga0: unknown output device acpiout6
 acpivga0: unknown output device acpiout7
 acpivga0: unknown output device acpiout8
 acpivga0: unknown output device acpiout9
 acpivga0: unknown output device acpiout10
 acpivga0: unknown output device acpiout11
 acpivga0: unknown output device acpiout12
 acpivga0: unknown output device acpiout13
 acpivga0: unknown output device acpiout14
 acpivga0: connected output devices:
 acpivga0:   0x0400 (acpiout0): Int. Digital Flat Panel, index 0, port 0, head 0
 acpivga0:   0x0300 (acpiout1): Ext. Digital Monitor, index 0, port 0, head 0, bios detect
 acpivga0:   0x0301 (acpiout2): Ext. Digital Monitor, index 1, port 0, head 0, bios detect
 acpivga0:   0x0302 (acpiout3): Ext. Digital Monitor, index 2, port 0, head 0, bios detect
 acpivga0:   0x0303 (acpiout4): Ext. Digital Monitor, index 3, port 0, head 0, bios detect
 PDRC (PNP0C02) at acpi0 not configured
 acpiwmi0 at acpi0 (AMW0, PNP0C14-0): ACPI WMI Interface
 acpiwmibus at acpiwmi0 not configured
 GTPM (IFX0102) at acpi0 not configured
 LDRC (PNP0C02) at acpi0 not configured
 GEN1 (PNP0C02) at acpi0 not configured
 attimer1 at acpi0 (TIMR, PNP0100): io 0x40-0x43,0x50-0x53 irq 0
 pckbc1 at acpi0 (PS2K, TOS7407) (kbd port): io 0x60,0x64 irq 1
 pckbc2 at acpi0 (PS2M, TTP1000) (aux port): irq 12
 SIRC (PNP0C02) at acpi0 not configured
 valz0 at acpi0 (VALZ, TOS6208): Toshiba VALZ
 BT (TOS6205) at acpi0 not configured
 acpiacad0 at acpi0 (ADP1, ACPI0003): ACPI AC Adapter
 acpibut0 at acpi0 (PWRB, PNP0C0C): ACPI Power Button
 acpilid0 at acpi0 (LID, PNP0C0D): ACPI Lid Switch
 acpibat0 at acpi0 (BAT1, PNP0C0A-1): ACPI Battery
 acpitz0 at acpi0 (TZ01)
 acpitz0: levels: critical 107.0 C, passive cooling
 ACPI: Enabled 4 GPEs in block 00 to 7F
 pckbd0 at pckbc1 (kbd slot)
 pckbc1: using irq 1 for kbd slot
 wskbd0 at pckbd0: console keyboard
 pms0 at pckbc1 (aux slot)
 pckbc1: using irq 12 for aux slot
 wsmouse0 at pms0 mux 0
 pci0 at mainbus0 bus 0: configuration mode 1
 pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
 pchb0 at pci0 dev 0 function 0: vendor 8086 product 1604 (rev. 0x09)
 i915drmkms0 at pci0 dev 2 function 0: vendor 8086 product 1616 (rev. 0x09)
 drm: Memory usable by graphics device = 4096M
 drm: Supports vblank timestamp caching Rev 2 (21.10.2013).
 drm: Driver supports precise vblank timestamp query.
 i915drmkms0: interrupting at ioapic0 pin 16 (i915)
 intelfb0 at i915drmkms0
 i915drmkms0: info: registered panic notifier
 i915drmkms0: More than 8 outputs detected via ACPI
 intelfb0: framebuffer at 0xffff80008ed7c000, size 1920x1080, depth 32, stride 7680
 wsdisplay0 at intelfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0
 wsmux1: connecting to wsdisplay0
 hdaudio0 at pci0 dev 3 function 0: HD Audio Controller
 hdaudio0: interrupting at msi0 vec 0
 hdaudio0: timeout leaving reset state
 hdaudio0: device driver failed to attach
 xhci0 at pci0 dev 20 function 0: vendor 8086 product 9cb1 (rev. 0x03)
 xhci0: interrupting at msi0 vec 0
 xhci0: xHCI version 1.0
 usb0 at xhci0: USB revision 3.0
 vendor 8086 product 9cba (miscellaneous communications, revision 0x03) at pci0 dev 22 function 0 not configured
 wm0 at pci0 dev 25 function 0: I218 V Ethernet Connection (rev. 0x03)
 wm0: interrupting at msi1 vec 0
 wm0: PCI-Express bus
 wm0: 2048 words FLASH
 wm0: Ethernet address b8:6b:23:86:df:bb
 ihphy0 at wm0 phy 2: i217 10/100/1000 media interface, rev. 5
 ihphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
 hdaudio1 at pci0 dev 27 function 0: HD Audio Controller
 hdaudio1: interrupting at msi2 vec 0
 hdafg0 at hdaudio1: vendor 10ec product 0255
 hdafg0: DAC00 2ch: Speaker [Built-In]
 hdafg0: DAC01 2ch: HP Out [Jack]
 hdafg0: ADC02 2ch: Mic In [Jack]
 hdafg0: 2ch/2ch 44100Hz 48000Hz 96000Hz 192000Hz PCM16 PCM20 PCM24 AC3
 audio0 at hdafg0: full duplex, playback, capture, mmap, independent
 spkr0 at audio0: PC Speaker (synthesized)
 ppb0 at pci0 dev 28 function 0: vendor 8086 product 9c9a (rev. 0xe3)
 ppb0: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x1 @ 5.0GT/s
 ppb0: link is x1 @ 2.5GT/s
 pci1 at ppb0 bus 1
 pci1: i/o space, memory space enabled, rd/line, wr/inv ok
 rtsx0 at pci1 dev 0 function 0: vendor 10ec product 5227 (rev. 0x01)
 rtsx0: interrupting at msi3 vec 0
 sdmmc0 at rtsx0
 ppb1 at pci0 dev 28 function 2: vendor 8086 product 9c94 (rev. 0xe3)
 ppb1: PCI Express capability version 2 <Root Port of PCI-E Root Complex> x1 @ 5.0GT/s
 ppb1: link is x1 @ 2.5GT/s
 pci2 at ppb1 bus 2
 pci2: i/o space, memory space enabled, rd/line, wr/inv ok
 iwm0 at pci2 dev 0 function 0: vendor 8086 product 095a (rev. 0x59)
 iwm0: interrupting at msi4 vec 0
 ehci0 at pci0 dev 29 function 0: vendor 8086 product 9ca6 (rev. 0x03)
 ehci0: interrupting at ioapic0 pin 23
 ehci0: EHCI version 1.0
 usb1 at ehci0: USB revision 2.0
 pcib0 at pci0 dev 31 function 0: vendor 8086 product 9cc3 (rev. 0x03)
 ahcisata0 at pci0 dev 31 function 2: vendor 8086 product 9c83 (rev. 0x03)
 ahcisata0: interrupting at ioapic0 pin 19
 ahcisata0: 64-bit DMA
 ahcisata0: AHCI revision 1.30, 3 ports, 32 slots, CAP 0xcf34ff02<PSC,SSC,PMD,SAM,ISS=0x3=Gen3,SCLO,SAL,SALP,SSS,SNCQ,S64A>
 atabus0 at ahcisata0 channel 0
 isa0 at pcib0
 tpm0 at isa0 iomem 0xfed40000-0xfed44fff irq 7: device 0x001a15d1 rev 0x10
 pcppi0 at isa0 port 0x61
 spkr1 at pcppi0: PC Speaker
 midi0 at pcppi0: PC speaker
 sysbeep0 at pcppi0
 attimer1: attached to pcppi0
 acpicpu0 at cpu0: ACPI CPU
 acpicpu0: C1: FFH, lat   1 us, pow  1000 mW
 acpicpu0: C2: FFH, lat 148 us, pow   200 mW
 acpicpu0: C3: FFH, lat 233 us, pow   200 mW
 acpicpu0: P0: FFH, lat  10 us, pow 15000 mW, 2401 MHz, turbo boost
 acpicpu0: P1: FFH, lat  10 us, pow 15000 mW, 2400 MHz
 acpicpu0: P2: FFH, lat  10 us, pow 14088 mW, 2300 MHz
 acpicpu0: P3: FFH, lat  10 us, pow 12607 mW, 2100 MHz
 acpicpu0: P4: FFH, lat  10 us, pow 11888 mW, 2000 MHz
 acpicpu0: P5: FFH, lat  10 us, pow 11184 mW, 1900 MHz
 acpicpu0: P6: FFH, lat  10 us, pow  9680 mW, 1700 MHz
 acpicpu0: P7: FFH, lat  10 us, pow  9019 mW, 1600 MHz
 acpicpu0: P8: FFH, lat  10 us, pow  7738 mW, 1400 MHz
 acpicpu0: P9: FFH, lat  10 us, pow  7119 mW, 1300 MHz
 acpicpu0: P10: FFH, lat  10 us, pow  6511 mW, 1200 MHz
 acpicpu0: P11: FFH, lat  10 us, pow  5209 mW, 1000 MHz
 acpicpu0: P12: FFH, lat  10 us, pow  4643 mW,  900 MHz
 acpicpu0: P13: FFH, lat  10 us, pow  4090 mW,  800 MHz
 acpicpu0: P14: FFH, lat  10 us, pow  3021 mW,  600 MHz
 acpicpu0: P15: FFH, lat  10 us, pow  2386 mW,  500 MHz
 acpicpu0: T0: I/O, lat   1 us, pow     0 mW, 100 %
 acpicpu0: T1: I/O, lat   1 us, pow     0 mW,  88 %
 acpicpu0: T2: I/O, lat   1 us, pow     0 mW,  76 %
 acpicpu0: T3: I/O, lat   1 us, pow     0 mW,  64 %
 acpicpu0: T4: I/O, lat   1 us, pow     0 mW,  52 %
 acpicpu0: T5: I/O, lat   1 us, pow     0 mW,  40 %
 acpicpu0: T6: I/O, lat   1 us, pow     0 mW,  28 %
 acpicpu0: T7: I/O, lat   1 us, pow     0 mW,  16 %
 coretemp0 at cpu0: thermal sensor, 1 C resolution, Tjmax=105
 acpicpu1 at cpu1: ACPI CPU
 acpicpu2 at cpu2: ACPI CPU
 coretemp1 at cpu2: thermal sensor, 1 C resolution, Tjmax=105
 acpicpu3 at cpu3: ACPI CPU
 timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
 timecounter: Timecounter "TSC" frequency 2394635040 Hz quality 3000
 acpiacad0: AC adapter online.
 uhub0 at usb0: vendor 8086 xHCI Root Hub, class 9/0, rev 1.00/1.00, addr 0
 uhub0: 15 ports with 15 removable, self powered
 IPsec: Initialized Security Association Processing.
 uhub1 at usb1: vendor 8086 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
 uhub1: 2 ports with 2 removable, self powered
 ahcisata0 port 0: device present, speed: 6.0Gb/s
 wd0 at atabus0 drive 0
 wd0: <TOSHIBA THNSNJ256GMCU>
 wd0: drive supports 16-sector PIO transfers, LBA48 addressing
 wd0: 238 GB, 496149 cyl, 16 head, 63 sec, 512 bytes/sect x 500118192 sectors
 wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
 wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100) (using DMA)
 uhub2 at uhub0 port 6: vendor 05e3 USB2.0 Hub, class 9/0, rev 2.10/88.30, addr 1
 uhub2: single transaction translator
 uhub2: 4 ports with 0 removable, self powered
 uhub3 at uhub1 port 1: vendor 8087 product 8001, class 9/0, rev 2.00/0.03, addr 2
 uhub3: single transaction translator
 uhub3: 8 ports with 8 removable, self powered
 uvideo0 at uhub0 port 7 configuration 1 interface 0: Chicony Electronics Co.,Ltd. TOSHIBA Web Camera - FHD, rev 2.00/83.73, addr 2
 video0 at uvideo0: Chicony Electronics Co.,Ltd. TOSHIBA Web Camera - FHD, rev 2.00/83.73, addr 2
 pad0: outputs: 44100Hz, 16-bit, stereo
 audio1 at pad0: half duplex, playback, capture
 spkr2 at audio1: PC Speaker (synthesized)
 WARNING: 13 errors while detecting hardware; check system log.
 boot device: wd0
 root on wd0a dumps on wd0b
 root file system type: ffs
 kern.module.path=/stand/amd64/7.99.56/modules
 iwm0: hw rev 0x210, fw ver 16.242414.0, address 5c:e0:c5:a8:88:ab
 iwm0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
 iwm0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
 iwm0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
 wsdisplay0: screen 1 added (default, vt100 emulation)
 wsdisplay0: screen 2 added (default, vt100 emulation)
 wsdisplay0: screen 3 added (default, vt100 emulation)
 wsdisplay0: screen 4 added (default, vt100 emulation)
 cpu 0: ucode 0x19->0x24
 cpu 2: ucode 0x19->0x24
 iwm0: fatal firmware error
 iwm0: device timeout
 iwm0: device timeout


 > Regards,
 > -- 
 > Kimihiro Nonaka

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Kimihiro Nonaka <nonakap@gmail.com>
To: Ryo ONODERA <ryo_on@yk.rim.or.jp>
Cc: "gnats-bugs@netbsd.org" <gnats-bugs@netbsd.org>
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Sun, 8 Jan 2017 18:57:04 +0900

 Hi,

 2017-01-08 18:48 GMT+09:00 Ryo ONODERA <ryo_on@yk.rim.or.jp>:

 > iwm0 at pci2 dev 0 function 0: vendor 8086 product 095a (rev. 0x59)
 > iwm0: interrupting at msi4 vec 0
 > iwm0: hw rev 0x210, fw ver 16.242414.0, address 5c:e0:c5:a8:88:ab

 Hmm, your machine has 7265D.
 Please try a following patch.

 Index: sys/dev/pci/if_iwm.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/if_iwm.c,v
 retrieving revision 1.51
 diff -u -p -r1.51 if_iwm.c
 --- sys/dev/pci/if_iwm.c    8 Jan 2017 08:29:23 -0000    1.51
 +++ sys/dev/pci/if_iwm.c    8 Jan 2017 09:51:55 -0000
 @@ -7373,9 +7373,7 @@ iwm_attach(device_t parent, device_t sel
          break;
      case PCI_PRODUCT_INTEL_WIFI_LINK_7265_1:
      case PCI_PRODUCT_INTEL_WIFI_LINK_7265_2:
 -        sc->sc_fwname = (sc->sc_hw_rev & IWM_CSR_HW_REV_TYPE_MSK) ==
 -            IWM_CSR_HW_REV_TYPE_7265D ?
 -            "iwlwifi-7265D-16.ucode": "iwlwifi-7265-16.ucode";
 +        sc->sc_fwname = "iwlwifi-7265-16.ucode";
          sc->host_interrupt_operation_mode = 0;
          sc->sc_device_family = IWM_DEVICE_FAMILY_7000;
          sc->sc_fwdmasegsz = IWM_FWDMASEGSZ;

 Regards,
 -- 
 Kimihiro Nonaka

Responsible-Changed-From-To: nonaka@netbsd.org->nonaka
Responsible-Changed-By: nonaka@NetBSD.org
Responsible-Changed-When: Sun, 08 Jan 2017 10:02:26 +0000
Responsible-Changed-Why:


From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: nonakap@gmail.com
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Sun, 08 Jan 2017 19:09:36 +0900 (JST)

 Hi,

 From: Kimihiro Nonaka <nonakap@gmail.com>, Date: Sun, 8 Jan 2017 18:57:04 +0900

 > Hi,
 > 
 > 2017-01-08 18:48 GMT+09:00 Ryo ONODERA <ryo_on@yk.rim.or.jp>:
 > 
 >> iwm0 at pci2 dev 0 function 0: vendor 8086 product 095a (rev. 0x59)
 >> iwm0: interrupting at msi4 vec 0
 >> iwm0: hw rev 0x210, fw ver 16.242414.0, address 5c:e0:c5:a8:88:ab
 > 
 > Hmm, your machine has 7265D.
 > Please try a following patch.

 Hmm... It is not supported yet accoring to your commit log.

 > Index: sys/dev/pci/if_iwm.c
 > ===================================================================
 > RCS file: /cvsroot/src/sys/dev/pci/if_iwm.c,v
 > retrieving revision 1.51
 > diff -u -p -r1.51 if_iwm.c
 > --- sys/dev/pci/if_iwm.c    8 Jan 2017 08:29:23 -0000    1.51
 > +++ sys/dev/pci/if_iwm.c    8 Jan 2017 09:51:55 -0000
 > @@ -7373,9 +7373,7 @@ iwm_attach(device_t parent, device_t sel
 >          break;
 >      case PCI_PRODUCT_INTEL_WIFI_LINK_7265_1:
 >      case PCI_PRODUCT_INTEL_WIFI_LINK_7265_2:
 > -        sc->sc_fwname = (sc->sc_hw_rev & IWM_CSR_HW_REV_TYPE_MSK) ==
 > -            IWM_CSR_HW_REV_TYPE_7265D ?
 > -            "iwlwifi-7265D-16.ucode": "iwlwifi-7265-16.ucode";
 > +        sc->sc_fwname = "iwlwifi-7265-16.ucode";
 >          sc->host_interrupt_operation_mode = 0;
 >          sc->sc_device_family = IWM_DEVICE_FAMILY_7000;
 >          sc->sc_fwdmasegsz = IWM_FWDMASEGSZ;

 With your patch, I have gotten as follows.

 # wpa_supplicant -i iwm0 -c configfile
 iwm0: device timeout
 iwm0: device timeout
 (infinite loop)

 "iwm0: fatal firmware error" disappears. However it does not work yet.

 Thank you.

 > Regards,
 > -- 
 > Kimihiro Nonaka

 P.S.
 I will test latest NetBSD/amd64-current kernel on my Vaio Pro 11 later.
 It has iwm(4) device inside.

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Kimihiro Nonaka <nonakap@gmail.com>
To: Ryo ONODERA <ryo_on@yk.rim.or.jp>
Cc: "gnats-bugs@netbsd.org" <gnats-bugs@netbsd.org>
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Fri, 13 Jan 2017 20:27:57 +0900

 Hi,

 2017-01-08 18:48 GMT+09:00 Ryo ONODERA <ryo_on@yk.rim.or.jp>:

 > iwm0 at pci2 dev 0 function 0: vendor 8086 product 095a (rev. 0x59)
 > iwm0: interrupting at msi4 vec 0
 > iwm0: hw rev 0x210, fw ver 16.242414.0, address 5c:e0:c5:a8:88:ab
 > iwm0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
 > iwm0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
 > iwm0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

 Could you try the following change?
 3165 card works fine with it.

 > http://mail-index.netbsd.org/source-changes/2017/01/13/msg080956.html


 Regards,
 -- 
 Kimihiro Nonaka

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: nonakap@gmail.com
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Sat, 14 Jan 2017 05:07:11 +0900 (JST)

 Hi,

 From: Kimihiro Nonaka <nonakap@gmail.com>, Date: Fri, 13 Jan 2017 20:27:57 +0900

 > Hi,
 > 
 > 2017-01-08 18:48 GMT+09:00 Ryo ONODERA <ryo_on@yk.rim.or.jp>:
 > 
 >> iwm0 at pci2 dev 0 function 0: vendor 8086 product 095a (rev. 0x59)
 >> iwm0: interrupting at msi4 vec 0
 >> iwm0: hw rev 0x210, fw ver 16.242414.0, address 5c:e0:c5:a8:88:ab
 >> iwm0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
 >> iwm0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
 >> iwm0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
 > 
 > Could you try the following change?
 > 3165 card works fine with it.
 > 
 >> http://mail-index.netbsd.org/source-changes/2017/01/13/msg080956.html

 With your change, my iwm(4) can connect to .11g AP
 in many case.

 However it seems that it is less stable.
 I have gotten 'iwm0: fatal firmware error' in some case.

 And it cannot connect to Android .11g AP like before.

 Thank you.

 > Regards,
 > -- 
 > Kimihiro Nonaka

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Kimihiro Nonaka <nonakap@gmail.com>
To: Ryo ONODERA <ryo_on@yk.rim.or.jp>
Cc: "gnats-bugs@netbsd.org" <gnats-bugs@netbsd.org>
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Sat, 14 Jan 2017 15:35:06 +0900

 > And it cannot connect to Android .11g AP like before.

 Could you tell me Android AP setting?
 I can connect to Nexus 5X (Android 7.1.1) with WPA2-PSK.

 Regards,
 -- 
 Kimihiro Nonaka

From: Kimihiro Nonaka <nonakap@gmail.com>
To: Ryo ONODERA <ryo_on@yk.rim.or.jp>
Cc: "gnats-bugs@netbsd.org" <gnats-bugs@netbsd.org>
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Sat, 14 Jan 2017 15:58:43 +0900

 2017-01-14 15:35 GMT+09:00 Kimihiro Nonaka <nonakap@gmail.com>:

 >> And it cannot connect to Android .11g AP like before.
 >
 > Could you tell me Android AP setting?

 And could you send wpa_supplicant.conf (please mask psk) and output of
 `wpa_supplicant -dd -i iwm -c <your wpa_supplicant.conf>'.

 Regards,
 -- 
 Kimihiro Nonaka

From: Kimihiro Nonaka <nonakap@gmail.com>
To: Ryo ONODERA <ryo_on@yk.rim.or.jp>
Cc: "gnats-bugs@netbsd.org" <gnats-bugs@netbsd.org>
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Thu, 19 Jan 2017 20:31:35 +0900

 2017-01-14 5:07 GMT+09:00 Ryo ONODERA <ryo_on@yk.rim.or.jp>:

 > However it seems that it is less stable.
 > I have gotten 'iwm0: fatal firmware error' in some case.

 Could you try if_iwm.c r1.65?

 Regards,
 -- 
 Kimihiro Nonaka

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: nonakap@gmail.com
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Thu, 19 Jan 2017 22:54:47 +0900 (JST)

 From: Kimihiro Nonaka <nonakap@gmail.com>, Date: Sat, 14 Jan 2017 15:58:43 +0900

 > 2017-01-14 15:35 GMT+09:00 Kimihiro Nonaka <nonakap@gmail.com>:
 > 
 >>> And it cannot connect to Android .11g AP like before.
 >>
 >> Could you tell me Android AP setting?
 > 
 > And could you send wpa_supplicant.conf (please mask psk) and output of
 > `wpa_supplicant -dd -i iwm -c <your wpa_supplicant.conf>'.

 Hi,

 # I will test if_iwm.c r1.65 soon.

 Here is my config file:
 $ cat /opt/share/wpa_supplicant-xperia.conf
 ctrl_interface=/var/run/wpa_supplicant
 ctrl_interface_group=wheel
 network={
 	ssid="xterm"
 	key_mgmt=WPA-PSK
 	psk="***"
 }


 Here is the output of wap_supplicant:

 $ sudo wpa_supplicant -dd -i iwm0 -c /opt/share/wpa_supplicant-xperia.conf
 wpa_supplicant v2.6
 Successfully initialized wpa_supplicant
 Initializing interface 'iwm0' conf '/opt/share/wpa_supplicant-xperia.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
 Configuration file '/opt/share/wpa_supplicant-xperia.conf' -> '/opt/share/wpa_supplicant-xperia.conf'
 Reading configuration file '/opt/share/wpa_supplicant-xperia.conf'
 ctrl_interface='/var/run/wpa_supplicant'
 ctrl_interface_group='wheel'
 Line: 3 - start of a new network block
 ssid - hexdump_ascii(len=5):
      78 74 65 72 6d                                    xterm
 key_mgmt: 0x2
 PSK (ASCII passphrase) - hexdump_ascii(len=13): [REMOVED]
 PSK (from passphrase) - hexdump(len=32): [REMOVED]
 Priority group 0
    id=0 ssid='xterm'
 Add interface iwm0 to a new radio N/A
 iwm0: Own MAC address: 5c:e0:c5:a8:88:ab
 bsd_set_key: alg=0 addr=0x0 key_idx=0 set_tx=0 seq_len=0 key_len=0
 bsd_del_key: key_idx=0
 bsd_set_key: alg=0 addr=0x0 key_idx=1 set_tx=0 seq_len=0 key_len=0
 bsd_del_key: key_idx=1
 bsd_set_key: alg=0 addr=0x0 key_idx=2 set_tx=0 seq_len=0 key_len=0
 bsd_del_key: key_idx=2
 bsd_set_key: alg=0 addr=0x0 key_idx=3 set_tx=0 seq_len=0 key_len=0
 bsd_del_key: key_idx=3
 wpa_driver_bsd_set_countermeasures: enabled=0
 iwm0: RSN: flushing PMKID list in the driver
 iwm0: Setting scan request: 0.100000 sec
 ENGINE: Loading dynamic engine
 ENGINE: Loading dynamic engine
 EAPOL: SUPP_PAE entering state DISCONNECTED
 EAPOL: Supplicant port status: Unauthorized
 EAPOL: KEY_RX entering state NO_KEY_RECEIVE
 EAPOL: SUPP_BE entering state INITIALIZE
 EAP: EAP entering state DISABLED
 ctrl_interface_group=0 (from group name 'wheel')
 iwm0: Added interface iwm0
 iwm0: State: DISCONNECTED -> DISCONNECTED
 iwm0: State: DISCONNECTED -> SCANNING
 iwm0: Starting AP scan for wildcard SSID
 iwm0: Add radio work 'scan'@0x73c4f39ec140
 iwm0: First radio work item in the queue - schedule start immediately
 iwm0: Starting radio work 'scan'@0x73c4f39ec140 after 0.000011 second wait
 wpa_driver_bsd_set_wpa: enabled=1
 wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
 EAPOL: disable timer tick
 iwm0: Event SCAN_RESULTS (3) received
 Received 624 bytes of scan results (7 BSSes)
 iwm0: BSS: Start scan result update 1
 iwm0: BSS: Add new id 0 BSSID 88:57:ee:36:87:30 SSID 'Buffalo-G-873E' freq 2422
 iwm0: BSS: Add new id 1 BSSID a4:12:42:67:d4:32 SSID 'SWEETS3' freq 2452
 iwm0: BSS: Add new id 2 BSSID 10:6f:3f:28:dc:d5 SSID '' freq 5200
 iwm0: BSS: Add new id 3 BSSID 10:6f:3f:28:dc:d4 SSID 'SWEETS2' freq 2417
 iwm0: BSS: Add new id 4 BSSID bc:6e:64:88:25:0b SSID 'xterm' freq 2417
 iwm0: BSS: Add new id 5 BSSID b6:12:42:67:d4:32 SSID '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' freq 2457
 iwm0: BSS: Add new id 6 BSSID 00:00:00:00:00:00 SSID '' freq 5200
 BSS: last_scan_res_used=7/32
 iwm0: New scan results available (own=0 ext=0)
 iwm0: Radio work 'scan'@0x73c4f39ec140 done in 5.534076 seconds
 iwm0: radio_work_free('scan'@0x73c4f39ec140: num_active_works --> 0
 iwm0: Selecting BSS from priority group 0
 iwm0: 0: 88:57:ee:36:87:30 ssid='Buffalo-G-873E' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=94 freq=2422
 iwm0:    skip - SSID mismatch
 iwm0: 1: a4:12:42:67:d4:32 ssid='SWEETS3' wpa_ie_len=22 rsn_ie_len=0 caps=0x31 level=87 freq=2452
 iwm0:    skip - SSID mismatch
 iwm0: 2: 10:6f:3f:28:dc:d5 ssid='' wpa_ie_len=26 rsn_ie_len=0 caps=0x11 level=69 freq=5200
 iwm0:    skip - SSID not known
 iwm0: 3: 10:6f:3f:28:dc:d4 ssid='SWEETS2' wpa_ie_len=26 rsn_ie_len=0 caps=0x31 level=53 freq=2417
 iwm0:    skip - SSID mismatch
 iwm0: 4: bc:6e:64:88:25:0b ssid='xterm' wpa_ie_len=0 rsn_ie_len=20 caps=0x31 level=36 freq=2417
 iwm0:    selected based on RSN IE
 iwm0:    selected BSS bc:6e:64:88:25:0b ssid='xterm'
 iwm0: Considering connect request: reassociate: 0  selected: bc:6e:64:88:25:0b  bssid: 00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING  ssid=0x73c4f3919800  current_ssid=0x0
 iwm0: Request association with bc:6e:64:88:25:0b
 iwm0: Add radio work 'connect'@0x73c4f39ec140
 iwm0: First radio work item in the queue - schedule start immediately
 iwm0: Starting radio work 'connect'@0x73c4f39ec140 after 0.000007 second wait
 iwm0: Trying to associate with bc:6e:64:88:25:0b (SSID='xterm' freq=2417 MHz)
 iwm0: Cancelling scan request
 iwm0: WPA: clearing own WPA/RSN IE
 iwm0: Automatic auth_alg selection: 0x1
 RSN: PMKSA cache search - network_ctx=0x73c4f3919800 try_opportunistic=0
 RSN: Search for BSSID bc:6e:64:88:25:0b
 RSN: No PMKSA cache entry found
 iwm0: RSN: using IEEE 802.11i/D9.0
 iwm0: WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
 iwm0: WPA: clearing AP WPA IE
 WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
 iwm0: WPA: using GTK CCMP
 iwm0: WPA: using PTK CCMP
 iwm0: WPA: using KEY_MGMT WPA-PSK
 WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 iwm0: State: SCANNING -> ASSOCIATING
 Limit connection to BSSID bc:6e:64:88:25:0b freq=2417 MHz based on scan results (bssid_set=0)
 wpa_driver_bsd_associate: ssid 'xterm' wpa ie len 22 pairwise 16 group 16 key mgmt 2
 wpa_driver_bsd_set_drop_unencrypted: enabled=1
 wpa_driver_bsd_associate: set PRIVACY 1
 iwm0: Setting authentication timeout: 10 sec 0 usec
 EAPOL: External notification - EAP success=0
 EAPOL: External notification - EAP fail=0
 EAPOL: External notification - portControl=Auto
 iwm0: Event ASSOC (0) received
 iwm0: State: ASSOCIATING -> ASSOCIATED
 iwm0: Associated to a new BSS: BSSID=bc:6e:64:88:25:0b
 iwm0: Associated with bc:6e:64:88:25:0b
 iwm0: WPA: Association event - clear replay counter
 iwm0: WPA: Clear old PTK
 EAPOL: External notification - portEnabled=0
 EAPOL: External notification - portValid=0
 EAPOL: External notification - EAP success=0
 EAPOL: External notification - portEnabled=1
 EAPOL: SUPP_PAE entering state CONNECTING
 EAPOL: enable timer tick
 EAPOL: SUPP_BE entering state IDLE
 iwm0: Setting authentication timeout: 10 sec 0 usec
 iwm0: Cancelling scan request
 iwm0: RX EAPOL from bc:6e:64:88:25:0b
 RX EAPOL - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 01 c8 33 32 f0 3e 31 c4 64 0f 8c 0a 00 d3 16 bd 7d 02 0e 4e 64 28 93 ae 4e bc 37 84 66 10 0b 81 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: Setting authentication timeout: 10 sec 0 usec
 iwm0: IEEE 802.1X RX: version=2 type=3 length=95
 WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 01 c8 33 32 f0 3e 31 c4 64 0f 8c 0a 00 d3 16 bd 7d 02 0e 4e 64 28 93 ae 4e bc 37 84 66 10 0b 81 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0:   EAPOL-Key type=2
 iwm0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
 iwm0:   key_length=16 key_data_length=0
   replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 01
   key_nonce - hexdump(len=32): c8 33 32 f0 3e 31 c4 64 0f 8c 0a 00 d3 16 bd 7d 02 0e 4e 64 28 93 ae 4e bc 37 84 66 10 0b 81 02
   key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
   key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: State: ASSOCIATED -> 4WAY_HANDSHAKE
 iwm0: WPA: RX message 1 of 4-Way Handshake from bc:6e:64:88:25:0b (ver=2)
 RSN: msg 1/4 key data - hexdump(len=0):
 Get randomness: len=32 entropy=8
 WPA: Renewed SNonce - hexdump(len=32): c9 b2 67 45 ac 40 2e 21 77 db 84 20 ad 87 14 fe 18 11 4a b7 f9 93 62 fd 3c 23 60 c8 c0 ae 14 2f
 WPA: PTK derivation - A1=5c:e0:c5:a8:88:ab A2=bc:6e:64:88:25:0b
 WPA: Nonce1 - hexdump(len=32): c9 b2 67 45 ac 40 2e 21 77 db 84 20 ad 87 14 fe 18 11 4a b7 f9 93 62 fd 3c 23 60 c8 c0 ae 14 2f
 WPA: Nonce2 - hexdump(len=32): c8 33 32 f0 3e 31 c4 64 0f 8c 0a 00 d3 16 bd 7d 02 0e 4e 64 28 93 ae 4e bc 37 84 66 10 0b 81 02
 WPA: PMK - hexdump(len=32): [REMOVED]
 WPA: PTK - hexdump(len=48): [REMOVED]
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: KEK - hexdump(len=16): [REMOVED]
 WPA: TK - hexdump(len=16): [REMOVED]
 WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
 iwm0: WPA: Sending EAPOL-Key 2/4
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: Derived Key MIC - hexdump(len=16): b3 f4 cc 40 29 82 df 5c 69 ea c0 2e 52 5d d7 1a
 WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00 00 00 00 00 00 01 c9 b2 67 45 ac 40 2e 21 77 db 84 20 ad 87 14 fe 18 11 4a b7 f9 93 62 fd 3c 23 60 c8 c0 ae 14 2f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b3 f4 cc 40 29 82 df 5c 69 ea c0 2e 52 5d d7 1a 00 16 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 iwm0: RX EAPOL from bc:6e:64:88:25:0b
 RX EAPOL - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 02 c8 33 32 f0 3e 31 c4 64 0f 8c 0a 00 d3 16 bd 7d 02 0e 4e 64 28 93 ae 4e bc 37 84 66 10 0b 81 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: IEEE 802.1X RX: version=2 type=3 length=95
 WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 02 c8 33 32 f0 3e 31 c4 64 0f 8c 0a 00 d3 16 bd 7d 02 0e 4e 64 28 93 ae 4e bc 37 84 66 10 0b 81 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0:   EAPOL-Key type=2
 iwm0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
 iwm0:   key_length=16 key_data_length=0
   replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 02
   key_nonce - hexdump(len=32): c8 33 32 f0 3e 31 c4 64 0f 8c 0a 00 d3 16 bd 7d 02 0e 4e 64 28 93 ae 4e bc 37 84 66 10 0b 81 02
   key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
   key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
 iwm0: WPA: RX message 1 of 4-Way Handshake from bc:6e:64:88:25:0b (ver=2)
 RSN: msg 1/4 key data - hexdump(len=0):
 WPA: PTK derivation - A1=5c:e0:c5:a8:88:ab A2=bc:6e:64:88:25:0b
 WPA: Nonce1 - hexdump(len=32): c9 b2 67 45 ac 40 2e 21 77 db 84 20 ad 87 14 fe 18 11 4a b7 f9 93 62 fd 3c 23 60 c8 c0 ae 14 2f
 WPA: Nonce2 - hexdump(len=32): c8 33 32 f0 3e 31 c4 64 0f 8c 0a 00 d3 16 bd 7d 02 0e 4e 64 28 93 ae 4e bc 37 84 66 10 0b 81 02
 WPA: PMK - hexdump(len=32): [REMOVED]
 WPA: PTK - hexdump(len=48): [REMOVED]
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: KEK - hexdump(len=16): [REMOVED]
 WPA: TK - hexdump(len=16): [REMOVED]
 WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 02
 iwm0: WPA: Sending EAPOL-Key 2/4
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: Derived Key MIC - hexdump(len=16): 4d 3f e3 45 32 f8 ab 44 58 5e 36 36 41 7a 40 32
 WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00 00 00 00 00 00 02 c9 b2 67 45 ac 40 2e 21 77 db 84 20 ad 87 14 fe 18 11 4a b7 f9 93 62 fd 3c 23 60 c8 c0 ae 14 2f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4d 3f e3 45 32 f8 ab 44 58 5e 36 36 41 7a 40 32 00 16 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 iwm0: Event DISASSOC (1) received
 iwm0: Disassociation notification
 iwm0: CTRL-EVENT-DISCONNECTED bssid=bc:6e:64:88:25:0b reason=0
 iwm0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
 iwm0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="xterm" auth_failures=1 duration=10 reason=WRONG_KEY
 iwm0: Auto connect enabled: try to reconnect (wps=0/0 wpa_state=7)
 iwm0: Setting scan request: 0.100000 sec
 iwm0: Radio work 'connect'@0x73c4f39ec140 done in 1.152498 seconds
 iwm0: radio_work_free('connect'@0x73c4f39ec140: num_active_works --> 0
 Added BSSID bc:6e:64:88:25:0b into blacklist
 iwm0: Blacklist count 1 --> request scan in 100 ms
 iwm0: Ignore new scan request for 0.100000 sec since an earlier request is scheduled to trigger sooner
 iwm0: WPA: Clear old PMK and PTK
 iwm0: Disconnect event - remove keys
 iwm0: State: 4WAY_HANDSHAKE -> DISCONNECTED
 EAPOL: External notification - portEnabled=0
 EAPOL: SUPP_PAE entering state DISCONNECTED
 EAPOL: Supplicant port status: Unauthorized
 EAPOL: SUPP_BE entering state INITIALIZE
 EAPOL: External notification - portValid=0
 EAPOL: External notification - EAP success=0
 iwm0: State: DISCONNECTED -> SCANNING
 iwm0: Starting AP scan for wildcard SSID
 iwm0: Add radio work 'scan'@0x73c4f39ec140
 iwm0: First radio work item in the queue - schedule start immediately
 iwm0: Starting radio work 'scan'@0x73c4f39ec140 after 0.000007 second wait
 wpa_driver_bsd_set_wpa: enabled=1
 wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
 EAPOL: startWhen --> 0
 EAPOL: disable timer tick
 iwm0: Event SCAN_RESULTS (3) received
 Received 520 bytes of scan results (6 BSSes)
 iwm0: BSS: Start scan result update 2
 BSS: a4:12:42:67:d4:32 changed freq 2452 --> 2457
 BSS: last_scan_res_used=6/32
 iwm0: New scan results available (own=0 ext=0)
 iwm0: Radio work 'scan'@0x73c4f39ec140 done in 5.533930 seconds
 iwm0: radio_work_free('scan'@0x73c4f39ec140: num_active_works --> 0
 iwm0: Postpone network selection by 4 seconds since all networks are disabled
 iwm0: Try to associate due to network getting re-enabled
 iwm0: CTRL-EVENT-SSID-REENABLED id=0 ssid="xterm"
 iwm0: Selecting BSS from priority group 0
 iwm0: 0: a4:12:42:67:d4:32 ssid='SWEETS3' wpa_ie_len=22 rsn_ie_len=0 caps=0x31 level=90 freq=2457
 iwm0:    skip - SSID mismatch
 iwm0: 1: 10:6f:3f:28:dc:d5 ssid='' wpa_ie_len=26 rsn_ie_len=0 caps=0x11 level=69 freq=5200
 iwm0:    skip - SSID not known
 iwm0: 2: 10:6f:3f:28:dc:d4 ssid='SWEETS2' wpa_ie_len=26 rsn_ie_len=0 caps=0x31 level=53 freq=2417
 iwm0:    skip - SSID mismatch
 iwm0: 3: bc:6e:64:88:25:0b ssid='xterm' wpa_ie_len=0 rsn_ie_len=20 caps=0x31 level=36 freq=2417
 iwm0:    skip - blacklisted (count=1 limit=0)
 iwm0: 4: b6:12:42:67:d4:32 ssid='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' wpa_ie_len=0 rsn_ie_len=0 caps=0x31 level=90 freq=2457
 iwm0:    skip - SSID mismatch
 iwm0: 5: 00:00:00:00:00:00 ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x0 level=0 freq=5200
 iwm0:    skip - SSID not known
 iwm0: No APs found - clear blacklist and try again
 Removed BSSID bc:6e:64:88:25:0b from blacklist (clear)
 iwm0: Selecting BSS from priority group 0
 iwm0: 0: a4:12:42:67:d4:32 ssid='SWEETS3' wpa_ie_len=22 rsn_ie_len=0 caps=0x31 level=90 freq=2457
 iwm0:    skip - SSID mismatch
 iwm0: 1: 10:6f:3f:28:dc:d5 ssid='' wpa_ie_len=26 rsn_ie_len=0 caps=0x11 level=69 freq=5200
 iwm0:    skip - SSID not known
 iwm0: 2: 10:6f:3f:28:dc:d4 ssid='SWEETS2' wpa_ie_len=26 rsn_ie_len=0 caps=0x31 level=53 freq=2417
 iwm0:    skip - SSID mismatch
 iwm0: 3: bc:6e:64:88:25:0b ssid='xterm' wpa_ie_len=0 rsn_ie_len=20 caps=0x31 level=36 freq=2417
 iwm0:    selected based on RSN IE
 iwm0:    selected BSS bc:6e:64:88:25:0b ssid='xterm'
 iwm0: Considering connect request: reassociate: 0  selected: bc:6e:64:88:25:0b  bssid: 00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING  ssid=0x73c4f3919800  current_ssid=0x0
 iwm0: Request association with bc:6e:64:88:25:0b
 iwm0: Re-association to the same ESS
 iwm0: Add radio work 'connect'@0x73c4f39ec140
 iwm0: First radio work item in the queue - schedule start immediately
 iwm0: Starting radio work 'connect'@0x73c4f39ec140 after 0.000004 second wait
 iwm0: Trying to associate with bc:6e:64:88:25:0b (SSID='xterm' freq=2417 MHz)
 iwm0: Cancelling scan request
 iwm0: WPA: clearing own WPA/RSN IE
 iwm0: Automatic auth_alg selection: 0x1
 RSN: PMKSA cache search - network_ctx=0x73c4f3919800 try_opportunistic=0
 RSN: Search for BSSID bc:6e:64:88:25:0b
 RSN: No PMKSA cache entry found
 iwm0: RSN: using IEEE 802.11i/D9.0
 iwm0: WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
 iwm0: WPA: clearing AP WPA IE
 WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
 iwm0: WPA: using GTK CCMP
 iwm0: WPA: using PTK CCMP
 iwm0: WPA: using KEY_MGMT WPA-PSK
 WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 iwm0: State: SCANNING -> ASSOCIATING
 Limit connection to BSSID bc:6e:64:88:25:0b freq=2417 MHz based on scan results (bssid_set=0)
 wpa_driver_bsd_associate: ssid 'xterm' wpa ie len 22 pairwise 16 group 16 key mgmt 2
 wpa_driver_bsd_set_drop_unencrypted: enabled=1
 wpa_driver_bsd_associate: set PRIVACY 1
 iwm0: Setting authentication timeout: 10 sec 0 usec
 EAPOL: External notification - EAP success=0
 EAPOL: External notification - EAP fail=0
 EAPOL: External notification - portControl=Auto
 iwm0: Event ASSOC (0) received
 iwm0: State: ASSOCIATING -> ASSOCIATED
 iwm0: Associated to a new BSS: BSSID=bc:6e:64:88:25:0b
 iwm0: Associated with bc:6e:64:88:25:0b
 iwm0: WPA: Association event - clear replay counter
 iwm0: WPA: Clear old PTK
 EAPOL: External notification - portEnabled=0
 EAPOL: External notification - portValid=0
 EAPOL: External notification - EAP success=0
 EAPOL: External notification - portEnabled=1
 EAPOL: SUPP_PAE entering state CONNECTING
 EAPOL: enable timer tick
 EAPOL: SUPP_BE entering state IDLE
 iwm0: Setting authentication timeout: 10 sec 0 usec
 iwm0: Cancelling scan request
 iwm0: RX EAPOL from bc:6e:64:88:25:0b
 RX EAPOL - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 01 ac f6 4c fa c9 47 1b 8b 62 94 50 42 fc a8 c6 a9 41 dd 2d 50 2e ff c3 c4 05 4d e8 25 e2 cf d3 a7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: Setting authentication timeout: 10 sec 0 usec
 iwm0: IEEE 802.1X RX: version=2 type=3 length=95
 WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 01 ac f6 4c fa c9 47 1b 8b 62 94 50 42 fc a8 c6 a9 41 dd 2d 50 2e ff c3 c4 05 4d e8 25 e2 cf d3 a7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0:   EAPOL-Key type=2
 iwm0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
 iwm0:   key_length=16 key_data_length=0
   replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 01
   key_nonce - hexdump(len=32): ac f6 4c fa c9 47 1b 8b 62 94 50 42 fc a8 c6 a9 41 dd 2d 50 2e ff c3 c4 05 4d e8 25 e2 cf d3 a7
   key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
   key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: State: ASSOCIATED -> 4WAY_HANDSHAKE
 iwm0: WPA: RX message 1 of 4-Way Handshake from bc:6e:64:88:25:0b (ver=2)
 RSN: msg 1/4 key data - hexdump(len=0):
 Get randomness: len=32 entropy=7
 WPA: Renewed SNonce - hexdump(len=32): 25 4a a8 e8 db b9 c4 40 8a 17 7b 3a 96 37 86 0d 6c 4f 24 9d d4 c5 1f 5e e9 52 df a5 95 41 03 4a
 WPA: PTK derivation - A1=5c:e0:c5:a8:88:ab A2=bc:6e:64:88:25:0b
 WPA: Nonce1 - hexdump(len=32): 25 4a a8 e8 db b9 c4 40 8a 17 7b 3a 96 37 86 0d 6c 4f 24 9d d4 c5 1f 5e e9 52 df a5 95 41 03 4a
 WPA: Nonce2 - hexdump(len=32): ac f6 4c fa c9 47 1b 8b 62 94 50 42 fc a8 c6 a9 41 dd 2d 50 2e ff c3 c4 05 4d e8 25 e2 cf d3 a7
 WPA: PMK - hexdump(len=32): [REMOVED]
 WPA: PTK - hexdump(len=48): [REMOVED]
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: KEK - hexdump(len=16): [REMOVED]
 WPA: TK - hexdump(len=16): [REMOVED]
 WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
 iwm0: WPA: Sending EAPOL-Key 2/4
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: Derived Key MIC - hexdump(len=16): 9d 00 79 6c 17 d9 94 1e 80 b7 90 4a e7 bc 33 3e
 WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00 00 00 00 00 00 01 25 4a a8 e8 db b9 c4 40 8a 17 7b 3a 96 37 86 0d 6c 4f 24 9d d4 c5 1f 5e e9 52 df a5 95 41 03 4a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9d 00 79 6c 17 d9 94 1e 80 b7 90 4a e7 bc 33 3e 00 16 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 iwm0: RX EAPOL from bc:6e:64:88:25:0b
 RX EAPOL - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 02 ac f6 4c fa c9 47 1b 8b 62 94 50 42 fc a8 c6 a9 41 dd 2d 50 2e ff c3 c4 05 4d e8 25 e2 cf d3 a7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: IEEE 802.1X RX: version=2 type=3 length=95
 WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 02 ac f6 4c fa c9 47 1b 8b 62 94 50 42 fc a8 c6 a9 41 dd 2d 50 2e ff c3 c4 05 4d e8 25 e2 cf d3 a7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0:   EAPOL-Key type=2
 iwm0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
 iwm0:   key_length=16 key_data_length=0
   replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 02
   key_nonce - hexdump(len=32): ac f6 4c fa c9 47 1b 8b 62 94 50 42 fc a8 c6 a9 41 dd 2d 50 2e ff c3 c4 05 4d e8 25 e2 cf d3 a7
   key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
   key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
 iwm0: WPA: RX message 1 of 4-Way Handshake from bc:6e:64:88:25:0b (ver=2)
 RSN: msg 1/4 key data - hexdump(len=0):
 WPA: PTK derivation - A1=5c:e0:c5:a8:88:ab A2=bc:6e:64:88:25:0b
 WPA: Nonce1 - hexdump(len=32): 25 4a a8 e8 db b9 c4 40 8a 17 7b 3a 96 37 86 0d 6c 4f 24 9d d4 c5 1f 5e e9 52 df a5 95 41 03 4a
 WPA: Nonce2 - hexdump(len=32): ac f6 4c fa c9 47 1b 8b 62 94 50 42 fc a8 c6 a9 41 dd 2d 50 2e ff c3 c4 05 4d e8 25 e2 cf d3 a7
 WPA: PMK - hexdump(len=32): [REMOVED]
 WPA: PTK - hexdump(len=48): [REMOVED]
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: KEK - hexdump(len=16): [REMOVED]
 WPA: TK - hexdump(len=16): [REMOVED]
 WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 02
 iwm0: WPA: Sending EAPOL-Key 2/4
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: Derived Key MIC - hexdump(len=16): ce 48 aa cf 5e e3 2a 6e d5 87 ec 3f 7c fb 25 98
 WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00 00 00 00 00 00 02 25 4a a8 e8 db b9 c4 40 8a 17 7b 3a 96 37 86 0d 6c 4f 24 9d d4 c5 1f 5e e9 52 df a5 95 41 03 4a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ce 48 aa cf 5e e3 2a 6e d5 87 ec 3f 7c fb 25 98 00 16 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 iwm0: Event DISASSOC (1) received
 iwm0: Disassociation notification
 iwm0: CTRL-EVENT-DISCONNECTED bssid=bc:6e:64:88:25:0b reason=0
 iwm0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
 iwm0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="xterm" auth_failures=2 duration=20 reason=WRONG_KEY
 iwm0: Auto connect enabled: try to reconnect (wps=0/0 wpa_state=7)
 iwm0: Setting scan request: 0.100000 sec
 iwm0: Radio work 'connect'@0x73c4f39ec140 done in 1.156160 seconds
 iwm0: radio_work_free('connect'@0x73c4f39ec140: num_active_works --> 0
 Added BSSID bc:6e:64:88:25:0b into blacklist
 iwm0: Blacklist count 2 --> request scan in 500 ms
 iwm0: Ignore new scan request for 0.500000 sec since an earlier request is scheduled to trigger sooner
 iwm0: WPA: Clear old PMK and PTK
 iwm0: Disconnect event - remove keys
 iwm0: State: 4WAY_HANDSHAKE -> DISCONNECTED
 EAPOL: External notification - portEnabled=0
 EAPOL: SUPP_PAE entering state DISCONNECTED
 EAPOL: Supplicant port status: Unauthorized
 EAPOL: SUPP_BE entering state INITIALIZE
 EAPOL: External notification - portValid=0
 EAPOL: External notification - EAP success=0
 iwm0: State: DISCONNECTED -> SCANNING
 iwm0: Starting AP scan for wildcard SSID
 iwm0: Add radio work 'scan'@0x73c4f39ec140
 iwm0: First radio work item in the queue - schedule start immediately
 iwm0: Starting radio work 'scan'@0x73c4f39ec140 after 0.000006 second wait
 wpa_driver_bsd_set_wpa: enabled=1
 wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
 EAPOL: startWhen --> 0
 EAPOL: disable timer tick
 ^Ciwm0: Removing interface iwm0
 iwm0: Request to deauthenticate - bssid=00:00:00:00:00:00 pending_bssid=00:00:00:00:00:00 reason=3 state=SCANNING
 iwm0: State: SCANNING -> DISCONNECTED
 EAPOL: External notification - portEnabled=0
 EAPOL: External notification - portValid=0
 wpa_driver_bsd_set_countermeasures: enabled=0
 iwm0: WPA: Clear old PMK and PTK
 Removed BSSID bc:6e:64:88:25:0b from blacklist (clear)
 iwm0: BSS: Remove id 0 BSSID 88:57:ee:36:87:30 SSID 'Buffalo-G-873E' due to wpa_bss_flush
 iwm0: BSS: Remove id 1 BSSID a4:12:42:67:d4:32 SSID 'SWEETS3' due to wpa_bss_flush
 iwm0: BSS: Remove id 2 BSSID 10:6f:3f:28:dc:d5 SSID '' due to wpa_bss_flush
 iwm0: BSS: Remove id 3 BSSID 10:6f:3f:28:dc:d4 SSID 'SWEETS2' due to wpa_bss_flush
 iwm0: BSS: Remove id 4 BSSID bc:6e:64:88:25:0b SSID 'xterm' due to wpa_bss_flush
 iwm0: BSS: Remove id 5 BSSID b6:12:42:67:d4:32 SSID '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' due to wpa_bss_flush
 iwm0: BSS: Remove id 6 BSSID 00:00:00:00:00:00 SSID '' due to wpa_bss_flush
 iwm0: Cancelling scan request
 iwm0: Cancelling authentication timeout
 Remove interface iwm0 from radio
 iwm0: Remove radio work 'scan'@0x73c4f39ec140 (started)
 iwm0: radio_work_free('scan'@0x73c4f39ec140: num_active_works --> 0
 Remove radio
 wpa_driver_bsd_set_wpa: enabled=0
 wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0
 wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0



 > Regards,
 > -- 
 > Kimihiro Nonaka

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: nonakap@gmail.com
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Thu, 19 Jan 2017 23:46:23 +0900 (JST)

 Hi,

 From: Kimihiro Nonaka <nonakap@gmail.com>, Date: Thu, 19 Jan 2017 20:31:35 +0900

 > 2017-01-14 5:07 GMT+09:00 Ryo ONODERA <ryo_on@yk.rim.or.jp>:
 > 
 >> However it seems that it is less stable.
 >> I have gotten 'iwm0: fatal firmware error' in some case.
 > 
 > Could you try if_iwm.c r1.65?

 I have
 iwm0: fatal firmware error
 too.

 Here is the output from wpa_supplicant:

 $ sudo wpa_supplicant -dd -i iwm0 -c /opt/share/wpa_supplicant-xperia.conf
 sudo password:
 wpa_supplicant v2.6
 Successfully initialized wpa_supplicant
 Initializing interface 'iwm0' conf '/opt/share/wpa_supplicant-xperia.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A'
 Configuration file '/opt/share/wpa_supplicant-xperia.conf' -> '/opt/share/wpa_supplicant-xperia.conf'
 Reading configuration file '/opt/share/wpa_supplicant-xperia.conf'
 ctrl_interface='/var/run/wpa_supplicant'
 ctrl_interface_group='wheel'
 Line: 3 - start of a new network block
 ssid - hexdump_ascii(len=5):
      78 74 65 72 6d                                    xterm
 key_mgmt: 0x2
 PSK (ASCII passphrase) - hexdump_ascii(len=13): [REMOVED]
 PSK (from passphrase) - hexdump(len=32): [REMOVED]
 Priority group 0
    id=0 ssid='xterm'
 Add interface iwm0 to a new radio N/A
 iwm0: Own MAC address: 5c:e0:c5:a8:88:ab
 bsd_set_key: alg=0 addr=0x0 key_idx=0 set_tx=0 seq_len=0 key_len=0
 bsd_del_key: key_idx=0
 bsd_set_key: alg=0 addr=0x0 key_idx=1 set_tx=0 seq_len=0 key_len=0
 bsd_del_key: key_idx=1
 bsd_set_key: alg=0 addr=0x0 key_idx=2 set_tx=0 seq_len=0 key_len=0
 bsd_del_key: key_idx=2
 bsd_set_key: alg=0 addr=0x0 key_idx=3 set_tx=0 seq_len=0 key_len=0
 bsd_del_key: key_idx=3
 wpa_driver_bsd_set_countermeasures: enabled=0
 iwm0: RSN: flushing PMKID list in the driver
 iwm0: Setting scan request: 0.100000 sec
 ENGINE: Loading dynamic engine
 ENGINE: Loading dynamic engine
 EAPOL: SUPP_PAE entering state DISCONNECTED
 EAPOL: Supplicant port status: Unauthorized
 EAPOL: KEY_RX entering state NO_KEY_RECEIVE
 EAPOL: SUPP_BE entering state INITIALIZE
 EAP: EAP entering state DISABLED
 ctrl_interface_group=0 (from group name 'wheel')
 iwm0: Added interface iwm0
 iwm0: State: DISCONNECTED -> DISCONNECTED
 iwm0: State: DISCONNECTED -> SCANNING
 iwm0: Starting AP scan for wildcard SSID
 iwm0: Add radio work 'scan'@0x7d42cc9f2140
 iwm0: First radio work item in the queue - schedule start immediately
 iwm0: Starting radio work 'scan'@0x7d42cc9f2140 after 0.000006 second wait
 wpa_driver_bsd_set_wpa: enabled=1
 wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
 EAPOL: disable timer tick
 iwm0: Event SCAN_RESULTS (3) received
 Received 520 bytes of scan results (6 BSSes)
 iwm0: BSS: Start scan result update 1
 iwm0: BSS: Add new id 0 BSSID a4:12:42:67:d4:32 SSID 'SWEETS3' freq 2457
 iwm0: BSS: Add new id 1 BSSID 10:6f:3f:28:dc:d5 SSID '' freq 5200
 iwm0: BSS: Add new id 2 BSSID 10:6f:3f:28:dc:d4 SSID 'SWEETS2' freq 2417
 iwm0: BSS: Add new id 3 BSSID bc:6e:64:88:25:0b SSID 'xterm' freq 2417
 iwm0: BSS: Add new id 4 BSSID b6:12:42:67:d4:32 SSID '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' freq 2452
 iwm0: BSS: Add new id 5 BSSID 00:00:00:00:00:00 SSID '' freq 5200
 BSS: last_scan_res_used=6/32
 iwm0: New scan results available (own=0 ext=0)
 iwm0: Radio work 'scan'@0x7d42cc9f2140 done in 5.542282 seconds
 iwm0: radio_work_free('scan'@0x7d42cc9f2140: num_active_works --> 0
 iwm0: Selecting BSS from priority group 0
 iwm0: 0: a4:12:42:67:d4:32 ssid='SWEETS3' wpa_ie_len=22 rsn_ie_len=0 caps=0x31 level=83 freq=2457
 iwm0:    skip - SSID mismatch
 iwm0: 1: 10:6f:3f:28:dc:d5 ssid='' wpa_ie_len=26 rsn_ie_len=0 caps=0x11 level=71 freq=5200
 iwm0:    skip - SSID not known
 iwm0: 2: 10:6f:3f:28:dc:d4 ssid='SWEETS2' wpa_ie_len=26 rsn_ie_len=0 caps=0x31 level=47 freq=2417
 iwm0:    skip - SSID mismatch
 iwm0: 3: bc:6e:64:88:25:0b ssid='xterm' wpa_ie_len=0 rsn_ie_len=20 caps=0x31 level=29 freq=2417
 iwm0:    selected based on RSN IE
 iwm0:    selected BSS bc:6e:64:88:25:0b ssid='xterm'
 iwm0: Considering connect request: reassociate: 0  selected: bc:6e:64:88:25:0b  bssid: 00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING  ssid=0x7d42cc919800  current_ssid=0x0
 iwm0: Request association with bc:6e:64:88:25:0b
 iwm0: Add radio work 'connect'@0x7d42cc9f2140
 iwm0: First radio work item in the queue - schedule start immediately
 iwm0: Starting radio work 'connect'@0x7d42cc9f2140 after 0.000014 second wait
 iwm0: Trying to associate with bc:6e:64:88:25:0b (SSID='xterm' freq=2417 MHz)
 iwm0: Cancelling scan request
 iwm0: WPA: clearing own WPA/RSN IE
 iwm0: Automatic auth_alg selection: 0x1
 RSN: PMKSA cache search - network_ctx=0x7d42cc919800 try_opportunistic=0
 RSN: Search for BSSID bc:6e:64:88:25:0b
 RSN: No PMKSA cache entry found
 iwm0: RSN: using IEEE 802.11i/D9.0
 iwm0: WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
 iwm0: WPA: clearing AP WPA IE
 WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
 iwm0: WPA: using GTK CCMP
 iwm0: WPA: using PTK CCMP
 iwm0: WPA: using KEY_MGMT WPA-PSK
 WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 iwm0: State: SCANNING -> ASSOCIATING
 Limit connection to BSSID bc:6e:64:88:25:0b freq=2417 MHz based on scan results (bssid_set=0)
 wpa_driver_bsd_associate: ssid 'xterm' wpa ie len 22 pairwise 16 group 16 key mgmt 2
 wpa_driver_bsd_set_drop_unencrypted: enabled=1
 wpa_driver_bsd_associate: set PRIVACY 1
 iwm0: Setting authentication timeout: 10 sec 0 usec
 EAPOL: External notification - EAP success=0
 EAPOL: External notification - EAP fail=0
 EAPOL: External notification - portControl=Auto
 iwm0: Event ASSOC (0) received
 iwm0: State: ASSOCIATING -> ASSOCIATED
 iwm0: Associated to a new BSS: BSSID=bc:6e:64:88:25:0b
 iwm0: Associated with bc:6e:64:88:25:0b
 iwm0: WPA: Association event - clear replay counter
 iwm0: WPA: Clear old PTK
 EAPOL: External notification - portEnabled=0
 EAPOL: External notification - portValid=0
 EAPOL: External notification - EAP success=0
 EAPOL: External notification - portEnabled=1
 EAPOL: SUPP_PAE entering state CONNECTING
 EAPOL: enable timer tick
 EAPOL: SUPP_BE entering state IDLE
 iwm0: Setting authentication timeout: 10 sec 0 usec
 iwm0: Cancelling scan request
 iwm0: RX EAPOL from bc:6e:64:88:25:0b
 RX EAPOL - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 01 e4 7d 28 dc b9 f9 88 01 2d fc e0 e0 20 4b 86 74 da 82 fd c4 21 a3 2d 54 aa 85 d5 0d 3c 30 67 8a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: Setting authentication timeout: 10 sec 0 usec
 iwm0: IEEE 802.1X RX: version=2 type=3 length=95
 WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 01 e4 7d 28 dc b9 f9 88 01 2d fc e0 e0 20 4b 86 74 da 82 fd c4 21 a3 2d 54 aa 85 d5 0d 3c 30 67 8a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0:   EAPOL-Key type=2
 iwm0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
 iwm0:   key_length=16 key_data_length=0
   replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 01
   key_nonce - hexdump(len=32): e4 7d 28 dc b9 f9 88 01 2d fc e0 e0 20 4b 86 74 da 82 fd c4 21 a3 2d 54 aa 85 d5 0d 3c 30 67 8a
   key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
   key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: State: ASSOCIATED -> 4WAY_HANDSHAKE
 iwm0: WPA: RX message 1 of 4-Way Handshake from bc:6e:64:88:25:0b (ver=2)
 RSN: msg 1/4 key data - hexdump(len=0):
 Get randomness: len=32 entropy=7
 WPA: Renewed SNonce - hexdump(len=32): 01 fb 3b 43 e1 15 58 7d 50 da 77 b4 2c 33 d3 8d 79 4c 4f 5d 2c 33 cd c1 ec 53 7e 39 af a6 ce 43
 WPA: PTK derivation - A1=5c:e0:c5:a8:88:ab A2=bc:6e:64:88:25:0b
 WPA: Nonce1 - hexdump(len=32): 01 fb 3b 43 e1 15 58 7d 50 da 77 b4 2c 33 d3 8d 79 4c 4f 5d 2c 33 cd c1 ec 53 7e 39 af a6 ce 43
 WPA: Nonce2 - hexdump(len=32): e4 7d 28 dc b9 f9 88 01 2d fc e0 e0 20 4b 86 74 da 82 fd c4 21 a3 2d 54 aa 85 d5 0d 3c 30 67 8a
 WPA: PMK - hexdump(len=32): [REMOVED]
 WPA: PTK - hexdump(len=48): [REMOVED]
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: KEK - hexdump(len=16): [REMOVED]
 WPA: TK - hexdump(len=16): [REMOVED]
 WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
 iwm0: WPA: Sending EAPOL-Key 2/4
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: Derived Key MIC - hexdump(len=16): e2 71 b3 25 30 1d 0b cd dd 54 76 d5 6a 69 8d f9
 WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00 00 00 00 00 00 01 01 fb 3b 43 e1 15 58 7d 50 da 77 b4 2c 33 d3 8d 79 4c 4f 5d 2c 33 cd c1 ec 53 7e 39 af a6 ce 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e2 71 b3 25 30 1d 0b cd dd 54 76 d5 6a 69 8d f9 00 16 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 iwm0: Event DISASSOC (1) received
 iwm0: Disassociation notification
 iwm0: CTRL-EVENT-DISCONNECTED bssid=bc:6e:64:88:25:0b reason=0
 iwm0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
 iwm0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="xterm" auth_failures=1 duration=10 reason=WRONG_KEY
 iwm0: Auto connect enabled: try to reconnect (wps=0/0 wpa_state=7)
 iwm0: Setting scan request: 0.100000 sec
 iwm0: Radio work 'connect'@0x7d42cc9f2140 done in 1.149477 seconds
 iwm0: radio_work_free('connect'@0x7d42cc9f2140: num_active_works --> 0
 Added BSSID bc:6e:64:88:25:0b into blacklist
 iwm0: Blacklist count 1 --> request scan in 100 ms
 iwm0: Ignore new scan request for 0.100000 sec since an earlier request is scheduled to trigger sooner
 iwm0: WPA: Clear old PMK and PTK
 iwm0: Disconnect event - remove keys
 iwm0: State: 4WAY_HANDSHAKE -> DISCONNECTED
 EAPOL: External notification - portEnabled=0
 EAPOL: SUPP_PAE entering state DISCONNECTED
 EAPOL: Supplicant port status: Unauthorized
 EAPOL: SUPP_BE entering state INITIALIZE
 EAPOL: External notification - portValid=0
 EAPOL: External notification - EAP success=0
 iwm0: State: DISCONNECTED -> SCANNING
 iwm0: Starting AP scan for wildcard SSID
 iwm0: Add radio work 'scan'@0x7d42cc9f2140
 iwm0: First radio work item in the queue - schedule start immediately
 iwm0: Starting radio work 'scan'@0x7d42cc9f2140 after 0.000004 second wait
 wpa_driver_bsd_set_wpa: enabled=1
 wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
 EAPOL: startWhen --> 0
 EAPOL: disable timer tick
 iwm0: Event SCAN_RESULTS (3) received
 Received 520 bytes of scan results (6 BSSes)
 iwm0: BSS: Start scan result update 2
 BSS: a4:12:42:67:d4:32 changed freq 2457 --> 2452
 BSS: b6:12:42:67:d4:32 changed freq 2452 --> 2457
 BSS: last_scan_res_used=6/32
 iwm0: New scan results available (own=0 ext=0)
 iwm0: Radio work 'scan'@0x7d42cc9f2140 done in 5.535155 seconds
 iwm0: radio_work_free('scan'@0x7d42cc9f2140: num_active_works --> 0
 iwm0: Postpone network selection by 4 seconds since all networks are disabled
 iwm0: Try to associate due to network getting re-enabled
 iwm0: CTRL-EVENT-SSID-REENABLED id=0 ssid="xterm"
 iwm0: Selecting BSS from priority group 0
 iwm0: 0: a4:12:42:67:d4:32 ssid='SWEETS3' wpa_ie_len=22 rsn_ie_len=0 caps=0x31 level=83 freq=2452
 iwm0:    skip - SSID mismatch
 iwm0: 1: 10:6f:3f:28:dc:d5 ssid='' wpa_ie_len=26 rsn_ie_len=0 caps=0x11 level=70 freq=5200
 iwm0:    skip - SSID not known
 iwm0: 2: 10:6f:3f:28:dc:d4 ssid='SWEETS2' wpa_ie_len=26 rsn_ie_len=0 caps=0x31 level=51 freq=2417
 iwm0:    skip - SSID mismatch
 iwm0: 3: bc:6e:64:88:25:0b ssid='xterm' wpa_ie_len=0 rsn_ie_len=20 caps=0x31 level=28 freq=2417
 iwm0:    skip - blacklisted (count=1 limit=0)
 iwm0: 4: b6:12:42:67:d4:32 ssid='\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' wpa_ie_len=0 rsn_ie_len=0 caps=0x31 level=84 freq=2457
 iwm0:    skip - SSID mismatch
 iwm0: 5: 00:00:00:00:00:00 ssid='' wpa_ie_len=0 rsn_ie_len=0 caps=0x0 level=0 freq=5200
 iwm0:    skip - SSID not known
 iwm0: No APs found - clear blacklist and try again
 Removed BSSID bc:6e:64:88:25:0b from blacklist (clear)
 iwm0: Selecting BSS from priority group 0
 iwm0: 0: a4:12:42:67:d4:32 ssid='SWEETS3' wpa_ie_len=22 rsn_ie_len=0 caps=0x31 level=83 freq=2452
 iwm0:    skip - SSID mismatch
 iwm0: 1: 10:6f:3f:28:dc:d5 ssid='' wpa_ie_len=26 rsn_ie_len=0 caps=0x11 level=70 freq=5200
 iwm0:    skip - SSID not known
 iwm0: 2: 10:6f:3f:28:dc:d4 ssid='SWEETS2' wpa_ie_len=26 rsn_ie_len=0 caps=0x31 level=51 freq=2417
 iwm0:    skip - SSID mismatch
 iwm0: 3: bc:6e:64:88:25:0b ssid='xterm' wpa_ie_len=0 rsn_ie_len=20 caps=0x31 level=28 freq=2417
 iwm0:    selected based on RSN IE
 iwm0:    selected BSS bc:6e:64:88:25:0b ssid='xterm'
 iwm0: Considering connect request: reassociate: 0  selected: bc:6e:64:88:25:0b  bssid: 00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING  ssid=0x7d42cc919800  current_ssid=0x0
 iwm0: Request association with bc:6e:64:88:25:0b
 iwm0: Re-association to the same ESS
 iwm0: Add radio work 'connect'@0x7d42cc9f2140
 iwm0: First radio work item in the queue - schedule start immediately
 iwm0: Starting radio work 'connect'@0x7d42cc9f2140 after 0.000007 second wait
 iwm0: Trying to associate with bc:6e:64:88:25:0b (SSID='xterm' freq=2417 MHz)
 iwm0: Cancelling scan request
 iwm0: WPA: clearing own WPA/RSN IE
 iwm0: Automatic auth_alg selection: 0x1
 RSN: PMKSA cache search - network_ctx=0x7d42cc919800 try_opportunistic=0
 RSN: Search for BSSID bc:6e:64:88:25:0b
 RSN: No PMKSA cache entry found
 iwm0: RSN: using IEEE 802.11i/D9.0
 iwm0: WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
 iwm0: WPA: clearing AP WPA IE
 WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 0c 00
 iwm0: WPA: using GTK CCMP
 iwm0: WPA: using PTK CCMP
 iwm0: WPA: using KEY_MGMT WPA-PSK
 WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 iwm0: State: SCANNING -> ASSOCIATING
 Limit connection to BSSID bc:6e:64:88:25:0b freq=2417 MHz based on scan results (bssid_set=0)
 wpa_driver_bsd_associate: ssid 'xterm' wpa ie len 22 pairwise 16 group 16 key mgmt 2
 wpa_driver_bsd_set_drop_unencrypted: enabled=1
 wpa_driver_bsd_associate: set PRIVACY 1
 iwm0: Setting authentication timeout: 10 sec 0 usec
 EAPOL: External notification - EAP success=0
 EAPOL: External notification - EAP fail=0
 EAPOL: External notification - portControl=Auto
 iwm0: Event ASSOC (0) received
 iwm0: State: ASSOCIATING -> ASSOCIATED
 iwm0: Associated to a new BSS: BSSID=bc:6e:64:88:25:0b
 iwm0: Associated with bc:6e:64:88:25:0b
 iwm0: WPA: Association event - clear replay counter
 iwm0: WPA: Clear old PTK
 EAPOL: External notification - portEnabled=0
 EAPOL: External notification - portValid=0
 EAPOL: External notification - EAP success=0
 EAPOL: External notification - portEnabled=1
 EAPOL: SUPP_PAE entering state CONNECTING
 EAPOL: enable timer tick
 EAPOL: SUPP_BE entering state IDLE
 iwm0: Setting authentication timeout: 10 sec 0 usec
 iwm0: Cancelling scan request
 iwm0: RX EAPOL from bc:6e:64:88:25:0b
 RX EAPOL - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 01 2e c8 a3 8c 60 5a df ac bc 47 ea ba fc 6a 77 a1 a2 0e 99 01 d3 c4 40 6b de b0 91 b4 53 00 97 93 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: Setting authentication timeout: 10 sec 0 usec
 iwm0: IEEE 802.1X RX: version=2 type=3 length=95
 WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 01 2e c8 a3 8c 60 5a df ac bc 47 ea ba fc 6a 77 a1 a2 0e 99 01 d3 c4 40 6b de b0 91 b4 53 00 97 93 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0:   EAPOL-Key type=2
 iwm0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
 iwm0:   key_length=16 key_data_length=0
   replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 01
   key_nonce - hexdump(len=32): 2e c8 a3 8c 60 5a df ac bc 47 ea ba fc 6a 77 a1 a2 0e 99 01 d3 c4 40 6b de b0 91 b4 53 00 97 93
   key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
   key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: State: ASSOCIATED -> 4WAY_HANDSHAKE
 iwm0: WPA: RX message 1 of 4-Way Handshake from bc:6e:64:88:25:0b (ver=2)
 RSN: msg 1/4 key data - hexdump(len=0):
 Get randomness: len=32 entropy=7
 WPA: Renewed SNonce - hexdump(len=32): 9f e1 10 2d 8a cf 9b 55 10 ca 82 52 ad 93 b3 3f 8c 39 dc b2 ee 55 d3 af 59 e8 ae f3 d7 a9 4a 66
 WPA: PTK derivation - A1=5c:e0:c5:a8:88:ab A2=bc:6e:64:88:25:0b
 WPA: Nonce1 - hexdump(len=32): 9f e1 10 2d 8a cf 9b 55 10 ca 82 52 ad 93 b3 3f 8c 39 dc b2 ee 55 d3 af 59 e8 ae f3 d7 a9 4a 66
 WPA: Nonce2 - hexdump(len=32): 2e c8 a3 8c 60 5a df ac bc 47 ea ba fc 6a 77 a1 a2 0e 99 01 d3 c4 40 6b de b0 91 b4 53 00 97 93
 WPA: PMK - hexdump(len=32): [REMOVED]
 WPA: PTK - hexdump(len=48): [REMOVED]
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: KEK - hexdump(len=16): [REMOVED]
 WPA: TK - hexdump(len=16): [REMOVED]
 WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
 iwm0: WPA: Sending EAPOL-Key 2/4
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: Derived Key MIC - hexdump(len=16): 79 11 27 d2 5f 50 38 04 8c e4 49 ea e0 a2 7c c5
 WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00 00 00 00 00 00 01 9f e1 10 2d 8a cf 9b 55 10 ca 82 52 ad 93 b3 3f 8c 39 dc b2 ee 55 d3 af 59 e8 ae f3 d7 a9 4a 66 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 79 11 27 d2 5f 50 38 04 8c e4 49 ea e0 a2 7c c5 00 16 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 iwm0: RX EAPOL from bc:6e:64:88:25:0b
 RX EAPOL - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 02 2e c8 a3 8c 60 5a df ac bc 47 ea ba fc 6a 77 a1 a2 0e 99 01 d3 c4 40 6b de b0 91 b4 53 00 97 93 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: IEEE 802.1X RX: version=2 type=3 length=95
 WPA: RX EAPOL-Key - hexdump(len=99): 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 02 2e c8 a3 8c 60 5a df ac bc 47 ea ba fc 6a 77 a1 a2 0e 99 01 d3 c4 40 6b de b0 91 b4 53 00 97 93 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0:   EAPOL-Key type=2
 iwm0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
 iwm0:   key_length=16 key_data_length=0
   replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 02
   key_nonce - hexdump(len=32): 2e c8 a3 8c 60 5a df ac bc 47 ea ba fc 6a 77 a1 a2 0e 99 01 d3 c4 40 6b de b0 91 b4 53 00 97 93
   key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
   key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
   key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 iwm0: State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
 iwm0: WPA: RX message 1 of 4-Way Handshake from bc:6e:64:88:25:0b (ver=2)
 RSN: msg 1/4 key data - hexdump(len=0):
 WPA: PTK derivation - A1=5c:e0:c5:a8:88:ab A2=bc:6e:64:88:25:0b
 WPA: Nonce1 - hexdump(len=32): 9f e1 10 2d 8a cf 9b 55 10 ca 82 52 ad 93 b3 3f 8c 39 dc b2 ee 55 d3 af 59 e8 ae f3 d7 a9 4a 66
 WPA: Nonce2 - hexdump(len=32): 2e c8 a3 8c 60 5a df ac bc 47 ea ba fc 6a 77 a1 a2 0e 99 01 d3 c4 40 6b de b0 91 b4 53 00 97 93
 WPA: PMK - hexdump(len=32): [REMOVED]
 WPA: PTK - hexdump(len=48): [REMOVED]
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: KEK - hexdump(len=16): [REMOVED]
 WPA: TK - hexdump(len=16): [REMOVED]
 WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 02
 iwm0: WPA: Sending EAPOL-Key 2/4
 WPA: KCK - hexdump(len=16): [REMOVED]
 WPA: Derived Key MIC - hexdump(len=16): 61 9d 96 62 a9 3b 2f c5 29 1d 92 9d c0 17 b8 b5
 WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00 00 00 00 00 00 02 9f e1 10 2d 8a cf 9b 55 10 ca 82 52 ad 93 b3 3f 8c 39 dc b2 ee 55 d3 af 59 e8 ae f3 d7 a9 4a 66 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 61 9d 96 62 a9 3b 2f c5 29 1d 92 9d c0 17 b8 b5 00 16 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 iwm0: Event DISASSOC (1) received
 iwm0: Disassociation notification
 iwm0: CTRL-EVENT-DISCONNECTED bssid=bc:6e:64:88:25:0b reason=0
 iwm0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
 iwm0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="xterm" auth_failures=2 duration=20 reason=WRONG_KEY
 iwm0: Auto connect enabled: try to reconnect (wps=0/0 wpa_state=7)
 iwm0: Setting scan request: 0.100000 sec
 iwm0: Radio work 'connect'@0x7d42cc9f2140 done in 1.159002 seconds
 iwm0: radio_work_free('connect'@0x7d42cc9f2140: num_active_works --> 0
 Added BSSID bc:6e:64:88:25:0b into blacklist
 iwm0: Blacklist count 2 --> request scan in 500 ms
 iwm0: Ignore new scan request for 0.500000 sec since an earlier request is scheduled to trigger sooner
 iwm0: WPA: Clear old PMK and PTK
 iwm0: Disconnect event - remove keys
 iwm0: State: 4WAY_HANDSHAKE -> DISCONNECTED
 EAPOL: External notification - portEnabled=0
 EAPOL: SUPP_PAE entering state DISCONNECTED
 EAPOL: Supplicant port status: Unauthorized
 EAPOL: SUPP_BE entering state INITIALIZE
 EAPOL: External notification - portValid=0
 EAPOL: External notification - EAP success=0
 iwm0: State: DISCONNECTED -> SCANNING
 iwm0: Starting AP scan for wildcard SSID
 iwm0: Add radio work 'scan'@0x7d42cc9f2140
 iwm0: First radio work item in the queue - schedule start immediately
 iwm0: Starting radio work 'scan'@0x7d42cc9f2140 after 0.000025 second wait
 wpa_driver_bsd_set_wpa: enabled=1
 wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
 EAPOL: startWhen --> 0
 EAPOL: disable timer tick
 ^Ciwm0: Removing interface iwm0
 iwm0: Request to deauthenticate - bssid=00:00:00:00:00:00 pending_bssid=00:00:00:00:00:00 reason=3 state=SCANNING
 iwm0: State: SCANNING -> DISCONNECTED
 EAPOL: External notification - portEnabled=0
 EAPOL: External notification - portValid=0
 wpa_driver_bsd_set_countermeasures: enabled=0
 iwm0: WPA: Clear old PMK and PTK
 Removed BSSID bc:6e:64:88:25:0b from blacklist (clear)
 iwm0: BSS: Remove id 0 BSSID a4:12:42:67:d4:32 SSID 'SWEETS3' due to wpa_bss_flush
 iwm0: BSS: Remove id 1 BSSID 10:6f:3f:28:dc:d5 SSID '' due to wpa_bss_flush
 iwm0: BSS: Remove id 2 BSSID 10:6f:3f:28:dc:d4 SSID 'SWEETS2' due to wpa_bss_flush
 iwm0: BSS: Remove id 3 BSSID bc:6e:64:88:25:0b SSID 'xterm' due to wpa_bss_flush
 iwm0: BSS: Remove id 4 BSSID b6:12:42:67:d4:32 SSID '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' due to wpa_bss_flush
 iwm0: BSS: Remove id 5 BSSID 00:00:00:00:00:00 SSID '' due to wpa_bss_flush
 iwm0: Cancelling scan request
 iwm0: Cancelling authentication timeout
 Remove interface iwm0 from radio
 iwm0: Remove radio work 'scan'@0x7d42cc9f2140 (started)
 iwm0: radio_work_free('scan'@0x7d42cc9f2140: num_active_works --> 0
 Remove radio
 wpa_driver_bsd_set_wpa: enabled=0
 wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0
 wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0
 iwm0: CTRL-EVENT-TERMINATING

 > Regards,
 > -- 
 > Kimihiro Nonaka

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Kimihiro Nonaka <nonakap@gmail.com>
To: Ryo ONODERA <ryo_on@yk.rim.or.jp>
Cc: "gnats-bugs@netbsd.org" <gnats-bugs@netbsd.org>
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Fri, 20 Jan 2017 10:14:24 +0900

 2017-01-19 22:54 GMT+09:00 Ryo ONODERA <ryo_on@yk.rim.or.jp>:

 > iwm0: WPA: Sending EAPOL-Key 2/4
 > WPA: KCK - hexdump(len=3D16): [REMOVED]
 > WPA: Derived Key MIC - hexdump(len=3D16): 4d 3f e3 45 32 f8 ab 44 58 5e 3=
 6 36 41 7a 40 32
 > WPA: TX EAPOL-Key - hexdump(len=3D121): 01 03 00 75 02 01 0a 00 00 00 00 =
 00 00 00 00 00 02 c9 b2 67 45 ac 40 2e 21 77 db 84 20 ad 87 14 fe 18 11 4a =
 b7 f9 93 62 fd 3c 23 60 c8 c0 ae 14 2f 00 00 00 00 00 00 00 00 00 00 00 00 =
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4d 3f e3 45 32 =
 f8 ab 44 58 5e 36 36 41 7a 40 32 00 16 30 14 01 00 00 0f ac 04 01 00 00 0f =
 ac 04 01 00 00 0f ac 02 00 00
 > iwm0: Event DISASSOC (1) received
 > iwm0: Disassociation notification
 > iwm0: CTRL-EVENT-DISCONNECTED bssid=3Dbc:6e:64:88:25:0b reason=3D0
 > iwm0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
 > iwm0: CTRL-EVENT-SSID-TEMP-DISABLED id=3D0 ssid=3D"xterm" auth_failures=
 =3D1 duration=3D10 reason=3DWRONG_KEY

 It seems to me that you are using the wrong passphrase.
 Please check the passphrase for Android AP and NetBSD.

 Regards,
 --=20
 Kimihiro Nonaka

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: nonakap@gmail.com
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Fri, 20 Jan 2017 10:46:55 +0900 (JST)

 Hi,

 From: Kimihiro Nonaka <nonakap@gmail.com>, Date: Fri, 20 Jan 2017 10:14:24 +0900

 > 2017-01-19 22:54 GMT+09:00 Ryo ONODERA <ryo_on@yk.rim.or.jp>:
 > 
 >> iwm0: WPA: Sending EAPOL-Key 2/4
 >> WPA: KCK - hexdump(len=16): [REMOVED]
 >> WPA: Derived Key MIC - hexdump(len=16): 4d 3f e3 45 32 f8 ab 44 58 5e 36 36 41 7a 40 32
 >> WPA: TX EAPOL-Key - hexdump(len=121): 01 03 00 75 02 01 0a 00 00 00 00 00 00 00 00 00 02 c9 b2 67 45 ac 40 2e 21 77 db 84 20 ad 87 14 fe 18 11 4a b7 f9 93 62 fd 3c 23 60 c8 c0 ae 14 2f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4d 3f e3 45 32 f8 ab 44 58 5e 36 36 41 7a 40 32 00 16 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
 >> iwm0: Event DISASSOC (1) received
 >> iwm0: Disassociation notification
 >> iwm0: CTRL-EVENT-DISCONNECTED bssid=bc:6e:64:88:25:0b reason=0
 >> iwm0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
 >> iwm0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="xterm" auth_failures=1 duration=10 reason=WRONG_KEY
 > 
 > It seems to me that you are using the wrong passphrase.
 > Please check the passphrase for Android AP and NetBSD.

 With run(4) device, Planex GW-US300MiniS, same config file works fine.

 $ sudo wpa_supplicant -dd -i run0 -c /opt/share/wpa_supplicant-xperia.conf

 I believe that my passphrase in config file is correct.

 Thank you.

 > Regards,
 > -- 
 > Kimihiro Nonaka

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: Kimihiro Nonaka <nonakap@gmail.com>
To: Ryo ONODERA <ryo_on@yk.rim.or.jp>
Cc: "gnats-bugs@netbsd.org" <gnats-bugs@netbsd.org>
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Fri, 20 Jan 2017 18:40:04 +0900

 --001a1149cdae4739d10546836f4b
 Content-Type: text/plain; charset=UTF-8

 2017-01-20 10:46 GMT+09:00 Ryo ONODERA <ryo_on@yk.rim.or.jp>:

 > With run(4) device, Planex GW-US300MiniS, same config file works fine.
 >
 > $ sudo wpa_supplicant -dd -i run0 -c /opt/share/wpa_supplicant-xperia.conf
 >
 > I believe that my passphrase in config file is correct.

 Hmm.

 Could you try the attached patch.

 Regards,
 -- 
 Kimihiro Nonaka

 --001a1149cdae4739d10546836f4b
 Content-Type: text/plain; charset=US-ASCII; name="if_iwm.c.diff"
 Content-Disposition: attachment; filename="if_iwm.c.diff"
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_iy5m6nwr0

 ZGlmZiAtLWdpdCBhL3N5cy9kZXYvcGNpL2lmX2l3bS5jIGIvc3lzL2Rldi9wY2kvaWZfaXdtLmMK
 aW5kZXggZTI4OWJlYzQ2MjguLjE3YjlhZDMwODkxIDEwMDY0NAotLS0gYS9zeXMvZGV2L3BjaS9p
 Zl9pd20uYworKysgYi9zeXMvZGV2L3BjaS9pZl9pd20uYwpAQCAtMTI1LDcgKzEyNSw3IEBAIF9f
 S0VSTkVMX1JDU0lEKDAsICIkTmV0QlNEOiBpZl9pd20uYyx2IDEuNjUgMjAxNy8wMS8xOSAxMToy
 NDowNSBub25ha2EgRXhwICQiKTsKICNpbmNsdWRlIDxzeXMvYnVzLmg+CiAjaW5jbHVkZSA8c3lz
 L3dvcmtxdWV1ZS5oPgogI2luY2x1ZGUgPG1hY2hpbmUvZW5kaWFuLmg+Ci0jaW5jbHVkZSA8bWFj
 aGluZS9pbnRyLmg+CisjaW5jbHVkZSA8c3lzL2ludHIuaD4KIAogI2luY2x1ZGUgPGRldi9wY2kv
 cGNpcmVnLmg+CiAjaW5jbHVkZSA8ZGV2L3BjaS9wY2l2YXIuaD4KQEAgLTEwMzIsNyArMTAzMiw3
 IEBAIGl3bV9uaWNfbG9jayhzdHJ1Y3QgaXdtX3NvZnRjICpzYykKIAkgICAgIHwgSVdNX0NTUl9H
 UF9DTlRSTF9SRUdfRkxBR19HT0lOR19UT19TTEVFUCwgMTUwMDApKSB7CiAJCXJ2ID0gMTsKIAl9
 IGVsc2UgewotCQlhcHJpbnRfZXJyb3JfZGV2KHNjLT5zY19kZXYsICJyZXNldHRpbmcgZGV2aWNl
 IHZpYSBOTUlcbiIpOworCQlEUFJJTlRGKCgiJXM6IHJlc2V0dGluZyBkZXZpY2UgdmlhIE5NSVxu
 IiwgREVWTkFNRShzYykpKTsKIAkJSVdNX1dSSVRFKHNjLCBJV01fQ1NSX1JFU0VULCBJV01fQ1NS
 X1JFU0VUX1JFR19GTEFHX0ZPUkNFX05NSSk7CiAJfQogCkBAIC0zOTk4LDcgKzM5OTgsNyBAQCBp
 d21fc2VuZF9jbWQoc3RydWN0IGl3bV9zb2Z0YyAqc2MsIHN0cnVjdCBpd21faG9zdF9jbWQgKmhj
 bWQpCiAKIAlpZiAoIWFzeW5jKSB7CiAJCWludCBnZW5lcmF0aW9uID0gc2MtPnNjX2dlbmVyYXRp
 b247Ci0JCWVyciA9IHRzbGVlcChkZXNjLCBQQ0FUQ0gsICJpd21jbWQiLCBtc3RvaHooMTAwMCkp
 OworCQllcnIgPSB0c2xlZXAoZGVzYywgUENBVENILCAiaXdtY21kIiwgbXN0b2h6KDIwMDApKTsK
 IAkJaWYgKGVyciA9PSAwKSB7CiAJCQkvKiBpZiBoYXJkd2FyZSBpcyBubyBsb25nZXIgdXAsIHJl
 dHVybiBlcnJvciAqLwogCQkJaWYgKGdlbmVyYXRpb24gIT0gc2MtPnNjX2dlbmVyYXRpb24pIHsK
 QEAgLTU0ODksNiArNTQ4OSw3IEBAIGl3bV9yeF9taXNzZWRfYmVhY29uc19ub3RpZihzdHJ1Y3Qg
 aXdtX3NvZnRjICpzYywKIAlzdHJ1Y3QgaXdtX3J4X3BhY2tldCAqcGt0LCBzdHJ1Y3QgaXdtX3J4
 X2RhdGEgKmRhdGEpCiB7CiAJc3RydWN0IGl3bV9taXNzZWRfYmVhY29uc19ub3RpZiAqbWIgPSAo
 dm9pZCAqKXBrdC0+ZGF0YTsKKwlpbnQgczsKIAogCURQUklOVEYoKCJtaXNzZWQgYmNuIG1hY19p
 ZD0ldSwgY29uc2VjdXRpdmU9JXUgKCV1LCAldSwgJXUpXG4iLAogCSAgICBsZTMydG9oKG1iLT5t
 YWNfaWQpLApAQCAtNTUwMiw4ICs1NTAzLDExIEBAIGl3bV9yeF9taXNzZWRfYmVhY29uc19ub3Rp
 ZihzdHJ1Y3QgaXdtX3NvZnRjICpzYywKIAkgKiBhbmQvb3IgaW4gY2FzZSBvZiBhIENTIGZsb3cg
 b24gb25lIG9mIHRoZSBvdGhlciBBUCB2aWZzLgogCSAqLwogCWlmIChsZTMydG9oKG1iLT5jb25z
 ZWNfbWlzc2VkX2JlYWNvbnNfc2luY2VfbGFzdF9yeCkgPgotCSAgICBJV01fTUlTU0VEX0JFQUNP
 TlNfVEhSRVNIT0xEKQorCSAgICBJV01fTUlTU0VEX0JFQUNPTlNfVEhSRVNIT0xEKSB7CisJCXMg
 PSBzcGxuZXQoKTsKIAkJaWVlZTgwMjExX2JlYWNvbl9taXNzKCZzYy0+c2NfaWMpOworCQlzcGx4
 KHMpOworCX0KIH0KIAogc3RhdGljIGludApAQCAtNTgzOSw2ICs1ODQzLDkgQEAgaXdtX21lZGlh
 X2NoYW5nZShzdHJ1Y3QgaWZuZXQgKmlmcCkKIAlyZXR1cm4gZXJyOwogfQogCisvKgorICogaXdt
 KDQpIG5ld3N0YXRlIHJvdXRpbmUgY2FuJ3QgcnVuIG9uIGludGVycnVwdCBvciBzb2Z0aW50IGNv
 bnRleHQKKyAqLwogc3RhdGljIGludAogaXdtX2RvX25ld3N0YXRlKHN0cnVjdCBpZWVlODAyMTFj
 b20gKmljLCBlbnVtIGllZWU4MDIxMV9zdGF0ZSBuc3RhdGUsIGludCBhcmcpCiB7CkBAIC01ODYw
 LDIzICs1ODY3LDIyIEBAIGl3bV9kb19uZXdzdGF0ZShzdHJ1Y3QgaWVlZTgwMjExY29tICppYywg
 ZW51bSBpZWVlODAyMTFfc3RhdGUgbnN0YXRlLCBpbnQgYXJnKQogCS8qIFJlc2V0IHRoZSBkZXZp
 Y2UgaWYgbW92aW5nIG91dCBvZiBBVVRILCBBU1NPQywgb3IgUlVOLiAqLwogCS8qIFhYWCBJcyB0
 aGVyZSBhIHdheSB0byBzd2l0Y2ggc3RhdGVzIHdpdGhvdXQgYSBmdWxsIHJlc2V0PyAqLwogCWlm
 IChvc3RhdGUgPiBJRUVFODAyMTFfU19TQ0FOICYmIG5zdGF0ZSA8IG9zdGF0ZSkgewotCQlpd21f
 c3RvcF9kZXZpY2Uoc2MpOwotCQlpd21faW5pdF9odyhzYyk7Ci0KIAkJLyoKIAkJICogVXBvbiBy
 ZWNlaXZpbmcgYSBkZWF1dGggZnJhbWUgZnJvbSBBUCB0aGUgbmV0ODAyMTEgc3RhY2sKIAkJICog
 cHV0cyB0aGUgZHJpdmVyIGludG8gQVVUSCBzdGF0ZS4gVGhpcyB3aWxsIGZhaWwgd2l0aCB0aGlz
 CiAJCSAqIGRyaXZlciBzbyBicmluZyB0aGUgRlNNIGZyb20gUlVOIHRvIFNDQU4gaW4gdGhpcyBj
 YXNlLgogCQkgKi8KLQkJaWYgKG5zdGF0ZSA9PSBJRUVFODAyMTFfU19TQ0FOIHx8Ci0JCSAgICBu
 c3RhdGUgPT0gSUVFRTgwMjExX1NfQVVUSCB8fAotCQkgICAgbnN0YXRlID09IElFRUU4MDIxMV9T
 X0FTU09DKSB7CisJCWlmIChuc3RhdGUgIT0gSUVFRTgwMjExX1NfSU5JVCkgewogCQkJRFBSSU5U
 RigoIkZvcmNlIHRyYW5zaXRpb24gdG8gSU5JVDsgTUdUPSVkXG4iLCBhcmcpKTsKIAkJCS8qIEFs
 d2F5cyBwYXNzIGFyZyBhcyAtMSBzaW5jZSB3ZSBjYW4ndCBUeCByaWdodCBub3cuICovCiAJCQlz
 Yy0+c2NfbmV3c3RhdGUoaWMsIElFRUU4MDIxMV9TX0lOSVQsIC0xKTsKLQkJCURQUklOVEYoKCJH
 b2luZyBJTklULT5TQ0FOXG4iKSk7Ci0JCQluc3RhdGUgPSBJRUVFODAyMTFfU19TQ0FOOworCQkJ
 aXdtX3N0b3AoaWZwLCAwKTsKKwkJCWl3bV9pbml0KGlmcCk7CisJCQlyZXR1cm4gMDsKIAkJfQor
 CisJCWl3bV9zdG9wX2RldmljZShzYyk7CisJCWl3bV9pbml0X2h3KHNjKTsKIAl9CiAKIAlzd2l0
 Y2ggKG5zdGF0ZSkgewpAQCAtNTg5Miw3ICs1ODk4LDggQEAgaXdtX2RvX25ld3N0YXRlKHN0cnVj
 dCBpZWVlODAyMTFjb20gKmljLCBlbnVtIGllZWU4MDIxMV9zdGF0ZSBuc3RhdGUsIGludCBhcmcp
 CiAJCWVsc2UKIAkJCWVyciA9IGl3bV9sbWFjX3NjYW4oc2MpOwogCQlpZiAoZXJyKSB7Ci0JCQlE
 UFJJTlRGKCgiJXM6IGNvdWxkIG5vdCBpbml0aWF0ZSBzY2FuXG4iLCBERVZOQU1FKHNjKSkpOwor
 CQkJRFBSSU5URigoIiVzOiBjb3VsZCBub3QgaW5pdGlhdGUgc2NhbjogJWRcbiIsCisJCQkgICAg
 REVWTkFNRShzYyksIGVycikpOwogCQkJcmV0dXJuIGVycjsKIAkJfQogCQlTRVQoc2MtPnNjX2Zs
 YWdzLCBJV01fRkxBR19TQ0FOTklORyk7CkBAIC03Mjg3LDYgKzcyOTQsNyBAQCBpd21fc29mdGlu
 dHIodm9pZCAqYXJnKQogCXN0cnVjdCBpZm5ldCAqaWZwID0gSUMySUZQKCZzYy0+c2NfaWMpOwog
 CXVpbnQzMl90IHIxOwogCWludCBpc3BlcmlvZGljID0gMDsKKwlpbnQgczsKIAogCXIxID0gYXRv
 bWljX3N3YXBfMzIoJnNjLT5zY19zb2Z0X2ZsYWdzLCAwKTsKIApAQCAtNzMxMSw4ICs3MzE5LDEw
 IEBAIGl3bV9zb2Z0aW50cih2b2lkICphcmcpCiAKIAkJYXByaW50X2Vycm9yX2RldihzYy0+c2Nf
 ZGV2LCAiZmF0YWwgZmlybXdhcmUgZXJyb3JcbiIpOwogIGZhdGFsOgorCQlzID0gc3BsbmV0KCk7
 CiAJCWlmcC0+aWZfZmxhZ3MgJj0gfklGRl9VUDsKIAkJaXdtX3N0b3AoaWZwLCAxKTsKKwkJc3Bs
 eChzKTsKIAkJLyogRG9uJ3QgcmVzdG9yZSBpbnRlcnJ1cHQgbWFzayAqLwogCQlyZXR1cm47CiAK
 QEAgLTczMzIsMTAgKzczNDIsOCBAQCBpd21fc29mdGludHIodm9pZCAqYXJnKQogCX0KIAogCWlm
 IChyMSAmIElXTV9DU1JfSU5UX0JJVF9SRl9LSUxMKSB7Ci0JCWlmIChpd21fY2hlY2tfcmZraWxs
 KHNjKSAmJiAoaWZwLT5pZl9mbGFncyAmIElGRl9VUCkpIHsKLQkJCWlmcC0+aWZfZmxhZ3MgJj0g
 fklGRl9VUDsKLQkJCWl3bV9zdG9wKGlmcCwgMSk7Ci0JCX0KKwkJaWYgKGl3bV9jaGVja19yZmtp
 bGwoc2MpICYmIChpZnAtPmlmX2ZsYWdzICYgSUZGX1VQKSkKKwkJCWdvdG8gZmF0YWw7CiAJfQog
 CiAJaWYgKHIxICYgSVdNX0NTUl9JTlRfQklUX1JYX1BFUklPRElDKSB7Cg==
 --001a1149cdae4739d10546836f4b--

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: nonakap@gmail.com
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Sat, 21 Jan 2017 14:38:33 +0900 (JST)

 Hi,

 From: Kimihiro Nonaka <nonakap@gmail.com>, Date: Fri, 20 Jan 2017 18:40:04 +0900

 > 2017-01-20 10:46 GMT+09:00 Ryo ONODERA <ryo_on@yk.rim.or.jp>:
 > 
 >> With run(4) device, Planex GW-US300MiniS, same config file works fine.
 >>
 >> $ sudo wpa_supplicant -dd -i run0 -c /opt/share/wpa_supplicant-xperia.conf
 >>
 >> I believe that my passphrase in config file is correct.
 > 
 > Hmm.
 > 
 > Could you try the attached patch.

 With your patch, my iwm(4) works fine with my Android AP and Buffalo AP.

 Thank you very much!

 > Regards,
 > -- 
 > Kimihiro Nonaka

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

From: "NONAKA Kimihiro" <nonaka@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51797 CVS commit: src/sys/dev/pci
Date: Sat, 21 Jan 2017 05:54:06 +0000

 Module Name:	src
 Committed By:	nonaka
 Date:		Sat Jan 21 05:54:06 UTC 2017

 Modified Files:
 	src/sys/dev/pci: if_iwm.c

 Log Message:
 PR/51797: initialize hardware completely when receiving a deauth frame from AP.

 avoid "iwm0: fatal firmware error".


 To generate a diff of this commit:
 cvs rdiff -u -r1.68 -r1.69 src/sys/dev/pci/if_iwm.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Kimihiro Nonaka <nonakap@gmail.com>
To: Ryo ONODERA <ryo_on@yk.rim.or.jp>
Cc: "gnats-bugs@netbsd.org" <gnats-bugs@netbsd.org>
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Sat, 21 Jan 2017 15:04:11 +0900

 2017-01-21 14:38 GMT+09:00 Ryo ONODERA <ryo_on@yk.rim.or.jp>:

 >> Could you try the attached patch.
 >
 > With your patch, my iwm(4) works fine with my Android AP and Buffalo AP.

 I've committed it. Could you try if_iwm.c r1.69?

 Regards,
 -- 
 Kimihiro Nonaka

From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: nonakap@gmail.com
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/51797: iwm(4) does not work after if_iwm.c rev. 1.45
Date: Sat, 21 Jan 2017 20:47:14 +0900 (JST)

 Hi,

 From: Kimihiro Nonaka <nonakap@gmail.com>, Date: Sat, 21 Jan 2017 15:04:11 +0900

 > 2017-01-21 14:38 GMT+09:00 Ryo ONODERA <ryo_on@yk.rim.or.jp>:
 > 
 >>> Could you try the attached patch.
 >>
 >> With your patch, my iwm(4) works fine with my Android AP and Buffalo AP.
 > 
 > I've committed it. Could you try if_iwm.c r1.69?

 if_iwm.c r1.69 works fine with Android AP and Buffalo AP.

 Thank you very much!

 > Regards,
 > -- 
 > Kimihiro Nonaka

 --
 Ryo ONODERA // ryo_on@yk.rim.or.jp
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3

State-Changed-From-To: open->closed
State-Changed-By: nonaka@NetBSD.org
State-Changed-When: Sun, 22 Jan 2017 04:32:02 +0000
State-Changed-Why:
Confirmed fixed by the submitter.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.