summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/rtw.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* part of rev 1.58 of rtw.c David Young comitted to NetBSD:jsg2006-01-051-121/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add support for GCT GRF5101 RF transceiver based hardware. Magic numbersjsg2005-11-201-8/+132
| | | | | | 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.
* Move displaying rf/pa type to rtw_rf_attach to simplify code.jsg2005-11-051-48/+38
| | | | ok reyk@
* remove uneeded debug function.jsg2005-11-041-27/+3
|
* Move access to RF tranceiver functions to be via callbacks.jsg2005-11-041-79/+22
| | | | "looks fine" reyk@
* change read/write callbacks to use a void * instead of struct rtw_regs.reyk2005-10-241-15/+22
| | | | | | | | 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@
* fix RTW_DEBUGreyk2005-10-241-2/+2
|
* change RTW_ANAPARM to RTW_ANAPARM_0 for consistency with the rtl8225 code.reyk2005-10-241-13/+13
| | | | ok jsg@
* Move rtw_attach error condition handling out of rtw_detach and intojsg2005-10-231-93/+55
| | | | rtw_attach simplifying things in the process. ok reyk@
* use read/write/barrier callbacks, will be used laterreyk2005-10-231-1/+64
| | | | ok jsg@
* knfreyk2005-10-231-6/+7
|
* Move two tiny sa2400 init functions back into calling sa2400 init function.jsg2005-09-151-33/+16
|
* Remove rtw_rfbus_write abstraction for readability.jsg2005-09-151-67/+34
|
* As the _create functions for all the rf transceivers now just set somejsg2005-09-141-65/+29
| | | | default values, remove them and do value setting in rtw_rf_attach.
* Remove rtw_rf/rtw_rfbus and some other related abstractionsjsg2005-09-141-329/+207
| | | | which made things overly complicated.
* Remove the last of the FreeBSD compatiblity goop.jsg2005-09-081-2/+1
| | | | ok reyk@
* remove trailing newline in panic(9); ok millert@ and deraadt@fgsch2005-07-181-4/+4
|
* Match RTL8255 transceiver and stub out related support functions.jsg2005-06-151-1/+81
|
* Move a bunch of small functions that only get called once intojsg2005-06-131-98/+67
| | | | their calling functions.
* use JAPAN for locale code 0 stored in some rtw EEPROMs.reyk2005-05-291-1/+3
|
* further cleanup - use bzero, bcopy and bcmpreyk2005-05-291-13/+10
| | | | ok jsg@
* knfreyk2005-05-291-73/+76
|
* cleanup rtwreyk2005-05-291-181/+1266
|
* make sure to enable socket on resume.robert2005-05-271-2/+2
| | | | | | | in order for the enable to work disable the socket on suspend. lot of help from mickey@ ok jsg@ millert@
* Remove some unuseful debug code.jsg2005-05-231-119/+2
|
* Only complain about tx fifo overflows if RTW_DEBUG is set.jsg2005-03-181-1/+3
| | | | ok deraadt@
* Make attach errors appear on new lines and makejsg2005-03-151-20/+21
| | | | dmesg output less ugly while here.
* Fix RTW_DEBUG compilation and add a few more sanity checks in addition tojsg2005-03-121-97/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* addtion of a generic function for allocating beacons: ieee80211_beacon_alloc().damien2005-03-031-143/+2
| | | | ok jsg@, reyk@, dlg@
* radiotap support largely based on NetBSD rtw.jsg2005-03-021-16/+64
|
* IBSS bits from NetBSD rtw.c -r 1.40jsg2005-02-271-11/+31
|
* Add support for software WEP.jsg2005-02-251-5/+9
| | | | Pointers from and ok damien@
* From part of NetBSD rtw.c rev 1.36:jsg2005-02-221-2/+6
| | | | | In rtw_detach, flag the rtw as "invalid" (RTW_F_INVALID). Do not try to power-down the RF section of an invalid rtw.
* From part of NetBSD rtw.c rev 1.42:jsg2005-02-191-1/+176
| | | | | | | | | | | | | | | | | | | | | | 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.
* derived from NetBSD:reyk2005-02-171-12/+4
| | | | | | | | | | | | | | | | | | --- 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@
* From NetBSD:jsg2005-02-141-213/+447
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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@
* From NetBSD:jsg2005-02-081-51/+41
| | | | | | | | | | | | | | | | | | | | | sys/dev/ic/rtw.c rev 1.38: 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. sys/dev/ic/rtwreg.h rev 1.10: 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.)
* Wait 10ms for the completion of the EEPROM recall process, allowing apedro2005-02-061-8/+10
| | | | | couple of specific adapters (such as mine) to be correctly initiated. Discussed with and okay jsg@.
* Remove some uneeded code to reduce delta to NetBSD.jsg2005-02-061-66/+1
|
* Fix a merge error that was causing a panic after associating.jsg2005-02-061-2/+2
| | | | Thanks to mcbride@ for pointing me in the right direction.
* Reduce diff to NetBSD.jsg2005-01-221-26/+26
| | | | | | From part of rtw.c rev 1.42: Move the register access mode into struct rtw_regs. Change rtw_set_access, rtw_set_access1 to match.
* Reduce diff to NetBSD.jsg2005-01-221-278/+278
| | | | | | | | | | From rtw.c rev 1.34: 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.
* Remove the last of the rampant inline usage.jsg2005-01-191-30/+30
|
* destatic functions.jsg2005-01-191-31/+105
|
* Use the RF chipset type rather than the hardware version when determiningjsg2005-01-191-18/+23
| | | | | | whether to use host or MAC controlled RF I/O. From part of NetBSD rev 1.42
* Make the time spent scanning per channel consistent with other driversjsg2005-01-101-2/+2
| | | | and much more reasonable.
* From dyoung@NetBSD rev 1.41:jsg2005-01-091-2/+2
| | | | | Set initial conditions to guarantee that when read_seeprom toggles Chip Select, it turns *on* rather than *off*.
* Use the macwrite instead of the hostwrite radio programming methodjsg2005-01-091-2/+2
| | | | | | for rev F devices which lets us get responses from access points. Driver is still not fully working as yet. From a discussion with David Young.
* shrink dmesg outputjsg2005-01-041-15/+16
|
* Move the cfdriver struct to rtw.c where it belongs so cardbus rtwjsg2004-12-311-1/+5
| | | | can be enabled seperately from pci rtw. From fgsch@