Commit Graph

83 Commits

Author SHA1 Message Date
onoe 19a6d3dfb3 Make the meaning of media options consistent with other wireless drivers.
mediaopt adhoc  802.11 adhoc (IBSS) mode.  IBSS creation is enabled
			for cards which can create IBSS.
	mediaopt adhoc,flag0    old lucent adhoc demo mode.
Note that [adhoc] media options for wi driver was used for adhoc demo mode,
which is NOW CHANGED.
2002-08-21 03:26:29 +00:00
thorpej 1336889c8a wi_keylen is kept in little-endian order, so le16toh() it before
using it in e.g. a memcpy() call.
2002-08-12 16:56:39 +00:00
thorpej 1cb29bde17 Pass all 3 parameters to wi_cmd(). 2002-08-11 22:03:43 +00:00
thorpej b336ee00cd * Fix a Lucent <-> Prism2 WEP interop bug. We only want to set the
EXCLUDE_UNENCRYPTED bit in the WI_RID_P2_ENCRYPTION value if we are
  in shared key mode.  Symbol cards, just to be different, supposedly
  always want the EXCLUDE_UNENCRYPTED bit set (confirmed with the
  Linux orinoco and spectrum24 drivers).

* Flesh out the Host-AP WEP transmit side.  Note this does not yet
  work properly; the frame as seen by the receiver FCS's incorrectly.

Both changes from OpenBSD.  Not confirmed whether or not Host-AP WEP
works with OpenBSD (mail sent to millert).
2002-08-11 21:54:19 +00:00
thorpej 22c90da7f0 Snapshot of work-in-progress: Add AP support for Prism2-based boards.
WEP for APs is not yet implemented, but without WEP, this works well
enough for my laptop to associate with an AP running this code.

Adapted from OpenBSD.
2002-08-11 06:13:53 +00:00
thorpej 918a335551 Use WI_RID_DATA_RATES to fetch the supported rates. From OpenBSD. 2002-08-11 01:35:10 +00:00
thorpej bb718bd6e3 * Add "wi_flags" to the softc to indicate capabilities of the card. Fill
in this info based on firmware type and version.  Replace "wi_has_wep"
  with a flag.
* For cards which support IBSS, add "ibss" has a media option.
* For cards which support CREATE_IBSS, add "ibss-master" as a media
  option.
* Use the "ibss" and "ibss-master" media options to determine if
  we should go into IBSS mode and/or create the IBSS.
* Internally convert between the generic WI_PORTTYPE_IBSS and the
  value the firmware wants to use for IBSS.
* When setting the IBSS name, if a desired-SSID is set, and we're
  an ibss-master, write the desired-SSID into the own-SSID slot.
  This ensures that "ifconfig wi0 nwid FOO" will do the expected
  thing.
* Only set the roaming mode if the card supports roaming.

From OpenBSD.
2002-08-11 01:30:28 +00:00
thorpej d1737f8f98 Only read supported rates on Prism2 boards. 2002-08-11 00:11:52 +00:00
thorpej 375eb183ff Read supported rates from the card and report them. Only add
media types if that rate is supported.

Adapted from OpenBSD.
2002-08-11 00:00:41 +00:00
thorpej 742ad68157 Fix some whitespace. 2002-08-10 23:16:14 +00:00
mycroft 79056950e2 Mask off extraneous bits in the RX frame status when testing it. My cards set
bit 3 in ad hoc mode.
Also, some minor constant folding.
2002-05-31 15:52:55 +00:00
onoe 86920876dd (force commit: no changes in the code)
WI_RID_SCAN_APS in previous commit works for Intel Pro/Wirelss 2011
with firmware 2.51.1.
It seems that the firmware automatically updated after the card runs on
Windows 2000 with 2011_2011B_CD_3.0 in Intel web site.
2002-04-18 05:24:28 +00:00
onoe fa97a362d4 Support WI_RID_SCAN_APS (wiconfig -D) for Symbol CF Card.
It apparently requires newer firmware (3.10.4), and doesn't work on
Intel PRO/Wireless 2011 (2.0.11).
2002-04-16 07:24:06 +00:00
onoe dd80e6d577 Some fixes for Symbol card.
- The version string doesn't need to start with 'V'.
- Symbol firmware also support CREATE_IBSS.
- But it doesn't support ROAMING_MODE nor MICROWAVE_OVEN.
2002-04-14 19:55:23 +00:00
augustss d0c3f994ea Put device name at start of line. 2002-04-11 11:21:26 +00:00
ichiro 1fb4491ea4 Upps, fix typo 2002-04-05 00:59:38 +00:00
ichiro 7d1236beff fix minor bugs for lucent cards. (point out from Warner Losh) 2002-04-05 00:54:51 +00:00
jdolecek 46d335a320 move wi_pci_reset() from ic/wi.c to pci/if_wi_pci.c, where is belongs 2002-04-04 17:43:31 +00:00
jdolecek e9ee3f796e fix sligh confusion on whether or not to supply dv_xname to printf() in
error cases of attach
Noticed in kern/16197 by George E Sollish.
2002-04-04 17:30:32 +00:00
ichiro 7fadd48a2f using table driven for Prism2 family IDs/Names. 2002-04-04 07:06:16 +00:00
ichiro ff941b5271 s/WI_NIC_3842/WI_NIC_3842_EVA 2002-04-03 15:43:14 +00:00
ichiro a07b331747 add more IDs of PRISM family 2002-04-03 15:33:20 +00:00
ichiro 2288447a2e add more IDs of PRISM family 2002-04-01 02:46:47 +00:00
jdolecek 3679b97e61 add some bound checking
patch submitted by IWAMOTO Toshihiro in kern/13112
2002-03-31 10:44:44 +00:00
ichiro 53f97402c6 Dont use magic number.
added parameter of WEP flags
2002-03-31 05:51:47 +00:00
ichiro 7cd9648d72 added sc_pri_firmware_ver, and print Primary/Station firmware versions.
cosmetic change.
2002-03-30 16:44:59 +00:00
ichiro c05f3dd312 the kind of "firmware" was clarified.
firmware -> station firmware
2002-03-30 15:58:45 +00:00
onoe 45a8f0749c Fix to work Symbol firmware card, which cannot be initialized more than once.
Tested with 3Com 3CRWE737A and Intel Pro/Wireless 2011.
2002-03-27 08:01:22 +00:00
dbj ea44522489 changes from Warner Losh to read firmware version for non prism2 cards 2002-03-25 09:10:54 +00:00
itohy a56d289043 I have Prism2 with 0.8.2 firmware, and have no problem
using WEP without promisc on the device.
2002-03-21 07:31:37 +00:00
dbj 28819987b7 don't set prism2 bit when WI_NIC_LUCENT is detected 2002-03-17 02:52:59 +00:00
ichiro 8596bfd754 fix 128bit WEP work with Prism2 Card.
from FreeBSD
2002-03-10 14:43:38 +00:00
augustss c93a7a4d14 Add a nic I don't really know much about, but it's used on my D-Link card. 2002-03-10 00:16:47 +00:00
dbj 5c7e9abe49 return EINPROGRESS instead of EINVAL when trying to read
the results of an AP scan that is not finished
2002-03-06 14:41:39 +00:00
dbj 47b3797fe7 Don't attempt to gather unrequested statistics.
Allow SIOCSWAVELAN with WI_RID_IFACE_STATS to request
an immediate statistics update.

We might in the future want to have SIOCGWAVELAN with
WI_RID_IFACE_STATS return an error if a statistics gathering is in
progress.  Then the caller could request fresh statistics and gather
them when they are done.  Instead, we currently just return whatever
statistics are available, which may be up to 60 seconds old.
2002-03-04 01:56:12 +00:00
dbj e9d22f79b0 fix byte swapping when gathering statistics
this should complete the fix to pr 14385
AP scanning and statistic gathering should work on le hosts now
2002-03-04 01:33:17 +00:00
dbj 918b9d4dec correctly handle AP scanning result when there are no APs 2002-03-04 01:30:04 +00:00
dbj 0dca7b4f6d used %02x instead of %x when printing out BSS ids 2002-03-04 01:21:07 +00:00
dbj 0812667818 s/Faild/Failed/ 2002-03-04 01:19:24 +00:00
dbj 2622b21584 use #ifdef WI_DEBUG instead of #if WI_DEBUG 2002-02-26 09:29:18 +00:00
dbj 44ab750650 avoid walking full length of unknown stats structure.
this partially addresses pr14385.
there is still a byte swapping bug retrieving the
stats structure.  Since both the type and the length
are incorrectly swapped, we would timeout while reading
an extra long section (caused by the byteswapped length)
of garbage data.
turning on WI_DEBUG now just reports the unknown info type
which can be seen to be obviously incorrectly swapped
on macppc
2002-02-26 09:18:54 +00:00
yamt e3f53c00e2 fix indent 2002-02-18 14:45:56 +00:00
yamt 1486b3d395 add a missing splx in the case of error. 2002-02-18 14:41:50 +00:00
martin 387b55cc79 Protect calls to wi_cmd() from callout handlers by proper splnet()/splx()
pairs. Without this, the interrupt handler will steal the "command completed"
status and wi_cmd will busy loop until it times out.

Add some error output to make failure modes like this more prominent.

This should fix PR 14559.
2002-02-17 19:24:18 +00:00
itojun 75777b6533 make the driver even more silent; print state change messages only if IFF_DEBUG. 2002-02-13 22:06:17 +00:00
martin 0b57fdbf9d Don't display some (non-exceptional) events unless IFF_DEBUG is set.
I have a card that fires a continuos stream of "connected" events (one
every 30 seconds) while it hasn't found any peer.
2002-02-01 13:35:41 +00:00
ichiro 8d5e7bd872 if AP is nothing, FrameLen is 3 or less. 2002-01-21 21:55:05 +00:00
ichiro 65967c6704 Print Association status changes to the console. 2002-01-21 11:29:22 +00:00
ichiro e08ec84292 "Association Faild" was added to "Link Stat" messages.
;
Implement wi_scan into wi.c.
forces if_wi to initiate one round of access point scan.
This code was written by jrb@cs.pdx.edu, modified and bug-fixed by ichiro@netbsd.org
2002-01-21 11:28:18 +00:00
ichiro 93c743cc3b mistake bit number of tx_rate
case 4 -> case 5
2002-01-20 07:26:14 +00:00