Re: ifconfig scan while connected

2014-09-08 Thread David Coppa
On Sun, Sep 7, 2014 at 5:56 PM, Fabian Raetz fabian.ra...@gmail.com wrote:
 On Sun, Sep 07, 2014 at 02:11:04PM +0200, Mike Burns wrote:
 A `sudo ifconfig iwn0 scan' works but only if the device is disconnected. Is
 this expected behavior? Is this specific to my card? Am I interpreting
 the results correctly?

 Hi,
 this is a known problem with the iwn(4) driver.

 I'm in the process of backporting a patch from FreeBSD, which seems to
 fix the problem.  Running here with this patch for an hour or so and can
 scan with iwn running and it continues to work.

 I'll probably send a patch to tech@ next week.

I'm also interested in this.

ciao!
David



ifconfig scan while connected

2014-09-07 Thread Mike Burns
A `sudo ifconfig iwn0 scan' works but only if the device is disconnected. Is
this expected behavior? Is this specific to my card? Am I interpreting
the results correctly?

I'd like to be able to see other networks while remaining connected.

These are the results I am interpreting:

$ sudo ifconfig iwn0 scan   
iwn0: flags=28843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,NOINET6 mtu 1500
lladdr 84:3a:4b:0a:ae:80
priority: 4
groups: wlan egress
media: IEEE802.11 autoselect (OFDM54 mode 11g)
status: active
ieee80211: nwid ComHemAA chan 1 bssid a0:21:b7:e8:2c:29 212dB 
wpakey 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef 
wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip
inet 192.168.0.13 netmask 0xff00 broadcast 192.168.0.255
$ sudo ifconfig iwn0 -wpakey
$ sudo ifconfig iwn0 scan   
iwn0: flags=28843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,NOINET6 mtu 1500
lladdr 84:3a:4b:0a:ae:80
priority: 4
groups: wlan egress
media: IEEE802.11 autoselect (OFDM54)
status: no network
ieee80211: nwid ComHemE9E964
nwid dlink chan 6 bssid 00:1c:f0:84:01:f0 171dB 54M 
short_preamble,short_slottime
[ ... and so on ... ]

pcidump and dmesg below. Want anything else?

$ sudo pcidump -vv 3:0:0
 3:0:0: Intel Centrino Advanced-N 6205
0x: Vendor ID: 8086 Product ID: 0085
0x0004: Command: 0006 Status: 0010
0x0008: Class: 02 Subclass: 80 Interface: 00 Revision: 96
0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 10
0x0010: BAR mem 64bit addr: 0xf0c0/0x2000
0x0018: BAR empty ()
0x001c: BAR empty ()
0x0020: BAR empty ()
0x0024: BAR empty ()
0x0028: Cardbus CIS: 
0x002c: Subsystem Vendor ID: 8086 Product ID: c220
0x0030: Expansion ROM Base Address: 
0x0038: 
0x003c: Interrupt Pin: 01 Line: 0a Min Gnt: 00 Max Lat: 00
0x00c8: Capability 0x01: Power Management
0x00d0: Capability 0x05: Message Signaled Interrupts (MSI)
0x00e0: Capability 0x10: PCI Express
Link Speed: 2.5 / 2.5 GT/s Link Width: x1 / x1

$ dmesg
OpenBSD 5.6 (GENERIC.MP) #320: Mon Aug  4 23:46:51 MDT 2014
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8255762432 (7873MB)
avail mem = 8027209728 (7655MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdae9d000 (71 entries)
bios0: vendor LENOVO version G6ET93WW (2.53 ) date 02/04/2013
bios0: LENOVO 3444CUU
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC TCPA SSDT SSDT SSDT HPET APIC MCFG ECDT FPDT ASF! 
UEFI UEFI MSDM SSDT SSDT UEFI SSDT DBG2
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3) 
EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz, 1896.03 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz, 1895.70 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz, 1895.70 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz, 1895.70 MHz
cpu3: 

Re: ifconfig scan while connected

2014-09-07 Thread Mike Burns
On 2014-09-07 17.11.09 +0200, Marcin Piotr Pawlowski wrote:
 Why You need to see other networks while remaining connected?

Some example scenarios:

- If I move about my office I'd like to see what other SSIDs are
  available in case I'd like to switch to one.
- If I'm tethering through my phone I'd like to see whether any other
  wifi has appeared so that I can switch to it.
- A first step toward getting something like NetworkManager/wicd working
  requires this. Well, it doesn't -- one could completely disconnect
  from the Internet every time they want to try their program -- but I
  don't imagine that inspiring someone to work on such a task.

I'm also bringing it up in general because every other system I know
does this, I don't know of any security issues around it, and maybe by
reporting it here someone will change it or give me advice on how to
change it, thus making OpenBSD that much better. (I poked around
if_iwn.c but didn't see anything obvious, but I honestly don't know what
the correct change should be.)

-Mike

[I had previously sent this off-list, but unintentionally.]



Re: ifconfig scan while connected

2014-09-07 Thread Fabian Raetz
On Sun, Sep 07, 2014 at 02:11:04PM +0200, Mike Burns wrote:
 A `sudo ifconfig iwn0 scan' works but only if the device is disconnected. Is
 this expected behavior? Is this specific to my card? Am I interpreting
 the results correctly?

Hi,
this is a known problem with the iwn(4) driver.

I'm in the process of backporting a patch from FreeBSD, which seems to
fix the problem.  Running here with this patch for an hour or so and can
scan with iwn running and it continues to work.

I'll probably send a patch to tech@ next week.

Regards,
Fabian

 
 I'd like to be able to see other networks while remaining connected.
 
 These are the results I am interpreting:
 
 $ sudo ifconfig iwn0 scan   
 iwn0: flags=28843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,NOINET6 mtu 1500
 lladdr 84:3a:4b:0a:ae:80
 priority: 4
 groups: wlan egress
 media: IEEE802.11 autoselect (OFDM54 mode 11g)
 status: active
 ieee80211: nwid ComHemAA chan 1 bssid a0:21:b7:e8:2c:29 212dB 
 wpakey 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef 
 wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip
 inet 192.168.0.13 netmask 0xff00 broadcast 192.168.0.255
 $ sudo ifconfig iwn0 -wpakey
 $ sudo ifconfig iwn0 scan   
 iwn0: flags=28843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,NOINET6 mtu 1500
 lladdr 84:3a:4b:0a:ae:80
 priority: 4
 groups: wlan egress
 media: IEEE802.11 autoselect (OFDM54)
 status: no network
 ieee80211: nwid ComHemE9E964
 nwid dlink chan 6 bssid 00:1c:f0:84:01:f0 171dB 54M 
 short_preamble,short_slottime
 [ ... and so on ... ]
 
 pcidump and dmesg below. Want anything else?
 
 $ sudo pcidump -vv 3:0:0
  3:0:0: Intel Centrino Advanced-N 6205
 0x: Vendor ID: 8086 Product ID: 0085
 0x0004: Command: 0006 Status: 0010
 0x0008: Class: 02 Subclass: 80 Interface: 00 Revision: 96
 0x000c: BIST: 00 Header Type: 00 Latency Timer: 00 Cache Line Size: 10
 0x0010: BAR mem 64bit addr: 0xf0c0/0x2000
 0x0018: BAR empty ()
 0x001c: BAR empty ()
 0x0020: BAR empty ()
 0x0024: BAR empty ()
 0x0028: Cardbus CIS: 
 0x002c: Subsystem Vendor ID: 8086 Product ID: c220
 0x0030: Expansion ROM Base Address: 
 0x0038: 
 0x003c: Interrupt Pin: 01 Line: 0a Min Gnt: 00 Max Lat: 00
 0x00c8: Capability 0x01: Power Management
 0x00d0: Capability 0x05: Message Signaled Interrupts (MSI)
 0x00e0: Capability 0x10: PCI Express
 Link Speed: 2.5 / 2.5 GT/s Link Width: x1 / x1
 
 $ dmesg
 OpenBSD 5.6 (GENERIC.MP) #320: Mon Aug  4 23:46:51 MDT 2014
 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
 real mem = 8255762432 (7873MB)
 avail mem = 8027209728 (7655MB)
 mpath0 at root
 scsibus0 at mpath0: 256 targets
 mainbus0 at root
 bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdae9d000 (71 entries)
 bios0: vendor LENOVO version G6ET93WW (2.53 ) date 02/04/2013
 bios0: LENOVO 3444CUU
 acpi0 at bios0: rev 2
 acpi0: sleep states S0 S3 S4 S5
 acpi0: tables DSDT FACP SLIC TCPA SSDT SSDT SSDT HPET APIC MCFG ECDT FPDT 
 ASF! UEFI UEFI MSDM SSDT SSDT UEFI SSDT DBG2
 acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3) 
 EHC2(S3) HDEF(S4)
 acpitimer0 at acpi0: 3579545 Hz, 24 bits
 acpihpet0 at acpi0: 14318179 Hz
 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
 cpu0 at mainbus0: apid 0 (boot processor)
 cpu0: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz, 1896.03 MHz
 cpu0: 
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
 cpu0: 256KB 64b/line 8-way L2 cache
 cpu0: smt 0, core 0, package 0
 mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
 cpu0: apic clock running at 99MHz
 cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
 cpu1 at mainbus0: apid 1 (application processor)
 cpu1: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz, 1895.70 MHz
 cpu1: 
 FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS
 cpu1: 256KB 64b/line 8-way L2 cache
 cpu1: smt 1, core 0, package 0
 cpu2 at mainbus0: apid 2 (application processor)
 cpu2: Intel(R) Core(TM) i7-3667U CPU @ 2.00GHz, 1895.70 MHz
 cpu2: 
 

Re: ifconfig scan while connected

2014-09-07 Thread Mike Burns
On 2014-09-07 17.56.09 +0200, Fabian Raetz wrote:
 On Sun, Sep 07, 2014 at 02:11:04PM +0200, Mike Burns wrote:
  A `sudo ifconfig iwn0 scan' works but only if the device is disconnected. Is
  this expected behavior? Is this specific to my card? Am I interpreting
  the results correctly?
 
 I'm in the process of backporting a patch from FreeBSD, which seems to
 fix the problem.  Running here with this patch for an hour or so and can
 scan with iwn running and it continues to work.
 
 I'll probably send a patch to tech@ next week.

Fantastic. I'll try it when you send it.

-Mike