Commit Graph

52 Commits

Author SHA1 Message Date
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
dyoung ea63a1a6cd PR 23428: support National Datacomm Corporation NCP130A2 board.
Thanks T. M. Pederson for sending the patches.
2003-12-14 10:04:33 +00:00
wiz c5670263e0 Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 11:07:44 +00:00
simonb 7e135f3a2e Make this compile with older gcc. 2003-10-25 13:45:07 +00:00
mycroft f253f37fb0 In wi_newstate(), read the BSSID into a temporary buffer that has guaranteed
alignment.  Fixes a really obscure failure mode on Alpha, and panics on other
machines.
2003-10-24 23:58:22 +00:00
dyoung d531221c67 Prepare for wi rate adaptation. Add wi_write_txrate, which only
writes a hardware register when the data rate selection actually
changes. Add wi_cfg_txrate, which writes the data rate selection
regardless.

Name some fields in the wi Tx buffer which we will use for rate
adaptation.

Name the Prism "Alternate Retry Count" RID, WI_RID_ALT_RETRY_COUNT.
2003-10-16 10:57:35 +00:00
dyoung 850a6ef1e6 Begin synchronization with FreeBSD:
1 Add channel mask, transmit rate-mask arguments to wi_scan_ap.
2 Adopt the macros WI_LOCK/WI_UNLOCK for synchronization. FreeBSD
  uses a different synchronization mechanism.
3 In wi_cmd, adopt constants WI_DELAY/WI_TIMEOUT for timing.
4 Pull debug messages from into wi_read_nicid from FreeBSD.
5 Bug fix: if IFF_ALLMULTI, don't filter any multicasts.
6 Count and report TX exceptions, but don't generate any additional
  interrupts.
2003-05-13 08:35:58 +00:00
kml 0ad9e0dccc Host AP power saving support. The Host AP notices that the power
saving bit is set in incoming frames from a station, and buffers the
outgoing frames for the station until they are polled for.  This
requires support in the driver to set a bit in the TIM bitmap sent
during 802.11 beacons.

So far, support for power saving in Host AP mode is only available
for the PRISM2 chipset.
2003-04-08 04:31:23 +00:00
dyoung 9b203bb525 Step 0 of adding Prism monitor mode: name the firmware command for
setting up manufacturing test modes. Name the sub-command for
turning on monitor mode.
2003-02-25 00:56:35 +00:00
soren 75a75e1d7a WI_PCI_CBMA belongs in dev/pci. 2002-10-21 11:57:25 +00:00
onoe 031d8de6cf Fix NIC-memory leak for symbol firmware at reinitialization. After 4-5
times changing of 802.11 parameters, such as nwid, the error
"tx buffer allocation failed" occured unless ifconfig down up.

Pass signal streangth and timestamp to ieee80211_input, though it is not
useful for wi driver for now.
2002-10-02 17:11:34 +00:00
onoe efe919010c Jumbo commit for wi driver.
- Eliminate wi_hostap.c since most of the code are duplicated with
  net/if_ieee80211subr.c
- Station for Infrastructure network and IBSS also use service functions
  as much as possible to be consistent with other wireless drivers.
Now WEP works for station/ibss/hostap.
2002-09-30 06:50:35 +00:00
thorpej 4f4dc45bbb Jumbo patch, from David Young <dyoung@ojctech.com>, with small tweaks
by me:
* Speed up reading/writing buffers from the hardware by avoiding
  slow forward seeks.  In preparation to use the optimization, do
  not read overlapping bytes.  This is currently disabled, but can
  be enabled with OPTIMIZE_RW_DATA.
* Hand 802.11 and Prism-specific frames to BPF.  User can watch these
  frames by specifying an alternate DLT to e.g. tcpdump(8).
* Add support for SIOC[SG]80211BSSID and SIOC[SG]80211CHANNEL.
* Issue join requests and track join/create state through link-status
  notifications.
* Split wi_rxeof into separate routines for receiving Ethernet II,
  802.11 data, and 802.11 management frames.
* Bug fix: Account for aligning m_data to a word boundary in the Rx
  buffer size check.
* Bug fix: Check for LLC/SNAP even if the firmware tells us the frame
  is Ethernet II, as the firmware sometimes gets this wrong.
* Process as many events as possible when we get an interrupt, using
  a simple heuristic to avoid reprocessing an event (which can have
  bad side-effects).  Clamp the time spent in the interrupt handler
  to 4ms.
* Redo the timeout loops to be consistent and less prone to error.
* Add delays to timeout loops which were missing them, so that a
  fast CPU won't win the race.
* Borrow some timeout loop values from the linux-wlan-ng driver,
  which seems to reflect a high level of clue (due to direct support
  from Intersil).
* Get rid of silly wi_read_data(..., len + 2) idiom; simply round up
  in wi_read_data() and wi_write_data().  Also, protect against a
  length of 0.
* Name some frequently-used constants.  Correct spelling.  Other style nits.
* Bug fix: On Prism, set Create IBSS register to 0 *always*.  The meaning
  of Create IBSS == 1 is join an IBSS or *ESS*, and we do not want to
  join an ESS, because that would put us in an inconsistent state.  0
  is the right value for Prism.
* Bug fix: Clean up state at the top of wi_init(), in the event that
  we don't reach the bottom.
* Simplify wi_start() by always providing an RFC1042-encoded 802.11
  frame to the firmware.
* Larval powersave support for HostAP mode, enabled by WI_HOSTAP_POWERSAVE.
* Bug fix: Call wi_stop() from wi_shutdown().
* Bug fix: sync media options with HostAP mode in wi_sync_media().
* In wi_media_status(), inquire firmware for current media state if
  media == auto.  From FreeBSD.
* Clean up the way buffer lengths are computed by using pointer
  arithmetic rather than magic constants.
* Swap the order of comparisons in addr_cmp() for speed.
* Bug fix: Send ReAssoc Response instead of Assoc Response to a
  ReAssoc Request.
* Bug fix: Copy SSID using the correct size.
* Give more meaningful names to offsets in a wi_frame.
* Bug fix: Assign the right values to the named constants for
  Rx frame encoding.
* Get rid of useless SNAP constants.
2002-09-23 14:31:27 +00:00
thorpej c4ec970f17 Remove a redundant defn. 2002-08-11 21:49:40 +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 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 dbae3bd18f Define PORTTYPE constants for IBSS and HOSTAP (already in the
comments!).
2002-08-10 23:29:53 +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 a40f47b098 Add support to Symbol Wireless Networker CF card.
The card is Type 1 CF card and it doesn't have firmware in.
So we need to download the firmware image into the card before
touching it.
XXX downloading code should be written in generic (bus independent),
    but I don't have enough information for now.
2002-04-15 15:05:58 +00:00
ichiro 9d3869cb7c more description of Chips was added 2002-04-10 04:01:27 +00:00
ichiro 7d1236beff fix minor bugs for lucent cards. (point out from Warner Losh) 2002-04-05 00:54:51 +00:00
ichiro ed93d4f3b5 space/TAB cosmetics 2002-04-04 07:15:17 +00:00
ichiro 7fadd48a2f using table driven for Prism2 family IDs/Names. 2002-04-04 07:06:16 +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
ichiro cf8b4530ef add more description of "Connection control characteristics" in Prism2 2002-03-31 06:09:37 +00:00
ichiro 17a3f4351a delete incorrect register 2002-03-31 05:22:26 +00:00
ichiro 94e7948a7e add rx/tx status register 2002-03-31 05:12:55 +00:00
ichiro 5cebe8a050 mistake 2002-03-31 04:06:29 +00:00
ichiro d68d2ca3ec add more frame structure register 2002-03-31 03:36:15 +00:00
martin f4be3308da Psssst, don't tell anybody I commited this.
Add an ugly hack, #ifdef WI_AT_BIGENDIAN_BUS_HACK, to make the wi driver
access the underlying bus in big endian byte order.

This makes it possible to use this driver (probably one of the most
interesting ones) in the pcmcia slot of a stp4020 (nell) adapter at sbus. The
sparc ports bus_space_{read,write}_* macros do not provide a way to do this
cleanly now as they ignore the bus_space_tag_t parameter.

XXX - make bus_space_{read,write}_* on sparc do the right thing.
2002-03-15 13:15:36 +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
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 19ae79a0b6 Upps
Garbage was removed.
2002-01-20 06:49:32 +00:00
ichiro f62afb33a0 add few Information frame types 2002-01-20 06:45:22 +00:00
explorer a40b01901f revert changes I made a long time ago. This should undo the changes which are causing problems on some non-x86 platforms. I'll probsably redo some of these changes, but after the next release branch. 2002-01-05 20:10:53 +00:00
christos 257a5919a3 Get rid of duplicate RID definitions. 2001-11-11 00:16:07 +00:00
ichiro 9ad1f29f64 The description about soft-reset of WI_PCI_COR was added
and WI_PCI_SOFT_RESET was used.
Cosmetic change.
2001-10-14 12:33:18 +00:00
ichiro cbcfff63ec Add Intersil Prism2.5 Mini-PCI wavelan. 2001-10-13 15:00:23 +00:00
explorer 56b9583089 Implement two major items:
(1) Add an IOCTL to tell the Lucent based cards how often to
	    do an access point scan.  These results are returned by
	    calling another IOCTL to get the most recent scan data.

	    This function works with prism2 cards as well, but the
	    data is returned in a different format, or perhaps it is
	    data only for the closest access point.

	(2) For prism2 cards, add the ability to put it into LAN monitor
	    mode, where (via BPF) all packets can be received.  This
	    mode works best with "wiconfig wi0 -p 3 -f ?" to put the
	    card into pseudo-IBSS mode (to keep it from channel-hopping
	    and scanning for access points) and to set the frequency of
	    the AP you wish to monitor.

	    The returned data has a partial wi_frame header (down to the
	    wi_dat_len field) followed by the raw data of the packet.
	    I have and will put up on http://www.flame.org/NetBSD/wireless/
	    some simple utilities which do some perhaps interesting things,
	    like scan for access points, capture packets, etc.
2001-09-22 17:22:25 +00:00
thorpej 0884f20bf7 bzero -> memset 2001-07-07 16:13:44 +00:00
thorpej 7711ad565b bcopy -> memcpy 2001-07-07 15:53:13 +00:00
toshii 9590a56496 Use bus_space_{read,write}_multi_stream_2 where available. 2001-06-02 15:49:16 +00:00
ichiro 8a78799bf4 support BUFFALO AirStation WLI-PCM-S11
this card are PRISM2.5 card.
2001-05-16 14:33:21 +00:00
tsubai eef5fa50d3 Big-endian support. 2001-05-16 10:45:36 +00:00
ichiro 15833cae3b add prism chip identity, Prism2 with SST flush. 2001-05-16 07:53:28 +00:00
ichiro 4afb07bd12 getting prism2 firm ver routine to wi_get_id().
if firm ver is more than 0.8c3, promiscuous mode is off.

typo WI_RID_STA_IDENEITY -> WI_RID_STA_IDENTITY
2001-05-15 09:01:27 +00:00