summaryrefslogtreecommitdiffstats
path: root/sys/dev/ral
Commit message (Collapse)AuthorAgeFilesLines
* Fix kernel panic in rt2661_tx_intr() if no frames has been sent.fjoe2006-06-051-0/+4
| | | | Obtained from: OpenBSD (sys/dev/ic/rt2661.c rev. 1.15)
* add missed calls to bpf_peers_presentsam2006-06-021-2/+2
|
* Fix the following bpf(4) race condition which can result in a panic:csjp2006-06-022-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (1) bpf peer attaches to interface netif0 (2) Packet is received by netif0 (3) ifp->if_bpf pointer is checked and handed off to bpf (4) bpf peer detaches from netif0 resulting in ifp->if_bpf being initialized to NULL. (5) ifp->if_bpf is dereferenced by bpf machinery (6) Kaboom This race condition likely explains the various different kernel panics reported around sending SIGINT to tcpdump or dhclient processes. But really this race can result in kernel panics anywhere you have frequent bpf attach and detach operations with high packet per second load. Summary of changes: - Remove the bpf interface's "driverp" member - When we attach bpf interfaces, we now set the ifp->if_bpf member to the bpf interface structure. Once this is done, ifp->if_bpf should never be NULL. [1] - Introduce bpf_peers_present function, an inline operation which will do a lockless read bpf peer list associated with the interface. It should be noted that the bpf code will pickup the bpf_interface lock before adding or removing bpf peers. This should serialize the access to the bpf descriptor list, removing the race. - Expose the bpf_if structure in bpf.h so that the bpf_peers_present function can use it. This also removes the struct bpf_if; hack that was there. - Adjust all consumers of the raw if_bpf structure to use bpf_peers_present Now what happens is: (1) Packet is received by netif0 (2) Check to see if bpf descriptor list is empty (3) Pickup the bpf interface lock (4) Hand packet off to process From the attach/detach side: (1) Pickup the bpf interface lock (2) Add/remove from bpf descriptor list Now that we are storing the bpf interface structure with the ifnet, there is is no need to walk the bpf interface list to locate the correct bpf interface. We now simply look up the interface, and initialize the pointer. This has a nice side effect of changing a bpf interface attach operation from O(N) (where N is the number of bpf interfaces), to O(1). [1] From now on, we can no longer check ifp->if_bpf to tell us whether or not we have any bpf peers that might be interested in receiving packets. In collaboration with: sam@ MFC after: 1 month
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-163-3/+0
| | | | unnecessary.
* o fixes the locking of if_init().damien2006-03-212-3/+45
| | | | | | | | | o don't send management frames if the IFF_DRV_RUNNING flag is not set. this prevents the timeout watchdog from being potentially re-armed when the interface is brought down. fixes a crash that occurs with RT2661 based adapters. reported by Arnaud Lacombe.
* Disable 802.11e support for now. Did some cleanup while I'm here.damien2006-03-071-4/+2
|
* Fix include paths to make this compile.silby2006-03-053-10/+10
|
* Import microcodes for RT2561, RT2561S and RT2661 chipsets.damien2006-03-051-0/+2268
| | | | With permission from Ralink Technology.
* Add support for the second (RT2561/RT2561S) and third (RT2661 MIMO XR)damien2006-03-059-1296/+4814
| | | | | | | | generations of 802.11abg chipsets from Ralink Technology. Get rid of the pccard front-end while I'm here since all adapters are cardbus ones. Obtained from: OpenBSD
* use s/w bmiss facilitysam2006-02-181-0/+2
| | | | MFC after: 1 week
* stop device so we don't panic on card ejectsam2006-02-181-0/+1
| | | | MFC after: 1 week
* Adjust tx power based on user preferences.damien2006-01-291-0/+3
|
* o Fix short preamble supportdamien2006-01-293-60/+95
| | | | | | | o Fix contention window o Feed rx rate to radiotap o Clean ral_setup_txdesc (sync w/ ural) o s/ic_ibss_chan/ic_curchan/
* Sync with ural:damien2005-11-292-18/+19
| | | | | o Send management frames at the lowest possible rate. o Cosmetic tweaks.
* Optimize PLCP length field computation for 802.11b rates.damien2005-11-231-5/+4
|
* Optimize and clean TX time computation.damien2005-11-151-22/+7
| | | | | | Avoid a test and a modulus operation. MFC after: 2 weeks
* Be more robust when handling Rx interrupts. If we can't allocate and DMA mapdamien2005-11-131-21/+41
| | | | | | | a new mbuf, just discard the received frame and reuse the old mbuf. This should fix kernel panics on high network traffic. MFC after: 2 weeks
* Remove OLDCARD shimsimp2005-09-211-23/+4
|
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weimp2005-09-191-1/+1
| | | | | | | could get an interrupt after we free the ifp, and the interrupt handler depended on the ifp being still alive, this could, in theory, cause a crash. Eliminate this possibility by moving the if_free to after the bus_teardown_intr() call.
* Avoid deferencing NULL in if_free().ru2005-09-161-3/+2
|
* if_ral_pccard does not depend on pccard module directly, but ratherimp2005-08-221-1/+0
| | | | | | | depends, like all other pccard drivers, indirectly through kobj on pccard. Therefore, it is not appropriate to force pccard to be loaded when if_ral.ko is loaded. This makes it possible to load if_ral w/o loading pccard.ko on, eg, pci only systems.
* Fix basic rates set for 802.11a/g operating modes. This can significantlydamien2005-08-211-16/+29
| | | | | | improve transfer rates in 802.11a/g. Fix IFS settings in ral(4) too. MFC after: 6 days
* Don't automatically start scanning in if_init() if IEEE80211_ROAMING_MANUALdamien2005-08-201-4/+6
| | | | | | flag is set. MFC after: 1 week
* Clarify/fix handling of the current channel:sam2005-08-101-7/+8
| | | | | | | | | | | | | | | | | | | o add ic_curchan and use it uniformly for specifying the current channel instead of overloading ic->ic_bss->ni_chan (or in some drivers ic_ibss_chan) o add ieee80211_scanparams structure to encapsulate scanning-related state captured for rx frames o move rx beacon+probe response frame handling into separate routines o change beacon+probe response handling to treat the scan table more like a scan cache--look for an existing entry before adding a new one; this combined with ic_curchan use corrects handling of stations that were previously found at a different channel o move adhoc neighbor discovery by beacon+probe response frames to a new ieee80211_add_neighbor routine Reviewed by: avatar Tested by: avatar, Michal Mertl MFC after: 2 weeks
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-092-13/+14
| | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days
* diff reduction against p4: define IEEE80211_FIXED_RATE_NONE and usesam2005-07-221-2/+2
| | | | it instead of -1
* remove local mods that snuck into rev 1.6sam2005-07-101-4/+1
| | | | Approved by: re (scottl implicit)
* remove driver-private key allocators; use the default one insteadsam2005-07-101-12/+0
| | | | | | | so wpa keys are handled properly Reviewed by: avatar Approved by: re (scottl)
* oops ... forgot to declare sc in my previous commit. unbreak build.damien2005-07-081-0/+1
| | | | Approved by: re (scottl)
* ral_init() takes a struct ral_softc as parameter not a struct ifnet.damien2005-07-081-1/+1
| | | | | | | Fixes a panic that occured when setting the interface parameters while the interface was associated. Approved by: re (scottl)
* reclaim node reference when ieee80211_encap failssam2005-07-081-2/+7
| | | | | Reviewed by: avatar Approved by: re (scottl)
* reclaim mbuf when ieee80211_crypto_encap failssam2005-07-071-1/+3
| | | | | Approved by: re (scottl) Obtained from: netbsd
* o Fix a write mbuf-after-free bug. The duration field of the 802.11 headerdamien2005-06-291-9/+23
| | | | | | | | | | | was written in the old fragmented mbuf chain instead of the defragmented one. Thus, the duration field of outgoing frames was incorrect. o Only call m_defrag() if the mbuf fragmentation threshold is greater than what is currently supported by the driver. Reviewed by: silby (mentor) Approved by: re (scottl)
* Eliminate unused argument in PCMCIA_CARD macro.imp2005-06-241-1/+1
| | | | | | | | Provide a backwards compatible way to have the extra macro by defining PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that want/need to have the same driver on 5 and 6 with pccard attachments. Approved by: re (dwhite)
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-102-5/+11
| | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam
* Fix WPA (802.11i) support.damien2005-05-221-0/+12
| | | | Approved by: silby (mentor)
* Initial import of ipw, iwi, ral and ural drivers:damien2005-04-187-0/+3868
ipw - Intel PRO/Wireless 2100 iwi - Intel PRO/Wireless 2200BG/2225BG/2915ABG ral - Ralink Technology RT2500 ural - Ralink Technology RT2500USB Approved by: silby (mentor)
OpenPOWER on IntegriCloud