History log of /src/sys/dev/ic/rtwphy.c |
Revision | | Date | Author | Comments |
1.17 |
| 10-Nov-2019 |
chs | in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT and remove code to handle failures that can no longer happen.
|
1.16 |
| 15-Nov-2013 |
nisimura | branches: 1.16.30;
fix unused variable warning
|
1.15 |
| 19-Oct-2009 |
rmind | branches: 1.15.12; 1.15.22; 1.15.26; Drop 3rd and 4th clauses from David Young's license. Reviewed and approved by dyoung@ (copyright holder).
|
1.14 |
| 03-Mar-2008 |
tsutsui | branches: 1.14.4; Explicitly include <sys/device.h> for device_t.
|
1.13 |
| 19-Oct-2007 |
ad | branches: 1.13.12; 1.13.16; machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
|
1.12 |
| 16-Nov-2006 |
christos | branches: 1.12.8; 1.12.22; 1.12.24; 1.12.28; __unused removal on arguments; approved by core.
|
1.11 |
| 12-Oct-2006 |
christos | - sprinkle __unused on function decls. - fix a couple of unused bugs - no more -Wno-unused for i386
|
1.10 |
| 31-Aug-2006 |
dyoung | branches: 1.10.2; 1.10.4; Per discussion on tech-kern and tech-userlevel, move the bit-twiddling macros, __BIT, __BITS, SHIFTIN, SHIFTOUT, and __arraycount() from lib/libkern/libkern.h to sys/cdefs.h. Add a __-prefix to SHIFTIN and SHIFTOUT, and add a manual page for the bit-twiddling macros, bits(3).
Make the __BIT and __BITS macros "widthless," as best I can, by changing their type to uintmax_t from uint32_t. XXX The manual page lags this change by a bit.
Define __PRIxBIT and __PRIxBITS printf(3) format strings.
|
1.9 |
| 08-Mar-2006 |
dyoung | Move my bit-twiddling macros to libkern.h from my drivers, where I had duplicated them. Improve the macros' names. Simplify their implementation.
A brief description of each macro is below.
BIT(n): Return a bitmask with bit m set, where the least significant bit is bit 0.
BITS(m, n): Return a bitmask with bits m through n, inclusive, set. It does not matter whether m>n or m<=n. The least significant bit is bit 0.
A "bitfield" is a span of consecutive bits defined by a bitmask, where 1s select the bits in the bitfield. SHIFTIN, SHIFTOUT, and SHIFTOUT_MASK help read and write bitfields from device registers.
SHIFTIN(v, mask): Left-shift bits `v' into the bitfield defined by `mask', and return them. No side-effects.
SHIFTOUT(v, mask): Extract and return the bitfield selected by `mask' from `v', right-shifting the bits so that the rightmost selected bit is at bit 0. No side-effects.
SHIFTOUT_MASK(mask): Right-shift the bits in `mask' so that the rightmost non-zero bit is at bit 0. This is useful for finding the greatest unsigned value that a bitfield can hold. No side-effects. Note that SHIFTOUT_MASK(m) = SHIFTOUT(m, m).
Examples:
/* * Register definitions taken from the RFMD RF3000 manual. */ #define RF3000_GAINCTL 0x11 /* TX variable gain control */ #define RF3000_GAINCTL_TXVGC_MASK BITS(7, 2) #define RF3000_GAINCTL_SCRAMBLER BIT(1)
/* * Shift the transmit power into the transmit-power field of the * gain-control register and write it to the baseband processor. */ atw_rf3000_write(sc, RF3000_GAINCTL, SHIFTIN(txpower, RF3000_GAINCTL_TXVGC_MASK));
/* * Register definitions taken from the ADMtek ADM8211 manual. * */ #define ATW_RXSTAT_OWN BIT(31) /* 1: NIC may fill descriptor */ /* ... */ #define ATW_RXSTAT_DA1 BIT(17) /* DA bit 1, admin'd address */ #define ATW_RXSTAT_DA0 BIT(16) /* DA bit 0, group address */ #define ATW_RXSTAT_RXDR_MASK BITS(15,12) /* RX data rate */ #define ATW_RXSTAT_FL_MASK BITS(11,0) /* RX frame length, last * descriptor only */
/* Extract the frame length from the Rx descriptor's * status field. */ len = SHIFTOUT(rxstat, ATW_RXSTAT_FL_MASK);
|
1.8 |
| 29-Dec-2005 |
dyoung | branches: 1.8.4; 1.8.6; 1.8.8; 1.8.10; Add support for the GCT Semiconductor GRF5101 transceiver/synthesizer. From OpenBSD.
GCT will not provide any documentation, so there are many magic numbers in this code.
|
1.7 |
| 11-Dec-2005 |
christos | merge ktrace-lwp.
|
1.6 |
| 22-Jun-2005 |
dyoung | branches: 1.6.2; Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9) from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch], sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw, awi, ipw, iwi, rtw, wi) for the new net80211(9) API.
|
1.5 |
| 27-Feb-2005 |
perry | nuke trailing whitespace
|
1.4 |
| 02-Jan-2005 |
dyoung | branches: 1.4.2; 1.4.4; Cosmetic: change u_int{8,16,32,64}_t to C99-style uint{8,16,32,64}_t, which is preferred.
|
1.3 |
| 25-Dec-2004 |
dyoung | Change rtw_debug from a debug level to a debug mask. Add a lot of debug flags.
From Linux: handle an RTL8180 bug. Sometimes the NIC skips from the middle of the ring to the 0th rx descriptor. Now the driver resynchronizes.
Handle a receive descriptor underrun or Rx FIFO overflow condition in the way that the Linux driver does. This kind of seems like overkill, but whatever.
Protect rtw_ioctl with splnet().
Do not load a tx descriptor with a buffer shorter than 4 bytes.
Handle a transmit timeout less disruptively.
|
1.2 |
| 12-Dec-2004 |
dyoung | Miscellaneous changes. Details below. Important changes flagged with []. Using the driver with my Linksys WPC11 ver. 4, it seems to be receiving packets for a change. The WPC11 ver. 4 has a Maxim RF section. My no-name rtw with Philips RF section still does not receive any packets.
Keep access-level (analog params > config[0123] registers > none) in sc_access. Add rtw_set_access for changing the access level.
Make rtw_continuous_tx_enable and other subroutines use rtw_set_access instead of rtw_config0123_enable and rtw_anaparm_enable.
Factor part of the chip-reset code into rtw_chip_reset1.
Change the 'struct foo (*bar)[N]'-style arguments to 'struct foo *bar'-style arguments.
Consolidate software/hardware Tx/Rx ring setup in rtw_hwring_setup, rtw_swring_setup.
Add a new constant, SA2400_OPMODE_DEFAULTS, for the bits that we *always* set in the SA2400 OPMODE register.
Factor some code out into rtw_sa2400_calibrate. (Inspired by the Linux driver.)
[] When the receiver goes into underrun/overflow state, call a new subroutine, rtw_kick() that stops the Rx/Tx processes, resets the chip, reinitializes the Tx/Rx rings, and restarts Rx/Tx processes. (Inspired by the Linux driver.)
[] In rtw_intr_rx, check for too-short packets before calling ieee80211_find_rxnode. I believe this will prevent a repeat of the MCHK exception I saw once on macppc.
[] Use seconds-elapased as well as microseconds-elapsed to set the next "due date" for the timeout interrupt. This keeps the driver from programming the timeout to expire too early.
[] In rtw_intr, read RTW_ISR at most 10 times, then get out. If the interface is not enabled (RTW_F_ENABLED), then get out.
[] In rtw_stop, get out if the interface is not enabled (RTW_F_ENABLED). Block IPL_NET interrupts. Don't read/write any registers if the interface is invalid (RTW_F_INVALID).
[] Call rtw_stop in rtw_detach.
|
1.1 |
| 26-Sep-2004 |
dyoung | branches: 1.1.2; Add work-in-progress driver rtw(4) for Realtek RTL8180 MAC/baseband.
Add register definitions for Maxim MAX2820 and Philips SA2400 radio front-ends.
|
1.1.2.6 |
| 10-Nov-2005 |
skrll | Sync with HEAD. Here we go again...
|
1.1.2.5 |
| 04-Mar-2005 |
skrll | Sync with HEAD.
Hi Perry!
|
1.1.2.4 |
| 17-Jan-2005 |
skrll | Sync with HEAD.
|
1.1.2.3 |
| 18-Dec-2004 |
skrll | Sync with HEAD.
|
1.1.2.2 |
| 19-Oct-2004 |
skrll | Sync with HEAD
|
1.1.2.1 |
| 26-Sep-2004 |
skrll | file rtwphy.c was added on branch ktrace-lwp on 2004-10-19 15:56:56 +0000
|
1.4.4.1 |
| 19-Mar-2005 |
yamt | sync with head. xen and whitespace. xen part is not finished.
|
1.4.2.1 |
| 29-Apr-2005 |
kent | sync with -current
|
1.6.2.4 |
| 17-Mar-2008 |
yamt | sync with head.
|
1.6.2.3 |
| 27-Oct-2007 |
yamt | sync with head.
|
1.6.2.2 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.6.2.1 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.8.10.1 |
| 19-Apr-2006 |
elad | sync with head.
|
1.8.8.2 |
| 03-Sep-2006 |
yamt | sync with head.
|
1.8.8.1 |
| 13-Mar-2006 |
yamt | sync with head.
|
1.8.6.1 |
| 22-Apr-2006 |
simonb | Sync with head.
|
1.8.4.1 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.10.4.2 |
| 10-Dec-2006 |
yamt | sync with head.
|
1.10.4.1 |
| 22-Oct-2006 |
yamt | sync with head
|
1.10.2.1 |
| 18-Nov-2006 |
ad | Sync with head.
|
1.12.28.1 |
| 25-Oct-2007 |
bouyer | Sync with HEAD.
|
1.12.24.2 |
| 23-Mar-2008 |
matt | sync with HEAD
|
1.12.24.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
1.12.22.1 |
| 26-Oct-2007 |
joerg | Sync with HEAD.
Follow the merge of pmap.c on i386 and amd64 and move pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup code to restore CR4 before jumping back into kernel space as the large page option might cover that.
|
1.12.8.1 |
| 23-Oct-2007 |
ad | Sync with head.
|
1.13.16.1 |
| 03-Apr-2008 |
mjf | Sync with HEAD.
|
1.13.12.1 |
| 24-Mar-2008 |
keiichi | sync with head.
|
1.14.4.1 |
| 11-Mar-2010 |
yamt | sync with head
|
1.15.26.1 |
| 18-May-2014 |
rmind | sync with head
|
1.15.22.1 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.15.12.1 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.16.30.1 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|