summaryrefslogtreecommitdiff
path: root/sys/dev/ic/if_wi.c
AgeCommit message (Collapse)Author
2003-12-05consistently treat wi_keylen as le16, fixes wicontrol crash for if_wiDale Rahn
and if_wi_usb ok millert@
2003-10-26Driver for PRISM 2.5/3 based (wifi) USB adapters. This is a work in progress,Dale Rahn
it does not yet handle bulk data copies or hostap mode. Only one model currently supported, however driver may support other PRISM based adapters. ok millert@ fgsch@
2003-10-21typos from Tom Cosgrove;Jason McIntyre
Tom: I did not commit a couple of your changes. i did not include some punctuation fixes (full stops, etc.) mnemorable -> mnemonic: i decided memorable was probably better instrunctions -> instruction: i kept the plural
2003-10-07use crypto/arc4; test, debug, ok millert@; ok fgsch@Markus Friedl
2003-09-06Add wi_detach, use it in pcmcia so that the shutdownhook is properly removed.Dale Rahn
ok miod@ millert@ deraadt@
2003-08-15change arguments to suser. suser now takes the process, and a flagsTed Unangst
argument. old cred only calls user suser_ucred. this will allow future work to more flexibly implement the idea of a root process. looks like something i saw in freebsd, but a little different. use of suser_ucred vs suser in file system code should be looked at again, for the moment semantics remain unchanged. review and input from art@ testing and further review miod@
2003-06-07print minor version as 02d; from Adam Montague via pr 3284; matches what ↵Michael Shalayeff
freebsd does as well
2003-04-26managment -> management;Jason McIntyre
ok mickey@
2003-03-10Fix AP scan on prism and add a /* FALLTHROUGH */ comment to makeTodd C. Miller
things obvious.
2003-02-13Plug mbuf leak when there is an IV mismatch during software decrypt.Todd C. Miller
Found by dhartmei@; I thought he committed the fix but appearently not. Also make the debugging printf for IV mismatch more useful.
2003-02-12replace crc32 code with BSD licensed code from opensshMarkus Friedl
2003-01-23be consistant on the spl everywhere and use splimp(), this seems to prevent ↵Michael Shalayeff
wi_mgmt_xmit: xmit failed messages; millert@ testing and ok
2003-01-21Stub out hostap bits #ifdef SMALL_KERNEL to free up space on theTodd C. Miller
floppies; OK mickey@ deraadt@
2003-01-10Don't call wi_cor_reset() in wi_attach(); since sc_firmware_type isTodd C. Miller
not set yet this is a NOOP (noticed some time ago by fgs@). Call wi_cor_reset() from wi_watchdog() so we do a soft reset of the card. Currently, we only reset Symbol cards but should probably reset all but Lucent cards with very old firmware revisions.
2002-10-27Add an option to use software WEP now that we have a software decryptTodd C. Miller
function. Can be useful for cards that only support 40-bit WEP or where the card firmware lacks weak IVs avoidance. Prism/Symbol only. In the future this will be expanded to support proposed WEP replacements. Based on code from Jamison Adcock.
2002-10-27add a matching wi_do_hostdecrypt()Markus Friedl
2002-10-18Account for the aligned m_data when checking boundaries; from NetBSD.Federico G. Schwindt
mickey and millert ok.
2002-10-18media support; slightly modified from FreeBSD.Federico G. Schwindt
mickey and millert ok.
2002-10-11pad keys of size != RC4KEYLEN or RC4KEYLEN/2 with zero; noticed and tested ↵Markus Friedl
by millert@
2002-10-11Stash the value of letoh16(ver.wi_ver[0]) in a variable so we don'tTodd C. Miller
evaluate the same thing for each loop iteration in wi_get_id(). [ previous commit contained unrelated changes and has been removed ]
2002-10-11Sigh, we can't just put the htole16() in the WI_CARD_IDS macroTodd C. Miller
since gcc doesn't seem to evaluate htole16() of a constant at compile time after all. Noticed by deraadt@
2002-10-10Make wi_get_id() table driven, similar to NetBSD and FreeBSD butTodd C. Miller
make the table itself a #define so we can reuse it in wicontrol. Also add a bunch of chip IDs from NetBSD/FreeBSD. mickey@ OK
2002-10-04Limit the TX key to a valid range; imp@Todd C. Miller
2002-08-30plug mbuf leak.Federico G. Schwindt
2002-08-30only do copyout() if wi_get_debug() returned 0.Federico G. Schwindt
2002-08-13change WI_PORTTYPE_AP -> WI_PORTTYPE_HOSTAP to match FreeBSD and NetBSD.Todd C. Miller
The reason for this is that it is possible in the future to have wi(4) be a real AP using the AP tertiary firmware. mickey@ OK
2002-08-08Fix IFF_PROMISC setting optimization. The point is to avoid theTodd C. Miller
wi_init() if only IFF_PROMISC status has changed. There is no need to change anything if we are in HostAP mode since wi_init() has already turned off the hardware promisc bit when we entered HostAP (HostAP already implies promisc behavior). Noticed by imp@, OK by mickey@
2002-07-16remove prototypes that now live in if_wivar.h.Federico G. Schwindt
2002-07-10use ifp->if_sadl whether possible.Federico G. Schwindt
2002-06-24oops. don't initialize wi_flags and wi_hostap_info here; fixes sparc.Federico G. Schwindt
somehow i didn't commit this. from denver airport.
2002-06-22use 8-bits when accessing the wi_cor_offset; millert@ ok.Federico G. Schwindt
2002-06-21Clear wi_hostap_info.apflags in wi_attach() to guarantee wihap_shutdown()Todd C. Miller
doesn't do the wrong thing with quick card insert/ejects.
2002-06-21Add some missing casts of sc->wi_txbuf -> caddr_tTodd C. Miller
2002-06-21Don't set WI_FLAGS_ATTACHED in sc->wi_flags until after mi attachTodd C. Miller
routines have been called. Avoids a panic when you insert & eject a card very quickly on a slow machine.
2002-06-21don't convert these to little-endian. now ifconfig shows the nwid onFederico G. Schwindt
sparc64 and macppc; tested by me and drahn@ on i386, macppc and sparc64.
2002-06-15Don't advertise hostap as an allowed media type for firmware < 0.80Todd C. Miller
Hopefully this will confuse people with crufty firmware a little less than the old behavior. Supposedly it is possible to get hostap working on prism firmware 0.7.6 but I'm not going to attempt that at this time.
2002-06-14don't allow users to set the IBSS/HostAP SSID to the empty stringTodd C. Miller
2002-06-12Previously, SIOCG80211NWID would return the "desired" netname ifTodd C. Miller
the interface was up, even if it was the empty string. This tends to confuse users who have not set the desired net name (ie: associate with any AP). Now we only return the desired net name if it is not empty and the interface is up. Otherwise we return the current net name (ie: what we are associated with).
2002-06-09a step towards consistancy; in general:Todd T. Fries
'struct arpcom foo' -> 'struct arpcom sc_arpcom' ok itojun@
2002-06-03o when checking the message type, mask with WI_RXSTAT_MSG_TYPE insteadTodd C. Miller
of comparing directly against WI_STAT_1042, WI_STAT_TUNNEL, etc. This is needed by some Symbol cards in ad-hoc mode. o change some ntohs(var) to htons(constant). Adapted from NetBSD (mycroft).
2002-06-02BSD air-tools 0.2 patches from dachb0den labs; h1kari@dachb0den.comTodd C. Miller
The common.h include file has been incorporated into if_wi_ieee.h similar to what is in FreeBSD.
2002-05-31Allow IBSS creation on Symbol cards with station firmware >= 2.5Todd C. Miller
From John Hay via Warner Losh
2002-04-30crc32_tab can be constMichael Shalayeff
2002-04-26Add some bounds checking of wi_len on copyin(). From NetBSD via FreeBSD.Todd C. Miller
2002-04-26Don't set WI_RID_OWN_SSID based on wi_net_name if wi_net_name isTodd C. Miller
not actually set. Closed PR #2569.
2002-04-26We use wi_authtype, not wi_authmode to store the auth type (open systemTodd C. Miller
or shared key).
2002-04-23Clear flags indicating whether or not wi or hostap is active asTodd C. Miller
early as possible. Also move the timeout_del() in wi_stop() to before we disable wi(4) so it doesn't fire at the wrong time. Joint effort between mickey@ and myself.
2002-04-21Symbol version string need not start with 'V'; from NetBSD (onoe)Todd C. Miller
2002-04-16From NetBSD:Todd C. Miller
o Fix m->m_data alignment in wi_rxeof() o Add a comment
2002-04-11Fix Lucent <-> Prism2 WEP interop bug. We only want to set theTodd C. Miller
EXCLUDE_UNENCRYPTED bit in the WI_RID_P2_ENCRYPTION value if we are in shared key mode. Symbol cards, just to be different, supposedly always want the EXCLUDE_UNENCRYPTED bit set (confirmed with the Linux orinoco and spectrum24 drivers). I have so far been unable to get my Symbol card to interop with Lucent or Prism2 WEP. In BSS mode at least, this Symbol card does not list WEP as a capability it supports. This is, to put it mildly, rather annoying.