aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/wi/if_wi.c
Commit message (Collapse)AuthorAgeFilesLines
* network interface driver changes:Sam Leffler2002-11-141-14/+7
| | | | | | | | | | | | | | | | | o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls Reviewed by: many Approved by: re Notes: svn path=/head/; revision=106937
* o Comment out the symbol download code for 4.x.Warner Losh2002-10-141-3/+19
| | | | | | | | o Add hooks for doing power management of the output signal. o Minor hacks to make flexlint happy wrt staticness of functions. Notes: svn path=/head/; revision=105076
* Limit the TX key to a valid rangeWarner Losh2002-09-291-0/+6
| | | | | | | PR: 39960, 39961 (patches here pointed out problem, but didn't quite fix it) Notes: svn path=/head/; revision=104147
* When setting the WI_RID_ENCRYPTION mode, we have to conditionallyWarner Losh2002-08-211-11/+20
| | | | | | | | | | set EXCLUDE_UNENCRYPTED if we're not in OPEN mode (or if we are a symbol card). Obtained from: OpenBSD (looks like a millert@ special) Notes: svn path=/head/; revision=102208
* comment about the magic number -149Warner Losh2002-08-211-0/+6
| | | | Notes: svn path=/head/; revision=102206
* Treat IBSS the same as ADHOC in wi_get_cur_ssid. This makes ifconfigWarner Losh2002-08-211-0/+1
| | | | | | | | work better, but might not make ibss actually work on the prism2 cards that I have (this is the first time I've tried ibss in a long time). Notes: svn path=/head/; revision=102204
* Move the symbol firmware loading routines into if_wi.Warner Losh2002-08-151-0/+142
| | | | | | | Define some basic firmware downloading commands. Notes: svn path=/head/; revision=101903
* Follow NetBSD's lead and use WI_PORTTYPE_HOSTAP instead of _AP, sinceWarner Losh2002-08-111-14/+14
| | | | | | | | _AP might be used in the future for cards with firmware that does AP in firmware. Notes: svn path=/head/; revision=101665
* Differentiate between AT45DB011 compatible large serial flash partsWarner Losh2002-08-051-3/+10
| | | | | | | | | and the AT24C08 small serial flash parts. We still report these as the same part (since we group things already), but now we recognize the small serial versions as well. Notes: svn path=/head/; revision=101355
* Don't set the IFF_PROMISC bit when in hostap mode like the previousWarner Losh2002-08-011-17/+15
| | | | | | | | | commit bogusly did. Instead, don't set PROMSIC in the hardware if we're in hostap mode. This matches more closely what openbsd did as well. Notes: svn path=/head/; revision=101139
* If we are in hostap mode, do not go into promisc mode. This causesWarner Losh2002-07-291-11/+33
| | | | | | | | | | | | problems with the firmware and will result in a) poor performance and b) the inability to associate certain types of cards (most notibly cisco). Idea obtained from OpenBSD, but I implemented it by clearing the IFF_PROMISC flag rather than the refusing to honor it downstream. Notes: svn path=/head/; revision=100876
* Only INTERSIL 0.8.3 and newer firmware is supported with hostap mode.Warner Losh2002-07-261-8/+13
| | | | | | | | While earlier versions can be made to work, they require various work arounds not in the driver right now. Notes: svn path=/head/; revision=100734
* Add better mediaopt support for ibss and friends.Warner Losh2002-06-191-38/+160
| | | | | | | | | Now the driver is closer to matching the wi man page. Submitted by: jhay (who obtained it from OpenBSD). Notes: svn path=/head/; revision=98440
* Add one copy of crc32() and crc32_tab[] in libkern, and remove it two otherPoul-Henning Kamp2002-05-291-55/+0
| | | | | | | | | | places. Comment out crc32 related definitions in zlib.h, we don't seem to have the corresponding code in our kernel. Notes: svn path=/head/; revision=97512
* Untimeout before calling timeout. I think that I have caught all the casesWarner Losh2002-04-291-0/+2
| | | | | | | where we were scheduling a timeout multiple times, but am not positive. Notes: svn path=/head/; revision=95706
* Make this driver compile for -stable also to prep for MFCWarner Losh2002-04-261-32/+57
| | | | Notes: svn path=/head/; revision=95534
* Move the new byte order function prototypes from <sys/param.h> toMike Barcroft2002-04-261-0/+1
| | | | | | | <sys/endian.h>. This puts us in line with NetBSD and OpenBSD. Notes: svn path=/head/; revision=95533
* Some fixes for Symbol card.Atsushi Onoe2002-04-191-2/+20
| | | | | | | | | - The version string doesn't need to start with 'V'. - Symbol firmware doesn't support ROAMING_MODE nor MICROWAVE_OPEN. Obtained from: NetBSD Notes: svn path=/head/; revision=95031
* Fix tx-rate setting for Lucent cards.Brooks Davis2002-04-141-0/+15
| | | | | | | Submitted by: Eugene Perevyazko <john@pcs.dp.ua> Notes: svn path=/head/; revision=94695
* After committing the forgotten IFM_IEEE80211_HOSTAP stuff to if_media.h,Warner Losh2002-04-121-10/+2
| | | | | | | no need for the ifdefs here anymore. Notes: svn path=/head/; revision=94490
* unifdef -DWI_HOSTAP, like OpenBSD doesWarner Losh2002-04-121-44/+5
| | | | Notes: svn path=/head/; revision=94486
* ifdef WI_HOSTAP some stuff that seems like it needs to be ifdef'd.Alfred Perlstein2002-04-121-0/+2
| | | | Notes: svn path=/head/; revision=94484
* Replace the original host WEP implementation with the one in OpenBSDWarner Losh2002-04-121-146/+129
| | | | | | | | | | | | | (apparently by markus@, at least committed by him). This has the advantage of not using the bad IV's from Fluhrer/Mantin/Shamir as well as bringing the drivers a little closer together. Also use a few constants in place of magic numbers in one place. Obtained from: OpenBSD 1.25, 1.28, 1.36, 1.38, 1.42 Notes: svn path=/head/; revision=94472
* Integrate the hostap stuff that Thomas Skibo <skibo@packbell.net>Warner Losh2002-04-111-50/+398
| | | | | | | | | | | | | wrote. This code was for 4.5-release, so I've ported it to -current and made a few minor tweaks. The biggest non-style tweak was to not make access point the default. More changes will be needed to get this actually working, but I wanted to get a relatively pure baseline. This doesn't seem to break what works now. Notes: svn path=/head/; revision=94405
* better initWarner Losh2002-04-111-4/+6
| | | | Notes: svn path=/head/; revision=94397
* MFNetBSD:Warner Losh2002-04-041-0/+8
| | | | | | | | | | 1.60: Add range checking, but put it higher up in the food chain than NetBSD (this should be fixed there as well). Obtained From: NetBSD Notes: svn path=/head/; revision=93833
* MFNetBSD:Warner Losh2002-04-041-72/+53
| | | | | | | | | | | | wi.c 1.64: Table driven IDs (ichiro) 1.59: Don't use magic numbers (ichiro) Also, added Sony, Lucent Embedded Ids and fix minor bugs for lucent cards (and submit those changes back to ichiro-san) Obtained from: NetBSD Notes: svn path=/head/; revision=93825
* Change callers of mtx_init() to pass in an appropriate lock type name. InJohn Baldwin2002-04-041-1/+2
| | | | | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64 Notes: svn path=/head/; revision=93818
* o Reduce the gratuitous differences with NetBSD.Warner Losh2002-04-041-3/+8
| | | | | | | | | | | | | o OpenBSD's wiconfig tells me that a value of '2' is for sony wireless cards, 1 is for lucent (which we already knew) and '5' is for embedded lucent cards. o Move some RID definitions to if_wavelan_ieee.h and use NetBSD names more often. # more work is still needed in this area. Notes: svn path=/head/; revision=93756
* Four fixes from NetBSD:Warner Losh2002-04-031-43/+115
| | | | | | | | | | | | | | | | | | | | | 1) Properly detect the Symbol based cards (The 3Com Airconnect and their ilk) and only reset them *ONCE* ever. This appears to make them work, but more testing is needed. The tests that would wedge up my machine completely now appear to work, but I have not real access points handy. 2) Report both the Station firmware and the Primary firmware on Prism based cards. On Lucent based cards, only report the station firmware since that's all it supports. On symbol cards, report the symbol specific firmware name as its station firmware. 3) Better Prism 2.5 and 3 family names. We really need to go table driven for this. 4) Workaround for bugs in Intersil's firmware is only needed for at most 0.8.2 and earlier, since 0.8.3 and later appear to work. Obtained from: NetBSD Notes: svn path=/head/; revision=93733
* First cut at breaking out the bus attachment from the bus independentWarner Losh2002-04-021-325/+8
| | | | | | | | part of the driver. Also, move the softc and some other stuff to if_wivar.h from if_wireg.h to make future merging activities easier. Notes: svn path=/head/; revision=93611
* Change the suser() API to take advantage of td_ucred as well as do aJohn Baldwin2002-04-011-6/+6
| | | | | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@ Notes: svn path=/head/; revision=93593
* More diff reduction patchesWarner Losh2002-04-011-1/+1
| | | | Notes: svn path=/head/; revision=93567
* Fix type from last commitWarner Losh2002-04-011-2/+2
| | | | Notes: svn path=/head/; revision=93563
* Add more ID's from the PRISM family. from wi.c 1.61 and wireg.h 1.26 byWarner Losh2002-04-011-0/+8
| | | | | | | | | ichiro@netbsd.org Obtained from: NetBSD Notes: svn path=/head/; revision=93560
* Identify PRISM 2.5 with ISL37300PWarner Losh2002-03-291-7/+10
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=93360
* Integrate the air-tools 0.2 from dachb0den labs.Warner Losh2002-03-291-72/+378
| | | | | | | | | o This moves the common.h file into if_wavelan_ieee.h Submitted by: h1kari@dachb0den.com Notes: svn path=/head/; revision=93359
* o Rework the identify routine a little, merging it with NetBSD's wi.Warner Losh2002-03-161-47/+40
| | | | | | | | | | | | | | | | | | | | o Add exerpimental support for identifying lucent cards. All of mine come back with ID of 1, but NetBSD committed code for 5. So accept both. o rename wi_prism2_ver to wi_firmware_ver so that we could, if necessary, do special things for lucent cards too. o Bring in a small part of the changes from airtools: The wi_cmd function now takes two additional arguments. I didn't bring in their ioctls yet. o eliminate the use of LE16TOH, and remove its define. o Print the firmware as if there were 100 versions instead of 10. This means that 6.1 and 6.10 aren't confusing to people. We now print 6.01 in the former case. # A good junior hacker project would be to merge the NetBSD, FreeBSD, and # OpenBSD drivers into one source base. Notes: svn path=/head/; revision=92457
* Add support for 3Com Airconnect PCI cards.Brooks Davis2002-03-111-0/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=92117
* Add roaming and microwave oven support. Some minor formatting nits.Warner Losh2002-03-051-12/+58
| | | | | | | | | | Some buggy firmware workarounds. Fix some endian bugs. These reduce the diffs from NetBSD, but NetBSD does have more changes since my last manual merge. Notes: svn path=/head/; revision=91695
* Remove __P to reduce diffs with NetBSD and my private tree.Warner Losh2002-03-051-40/+38
| | | | Notes: svn path=/head/; revision=91693
* Add a bunch of cards from NetBSD and maybe other places.Warner Losh2002-03-041-0/+5
| | | | | | | | | | Ericsson Wireless Lan Simple Tech Spectrum 24 Alt Socket LP WLAN CF Symbol LA4100 Notes: svn path=/head/; revision=91608
* Make 128-bit WEP (aka 104-bit WEP) work with Prism based cards.Brooks Davis2002-03-021-3/+6
| | | | | | | | Submitted by: Thomas Skibo <skibo@pacbell.net> MFC after: 3 days Notes: svn path=/head/; revision=91548
* Add the following functions/macros to support byte order conversions andThomas Moestl2002-02-271-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | device drivers for bus system with other endinesses than the CPU (using interfaces compatible to NetBSD): - bwap16() and bswap32(). These have optimized implementations on some architectures; for those that don't, there exist generic implementations. - macros to convert from a certain byte order to host byte order and vice versa, using a naming scheme like le16toh(), htole16(). These are implemented using the bswap functions. - stream bus space access functions, which do not perform a byte order conversion (while the normal access functions would if the bus endianess differs from the CPU endianess). htons(), htonl(), ntohs() and ntohl() are implemented using the new functions above for kernel usage. None of the above interfaces is currently exported to user land. Make use of the new functions in a few places where local implementations of the same functionality existed. Reviewed by: mike, bde Tested on alpha by: mike Notes: svn path=/head/; revision=91394
* Add a missing field to the end of array marker in the pci_ids array.Brooks Davis2002-02-261-1/+1
| | | | | | | Submitted by: sumikawa Notes: svn path=/head/; revision=91318
* Add support for the Linksys WMP-11, Prism 2.5, PCI adaptor.Brooks Davis2002-02-121-61/+119
| | | | | | | | Submitted by: Thomas Skibo <skibo@pacbell.net> MFC after: 2 weeks Notes: svn path=/head/; revision=90580
* identify GLPRISM2 PCI WaveLAN/IEEE 802.11Alfred Perlstein2002-01-311-0/+1
| | | | | | | Submitted by: Toni Andjelkovic <toni@soth.at> Notes: svn path=/head/; revision=90027
* Add support for Linksys WDT11 PCI adaptors.Brooks Davis2002-01-211-0/+1
| | | | | | | Submitted by: Eric Liedtke <eliedtke@apogeetelecom.com> Notes: svn path=/head/; revision=89600
* put function return types on a line by themselves as per style(9)Alfred Perlstein2001-12-271-32/+62
| | | | Notes: svn path=/head/; revision=88546
* Update to C99, s/__FUNCTION__/__func__/,David E. O'Brien2001-12-101-2/+2
| | | | | | | also don't use ANSI string concatenation. Notes: svn path=/head/; revision=87599