From ast@marabu.ch  Tue May 11 09:58:41 2004
Return-Path: <ast@marabu.ch>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D8CB016A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 May 2004 09:58:41 -0700 (PDT)
Received: from oneplusone.ch (oneplusone.ch [212.55.208.170])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 21FC443D5E
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 May 2004 09:58:38 -0700 (PDT)
	(envelope-from ast@marabu.ch)
Received: from marabu.ch (localhost.marabu.ch [127.0.0.1])
	by marabu.ch (8.12.11/8.12.11) with ESMTP id i4BGrClp023011;
	Tue, 11 May 2004 18:53:13 +0200 (CEST)
	(envelope-from ast@marabu.ch)
Received: (from ast@localhost)
	by marabu.ch (8.12.11/8.12.11/Submit) id i4BGrBmg023010;
	Tue, 11 May 2004 18:53:11 +0200 (CEST)
	(envelope-from ast)
Message-Id: <200405111653.i4BGrBmg023010@marabu.ch>
Date: Tue, 11 May 2004 18:53:11 +0200 (CEST)
From: Adrian Steinmann <ast@marabu.ch>
Reply-To: Adrian Steinmann <ast@marabu.ch>
To: FreeBSD-gnats-submit@freebsd.org
Cc: sam@errno.com
Subject: panic if_ath.c:2776 "transition to RUN state w/ no rates!" when no IP assigned to Level One WPC-0300 interface
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         66534
>Category:       i386
>Synopsis:       [panic] if_ath.c:2776 "transition to RUN state w/ no rates!" when no IP assigned to Level One WPC-0300 interface
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sam
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 11 10:00:30 PDT 2004
>Closed-Date:    Mon Dec 13 16:34:40 GMT 2004
>Last-Modified:  Mon Dec 13 16:34:40 GMT 2004
>Originator:     Adrian Steinmann
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Webgroup Consulting AG
>Environment:
System: FreeBSD nico 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sat May 8 14:15:53 CEST 2004 root@nico.marabu.ch:/usr/obj/usr/src/sys/NIC i386

>Description:
	Level One WPC-0300 is probed correctly by ath() driver. However if no
	IP has been assigned, it has no rate and kernel panics in if_ath.c
	line 2776:

        if (state == IEEE80211_S_RUN) {   
                /* start with highest negotiated rate */
                KASSERT(ni->ni_rates.rs_nrates > 0,
                        ("transition to RUN state w/ no rates!"));

	at first use (i.e. with kismet) unless the interface has been assigned
	an IP address.

>How-To-Repeat:
	- Plug in card, but do *not* assign an IP with ifconfig ath0 inet ...
    		the ifconfig ath0 reports:

    ath0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
	ether 00:03:2f:16:9f:ae
	media: IEEE 802.11 Wireless Ethernet autoselect
	status: no carrier
	ssid ""
	channel -1 authmode OPEN powersavemode OFF powersavesleep 100
	rtsthreshold 2312 protmode CTS
	wepmode OFF weptxkey 1

	- Start kismet with kismet.conf source=radiotap_fbsd_b,ath0,ath0
	- Kernel will panic

>Fix:

	Workaround for now is never to forget an initial
		ifconfig ath0 0.0.0.0
	(it might even associate and thus have a negotiated rate):

    ath0: flags=28943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	inet6 fe80::203:2fff:fe16:9fae%ath0 prefixlen 64 scopeid 0x3 
	inet 0.0.0.0 netmask 0xff000000 broadcast 0.255.255.255
	ether 00:03:2f:xx:xx:xx
	media: IEEE 802.11 Wireless Ethernet autoselect <monitor>
	status: associated
	ssid AP 1:AP
	channel 2 authmode OPEN powersavemode OFF powersavesleep 100
	rtsthreshold 2312 protmode CTS
	wepmode OFF weptxkey 1

Adrian

PS. This is the pciconf -lv of the
	Level One WPC-0300 54Mbps Wireless Cardbus adapter:

ath0@pci2:0:0:  class=0x020000 card=0x710116ab chip=0x0013168c rev=0x01 hdr=0x00
    vendor   = 'Atheros Communications Inc.'
    device   = '802/11b/g AR5212 wireless Adapter'
    class    = network
    subclass = ethernet

See also http://www.level-one.de/products3.php?sklop=9&id=540520
which seems to describe a newer rev of this card (in german).
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->sam 
Responsible-Changed-By: arved 
Responsible-Changed-When: Thu May 20 18:06:26 PDT 2004 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66534 
State-Changed-From-To: open->closed 
State-Changed-By: sam 
State-Changed-When: Mon Dec 13 16:33:53 GMT 2004 
State-Changed-Why:  
Fixed by recent commits to current. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66534 
>Unformatted:
