Re: ath(4) driver problems with WEP...

From: Kenneth D. Merry <ken_at_kdm.org>
Date: Thu, 18 Sep 2003 23:26:57 -0600
On Wed, Sep 17, 2003 at 12:43:08 -0700, Sam Leffler wrote:
> > I've got a Netgear WAG511 (Atheros 5212-based card) and a Netgear FWAG114
> > wireless router.
> > 
> > I've been trying to get the card and the router talking under FreeBSD.
> > (Both 802.11a and 802.11g work fine under Windows on the same machine.)
> > 
> > I'm using -current from September 15th.
> > 
> > Anyway, whenever I try to get the card talking to the router, which is
> > running WEP (128 bit keys) on both the a and b/g sides, I get:
> > 
> > ath0: authentication failed (reason 13) for [ base station MAC address ]
> > ath0: authentication failed (reason 13) for [ base station MAC address ]
> > ath0: authentication failed (reason 13) for [ base station MAC address ]
> > ath0: authentication failed (reason 13) for [ base station MAC address ]
> > ath0: authentication failed (reason 13) for [ base station MAC address ]
> > 
> > Here's what the ifconfig looks like:
> > 
> > ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> >         ether [ card mac address ]
> >         media: IEEE 802.11 Wireless Ethernet autoselect mode 11a
> > (OFDM/6Mbps)         status: no carrier
> >         ssid [my ssid] 1:[my ssid]
> >         channel -1 authmode OPEN powersavemode OFF powersavesleep 100
> >         wepmode MIXED weptxkey 1
> >         wepkey 1:128-bit wepkey 2:128-bit wepkey 3:128-bit wepkey
> > 4:128-bit
> > 
> > I've verified and re-verified, via cut-and-paste from the router setup
> > screen, that the WEP key is correct.
> > 
> 
> Good news+bad news.  I just committed a fix to ifconfig to correctly handle
> 128-bit WEP keys.  I'm not sure how you thought you were setting your key
> up but ifconfig was barfing on anything more than 104 bits.  FWIW ifconfig
> wrongly indicated keys >5 bytes (40 bits) were 128-bit keys; I also fixed
> that so ifconfig now indicates keys are 40-, 104-, or 128-bit according to
> their length.  Beware also that wicontrol displays WEP keys longer than 104
> bits zero-padded; I believe this is because of limitations in the RID API
> for fetching keys.  Someone else may want to investigate that issue.
> 
> The bad news is that with 128-bit keys installed I'm getting decryption
> errors at the AP.  Actually, I'm seeing errors for any length key so it's
> likely a botch in the WEP frame construction in the driver.  I've run out
> of time to look at this right now and will have to investigate later.

Hmm.  One other thing I'm seeing is that when I configure a 128 bit key
with ifconfig or wicontrol (wicontrol shows all 28 characters -- 0x plus 26
hex characters), ifconfig still thinks it is a 104 bit key.  This is
because ireq.i_len is 13.

> > Anyway, I can't get the ath(4) driver to talk to the router when it is
> > running WEP.  I have been able to get it to talk 802.11g to the router
> > without WEP enabled, though.
> > 
> > I tried setting the authmode to shared via ifconfig, but from looking at
> > ieee80211_ioctl.c:
> > 
> ># if 0
> > 		case IEEE80211_IOC_AUTHMODE:
> > 			sc->wi_authmode = ireq->i_val;
> > 			break;
> ># endif
> > 
> > i.e. I get EINVAL back.
> > 
> > Is WEP supposed to work in -current?
> > 
> 
> authmode is not relevant.  WEP worked at one time; I seem to have broken
> it.  As I said above I will have to look at it later.

Okay.

> > In a separate issue, the ath(4) driver can't see the 802.11a side of the
> > wireless router at all when it is running in 108Mbps "turbo" mode.  If I
> > drop it down to 54Mbps, it sees it.  (Works fine in Windows.)
> > 
> > Is the ath(4) driver supposed to support the 108Mbps turbo mode?
> 
> I was able to associate with an Atheros AP with turbo mode enabled but
> didn't get any higher throughput.  I'm investigating this.
> 
> FWIW I enabled turbo mode with:
> 
> ifconfig ath0 mediaopt turbo

I had to also set the mode to 11a before it wanted to accept the turbo
option.  Otherwise I got:

ifconfig: SIOCSIFMEDIA (mediaopt): Device not configured

Then I typed:

# ifconfig ath0 mode 11a mediaopt turbo
	atalk 0.0 range 0-0 phase 2

Does it think I'm doing appletalk or something?

It seems to see the base station in turbo mode now, but I'm still getting
the "authentication failed (reason 13)" errors.

> I verified turbo mode was in use by disabling it on either station or AP
> side and with things mismatched the station/AP couldn't see each other.
> With turbo mode enabled on each side I was able to associate and
> communicate as normal; but netperf throughput was identical to the
> non-turbo setup.  I'm asking Atheros folks for clarification on this--I may
> need to do some additional setup work to enable turbo operation.  This is
> actually the first time I've tried turbo mode...

Ahh.

Thanks!

Ken
-- 
Kenneth Merry
ken_at_kdm.org
Received on Thu Sep 18 2003 - 20:27:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:22 UTC