NetBSD Problem Report #46101

From khorben@defora.org  Sun Feb 26 16:47:30 2012
Return-Path: <khorben@defora.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id DBB7263E16C
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 26 Feb 2012 16:47:29 +0000 (UTC)
Message-Id: <20120226164727.ECF4E17C@kwarx.defora.lan>
Date: Sun, 26 Feb 2012 17:47:27 +0100 (CET)
From: Pierre Pronchery <khorben@defora.org>
To: gnats-bugs@gnats.NetBSD.org
Subject: wpi(4) does not support IBSS (ad-hoc) mode
X-Send-Pr-Version: 3.95

>Number:         46101
>Category:       kern
>Synopsis:       wpi(4) erroneously mentions IBSS (ad-hoc) as supported
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 26 16:50:04 +0000 2012
>Originator:     Pierre Pronchery
>Release:        NetBSD 5.99.64
>Organization:
>Environment:
System: NetBSD kwarx.defora.lan 5.99.64 NetBSD 5.99.64 (SPLASH) #0: Sat Feb 11 15:24:34 CET 2012 khorben@kwarx.defora.lan:/home/amd64/obj/sys/arch/amd64/compile/SPLASH amd64
Architecture: x86_64
Machine: amd64
>Description:
After a number of tests, checking documentation and comparing code with
the OpenBSD version of this driver, I realized that IBSS mode is not
meant to be supported at all in the current version of either driver.

However, the driver advertises otherwise:

=== BEGIN PASTE ===
# ifconfig -m wpi0
[...]
                media DS11 mediaopt adhoc
=== END PASTE ===

Enabling ad-hoc mode will then always end up in a "fatal firmware
error", with my current setup at least.

>How-To-Repeat:
# ifconfig wpi0 media DS11 mediaopt adhoc nwid TestSSID up
# ifconfig wpi0 | grep flags
wpi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500

>Fix:
Well, the best would be to properly implement IBSS support... However,
in the meantime, I believe the following patch should be applied:

Index: sys/dev/pci/if_wpi.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_wpi.c,v
retrieving revision 1.50
diff -p -u -r1.50 if_wpi.c
--- sys/dev/pci/if_wpi.c	30 Jan 2012 19:41:21 -0000	1.50
+++ sys/dev/pci/if_wpi.c	26 Feb 2012 16:25:09 -0000
@@ -310,7 +310,9 @@ wpi_attach(device_t parent __unused, dev

 	/* set device capabilities */
 	ic->ic_caps =
+#ifdef notyet
 		IEEE80211_C_IBSS |       /* IBSS mode support */
+#endif
 		IEEE80211_C_WPA |        /* 802.11i */
 		IEEE80211_C_MONITOR |    /* monitor mode supported */
 		IEEE80211_C_TXPMGT |     /* tx power management */

>Unformatted:
 $NetBSD: if_wpi.c,v 1.50 2012/01/30 19:41:21 drochner Exp $

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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.