Commit Graph

230 Commits

Author SHA1 Message Date
Warner Losh
08d49adb7f Add DLINK DWL650H
From NetBSD by way of deischen
2003-03-18 02:47:53 +00:00
Warner Losh
7a073cc3e0 Add SMC 2602W pci card, from a post to mobile@ 2003-03-18 02:45:29 +00:00
Warner Losh
fabc845e37 Remove bogus KASSERT. The 802.11 layer and the resume from suspend
code both seem to call wi_start (directly or via the if_start pointer)
without checking to see if OACTIVE is 0.  In addition, I think that
with the use of 3 transmit buffers this routine can be called with
OACTIVE set, but I might be mistaken about that (and it doesn't
matter).

Reviewed by: sam
Noticed by: imp, alfred, ambrisko
2003-03-17 13:19:28 +00:00
Warner Losh
739804813b Remove bogus UNLOCK in if_wi.c. Since we no longer WILOCK() in the
attach routine, calling WIUNLOCK in the error case of one of the ifs
for that routine is now bogus.  This should have been removed when the
WILOCK() was removed, but wasn't.

Submitted by:  "Harti Brandt" <brandt@fokus.fraunhofer.de>
2003-03-11 17:13:33 +00:00
Sam Leffler
f1dacb5270 Change default setting of hw.wi.txerate to zero so that tx error msgs are
ignored (as before).  This was the original setting but a bug in ppsratecheck
made me do stupid things.
2003-02-26 17:18:35 +00:00
Warner Losh
a163d034fa Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
Takeshi Shibagaki
a544e1117c Add YIS YWL-11B. This card has same vendor id and product id
as XI300 Wireless LAN. So use PCMCIA_CARD2().
2003-02-15 13:59:54 +00:00
Warner Losh
1a972e076a Unlock the mutex in the error case in wi_init. Otherwise we can return
from an ioctl with the lock held.

Submitted by: iedowse (by way of sam)
2003-02-02 06:35:46 +00:00
Alfred Perlstein
44956c9863 Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
Sam Leffler
2a363b8963 correct default setting of hw.wi.txerate; it must be -1, not zero,
to silence all msgs (like the old driver)
2003-01-20 21:06:58 +00:00
Sam Leffler
1c56cdce18 correct sysctl names and move them to hw.wi: hw.wi.txerate controls the rate
at which tx errors are printed (default to 0); hw.wi.debug control the debug
msgs and is only present when WI_DEBUG is defined at compile time (the default
for the moment)

Requested by:	imp
2003-01-20 20:55:37 +00:00
Sam Leffler
fa15ece030 gc dead code 2003-01-20 19:45:09 +00:00
Sam Leffler
c9def0f441 default tx error rate limiting to 0 to disable tx error msgs; this is
consistent with how the old driver worked
2003-01-20 00:50:36 +00:00
Takeshi Shibagaki
3f9970c831 Add Allied Telesis WR211PCM. 2003-01-17 18:41:32 +00:00
Warner Losh
e2fcd48525 Restore a comment that was lost in the shuffle. 2003-01-16 23:38:08 +00:00
Sam Leffler
11411c79c7 wi-specific host ap support no longer needed now that it uses
the core 802.11 code

Reviewed by:	imp
2003-01-15 20:12:50 +00:00
Sam Leffler
474b12ddf0 new wi driver that uses the 802.11 link layer code
Reviewed by:	imp
Obtained from:	NetBSD (originally)
2003-01-15 20:11:31 +00:00
Matthew N. Dodd
c94b6ebc27 Suspend/resume support (mostly for MiniPCI Prism2.5 boards).
Reviewed by:	 imp
2003-01-14 23:19:32 +00:00
Mike Barcroft
51afc2ad43 Avoid casting pointers to int and using %x to print them.
Noticed by:	alpha tinderbox
2003-01-05 16:23:49 +00:00
Robert Watson
dcce7232ef Require privilege to flush the signal cache on if_an and if_wi 802.11
cards.

Reviewed by:	imp (if_wi)
2002-12-24 14:46:01 +00:00
Sam Leffler
673d91916d network interface driver changes:
o don't strip the Ethernet header from inbound packets; pass packets
  up the stack intact (required significant changes to some drivers)
o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN)
o track ether_ifattach/ether_ifdetach API changes
o track bpf changes (use BPF_TAP and BPF_MTAP)
o track vlan changes (ifnet capabilities, revised processing scheme, etc.)
o use if_input to pass packets "up"
o call ether_ioctl for default handling of ioctls

Reviewed by:	many
Approved by:	re
2002-11-14 23:54:55 +00:00
Poul-Henning Kamp
031fd299d7 Be consistent about functions being static.
Spotted by:	FlexeLint.
2002-10-16 08:48:39 +00:00
Warner Losh
aa23e9c476 o Comment out the symbol download code for 4.x.
o Add hooks for doing power management of the output signal.
o Minor hacks to make flexlint happy wrt staticness of functions.
2002-10-14 01:59:57 +00:00
Warner Losh
5c71502dad Some renamings from pccarddevs
Add Linksys WCF11
Bay eMobility 11B
2002-10-11 07:02:31 +00:00
Warner Losh
82ddfdef07 Add Planex GWNS11H
Submitted by: hanai-san
2002-10-11 05:43:38 +00:00
Warner Losh
d909f3e20c Fix comment 2002-09-29 18:42:14 +00:00
Warner Losh
7f2907fd70 Limit the TX key to a valid range
PR: 39960, 39961 (patches here pointed out problem, but didn't quite fix it)
2002-09-29 18:40:35 +00:00
Warner Losh
34c947d8b6 When setting the WI_RID_ENCRYPTION mode, we have to conditionally
set EXCLUDE_UNENCRYPTED if we're not in OPEN mode (or if we are a
symbol card).

Obtained from: OpenBSD (looks like a millert@ special)
2002-08-21 05:57:37 +00:00
Warner Losh
87c397af5c comment about the magic number -149 2002-08-21 05:35:51 +00:00
Warner Losh
abc38e4485 Treat IBSS the same as ADHOC in wi_get_cur_ssid. This makes ifconfig
work better, but might not make ibss actually work on the prism2 cards
that I have (this is the first time I've tried ibss in a long time).
2002-08-21 05:31:04 +00:00
Warner Losh
6f6efa5165 Move the symbol firmware loading routines into if_wi.
Define some basic firmware downloading commands.
2002-08-15 07:13:17 +00:00
Warner Losh
6854d13abc Follow NetBSD's lead and use WI_PORTTYPE_HOSTAP instead of _AP, since
_AP might be used in the future for cards with firmware that does AP in
firmware.
2002-08-11 08:51:08 +00:00
Warner Losh
6edfb9d7cb Fix minor typo in ID number in last commit 2002-08-05 07:48:31 +00:00
Warner Losh
cb642e2945 A definition of regulatory domains that matches the docs. 2002-08-05 07:45:57 +00:00
Warner Losh
b04a43c87c Differentiate between AT45DB011 compatible large serial flash parts
and the AT24C08 small serial flash parts.  We still report these as
the same part (since we group things already), but now we recognize
the small serial versions as well.
2002-08-05 07:24:02 +00:00
Warner Losh
ae06c30e2b Add a comment that says it looks like lucent cards have a primary
firmware revision as well (not sure which firmware versions are needed
for this, but the 6.x and 8.x 'software' versions that I have seem to
support it).

Add dBm comm quality RID.  This is like the normal comm quality rid,
except the signal and noise numbers are normalized to dBm.  Some
revisions of the prism firmware, however, don't support this RID, and
some that do support it return 0 for quality and/or noise.  Your
milage may vary.
2002-08-05 07:19:27 +00:00
Warner Losh
073eef8ca2 Add code that will download firmware to a Symbol LA4100-series of CF
cards.  Since the firmware is hard coded into the kernel, I've made it
a kernel option (WI_SYMBOL_FIRMWARE).

Note: This only downloads into the RAM of these cards.  It doesn't
download into FLASH, and is somewhat limited.  There needs to be a
better way to deal, but this works for now.  My Symbol LA4132 CF card
works now.

Obtained from: NetBSD
2002-08-03 00:19:58 +00:00
Warner Losh
3d976872ed Don't set the IFF_PROMISC bit when in hostap mode like the previous
commit bogusly did.  Instead, don't set PROMSIC in the hardware if
we're in hostap mode.  This matches more closely what openbsd did as
well.
2002-08-01 07:37:52 +00:00
Warner Losh
08c0f3d917 If we are in hostap mode, do not go into promisc mode. This causes
problems with the firmware and will result in a) poor performance and
b) the inability to associate certain types of cards (most notibly
cisco).

Idea obtained from OpenBSD, but I implemented it by clearing the
IFF_PROMISC flag rather than the refusing to honor it downstream.
2002-07-29 15:36:22 +00:00
Warner Losh
ffd283ae15 Send a disassoc packet for a STA that we don't know about that claims to
be associated with us.  From millert@openbsd.org

Obtained from: OpenBSD (I think)
2002-07-26 22:56:04 +00:00
Warner Losh
bec60c0fd8 Only INTERSIL 0.8.3 and newer firmware is supported with hostap mode.
While earlier versions can be made to work, they require various work
arounds not in the driver right now.
2002-07-26 22:54:30 +00:00
Warner Losh
fc7b12d6fc Add support for Elsa XI325, Netgear MA401RA, and Nokia C110. From OpenBSD
by various people there.
2002-07-17 04:07:07 +00:00
Warner Losh
f83c4a42ea IF_HANDOFF is no longer in -stable 2002-06-30 22:39:25 +00:00
Warner Losh
be5359fb85 On REASREQ packets, handled them earlier in processing the association
request.  We need to eat the MAC address of the packet before we go
looking at the SSID and such.  Doing do is sufficient to make Cisco
cards assocaite with prism II cards.

The submitter says that Linux does the same thing.

Submitted by: jhay
2002-06-24 07:50:41 +00:00
Warner Losh
586fdde4bc Add kernel printf bits for WI_SUPPRATES and HOSTAP_FLAGS 2002-06-24 04:42:46 +00:00
Warner Losh
890565f00b Add RID to get the DBM adjustment factor 2002-06-24 04:41:34 +00:00
Warner Losh
d5ca4da61e Add better mediaopt support for ibss and friends.
Now the driver is closer to matching the wi man page.

Submitted by: jhay (who obtained it from OpenBSD).
2002-06-19 17:37:34 +00:00
Nick Sayer
dc957e3d2b Add an entry for the US Robotics 2415.
PR:		i386/38879
Submitted by:	jordi_yc@lycos.es
MFC after:	1 week
2002-06-14 15:32:01 +00:00
Poul-Henning Kamp
f4258597dc Add one copy of crc32() and crc32_tab[] in libkern, and remove it two other
places.

Comment out crc32 related definitions in zlib.h, we don't seem to have the
corresponding code in our kernel.
2002-05-29 20:24:09 +00:00
Bruce Evans
e788f79698 Fixed printf format errors which apparently crept in while -Wformat was
disabled for gcc-3.
2002-05-25 11:18:03 +00:00
Warner Losh
3029e334b7 Use correct inactivity timeout of 2 minutes rather than 24 seconds due to
bogons introduced at some point.

Submitted by: thomas skibo
2002-05-20 19:33:49 +00:00
Warner Losh
5b6a60ea0a Use splnet() when we need to block timeouts rather than splimp() since
the former blocks software interrupts, while the latter blocks
hardware interrupts.

Avoid one place where I'm at splnet across a call to copyout.  Leave
one in place to give bde something to complain about :-).  Actaully,
I'll fix it in a subsequent commit.

Reviewed by: bde
spl conical hat to: imp
2002-05-16 06:32:37 +00:00
Warner Losh
e9f49c9c96 BDE and I have had a chance to hash this out:
o Use splnet() instead of splclock().
o Use splnet() instead of splimp().

Reviewed by: bde
2002-05-13 21:17:33 +00:00
Warner Losh
d87fc9ac63 Try to use spls more correctly 2002-05-07 18:09:19 +00:00
Warner Losh
883ee9463e skibo tells me that that I didn't apply all of his last patch, and
sent me a replacement patch that fixes the problem.  The challenge
buffer was not large enough by a factor of 4 (due to my changing the
size from 128 to 32, but not u_int8_t to u_int32_t).

MFC after: 1 day
Submitted by: skibo@pacbell.net
2002-04-30 03:46:27 +00:00
Warner Losh
0f98688eb0 We don't need the card_if.h here. It breaks the building of kernels
with wi but without pccard.  Also remove an RCS id that I don't think
we need.
2002-04-29 21:11:02 +00:00
Warner Losh
1456297748 splsoftnet is spelled splimp in FreeBSD rather than splnet. splimp is
used to protect the rest of the driver.  This is a no-op commit to current,
but is needed for the MFC.

MFC after: 1 day
2002-04-29 19:04:29 +00:00
Warner Losh
8ad896e0ad Untimeout before calling timeout. I think that I have caught all the cases
where we were scheduling a timeout multiple times, but am not positive.
2002-04-29 06:55:46 +00:00
Warner Losh
9218b6a376 Alphabetize descriptions and remove the "PCI" from the desciptions.
Suggested by: brooks
2002-04-28 02:04:28 +00:00
Warner Losh
cd5a4c63c7 This patch fixes my breakage of ssid matching. I introduced the
breakage when I tried to merge OpenBSD wi_hostap changes into the
tree.  Skibo found the problem and submitted these patches.  Thanks!

Submitted by: skibo@pacbell.net
2002-04-27 16:03:25 +00:00
Warner Losh
0853849336 Better names for the PCI cards. The biggest change is that we now
identify the Intersil Prism 2.5 PCI native card as that, rather than
Linksys, the first folks to get it to market.
2002-04-27 16:01:26 +00:00
Warner Losh
3465a702f3 Make this driver compile for -stable also to prep for MFC 2002-04-26 23:11:23 +00:00
Mike Barcroft
a30d4b3270 Move the new byte order function prototypes from <sys/param.h> to
<sys/endian.h>.  This puts us in line with NetBSD and OpenBSD.
2002-04-26 22:48:23 +00:00
Warner Losh
632754e510 Implement shared secret mode for hostap mode.
Submitted by: Thomas Skibo <skibo@pacbell.net>
2002-04-22 07:09:13 +00:00
Atsushi Onoe
60f514a9a7 Some fixes for Symbol card.
- The version string doesn't need to start with 'V'.
- Symbol firmware doesn't support ROAMING_MODE nor MICROWAVE_OPEN.
Obtained from: NetBSD
2002-04-19 08:16:59 +00:00
Warner Losh
93ca0d0cfb Merge from OpenBSD's fixes:
o move timeout from wihap_info to wihap_sta_info
o sprinkle spls into the code (need to use proper -current locking)
o better use of le16toh and htole16
o fix a few leaks m_freem(m)
o minor knf
o minor de-knf to match OpenBSD
o de__P
2002-04-16 07:45:30 +00:00
Warner Losh
c8e6c42caa Minor format nit 2002-04-16 07:39:25 +00:00
Brooks Davis
39606b2e27 Fix tx-rate setting for Lucent cards.
Submitted by:	Eugene Perevyazko <john@pcs.dp.ua>
2002-04-14 23:18:40 +00:00
Brooks Davis
42d7dbe6bf Support the Siemens SpeedStream PCI card.
PR:		kern/35988
Submitted by:	Stephen Gunn <csg@waterspout.com>
2002-04-14 22:08:58 +00:00
Warner Losh
fafbd94d8d After committing the forgotten IFM_IEEE80211_HOSTAP stuff to if_media.h,
no need for the ifdefs here anymore.
2002-04-12 06:12:21 +00:00
Warner Losh
b0152b2e40 unifdef -DWI_HOSTAP, like OpenBSD does 2002-04-12 06:01:28 +00:00
Alfred Perlstein
7344c0a194 ifdef WI_HOSTAP some stuff that seems like it needs to be ifdef'd. 2002-04-12 05:46:36 +00:00
Warner Losh
e122b676e6 Replace the original host WEP implementation with the one in OpenBSD
(apparently by markus@, at least committed by him).  This has the
advantage of not using the bad IV's from Fluhrer/Mantin/Shamir as well
as bringing the drivers a little closer together.

Also use a few constants in place of magic numbers in one place.

Obtained from: OpenBSD 1.25, 1.28, 1.36, 1.38, 1.42
2002-04-12 03:42:37 +00:00
Warner Losh
f90d35eca1 Add ActionTec HWC01170 and Linksys IWN2
Obtained from: OpenBSD
2002-04-11 21:21:14 +00:00
Warner Losh
1bd2b5b4cd Integrate the hostap stuff that Thomas Skibo <skibo@packbell.net>
wrote.  This code was for 4.5-release, so I've ported it to -current
and made a few minor tweaks.  The biggest non-style tweak was to not
make access point the default.

More changes will be needed to get this actually working, but I wanted
to get a relatively pure baseline.  This doesn't seem to break what
works now.
2002-04-11 07:21:16 +00:00
Warner Losh
ea185f8108 better init 2002-04-11 03:31:45 +00:00
Warner Losh
a00985a564 Sony ID is 0x0002, not 0x0001. Noticed by Ichiro Fukuhara-san when I
submitted patches to him for NetBSD integration.
2002-04-08 00:52:15 +00:00
Warner Losh
8838e07eeb The 3Com 3CRWE62092A (the XJack antenna product) does not have a host
interface that is compatible with the LUCENT or HERMES firmware.
Instead, it is like the various No Wires Necessary products that were
produced a while ago and then sold to intersil.  It will require a
different driver altogether.  Remove it from the list of supported
cards.

The 3CRWE777A apperas to be a re-badged SMC 2602W card, so the driver
appears to support it.  Add it to the list.

Thanks to Todd Miller for loaning me the card during tonight's FRUUG
meeting for testing against CU's wireless infrastructure.
2002-04-05 01:31:30 +00:00
Warner Losh
15ffbeb81d MFNetBSD:
1.60: Add range checking, but put it higher up in the food
	chain than NetBSD (this should be fixed there as well).

Obtained From: NetBSD
2002-04-04 22:22:31 +00:00
Warner Losh
dfdbc0533d MFNetBSD:
wi.c 1.64: Table driven IDs (ichiro)
	1.59: Don't use magic numbers (ichiro)
Also, added Sony, Lucent Embedded Ids and fix minor bugs for lucent
cards (and submit those changes back to ichiro-san)

Obtained from: NetBSD
2002-04-04 21:40:37 +00:00
John Baldwin
6008862bc2 Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64
2002-04-04 21:03:38 +00:00
Warner Losh
276bdee1b5 o Reduce the gratuitous differences with NetBSD.
o OpenBSD's wiconfig tells me that a value of '2' is for sony wireless
  cards, 1 is for lucent (which we already knew) and '5' is for embedded
  lucent cards.
o Move some RID definitions to if_wavelan_ieee.h and use NetBSD names
  more often.

# more work is still needed in this area.
2002-04-04 06:28:16 +00:00
Warner Losh
c677a10e48 It would appear, from preliminary indications, that No Wires Necessary
cards aren't compatible with either Lucent or Intersil firmware.
2002-04-03 20:39:07 +00:00
Warner Losh
a19c104dd2 Four fixes from NetBSD:
1) Properly detect the Symbol based cards (The 3Com Airconnect and their
   ilk) and only reset them *ONCE* ever.  This appears to make them work,
   but more testing is needed.  The tests that would wedge up my machine
   completely now appear to work, but I have not real access points
   handy.
2) Report both the Station firmware and the Primary firmware on Prism
   based cards.  On Lucent based cards, only report the station firmware
   since that's all it supports.  On symbol cards, report the symbol
   specific firmware name as its station firmware.
3) Better Prism 2.5 and 3 family names.  We really need to go table
   driven for this.
4) Workaround for bugs in Intersil's firmware is only needed for at most
   0.8.2 and earlier, since 0.8.3 and later appear to work.

Obtained from: NetBSD
2002-04-03 19:44:17 +00:00
Warner Losh
6e9e29ea41 Add some devices from OpenBSD/NetBSD:
o 3Com 3crwe62092a
o Addtron awp100
o No Wires Necessary WLAN 550 and 1148
o Proxim RANGELANDS 8340

and reorder linksys to be in proper sort order.

Obtained from: OpenBSD (mostly)
2002-04-02 05:49:09 +00:00
Warner Losh
dbab04ca39 First cut at breaking out the bus attachment from the bus independent
part of the driver.  Also, move the softc and some other stuff to
if_wivar.h from if_wireg.h to make future merging activities easier.
2002-04-02 02:38:35 +00:00
John Baldwin
44731cab3b Change the suser() API to take advantage of td_ucred as well as do a
general cleanup of the API.  The entire API now consists of two functions
similar to the pre-KSE API.  The suser() function takes a thread pointer
as its only argument.  The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0.  The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.

Discussed on:	smp@
2002-04-01 21:31:13 +00:00
Warner Losh
8fcb428045 More diff reduction patches 2002-04-01 18:52:53 +00:00
Warner Losh
922e111715 Merge a little from NetBSD. This changes reduces the diffs between the
two a little, but more commits like this will follow.
2002-04-01 18:28:20 +00:00
Warner Losh
282607088a Fix type from last commit 2002-04-01 18:26:32 +00:00
Warner Losh
c92b317966 Add more ID's from the PRISM family. from wi.c 1.61 and wireg.h 1.26 by
ichiro@netbsd.org

Obtained from: NetBSD
2002-04-01 18:07:05 +00:00
Warner Losh
4f453a6c89 Identify PRISM 2.5 with ISL37300P
Obtained from: OpenBSD
2002-03-29 00:32:32 +00:00
Warner Losh
8cf3aa5fce Integrate the air-tools 0.2 from dachb0den labs.
o This moves the common.h file into if_wavelan_ieee.h

Submitted by: h1kari@dachb0den.com
2002-03-29 00:26:23 +00:00
Warner Losh
048d9f99d1 o Rework the identify routine a little, merging it with NetBSD's wi.
o Add exerpimental support for identifying lucent cards.  All of mine
  come back with ID of 1, but NetBSD committed code for 5.  So accept
  both.
o rename wi_prism2_ver to wi_firmware_ver so that we could, if necessary,
  do special things for lucent cards too.
o Bring in a small part of the changes from airtools: The wi_cmd function
  now takes two additional arguments.  I didn't bring in their ioctls yet.
o eliminate the use of LE16TOH, and remove its define.
o Print the firmware as if there were 100 versions instead of 10.  This means
  that 6.1 and 6.10 aren't confusing to people.  We now print 6.01 in the
  former case.

# A good junior hacker project would be to merge the NetBSD, FreeBSD, and
# OpenBSD drivers into one source base.
2002-03-16 22:59:15 +00:00
Brooks Davis
d174b27395 Add support for 3Com Airconnect PCI cards.
MFC after:	3 days
2002-03-11 23:29:59 +00:00
Warner Losh
f1bdbc6674 Add roaming and microwave oven support. Some minor formatting nits.
Some buggy firmware workarounds.  Fix some endian bugs.

These reduce the diffs from NetBSD, but NetBSD does have more changes since
my last manual merge.
2002-03-05 16:18:14 +00:00
Warner Losh
a90b09d20a Remove __P to reduce diffs with NetBSD and my private tree. 2002-03-05 16:12:41 +00:00
Warner Losh
0e4c175bb9 Merge a little from NetBSD. 2002-03-05 16:06:54 +00:00
Warner Losh
dc4ec1188e Add a bunch of cards from NetBSD and maybe other places.
Ericsson Wireless Lan
Simple Tech Spectrum 24 Alt
Socket LP WLAN CF
Symbol LA4100
2002-03-04 02:59:20 +00:00
Brooks Davis
16555f3a03 Make 128-bit WEP (aka 104-bit WEP) work with Prism based cards.
Submitted by:	Thomas Skibo <skibo@pacbell.net>
MFC after:	3 days
2002-03-02 00:06:23 +00:00