which is safer than the loop there used to be here.
wi_mwrite_bap: if wi_write_bap fails, don't keep on going: this
way you avoid writing garbage to the radio. First time you see
an odd-length mbuf, copy the remainder of the chain to sc_txbuf
and from there to the MAC. This way, you do not read an mbuf past
the end of its data (occasionally you will cross a page doing
that!) and you avoid expensive, excess seeks in the radio's own
buffer chain.
wi_rx_intr: clamp the frame length told to us by the driver to the
most bytes we can fit in our mbuf cluster.
I am still getting e-mails from my testers telling me how much
better this makes things.
LINK_STAT notification for every change of BSSID, so the firmware's
BSSID and the driver's BSSID will get out of sync. This has two
bad affects. First, because the 802.11 framework filters received
packets based on BSSID, many packets can be dropped before the
driver adopts the firmware's BSSID. Second, ifconfig's tells a
misleading BSSID to the operator.
This problem is most apparent in networks where every station does
not hear every other. I reproduce these conditions in an office by
removing/replacing the antennas on my 802.11 cards.
As a solution, in IBSS mode, the driver will ask the firmware for
the BSSID every five seconds. Also, whenever the driver receives
a frame carrying a different BSSID than the driver's BSSID, then
the driver asks the firmware for the BSSID before handing the frame
to ieee80211_input.
WI_RID_DBM_ADJUST: In preparation for capturing Prism packets
containing received signal strength indications (RSSI), read the
constant for conversion from RSSI to dBm (decibels relative to
a milliwatt).
WI_RID_FRAG_THRESH: Get/set the packet fragmentation threshold
on Lucent/Prism.
It seems that the firmware accept 104bit key only if
all the keys have 104bit length. We get the length of
the transmit key and use it for all other keys.
Perhaps we should use software WEP for such situation.
since it can be updated by IBSS merge. Also the lucent firmware 8.10.1
changes random generated bssid every 10 seconds in IBSS creation enable.
PR 18520
times changing of 802.11 parameters, such as nwid, the error
"tx buffer allocation failed" occured unless ifconfig down up.
Pass signal streangth and timestamp to ieee80211_input, though it is not
useful for wi driver for now.
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.
- Eliminate wi_hostap.c since most of the code are duplicated with
net/if_ieee80211subr.c
- Station for Infrastructure network and IBSS also use service functions
as much as possible to be consistent with other wireless drivers.
Now WEP works for station/ibss/hostap.
by me:
* Speed up reading/writing buffers from the hardware by avoiding
slow forward seeks. In preparation to use the optimization, do
not read overlapping bytes. This is currently disabled, but can
be enabled with OPTIMIZE_RW_DATA.
* Hand 802.11 and Prism-specific frames to BPF. User can watch these
frames by specifying an alternate DLT to e.g. tcpdump(8).
* Add support for SIOC[SG]80211BSSID and SIOC[SG]80211CHANNEL.
* Issue join requests and track join/create state through link-status
notifications.
* Split wi_rxeof into separate routines for receiving Ethernet II,
802.11 data, and 802.11 management frames.
* Bug fix: Account for aligning m_data to a word boundary in the Rx
buffer size check.
* Bug fix: Check for LLC/SNAP even if the firmware tells us the frame
is Ethernet II, as the firmware sometimes gets this wrong.
* Process as many events as possible when we get an interrupt, using
a simple heuristic to avoid reprocessing an event (which can have
bad side-effects). Clamp the time spent in the interrupt handler
to 4ms.
* Redo the timeout loops to be consistent and less prone to error.
* Add delays to timeout loops which were missing them, so that a
fast CPU won't win the race.
* Borrow some timeout loop values from the linux-wlan-ng driver,
which seems to reflect a high level of clue (due to direct support
from Intersil).
* Get rid of silly wi_read_data(..., len + 2) idiom; simply round up
in wi_read_data() and wi_write_data(). Also, protect against a
length of 0.
* Name some frequently-used constants. Correct spelling. Other style nits.
* Bug fix: On Prism, set Create IBSS register to 0 *always*. The meaning
of Create IBSS == 1 is join an IBSS or *ESS*, and we do not want to
join an ESS, because that would put us in an inconsistent state. 0
is the right value for Prism.
* Bug fix: Clean up state at the top of wi_init(), in the event that
we don't reach the bottom.
* Simplify wi_start() by always providing an RFC1042-encoded 802.11
frame to the firmware.
* Larval powersave support for HostAP mode, enabled by WI_HOSTAP_POWERSAVE.
* Bug fix: Call wi_stop() from wi_shutdown().
* Bug fix: sync media options with HostAP mode in wi_sync_media().
* In wi_media_status(), inquire firmware for current media state if
media == auto. From FreeBSD.
* Clean up the way buffer lengths are computed by using pointer
arithmetic rather than magic constants.
* Swap the order of comparisons in addr_cmp() for speed.
* Bug fix: Send ReAssoc Response instead of Assoc Response to a
ReAssoc Request.
* Bug fix: Copy SSID using the correct size.
* Give more meaningful names to offsets in a wi_frame.
* Bug fix: Assign the right values to the named constants for
Rx frame encoding.
* Get rid of useless SNAP constants.
mediaopt adhoc 802.11 adhoc (IBSS) mode. IBSS creation is enabled
for cards which can create IBSS.
mediaopt adhoc,flag0 old lucent adhoc demo mode.
Note that [adhoc] media options for wi driver was used for adhoc demo mode,
which is NOW CHANGED.
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).
* Flesh out the Host-AP WEP transmit side. Note this does not yet
work properly; the frame as seen by the receiver FCS's incorrectly.
Both changes from OpenBSD. Not confirmed whether or not Host-AP WEP
works with OpenBSD (mail sent to millert).
WEP for APs is not yet implemented, but without WEP, this works well
enough for my laptop to associate with an AP running this code.
Adapted from OpenBSD.
in this info based on firmware type and version. Replace "wi_has_wep"
with a flag.
* For cards which support IBSS, add "ibss" has a media option.
* For cards which support CREATE_IBSS, add "ibss-master" as a media
option.
* Use the "ibss" and "ibss-master" media options to determine if
we should go into IBSS mode and/or create the IBSS.
* Internally convert between the generic WI_PORTTYPE_IBSS and the
value the firmware wants to use for IBSS.
* When setting the IBSS name, if a desired-SSID is set, and we're
an ibss-master, write the desired-SSID into the own-SSID slot.
This ensures that "ifconfig wi0 nwid FOO" will do the expected
thing.
* Only set the roaming mode if the card supports roaming.
From OpenBSD.
WI_RID_SCAN_APS in previous commit works for Intel Pro/Wirelss 2011
with firmware 2.51.1.
It seems that the firmware automatically updated after the card runs on
Windows 2000 with 2011_2011B_CD_3.0 in Intel web site.
- The version string doesn't need to start with 'V'.
- Symbol firmware also support CREATE_IBSS.
- But it doesn't support ROAMING_MODE nor MICROWAVE_OVEN.