Commit Graph

8 Commits

Author SHA1 Message Date
dyoung 5dc6377838 IBSS-merge clean-up, inspired by some Linux patches from Jon Anderson
(mail@janderson.ca): remove ieee80211_ibss_merge's TSFT argument.
Do the TSFT comparison in the drivers (ath, atw).  Remove a lot of
extraneous debug statements from ieee80211_ibss_merge.

Set the ieee80211_node's state to IEEE80211_STA_BSS after it's been
copied to the ic_bss, not before.

In struct ieee80211_node, make the ni_tstamp field a union of a
uint64_t and the 8 TSF octets so that it's easier to compare a
neighbor's TSF with the local TSF.

Log IBSS merges (Greg Troxel's suggestion).  Also log IBSS creation.
These are rare and important events that deserve to be logged.
2005-01-04 00:56:51 +00:00
dyoung 24ba04b962 Fix a bug in ieee80211_compute_duration: the 802.11 Duration field
in an 802.11 unicast data packet is equal to the duration of the
SIFS and Acknowledgement.  That is, the amount of time reserved
*after* the packet has finished transmitting.

Change the arguments to ieee80211_compute_duration: pass the entire
packet length, not just the payload length.  Add a 'debug' argument
to ieee80211_compute_duration and its helper subroutine,
ieee80211_compute_duration1.

If debug != 0, ieee80211_compute_duration printfs its arguments
and several local variables.

In rtw(4), load the 802.11 Duration field with the result from
ieee80211_compute_duration.
2004-12-23 06:08:52 +00:00
dyoung 81eefc6f1a Define for more bits in the Service field of the 802.11 PLCP Header.
For use by the subroutine ieee80211_compute_duration, add struct
ieee80211_duration, and #define a number of microsecond constants
used for the transmit timing of 802.11 packets.

Add the subroutine ieee80211_compute_duration, which computes for
any packet the appropriate 802.11 Duration field, the PLCP Length
field, as well as the Duration and Length fields for an RTS frame.

atw(4), rtw(4), future drivers, and possibly ath(4) will share
ieee80211_compute_duration.
2004-12-19 08:08:06 +00:00
dyoung 6f9ff5e059 Vastly simplify ieee80211_ibss_merge, eliminating the needless
callbacks.  Change the reference IBSS-merge implementation in atw
to match.
2004-07-28 08:12:49 +00:00
dyoung ce488d2bf7 Pull the IBSS merge logic out of atw and into net80211, since ath
will eventually share it.

In the IBSS merge logic, check conditions in a different order so
that they run faster in the common case---no merge.  Fix the
rate-limiting on the debug outputs (enabled by IFF_LINK0).
2004-07-24 23:53:49 +00:00
dyoung 91ca08d44e Add Kevin Lahey's power-saving support from the old 802.11 layer 2003-10-13 04:23:56 +00:00
dyoung 6e8d0b71c8 Insert RCSIDs. 2003-09-14 01:14:54 +00:00
dyoung 40e261aa72 Pull in net80211/ from FreeBSD. This contains Sam Leffler's
enhancements to the 802.11 layer, which are necessary for ath(4),
the Atheros-chipset driver.
2003-08-30 21:26:03 +00:00