Commit Graph

1088 Commits

Author SHA1 Message Date
onoe 9fadcea372 old lucent adhoc-demo mode (adhoc,flag0 or wiconfig -p 3) wasn't handled
correctly.  To avoid massive extra code in each driver, now if_iee80211subr.c
also handles non-standard old lucent adhoc-demo mode.
This also fixes PR 14227.
2002-09-30 15:48:41 +00:00
onoe ed3b52f295 Obtain some functionality from wi_hostap;
use hash for device node list.
	Avoid use weak IV value, increment IV for each packet.
2002-09-30 05:35:28 +00:00
onoe 4c66b63b21 Fix SIOCG80211BSSID to return current BSSID if associated. 2002-09-29 10:17:00 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
itojun 501bf56348 license clarification from the author, via openbsd
>BSD-style license from Serge Vakulenko <vak@cronyx.ru>
2002-09-27 06:20:30 +00:00
onoe 30d884d47c Add support for SIOC[SG]80211BSSID, SIOC[SG]80211CHANNEL.
Change the name of structure ieee80211_bss to ieee80211_node, which is
used for management of stations in hostap mode, and peers in ibss mode.
Split off ic_opmode, ic_phytype from ic_flags.
Preparation to merge 'wi' driver into 80211subr.c.
2002-09-27 05:36:04 +00:00
onoe 23ab1acf02 Change ifmb_baudrate for IFM_IEEE80211_DS5: 5Mbps -> 5.5Mbps 2002-09-27 05:27:20 +00:00
onoe f529393822 Add check suser() for SIOCS80211BSSID, SIOCS80211CHANNEL. 2002-09-27 04:08:40 +00:00
darrenr aa1492743a Fix a case where M_COPY_PKTHDR() wasn't being used prior to calling bpf_mtap 2002-09-26 16:07:03 +00:00
onoe e3261bdc94 initialize pkthdr for dummy mbuf before calling bpf_mtap(). 2002-09-26 13:06:56 +00:00
augustss 7656699497 Remove unused variable so the file compiles again. 2002-09-25 23:24:37 +00:00
thorpej 71404bb533 Don't include <sys/map.h>. 2002-09-25 22:21:01 +00:00
darrenr 4c314b9a9f Keep m_pkthdr.len updated correctly and use it rather than a loop to find
out the total length of the packet.
2002-09-25 16:10:15 +00:00
itojun c40ace5ea0 KNF 2002-09-25 07:24:06 +00:00
itojun 6a3e3549fe backout recent changes, for PR 18392.
bpf_mtap() gets called with not-well-initialized mbuf, so we need to go through
it without touching m->m_pkthdr.len and such.  it's part of our bpf_mtap() API
(at least today).
2002-09-24 03:14:43 +00:00
simonb 4e3613273b Remove breaks after returns, unreachable returns and returns after
returns(!).
2002-09-23 05:51:10 +00:00
simonb f8a2d422d1 uio_resid is a size_t (ie, unsigned), so don't check if it's less than 0. 2002-09-23 04:26:17 +00:00
thorpej cccd4bd402 Fix thinko in the SIOC{G,S}80211CHANNEL and SIOC{G,S}80211BSSID
ioctls.
2002-09-22 01:56:08 +00:00
thorpej 8ad8dd07df Nuke the old SunOS-style ioctl defns. 2002-09-21 17:02:46 +00:00
atatat fe89a76e74 Add a missing semi-colon. 2002-09-19 03:04:32 +00:00
darrenr 0a30063654 For the trivial case where the packet is only in one mbuf, call bpf_tap()
(idea from FreeBSD) - alternative to changing bpf_filter() to be aware of
kernel calling convetion where 0 is passed as the length for mbufs.
2002-09-19 01:16:58 +00:00
darrenr 600f9cb660 If M_PKTHDR is set we can use m_pkthdr.len instead of the for loop. 2002-09-19 00:34:00 +00:00
itojun ce04d2f721 fix comment, sync with kame 2002-09-17 06:32:49 +00:00
itojun cf50f0c768 reject SIOCAIFADDR if embedded address is in private address range. sync w/kame 2002-09-17 05:56:37 +00:00
tron 377e179dcb Use "const" for all input parameters of ethers(3) functions. 2002-09-16 19:25:30 +00:00
thorpej 2d655f566e In bpf_setdlt(), preserve the promiscuous mode setting of the
descriptor.

From David Young <dyoung@ojctech.com>, slight change by me.
2002-09-15 23:44:12 +00:00
thorpej 4c3ae4bbc8 Add new ioctls:
* SIOCS80211CHANNEL, SIOCG80211CHANNEL -- set/get the 802.11 channel.
* SIOCS80211BSSID, SIOCG80211BSSID -- set desired/get current BSSID.

From David Young <dyoung@ojctech.com>.
2002-09-15 23:27:08 +00:00
itojun 0319b78e54 copyright clarification. from openbsd
1.
Paul Mackerras and the Australian National University have worked things
out, and as a result, Paul now owns copyright on all these files, with the
proper terms.

2.
and... we managed to contact "Eric Rosenquist" <eric@rosenquist.com> through
the help of people who found him: first one was nick.stott@cogeco.ca
This now has a better license.  Two authors left to go.
2002-09-13 14:32:11 +00:00
itojun 822449ac65 KNF - return is not a function. 2002-09-11 05:36:26 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
onoe 26ebf5f371 Several fixes hostap for awi driver:
- aging ang clear inactivity stations
- DTIM field in beacon/probe response.
- ignore IFF_PROMISC for hostap mode, since 802.11 has 3 address fields,
  so that promisc mode is not required for AP function.
2002-09-03 14:54:00 +00:00
onoe efcfc3e1c8 Add experimental support of Host-AP mode for awi driver.
It works also with WEP enabled.
But aging the associated clients is not implemented yet, so that the number
of clients may increase unlimitedly..
2002-09-02 13:37:35 +00:00
martin 1caaa903fa If the peer did not answer LCP echo requests in-time, but we got user
data through within the last LCP keepalive interval, do not count this
as a keepalive failure.

Addresses parts of kern/17723.
2002-09-01 18:54:12 +00:00
martin adb5933cbb Apply patch from Todd Vierling in PR kern/17665:
remove a test that has been obsoleted by the authentication failure
counter - enter slow retry mode always, not only if we already transfered
data successfully (the test was designed to disable retries when the
initial authentication setting was not correct, the auth failure counter
does this job better).
2002-09-01 18:06:59 +00:00
martin ac83580ea9 Add an option PPPOE_TERM_UNKNOWN_SESSIONS to forcefully disconnect sessions
we don't know anything about with a PADT packet.

Use with care, this is pretty dangerous and will kill all userland PPPoE
implementations. Therefore it is not enabled by default nor added as
a commented out option to GENERIC kernels.

But it is highly usefull if you have a fixed IP, an ISP that does not use
LCP echo requests for link monitoring and you want to recover quickly after
a crash or otherwise ungracefull disconnect.
2002-09-01 17:21:40 +00:00
onoe fd9daca7ea Attach another DLTs for bpf: DLT_IEEE802_11 to capture raw 802.11 frame. 2002-08-28 09:38:08 +00:00
onoe 5d6bb1fbc3 Define new kernel interface bpfattach2() to register another data link
type for the driver, which will be used for 802.11 drivers.
Also add 2 APIs to get a list of available DLTs and use one for them.
	BIOCGDLTLIST (struct bpf_dltlist)
	BIOCSDLT (u_int)
2002-08-28 09:34:57 +00:00
onoe b4c41e0480 Define new DLT: DLT_IEEE802_11, DLT_PRISM_HEADER, and DLT_AIRONET_HEADER
from tcpdump.org
2002-08-28 09:31:20 +00:00
thorpej 83b3b86fd6 Fix a signed/unsigned comparison warning from GCC 3.3. 2002-08-26 01:42:28 +00:00
thorpej f3420f21a5 Fix some signed/unsigned comparison warnings from GCC 3.3. 2002-08-26 01:39:39 +00:00
thorpej 2371f92317 Fix signed/unsigned comparison warnings from GCC 3.3. 2002-08-26 01:36:37 +00:00
tron 56999645f0 Fix typo in a comment. 2002-08-25 19:21:47 +00:00
martin f54ddc3c17 Add a function to lookup bridge members by struct ifnet * and use
it at all call sites that have such a pointer readily available.
This avoids unnecessary strcmp()s in critical paths, and removes
some XXX comments.
2002-08-24 19:00:31 +00:00
onoe 63a1f2ed02 Delete IFM_IEEE80211_IBSS [ibss] and IFM_IEEE80211_IBSSMASTER [ibss-master]
from media options, since IEEE80211_ADHOC [adhoc] is already defined for
IBSS.  Instead, [ibss] is assigned as an alias for IEEE80211_ADHOC.
2002-08-21 03:22:04 +00:00
kristerw 6cf8d48ed9 #if 0 a couple of unused functions. 2002-08-20 03:52:26 +00:00
kristerw 81244d0b17 Make it compile for the __NO_STRICT_ALIGNMENT case. 2002-08-20 03:32:08 +00:00
thorpej c59bd1a572 In ether_output(), don't bother calling memcpy() to plop the ethertype
into the packet: On system with no strict alignment constraints, just
assign the value, and on others, do an inline 2 byte copy.
2002-08-19 18:58:50 +00:00
itojun c00fa8dfd9 avoid swapping endian of ip_len and ip_off on mbuf, to meet with M_LEADINGSPACE
optimization made last year.  should solve PR 17867 and 10195.

IP_HDRINCL behavior of raw ip socket is kept unchanged.  we may want to
provide IP_HDRINCL variant that does not swap endian.
2002-08-14 00:23:27 +00:00
itojun dddc4be003 to be consistent with other sources, use "struct ip *ip", not inp.
(inp is usually used for pointing struct inpcb)
2002-08-12 05:22:57 +00:00
drochner 5f33ace021 rename WI_ ioctl to make it compile again 2002-08-11 12:08:55 +00:00