Subject: Re: ath driver and wep
To: None <current-users@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: current-users
Date: 10/01/2005 06:25:21
On Fri, Sep 30, 2005 at 08:13:52PM -0400, Greg Troxel wrote:
> I made the following change (locally, not committed) yet to
> sys/dev/ic/ath.c to write wep keys to the hardware on power up.  This
> intends to fix the problem of wep keys being set while the power is
> off (ifconfig nwkey before ifconfig up), or lost during ifconfig
> down/up.  I tested on one machine and an ifconfig down/up resulted in
> a working configuration where previously it did not (and I received a
> report from someone else who had the same problem).
> 
> I'm using a single 40-bit WEP key.
> 
> 
> I'm hesitant to commit it because I don't fully understand how this is
> supposed to be handled and I suspect it doesn't handle non-wep keys
> correctly.
> 
> This is in ath_mode_init; line numbers are likely off since I have a
> lot of local changes.

I think I understand the problem, now, and how to fix it.  ath assumes
that the card has power, always, so it can always write keys to the
hardware using ath_hal_keyset.  NetBSD breaks that assumption by powering
down the cardslot when the NIC is deactivated (ifconfig ath0 down).
A quick fix is to stop powering down the cardslot; that happens in
ath_cardbus_disable.

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933