Commit Graph

13 Commits

Author SHA1 Message Date
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
dyoung 55940f7c4e Move the register access mode into struct rtw_regs. Change
rtw_set_access, rtw_set_access1 to match.

Add a subroutine for setting WEP keys.  WEP isn't quite finished,
because I have to add the WEP header to Tx packets.  Implement the
SIOCS80211NWKEY ioctl for setting WEP keys.

Program the LEDs based on operating state and packet activity.

 * On a Revision F RTL8180, blink LED1 at 1Hz to indicate
   scan/authenticate/associate states.  In the run state, turn LED1
   on.  In every state, blink LED1 at 5Hz to indicate non-beacon
   tx/rx activity.  I would like to use two LEDs, but in all my
   Rev. F instances, LED0 is not wired to an LED; instead, the
   first LED is wired to indicate that the card's power is on.

 * On a Revision D RTL8180, program the LEDs so that LED0 indicates
   Tx, and LED1 indicates Rx.  The Rx LED will blink annoyingly if
   there are beacons in the air, but at least the Tx LED is useful.

 * Store the hardware revision in the softc to support my futile
   attempt at programming LEDs for both Rev. D and Rev. F parts;
   I never did get Rev. D LEDs to work right.

 * Add a debug flag RTW_DEBUG_LED for the LED transitions.

Add RTW_TPPOLL_ALL, RTW_TPPOLL_SALL to start and stop, respectively,
all of the transmit rings.

In ad hoc mode, allocate a beacon and load it into the beacon ring.
Start the ring.  In one trial, the card re-transmitted the beacon
ring's contents several times before stopping.  More programming
and testing for ad hoc mode is necessary.  I'm not setting the
beacon flag in the transmit descriptor.

Revamp the transmit section to make better use of all the transmit
rings:  beacon queue, high-, low-, and medium-priority rings.  Put
beacon frames on the beacon ring.  All other management frames,
and data frames, go on the medium-priority ring.  Power-save data
frames go on the high-priority ring.  (Note that powersaving is
not implemented!)  This is a work in progress.

Send all 802.11 Management frames at 1Mbps.

After we put a packet on a transmit ring, tickle the right bit in
the TPPOLL to tell RTL8180.  Stop all rings on error and in rtw_stop.

Use the RF chip type, not the RTL8180 revision, to choose between
host- and MAC-controlled RF serial I/O.  Now the Netgear MA521
works.

Remove bogus definition of bit RTW_TPPOLL_FSWINT.
2005-01-16 11:50:43 +00:00
dyoung f7a7696b57 Fix typos in TPPOLL register definition: stop the normal- &
low-priority queues with bit1 and bit0, not bit2 and bit2.
2005-01-14 10:13:55 +00:00
dyoung 4903d25d90 In sys/dev/ic/rtw.c:
Use clue from rtk(4) and re(4) to fix the rtw(4) packet
	filter.  Previously, I was using the wrong CRC32 function
	to hash multicast addresses; to compensate, I set the
	multicast filter to all 1s.  Now that I hash the addresses
	correctly, I do not any longer set the filter to all 1s.

	In rtw_ioctl, avoid gratuitous re-initialization when the
	interface flags change.  If a !IFF_UP -> IFF_UP transition,
	call rtw_init(); otherwise, only reload the packet filter.

In sys/dev/ic/rtwreg.h:

	Put useful combinations of Receiver Control Register flags
	in RTW_RCR_PKTFILT_MASK, RTW_RCR_MONITOR, and
	RTW_RCR_PKTFILT_DEFAULT.  (XXX RTW_RCR_MONITOR should be
	called RTW_RCR_PKTFILT_MONITOR.)
2005-01-03 03:07:12 +00:00
dyoung 1236e46cff Guess the meanings of most registers on the baseband processor.
Available documentation is incomplete, so the true meanings will
have to be found out by painstaking experimentation.
2005-01-02 04:29:36 +00:00
dyoung 37420795ec Cosmetic: change u_int{8,16,32,64}_t to C99-style uint{8,16,32,64}_t,
which is preferred.
2005-01-02 04:23:03 +00:00
dyoung 23e8e34093 Remove the cut & pasted copyright and apply my copyright. 2004-12-29 19:43:27 +00:00
dyoung c3b84ef737 I like the tlp/atw-style names for software descriptors, txsoft,
better than txctl.  Change from rtw_txctl/rtw_rxctl to
rtw_txsoft/rtw_rxsoft.  Change the descriptor blocks' names to
match: rtw_txctl_blk becomes rtw_txsoft_blk.  Change the member-name
prefixes for both software and hardware descriptors.
2004-12-29 01:06:52 +00:00
mycroft 8de0a60775 Fix the BRSR macros. 2004-12-27 08:59:16 +00:00
dyoung e8cbfad366 The CRC bit in the Transmit Configuration Register seems to have
the meaning opposite to what I thought I read in the datasheet.
2004-12-21 09:07:23 +00:00
dyoung aecae5f227 Realtek sample sources are not consistent about the "Digital PHY"
bit in the SROM.  It seems as if it is set to 1 when the PHY is
*analog*, not *digital*.  Fix my sources.

In rtw_intr_rx, use units of 500kb/s instead of 100kb/s for rate,
to be consistent with net80211's expectations.  Polish up some
debugging ugly messages.  Dump raw 802.11 packets if IFF_DEBUG|IFF_LINK2
and RTW_DEBUG is defined.

Polish power-state (on/sleep/off) handling.  Especially improve
support for RFMD (totally untested) and Maxim.  For Philips, take
the Digital PHY property into account.

Call the net80211 watchdog function from rtw_watchdog, so that we
scan again if auth/assoc fails.

Be a little more cautious about writing register[RTW_TPPOLL], since
other drivers are....  Don't frob the high/low-priority queues
right now, since I don't use them.

Add rtw_join_bss which programs the card with the BSSID and other
properties of a BSS.  Use it on state transitions.  Factor out
rtw_set_nettype.

Make rtw_recv_beacon call ieee80211_recv_mgmt instead of dropping
beacons on the floor!  TBD IBSS merges.

Change some rtw_debug=2 printfs to rtw_debug=3 (RTW_DPRINTF3)
printfs so the console doesn't get spammed so badly at rtw_debug=2.
Change some debugging printfs to RTW_DPRINTFs.  E.g., print the
"RF programming method" only if debugging is enabled.
2004-12-20 23:05:41 +00:00
dyoung 38e3126fe5 Add the transmit section of rtw(4): build up and tear down transmit
descriptor rings, move packets from the transmit queues to the
transmit rings, handle transmission-completed interrupts.  My
Linksys WPC11 ver. 4 with Maxim RF, generates interrupts like it
is successfully transmitting packets.  Clearly there are bugs: my
G4 Powerbook locks up hard.  I will debug tomorrow.
2004-12-19 08:19:25 +00:00
dyoung 3e9bdb9662 Add work-in-progress driver rtw(4) for Realtek RTL8180 MAC/baseband.
Add register definitions for Maxim MAX2820 and Philips SA2400 radio
front-ends.
2004-09-26 02:29:15 +00:00