Commit Graph

89 Commits

Author SHA1 Message Date
glebius
cedd8768c4 Mechanically convert to if_inc_counter(). 2014-09-19 10:35:56 +00:00
kevlo
9ef5f9b0ca Fix typo: s/mac_rev/mac_ver/
Submitted by:	Stefan Sperling <stsp at openbsd dot org>
2014-08-26 02:20:37 +00:00
kevlo
746eb54add If eapol packets are sent at the lowest rate, key negotiation will
become more reliable.

Submitted by:	Akinori Furukoshi <moonlightakkiy at yahoo dot ca>
2014-08-20 01:32:04 +00:00
kevlo
522e03c8be Remove D-Link DWA140 rev D1 by accident.
Pointed out by Anders Larsson in private email.
2014-06-05 01:55:23 +00:00
hselasky
129b50ccf0 Add new USB ID.
Submitted by:	Tuomo Latto <djv+fbpr@iki.fi>
PR:		usb/188046
MFC after:	1 week
2014-04-01 10:34:39 +00:00
hselasky
ecdc0f0c42 - Temporary fix for race in RUN driver which can
cause freed memory to be accessed.
- Properly lock callout_reset()'s.

MFC after:	1 week
2014-03-05 18:39:27 +00:00
kevlo
65cc350313 Add a flag to run's device list which uses a standard scsi eject.
The flag indicates that the mcu doesn't need to load firmware.

Tested by:	Alex Deiter <alex dot deiter at gmail.com>, myself
Tested on:	ASUS USB-N66
2014-02-25 01:42:02 +00:00
hselasky
f6bc13e38a Fix a range check for maximum transmit length. The existing code was
off by 4 bytes in one case.

Approved by:	kevlo @
MFC after:	2 weeks
2014-01-31 22:42:26 +00:00
kevlo
2c9e578739 Fix comment. 2014-01-24 15:34:22 +00:00
kevlo
f1926f47b5 Get rid of memmove(). It's not portable.
Tested on RT3071, RT3573, RT3570, RT3572, and RT5572.

Reviewed by:	hselasky
2014-01-24 09:17:29 +00:00
hselasky
8acd608957 Revert r261014. Let Kevin fix it.
MFC after:	1 week
2014-01-23 10:18:28 +00:00
hselasky
ce97156ddb - Fix some non-portable code with regard to endianness. Don't use memmove().
- Fix a range check for maximum transmit length.
- Fix read from missing field when transmitting data.

MFC after:	2 weeks
2014-01-22 09:57:26 +00:00
kevlo
8a56b3adbe Fix a logic error when checking if Tx power entries are greater than 31. 2014-01-11 14:48:16 +00:00
kevlo
2d30c961db Rename definition of IEEE80211_FC1_WEP to IEEE80211_FC1_PROTECTED.
The origin of WEP comes from IEEE Std 802.11-1997 where it defines
whether the frame body of MAC frame has been encrypted using WEP
algorithm or not.
IEEE Std. 802.11-2007 changes WEP to Protected Frame, indicates
whether the frame is protected by a cryptographic encapsulation
algorithm.

Reviewed by:	adrian, rpaulo
2014-01-08 08:06:56 +00:00
kevlo
f8e32f263b Add support for the MediaTek/Ralink RT3593 chipset.
Committed over the ZyXEL NWD2705 on amd64 with WPA.
2014-01-03 06:01:05 +00:00
kevlo
9b429fdd7f Add D-Link DWA-140 rev D1, another RT5372/run(4).
From Anton Mazunin.
2013-12-27 08:03:53 +00:00
kevlo
4cebeb74ee Some devices have a dual mode such as Tenda W326U and ZyXEL NWD2705,
add the product id and use a standard scsi eject.

Tested on the ZyXEL NWD2705 wlan dongle.
2013-12-24 07:02:05 +00:00
kevlo
5cd113b51f Use 'val' instead of 'val & 0xff' since the last argument of run_bbp_write()
is uint8_t.

Spotted by:	yongari
2013-12-18 08:53:40 +00:00
kevlo
b79af7fc51 Fix style: add tab after #define. 2013-12-18 08:39:12 +00:00
kevlo
5c847bbcbd Fix typo in comment. 2013-12-18 07:47:50 +00:00
kevlo
698593e4d7 Add support to IQ calibration. 2013-12-18 07:34:57 +00:00
hselasky
7d5f67face Fix compilation when the "USB_DEBUG" option is set. 2013-12-06 22:13:51 +00:00
kevlo
ebd908fde4 Add support for the MediaTek/Ralink RT5572 chipset.
Committed over the TP-LINK TL-WDN3200 (RT5572) on amd64 with WPA.

While here, add my copyright.
2013-12-06 15:26:39 +00:00
kevlo
3ce49fd210 Replace the magic numbers with something more readable. 2013-12-06 15:17:28 +00:00
kevlo
06f42a6b8c Cosmetic changes. 2013-12-06 15:15:58 +00:00
kevlo
51bf08becd Remove daft KASSERT. 2013-12-06 15:14:18 +00:00
hselasky
7d3024cb62 Fix what looks like a typo after r258732. 2013-12-04 12:30:51 +00:00
hselasky
40def9e664 Fix external compiler warning(s). Avoid pointer dereferencing. 2013-12-04 12:07:46 +00:00
kevlo
babdb17eed The RUN_MAX_TXSZ constat is defined as Tx desc + Tx wireless info + MCLBYTES +
max padding.  We were lucky in that run(4) working fine since both
rt2860_rxwi and rt2860_txwi structure sizes are the same.
2013-12-02 09:07:43 +00:00
kevlo
9f3c182db5 Change run_rt2870_rf_write() prototype (no functional change) 2013-11-29 07:08:17 +00:00
kevlo
b17645aa8b On the RT2870, rf registers are now 64-bit, not 32-bit after r257955.
Committed over a Buffalo WLI-UC-AG300N (RT2870).
2013-11-29 06:10:44 +00:00
hselasky
60390b2cf7 Style changes. 2013-11-26 11:11:24 +00:00
hselasky
594d5b9c54 Add missing static keyword.
MFC after:	2 weeks
2013-11-26 10:53:12 +00:00
kevlo
6ca4f70a6a - Use bit twiddling macro to set IEEE80211_MODE_11A
- On the RT3572 chipset, there's no need to configure BBP register 86
2013-11-13 05:21:41 +00:00
kevlo
39e09b6215 Remove r257748 by accident. 2013-11-11 10:00:19 +00:00
kevlo
2f2bb49d91 Add support for the MediaTek/Ralink RT5370/RT5372 chipset.
Tested with the TP-Link TL-WN727N (RT5370) and the D-Link DWA-140 (RT5372)
on i386/amd64/arm with WPA.
2013-11-11 09:47:33 +00:00
hselasky
32e7b0e2ad Implement a working write region function to speed up loading of the
firmware. You can test this change by switching the "#if 1" statement
right above in the patched code to "#if 0" !

MFC after:	1 week
2013-11-06 15:32:37 +00:00
hselasky
01e0013156 Check for "ieee80211_vap_setup()" failure in all USB WLAN drivers.
MFC after:	1 week
2013-11-06 12:57:01 +00:00
kevlo
c72185619b Reading the RT2860_ASIC_VER_ID register is not needed and returns
completely bogus value.
2013-11-06 02:49:16 +00:00
hselasky
84531bbbc3 Protect the "ratectl_ch" callout in the "run" driver by the "run"
softc's "sc->sc_mtx" mutex. Currently the callout was marked
multi-processor safe, which is fine, but it is better to
start/stop/reset callouts while holding the "run" drivers own
mutex. While at it add a missing "ULL" at end of the 64-bit unsigned
integer constant.

MFC after:	1 week
2013-11-05 18:27:25 +00:00
hselasky
cab03592ec Fix a potential memory leak.
MFC after:	1 week
2013-10-31 11:03:36 +00:00
hselasky
dd06997a19 Fix some types. Compilation for external target complains that "u_int"
is not idential to "uint32_t" when defining set channel prototype
functions. The WLAN channel range should be from 0 to 65535
inclusivly, and u_int should be fine for this purpose.
2013-10-31 09:20:30 +00:00
kevlo
29e5b68622 Enable DC filter in RT3071 Version E. 2013-10-31 02:00:58 +00:00
glebius
ff6e113f1b The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare
to this event, adding if_var.h to files that do need it. Also, include
all includes that now are included due to implicit pollution via if_var.h

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2013-10-26 17:58:36 +00:00
kevlo
212cc4c51f Fix the RT2860_TX_SW_CFG2 init value on older revisions of RT3070 chip. 2013-10-23 09:53:37 +00:00
kevlo
148d878214 Correct tx mixer gain value for RT3070 and RT3071.
Correctly value in EEPROM/EFUSE is one or more for RT3070 and
two or more for other RT3071 chips.
2013-10-18 07:48:20 +00:00
kevlo
8025ae0e2f Since the DAC issue has been fixed in RT3070(F), the voltage raising fix
is no longer needed.
2013-10-18 07:46:28 +00:00
kevlo
1c79d42cd8 Fix lower bits of RF_R3 for RT3370 and newer. This change doesn't affect
older chipsets.
2013-10-18 07:43:49 +00:00
hselasky
ccb5ee0623 Add new USB ID.
PR:		usb/182936
Submitted by:	Keith White <kwhite@site.uottawa.ca>
MFC after:	1 week
2013-10-15 06:23:54 +00:00
br
71ada8a9ac Add support for DLINK DWA-127 Wireless Adapter
Approved by:	cognet (mentor)
2013-09-05 10:09:24 +00:00