summaryrefslogtreecommitdiff
path: root/sys/dev/ic/rtw.c
AgeCommit message (Collapse)Author
2007-11-21Remove superfluous function declarationBret Lambert
ok jsg@
2007-10-24Unconditionally initialize all channels, regardless of locale.Bret Lambert
Shaves 258 bytes from i386 kernel. Feedback, guidance, testing, and ok jsg@
2007-09-30s/NPBFILTER/NBPFILTER/ in #endif comment. No functional change.Mark Kettenis
2007-09-17Only the most obvious bzero() -> M_ZERO changes. No cast changes, noKenneth R Westerback
MALLOC/FREE, etc. Just adding M_ZERO to malloc() and deleting an immediately adjacent bzero().
2007-06-07move ieee80211_compute_duration() and ieee80211_compute_duration1()Damien Bergamini
functions into the two drivers that use them (atw and rtw.) this code is not generic enough to be used by other drivers and there is no chance that it will ever be used in newer driver since it supports 802.11b only. plus, it hurts my eyes each time i look into ieee80211_output.c. "fine with me as long as the logic doesn't change in the functions" jsg@
2007-04-06Correct order of bus_space_barrier() parameters.Jonathan Gray
From brad
2007-04-02Similar to other drivers call if_start() at the end of the rx interrupt becauseClaudio Jeker
ieee80211_input() may enqueue packets. OK jsg@
2007-02-14remove some unused goopJonathan Gray
2007-01-03M_DUP_PKTHDR() cleanup. On static buffers M_DUP_PKTHDR() will leak mbuf tags.Claudio Jeker
See similar rum(4) commit for more info. OK mglocker@
2006-11-26Make use of ieee80211_std_ratesetJonathan Gray
2006-08-30Return from channel tuning code if we get IEEE80211_CHAN_ANYJonathan Gray
as per other drivers instead of doing panics. Should workaround PR 5206 which I could never manage to reproduce, though we really shouldn't be getting IEEE80211_CHAN_ANY here. ok deraadt@
2006-03-25allow bpf(4) to ignore packets based on their direction (inbound orDamien Miller
outbound), using a new BIOCSDIRFILT ioctl; guidance, feedback and ok canacar@
2006-02-05Add a fix from David Young to not set the ring indexes to somethingJonathan Gray
obviously invalid, which can occur when ejecting a CardBus rtw.
2006-01-05rev 1.59 & 1.60 of rtw.c commited by David Young to NetBSD:Jonathan Gray
On a transmit FIFO overflow (err, actually an underflow...) reset both the transmit & receive sections of the MAC. Fix comments and debug printfs: Tx FIFOs underflow, they don't overflow.
2006-01-05part of rev 1.58 of rtw.c David Young comitted to NetBSD:Jonathan Gray
Miscellaneous Realtek RTL8180L driver improvements: 3 Revamp handling of transmit descriptor rings. 4 Reliably IFF_OACTIVE when transmit descriptors are available, to stop the transmit section of the driver from freezing up. 5 Fix beacon transmission in adhoc and hostap modes. XXX There is a wart in hostap mode, where beacons are transmitted at 1/2 the correct rate. Load beacon descriptors when the RTW_INTR_BINT interrupt arrives; schedule RTW_INTR_BINT 1ms ahead of the target beacon time. 6 Recover more gracefully from tx/rx errors: avoid transmitter/receiver/chip resets. Try to re-synchronize software state with hardware state---e.g., load next descriptor pointer from hardware. 7 Activate the transmit watchdog timer for beacons as well as other packets. 8 Introduce rtw_idle() that waits for transmit DMA to finish; call it before resetting the transmitter.
2005-11-20Add support for GCT GRF5101 RF transceiver based hardware. Magic numbersJonathan Gray
partially derived from rtl8180-sa2400 Linux driver. GCT refuse to release documentation so this is more than likely not as optimal as it could be.
2005-11-05Move displaying rf/pa type to rtw_rf_attach to simplify code.Jonathan Gray
ok reyk@
2005-11-04remove uneeded debug function.Jonathan Gray
2005-11-04Move access to RF tranceiver functions to be via callbacks.Jonathan Gray
"looks fine" reyk@
2005-10-24change read/write callbacks to use a void * instead of struct rtw_regs.Reyk Floeter
why? rtw uses the smc93cx6 EEPROM and a separate diff will allow accessing it without depending on the bus_space_* functions. this is required for the RTL8187L. discussed with jsg@
2005-10-24fix RTW_DEBUGReyk Floeter
2005-10-24change RTW_ANAPARM to RTW_ANAPARM_0 for consistency with the rtl8225 code.Reyk Floeter
ok jsg@
2005-10-23Move rtw_attach error condition handling out of rtw_detach and intoJonathan Gray
rtw_attach simplifying things in the process. ok reyk@
2005-10-23use read/write/barrier callbacks, will be used laterReyk Floeter
ok jsg@
2005-10-23knfReyk Floeter
2005-09-15Move two tiny sa2400 init functions back into calling sa2400 init function.Jonathan Gray
2005-09-15Remove rtw_rfbus_write abstraction for readability.Jonathan Gray
2005-09-14As the _create functions for all the rf transceivers now just set someJonathan Gray
default values, remove them and do value setting in rtw_rf_attach.
2005-09-14Remove rtw_rf/rtw_rfbus and some other related abstractionsJonathan Gray
which made things overly complicated.
2005-09-08Remove the last of the FreeBSD compatiblity goop.Jonathan Gray
ok reyk@
2005-07-18remove trailing newline in panic(9); ok millert@ and deraadt@Federico G. Schwindt
2005-06-15Match RTL8255 transceiver and stub out related support functions.Jonathan Gray
2005-06-13Move a bunch of small functions that only get called once intoJonathan Gray
their calling functions.
2005-05-29use JAPAN for locale code 0 stored in some rtw EEPROMs.Reyk Floeter
2005-05-29further cleanup - use bzero, bcopy and bcmpReyk Floeter
ok jsg@
2005-05-29knfReyk Floeter
2005-05-29cleanup rtwReyk Floeter
2005-05-27make sure to enable socket on resume.Robert Nagy
in order for the enable to work disable the socket on suspend. lot of help from mickey@ ok jsg@ millert@
2005-05-23Remove some unuseful debug code.Jonathan Gray
2005-03-18Only complain about tx fifo overflows if RTW_DEBUG is set.Jonathan Gray
ok deraadt@
2005-03-15Make attach errors appear on new lines and makeJonathan Gray
dmesg output less ugly while here.
2005-03-12Fix RTW_DEBUG compilation and add a few more sanity checks in addition toJonathan Gray
rtw.c -r 1.45 from dyoung@NetBSD: Log Message: Misc. changes to improve ad hoc mode and to enable hostap mode: Fix the work-around for the NIC bug where it skips to rx descriptor 0. The driver used to skip to rx descriptor 1. Hopefully this stops the out-of-order packet reception that Charles Hannum saw. When debugging is enabled, print rx-descriptor status flags before printing the rx bit rate. Add a debug message for when a beacon tx buffer reclamation. Reset IFF_OACTIVE when we reset the transmitter. Pass the consolidated LED state, a struct rtw_led_state, to rtw_led_attach. Choose the bit-rate for management frames (1Mb/s) at the same place we choose for all other frames. Do not use the NIC's short preamble or RTS options for management frames. Label beacons for the NIC. Following a Linux driver, take care not to zero arbitrary bits in the TPPOLL register. Use the new idiom for IBSS merges: disable transmitter, kick the state machine. Add a second descriptor to the beacon ring. The NIC seems to like this much better.
2005-03-03addtion of a generic function for allocating beacons: ieee80211_beacon_alloc().Damien Bergamini
ok jsg@, reyk@, dlg@
2005-03-02radiotap support largely based on NetBSD rtw.Jonathan Gray
2005-02-27IBSS bits from NetBSD rtw.c -r 1.40Jonathan Gray
2005-02-25Add support for software WEP.Jonathan Gray
Pointers from and ok damien@
2005-02-22From part of NetBSD rtw.c rev 1.36:Jonathan Gray
In rtw_detach, flag the rtw as "invalid" (RTW_F_INVALID). Do not try to power-down the RF section of an invalid rtw.
2005-02-19From part of NetBSD rtw.c rev 1.42:Jonathan Gray
log message: 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.
2005-02-17derived from NetBSD:Reyk Floeter
--- Make the node table into an LRU cache: least-recently used nodes are at the end of the node queue. Change the reference-counting discipline: ni->ni_refcnt indicates how many times net80211 has granted ni to the driver. Every node in the table with ni_refcnt=0 is eligible to be garbage-collected. The mere presence of a node in the table does not any longer indicate its auth/assoc state; nodes have a ni_state variable, now. While I am here, patch ieee80211_find_node_for_beacon to do a "best match" by bssid/ssid/channel, not a "perfect match." This keeps net80211 from caching duplicate nodes in the table. --- ok deraadt@ dlg@, looks good jsg@
2005-02-14From NetBSD:Jonathan Gray
From part of rtw.c rev 1.42: log message: Add RTW_TPPOLL_ALL, RTW_TPPOLL_SALL to start and stop, respectively, all of the transmit rings. 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. And rtw.c rev 1.33: log message: Consolidate variables related to the rx ring in sc_rxdesc_blk, which is a struct rtw_rxdesc_blk. Put a copy of the DMA tag and the DMA map into the rx- and tx-ring blocks so that I don't have to pass them to subroutines all of the time. ok dlg@