Commit Graph

83 Commits

Author SHA1 Message Date
sam
d5e5ef7858 clear wep bit in 802.11 header after crypto decap so packet
capture doesn't see it
2004-12-31 21:04:05 +00:00
sam
8c3a1cf5aa o add net.wlan.X.driver_caps mib variable for setting the driver capabilities
flags for testing
o debug msg consistency fixups
2004-12-31 21:01:41 +00:00
sam
e508073ee6 correct pseudo-mic header calculation for QoS frames 2004-12-31 20:59:03 +00:00
sam
4327f1ee6e whitespace/debug msg fixups 2004-12-31 20:58:06 +00:00
sam
83e6bc9990 add ieee80211_hdrspace and ieee80211_anyhdrspace to calculate the space
for an ieee80211 header taking into account padding requirements
2004-12-31 20:56:32 +00:00
sam
886a744d99 correct header length calculations on tx path for QoS-encapsulated frames
when IEEE80211_F_DATAPAD is set (e.g. ath); must use ieee80211_hdrspace
instead of ieee80211_hdrsize
2004-12-31 20:51:41 +00:00
sam
0b07314057 const'ify ivp reference 2004-12-31 20:44:15 +00:00
sam
ae02e9bff7 add/fixup debug msgs 2004-12-31 20:42:51 +00:00
sam
dfe3a547e6 s/inline/__inline/ 2004-12-31 20:39:41 +00:00
sam
11042819f1 expose ieee80211_phymode_name for use in debug msgs 2004-12-31 20:38:48 +00:00
sam
dfbb715550 correct module dependency 2004-12-13 18:26:13 +00:00
sam
18549dae69 correct module dependency 2004-12-13 18:12:26 +00:00
sam
e3a33be489 cover up the landmine until there's a proper solution 2004-12-13 04:26:36 +00:00
sam
dc4ceb7b98 do not clear the global key cache when reaching the INIT state 2004-12-12 05:00:13 +00:00
sam
27e1f2c5b3 remove module dependency on rc4; it's not needed any more 2004-12-12 00:28:41 +00:00
sam
42039c0abf fix wep key seting: ENETRESET is the code to return to signal the driver
should push software state to the hardware (was ERESTART which caused the
system call to be retried)

Submitted by:	Tor Egge
2004-12-10 16:35:37 +00:00
sam
0ea4584f3c fixup printf arguments for 64-bit machines 2004-12-08 22:34:07 +00:00
sam
2843bf259e Update 802.11 support; too much new functionality to fully describe
here but it includes completed 802.11g, WPA, 802.11i, 802.1x, WME/WMM,
AP-side power-save, crypto plugin framework, authenticator plugin framework,
and access control plugin frameowrk.
2004-12-08 17:26:47 +00:00
rwatson
b463bc6c33 Add a new network interface flag, IFF_NEEDSGIANT, which will allow
device drivers to declare that the ifp->if_start() method implemented
by the driver requires Giant in order to operate correctly.

Add a 'struct task' to 'struct ifnet' that can be used to execute a
deferred ifp->if_start() in the event that if_start needs to be called
in a Giant-free environment.  To do this, introduce if_start(), a
wrapper function for ifp->if_start().  If the interface can run MPSAFE,
it directly dispatches into the interface start routine.  If it can't
run MPSAFE, we're running with debug.mpsafenet != 0, and Giant isn't
currently held, the task is queued to execute in a swi holding Giant
via if_start_deferred().

Modify if_handoff() to use if_start() instead of direct dispatch.
Modify 802.11 to use if_start() instead of direct dispatch.

This is intended to provide increased compatibility for non-MPSAFE
network device drivers in the presence of Giant-free operation via
asynchronous dispatch.  However, this commit does not mark any network
interfaces as IFF_NEEDSGIANT.
2004-07-27 23:20:45 +00:00
mlaier
977d97b004 Link ALTQ to the build and break with ABI for struct ifnet. Please recompile
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
2004-06-13 17:29:10 +00:00
phk
d6f7d2bde6 Add some missing <sys/module.h> includes which are masked by the
one on death-row in <sys/kernel.h>
2004-05-30 17:57:46 +00:00
andre
f083d45820 Link state change notification of ethernet media to the routing socket.
o The ieee80211_media_status() function updates the ifi_link_state field
  and calls rt_ifmsg() to notify listeners on the routing socket.

Approved by:	sam
2004-05-05 15:48:06 +00:00
sam
534a1c6c21 Resolve the issue of whether frames have FCS or not. Frame data does not
include FCS; if you want to provide it you can put it in the header.

Submitted by:	David Young
2004-04-05 22:13:21 +00:00
sam
95fbaa6dad eliminate nested include by making MALLOC_DECLARE conditional on the
inclusion of <sys/malloc.h>

Submitted by:	bde
2004-04-05 22:10:26 +00:00
sam
4bcffa477a add definitions for WME, WPA (and WPA2), and miscellaneous other stuff
that's coming soon

Obtained from:	madwifi
2004-04-05 17:47:40 +00:00
sam
0eac2dcc6f export the malloc type M_80211_NODE for drivers that override the node
allocation routines
2004-04-05 04:17:03 +00:00
sam
089385e207 make malloc tag for ieee80211_node more recognizable 2004-04-05 04:15:55 +00:00
sam
0a58f658fe Change handling of probe response frames. Previously we always dropped the
refcnt on the node but left it in the node table.  This allows the node table
to hold the results of scanned ap's but for ibss scans left nodes w/o any
driver-private state setup and/or a bad refcnt (when the nodes were timed
out they were prematurely discarded).  Now we treat nodes identified for ap
scanning as before but force nodes discovered when scanning for ibss neighbors
to have complete/proper state and hold the refcnt on the node.  Any other
nodes created because of these frames are discarded directly (need to optimize
this case to eliminate various work that's immediately discarded).
2004-04-02 23:35:24 +00:00
sam
b024266b89 fix adhoc/ibss operation for drivers that require host support (e.g. ath):
o remove IEEE80211_C_RCVMGT capability
o on transmit craft new nodes as needed using new ieee80211_find_txnode routine
o add ieee80211_find_txnode routine to lookup a node by mac address and
  if not present create one when operating in ibss/ahdemo mode; new nodes
  are dup'd from bss and the driver is told to treat the node as if a new
  association has been created so driver-private state (e.g. rate control
  handling) is setup

Obtained from:	netbsd (basic idea)
2004-04-02 23:25:39 +00:00
sam
5c586165c7 always free node reference when processing a probe request frame; was
conditionally doing an unref if operating in adhoc mode which turns
out to be wrong
2004-04-02 23:12:45 +00:00
sam
a1be64a6dc o change ieee80211_dup_bss to inherit explicit data from ic_bss instead of
blindy copying the node contents; this turns out to be a bad idea as we
  add more state in the node for things like WPA
o track node allocation failures in ieee80211_dup_bss instead of the callers

Obtained from:	madwifi
2004-04-02 23:09:24 +00:00
sam
32d170b4b8 track node allocation failure stats in ieee80211_alloc_node instead
of each caller

Obtained from:	madwifi
2004-04-02 23:06:41 +00:00
sam
ddc6548865 replace explicit malloc/free with MALLOC/FREE for portability
Obtained from:	madwifi
2004-04-02 23:02:24 +00:00
sam
aaa98f8e29 extract node matching logic into new ieee80211_match_bss routine for use
in background/incremental scanning

Obtained from:	madwifi
2004-04-02 23:00:30 +00:00
sam
ac53a5bdcf diff reduction against madwifi 2004-04-02 22:56:09 +00:00
sam
f57cb8d81b when processing beacon/probe response frames capture "is probe" in a
variable to improve code legibility since we're going to use it more
in forthcoming mods

Obtained from:	madwifi
2004-04-02 22:54:07 +00:00
sam
41b9a21d19 add a case of IEEE80211_ELEMID_IBSSPARMS so the statistic on unknown
elements is more meaningful (will add more with WPA merge)

Obtained from:	madwifi
2004-04-02 22:50:31 +00:00
sam
b9a1b7eda9 when doing internal bridging free the node instead of just dropping the
reference for consistency (explicit refcounting is discouraged)

Obtained from:	madwifi
2004-04-02 22:48:52 +00:00
sam
ca926004a9 when receiving a frame w/ a bad version number don't unref the node; the
driver is responsible for that

Obtained from:	madwifi
2004-04-02 22:47:11 +00:00
sam
4cfcf755a1 insure basic rate bit is set in derived rate set; this
works around a protocol/firmware problem with some versions found
in hermes/prism cards
2004-04-02 20:22:25 +00:00
sam
d007eaede6 diff reduction against madwifi/p4 2004-04-02 20:19:20 +00:00
sam
2f7d679f76 o add support for controlling the power of transmitted frames
o add support for controlling the 11g protection mechanism used
  to protect OFDM frames in a mixed 11b/g network

Reviewed by:	imp
2004-03-30 22:57:57 +00:00
sam
551dbe5269 Only call if_init when doing SIOCSIFADDR if the interface is not marked
up (IFF_UP).  This eliminates extraneous AP scanning.

Reviewed by:	imp
2004-03-30 22:53:52 +00:00
mux
3ca8d2f211 Add explicit dependency on "ether", since we use ether_ifattach(). 2004-03-16 19:25:55 +00:00
onoe
8fb32b2573 Change WI_RID_SCAN_RES compatibility interface to return the result after
active scan is completed just as WI_RID_READ_APS.
This fixes wicontrol -L for ath(4) and awi(4) to have results even if
the driver cannot associate any APs.
2004-01-19 05:25:43 +00:00
onoe
df98da69f8 Add support for FH phy, which will be used by awi driver.
Also some if_media constants to indicate operational mode are changed
to bitmasks to reduce diffs from NetBSD.
2004-01-15 08:44:27 +00:00
sam
b8570d5db4 Handle SIOCSIFMTU ioctl directly so we can apply 802.11-specific bounds.
Note that the min is actually constrained to IF_MINMTU by the if layer.
2004-01-13 06:22:55 +00:00
sam
189a9001bd Sync with netbsd:
o #ifdef _KERNEL the fallback definition for DLT_IEEE802_11_RADIO
o fix many comments
o rename antenna stuff and fix units/reference signal
o change IEEE80211_RADIOTAP_DBM_TX_POWER from unsigned 16-bit value
  to a signed 8-bit value
o change IEEE80211_RADIOTAP_FLAGS from 16 bits to 8 bits to simplify
  padding requirements
o drop IEEE80211_RADIOTAP_TIME
o change IEEE80211_RADIOTAP_ANTENNA from 16 bits to 8 bits
o drop IEEE80211_RADIOTAP_PAD
o add channel flag definitions for outside the kernel so radiotap
  doesn't depend on stuff in ieee80211*.h

Obtained from:	NetBSD
2003-12-28 06:57:28 +00:00
sam
5bfac52170 o insure the current channel is in a good state before starting an AP scan
o reject scan requests for a device that isn't marked up

This fixes a problem where requesting a scan before marking the device
up would cause a panic because the current channel was set to "any" (0xffff).
2003-11-13 05:23:58 +00:00
sam
02ea9f180f fix typo that broke AP scanning by BSSID
Submitted by:	Len Widra
2003-11-09 23:36:46 +00:00