summaryrefslogtreecommitdiffstats
path: root/sys/dev/wi
Commit message (Collapse)AuthorAgeFilesLines
* replace if_watchdog w/ a private calloutsam2006-12-112-12/+11
| | | | MFC after: 1 month
* drop softc lock when passing rx frames up the stacksam2006-12-111-0/+3
| | | | MFC after: 1 month
* split wi_start int locked+unlocked variants and use the unlockedsam2006-12-112-9/+15
| | | | | | one from the isr to eliminate a recursive lock MFC after: 1 month
* nuke compatibility cruftsam2006-12-112-41/+0
| | | | MFC after: 1 month
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-3/+4
| | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
* raw 802.11 packet transmit supportsam2006-08-053-31/+148
| | | | Submitted by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
* Really fix the typo this time: it should be sc->sc_drvbpf to be verified,avatar2006-06-051-1/+1
| | | | not ic->ic_drvbpf.
* Fixing a typo in rev1.196.avatar2006-06-051-1/+1
|
* Fix the following bpf(4) race condition which can result in a panic:csjp2006-06-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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-162-2/+0
| | | | unnecessary.
* - Store pointer to the link-level address right in "struct ifnet"ru2005-11-111-5/+1
| | | | | | | | | | rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead.
* Add ELSA XI330 product. This is rebadged and sold as SMC 2532W-B andimp2005-10-141-0/+2
| | | | I/O Data also resells it. Add an alternative airvast an100 id.
* Fixing WEP bustage in hostap mode since 5.2-RELEASE.avatar2005-10-022-15/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - WEP TX fix: The original code called software crypto, ieee80211_crypto_encap(), which never worked since IEEE80211_KEY_SWCRYPT was never flagged due to ieee80211_crypto_newkey() assumes that wi always supports hardware based crypto regardless of operational mode(by virtue of IEEE80211_C_WEP). This fix works around that issue by adding wi_key_alloc() to force the use of s/w crypto. Also if anyone ever decides to cleanup ioctl handling where key changes wouldn't cause a call to wi_init() every time, we'll need wi_key_alloc() to DTRT. In addition to that, this fix also adds code to wi_write_wep() to force existing keys to be switched between h/w and s/w crypto such that an operation mode change(sta <-> hostap) will flag IEEE80211_KEY_SWCRYPT properly. - WEP RX fix: Clear IEEE80211_F_DROPUNENC even in hostap mode. Quote from Sam: "This is really gross but I don't see an easy way around it. By doing it we lose the ability to independently drop unencode frames (and support mixed wep/!wep use). We should really be setting the EXCLUDE_UNENCRYPTED flag written in wi_write_wep based on IEEE80211_F_DROPUNENC but with our clearing it we can't depend on it being set properly." Reported by: Holm Tiffe <holm at freibergnet dot de> Submitted by: sam MFC after: 3 days
* Honouring ic->ic_dtim_period.avatar2005-10-021-1/+1
| | | | | Submitted by: sam MFC after: 3 days
* Fix "taskqueue_drain with the following non-sleepable locks held"ru2005-09-281-1/+1
| | | | witness(9) warning on detach.
* MFp4: save mac addr hint, eliminage OLDCARD shimsimp2005-09-222-35/+11
|
* 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.
* Correct previous commit.scottl2005-08-291-3/+0
|
* Eliminate bogus seatbelt in wi_cmd. This may have been appropriateimp2005-08-291-5/+0
| | | | | | | | for the spl-era locking, but now that we can have multiple, concurrent interrupts for multiple wi devices, having a global check to make sure at most one of them was in wi_cmd no longer makes sense. MFC After: 2 decifortnight
* fix media_status so devd recognizes the device as an 802.11 interfacesam2005-08-131-1/+6
| | | | Submitted by: Robert C. Noland III
* Clarify/fix handling of the current channel:sam2005-08-101-0/+1
| | | | | | | | | | | | | | | | | | | 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-11/+11
| | | | | | | | | | | | | | 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
* Cleanup beacon/listen interval handling:sam2005-08-081-1/+1
| | | | | | | | | | | | | | | | | o separate configured beacon interval from listen interval; this avoids potential use of one value for the other (e.g. setting powersavesleep to 0 clobbers the beacon interval used in hostap or ibss mode) o bounds check the beacon interval received in probe response and beacon frames and drop frames with bogus settings; not clear if we should instead clamp the value as any alteration would result in mismatched sta+ap configuration and probably be more confusing (don't want to log to the console but perhaps ok with rate limiting) o while here up max beacon interval to reflect WiFi standard Noticed by: Martin <nakal@nurfuerspam.de> MFC after: 1 week
* When the MAC address is reported all zeros, then error is necessarilyimp2005-08-051-1/+3
| | | | | | | | 0. This means that we 'succeed' the attach, even after we've freed the internal data bits. This leads to a panic when you eject the card with this problem. Set error = ENXIO in the mac read zeros case.
* Modify device drivers supporting multicast addresses to lock if_addr_mtxrwatson2005-08-031-0/+2
| | | | | | | | over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week
* diff reduction against p4: define IEEE80211_FIXED_RATE_NONE and usesam2005-07-221-2/+2
| | | | it instead of -1
* Add a boatload of new device ids, gleaned from the pcmcia-cs-3.2.8imp2005-07-101-0/+1
| | | | | | | distribution. Add the appropriate devices to the man pages. Obtained from: pcmcia-cs Approved by: re (scottl)
* Eliminate unused argument in PCMCIA_CARD macro.imp2005-06-241-49/+51
| | | | | | | | 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-18/+25
| | | | | | | | | | | | | | | | | | | | 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
* Honouring current authmode setting. With this patch, my wi card can nowavatar2005-06-021-1/+3
| | | | | | | associate to an AP which uses shared WEP key authentication. Tested with: "ifconfig wi0 authmode shared" Reviewed by: imp, sam
* Invert conditional and use continue to reduce nesting.mdodd2005-04-131-5/+5
|
* Unbreak style(9) breakage from last commit. We try to avoid definingimp2005-03-271-4/+2
| | | | | | variables in internal blocks. Also, go ahead and fail if we can't load the firmware. It should have failed like this, but never did (firmware loads generally don't fail).
* Unbreak LINT.pjd2005-03-271-0/+3
|
* purge dead codesam2005-03-261-3/+0
| | | | Noticed by: Coverity Prevent analysis tool
* correct logic so we recognize timeout on allocsam2005-03-261-4/+4
| | | | Noticed by: Coverity Prevent analysis tool
* reclaim mbuf chain when ieee80211_crypto_encap failssam2005-03-081-0/+1
| | | | Noticed by: David Young
* Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, returnimp2005-03-011-1/+1
| | | | | BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx both support so that xl will snarf them on up.
* The two PLANEX cards listed in pccarddevs, identified only by theirimp2005-02-011-1/+1
| | | | | | | | | | | | | | | | | | CIS, weren't actually used anywhere (other than the generic PC Card code when certain variables are defined). They aren't used in NetBSD either. Make things simpler by removing them. Change PLANEX_2 to PLANEX and tweak wi and owi to use that instead. The PLANEX id seems to actually be pci ID assigned to planex, not its pcmcia id. Ooops. I don't know if this is a reporting error from where this entry came from, or if it is a mistake on PLANEX's part. I suspect the latter, as ACTIONTEC and NEWMEDIA made the same mistake (although new media may be because it uses an advansys chip inside). Make a note of this in the file. The 0xc entires may be JEITA assigned, so note that as well. # This leaves just 3 entries that are totally unknown: airvast, archos # and edimax although the arivast number is the same assigned to # avertec in usb...
* Use Intersil chip names for the symbols, since many makers use theimp2005-01-201-3/+3
| | | | intersil IDs but their own name in the CIS.
* Add support for SENAO SL-2511CDimp2005-01-201-1/+2
| | | | Info submitted by: Paulo Fragoso
* Call wi_free after we turn off the interrupts. If we call it before,imp2005-01-191-2/+2
| | | | | | then we reference parts of the softc. # My appologies, but this was sent to me by someone whose name I've lost.
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-067-7/+7
|
* Eliminate some of the egregious bypass of the 802.11 statesam2005-01-011-18/+20
| | | | | | machine; instead use the intended entry points. There's still too much incestuous knowledge about the internals of the 802.11 layer but this at least fixes adhoc mode.
* Diff reduce wi_write_wep() relative to revision 1.168mdodd2004-12-171-41/+38
|
* Fix wep operation for station mode:sam2004-12-171-4/+28
| | | | | | | | | | o don't encapsulate on tx; the chip expect a raw frame w/o the crypto header o clear the WEP bit in the 802.11 header on rx so the 802.11 layer doesn't try to strip the crypto header o clobber the "drop unencoded frames" state bit when privacy is enabled so rx'd frames we pass up to the 802.11 layer are not discarded as unencrypted This stuff will need to be redone if anyone decides to add WPA support.
* set ic_ibss_chan when entering RUN state to match ic_bss so the channelsam2004-12-171-0/+1
| | | | reported when associated to an AP is correct
* remove power save logic from the tx path; the driver isn't ready to supportsam2004-12-171-6/+0
| | | | it so don't mislead folks
* o Update for net80211 changessam2004-12-083-205/+238
| | | | o Import some minor fixes from netbsd
* Second part of ALTQ driver modifications, covering:mlaier2004-08-011-10/+6
| | | | | | | | | | an(4), ath(4), hme(4), ndis(4), vr(4) and wi(4) Please help testing: http://people.freebsd.org/~mlaier/ALTQ_driver/ Tested by: Vaidas Damosevicius (an, ath, wi) Roman Divacky (vr) Submitted by: yongari (hme)
* Link ALTQ to the build and break with ABI for struct ifnet. Please recompilemlaier2004-06-131-0/+2
| | | | | | | | | | | | your (network) modules as well as any userland that might make sense of sizeof(struct ifnet). This does not change the queueing yet. These changes will follow in a seperate commit. Same with the driver changes, which need case by case evaluation. __FreeBSD_version bump will follow. Tested-by: (i386)LINT
OpenPOWER on IntegriCloud