Commit Graph

22 Commits

Author SHA1 Message Date
Mateusz Guzik
391a27c41d wpi: clean up empty lines in .c and .h files 2020-09-01 21:46:27 +00:00
Adrian Chadd
940aa8080c wpi(4): add support for TX fragmentation.
Tested:

* Tested with Intel 3945BG, HOSTAP and STA modes

Differential Revision:	https://reviews.freebsd.org/D3770
2015-10-12 04:05:12 +00:00
Adrian Chadd
525a3d47d8 wpi(4): use more correct types.
This change fixes some amount of -Wsign-conversion and -Wconversion warnings
and sets correct sizes for some variables (as a result, some loop counters
were touched too).

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3763
2015-10-11 01:31:18 +00:00
Adrian Chadd
6f5066748d Try to fix passive scanning hang on beacon miss.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:28:54 +00:00
Adrian Chadd
efccc3c60c Fix pause scan time calculation (the remainder must be less than beacon interval).
PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 23:03:06 +00:00
Adrian Chadd
42946b7dbc Fix active/passive dwell calculation.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 22:56:36 +00:00
Adrian Chadd
3d9089a6f1 Add TX status codes (obtained from iwlegacy)
PR:		kern/197143
Differential Revision:	Andriy Voskoboinyk <s3erios@gmail.com>
Obtained from:	Linux drivers/net/wireless/iwlegacy
2015-05-03 22:49:47 +00:00
Adrian Chadd
30b6048179 Retry twice at the same rate.
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-05-03 20:56:33 +00:00
Adrian Chadd
a5403e3157 Workaround delays caused by vmem_check().
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:30:20 +00:00
Adrian Chadd
726ddc2648 Add experimental HOSTAP support.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:18:18 +00:00
Adrian Chadd
a6df6cfe65 * Add new debug category
* Refactor out / restructure / extend debugging information

PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 21:04:55 +00:00
Adrian Chadd
8e4cf38ac7 Replace few numbers with named constants.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:29:22 +00:00
Adrian Chadd
bb086d4e83 Fix indentation - non-functional change.
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:19:54 +00:00
Adrian Chadd
ebf62e08fb Check some variables only on active TX rings
PR:		kern/197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-03-15 20:19:01 +00:00
Adrian Chadd
fae61c6918 More fixes to wpi(4), again not by me! Woo!
- Use IEEE80211_F_DATAPAD;
- (c->ic_flags & IEEE80211_CHAN_PASSIVE) -> IEEE80211_IS_CHAN_PASSIVE(c);
- Convert ackfailcnt to int (there is dereference to *(int *) in ieee80211_ratectl_tx_complete());
- Fix & move cleanup to the end in wpi_rx_done();
- Add missed lock in wpi_update_beacon();
- Try to fix powersave.

PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2015-02-14 17:45:53 +00:00
Adrian Chadd
692ad7ca94 Big wpi(4) overhaul! Not by me!
This is a sync against iwn(4) and openbsd.

- Add power management support;
- Add background scanning support;
- Fix few LORs;
- Handle rfkill switch state changes properly;
- Fix recovering after firmware failure;
- Add more error checking;
- Cleanup & disable by default debug output;
- Update macroses names;
- Other various fixes;
- Add IBSS support:
  - don't set data_ntries field for management frames;
- Add AHDEMO support:
    - fix padding;
- Sync eeprom functions;
- Use CMD_RXON_ASSOC where possible;
- Enable HW CCMP encryption/decryption for pairwise keys;
- Fix filter flags for CMD_RXON.

Tested (by submitter) - iwn 3945 NIC.  I have one somewhere; I'll
validate this later on and revert it if it's a problem.

Thanks!

PR:		197143
Submitted by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-02-07 23:11:38 +00:00
Adrian Chadd
e54c8bda3e Remove some hard-coded IE assembly over to use net80211 methods.
PR:		kern/196069
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
2014-12-20 20:07:48 +00:00
Eitan Adler
7a22215c53 Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit.  Instead use (1U << 31) which gets the
expected result.

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.

Discussed with:	-arch, rdivacky
Reviewed by:	cperciva
2013-11-30 22:17:27 +00:00
Juli Mallett
fcec677d3d o) Check that no overrun or CRC errors were encountered in receiving a
packet.  Linux, OpenBSD and our iwn(4) all do this.  It also results in
   a huge performance improvement (and the rejection of a fair number of
   apparently-bad packets on receive) on my hardware.
o) Like the wpi(4) driver in OpenBSD, and like our iwn(4), also drop runt
   packets.
o) Don't bother doing IFQ_POLL and then IFQ_DRV_DEQUEUE, just do
   IFQ_DRV_DEQUEUE outright.  This is more similar to how OpenBSD and our
   iwn(4) work.

Reviewed by:	sam
2009-03-27 03:17:25 +00:00
Andrew Thompson
82f1b132a4 Update wpi(4) with stability fixes
- remove second taskqueue
 - busdma 16k alignment workaround
 - use busdma instead of external mbuf storage on Rx
 - locking fixes
 - net80211 state change fixes
 - improve scanning reliability
 - improve radio hw switch interaction
 - consolidate callouts

Parts obtained from:	benjsc, sam
Tested by:		many
2008-03-10 23:16:48 +00:00
Benjamin Close
a7099588fc Handle missed beacons correctly
Approved by: mlaier (comentor)
2007-11-27 08:58:32 +00:00
Benjamin Close
6607310b74 Initial Import of wpi driver based on p4 changeset 128641.
This import includes:
   o wpi Wireless driver for the Intel 3945 Wireless Lan Controller (802.11abg) (sys/dev/wpi)
   o Intel firmware revision 2.14.4 & associated LICENSE (sys/dev/contrib/wpi, sys/contrib/dev/wpi/LICENSE)
   o wpifw Firmware driver (sys/modules/wpifw)

Approved by: mlaier, sam (co-mentors)
2007-11-05 11:47:19 +00:00