Hans Petter Selasky
0aff597a1f
Fix what looks like a typo after r258732.
2013-12-04 12:30:51 +00:00
Hans Petter Selasky
8cfe54400e
Fix external compiler warning(s). Avoid pointer dereferencing.
2013-12-04 12:07:46 +00:00
Kevin Lo
405886883d
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
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
Kevin Lo
5b7514646c
Change run_rt2870_rf_write() prototype (no functional change)
2013-11-29 07:08:17 +00:00
Kevin Lo
5f7e329cec
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
Hans Petter Selasky
361f264ba0
Style changes.
2013-11-26 11:11:24 +00:00
Hans Petter Selasky
beb13f0407
Add missing static keyword.
...
MFC after: 2 weeks
2013-11-26 10:53:12 +00:00
Kevin Lo
0f3728be20
Remove a couple of unused macros.
2013-11-13 05:22:39 +00:00
Kevin Lo
28dfd8415b
- 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
Kevin Lo
bf124fcf1e
Use the real product name for Edimax rsu(4) id.
2013-11-12 02:34:48 +00:00
Kevin Lo
67e73b2b2d
Remove r257748 by accident.
2013-11-11 10:00:19 +00:00
Kevin Lo
64891211ca
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
Hans Petter Selasky
415fd8a3dc
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
Hans Petter Selasky
bb2f69e83f
Check for "ieee80211_vap_setup()" failure in all USB WLAN drivers.
...
MFC after: 1 week
2013-11-06 12:57:01 +00:00
Kevin Lo
ae7d66f220
Reading the RT2860_ASIC_VER_ID register is not needed and returns
...
completely bogus value.
2013-11-06 02:49:16 +00:00
Hans Petter Selasky
2764a2784f
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
Alfred Perlstein
50903998f0
Add device ID for 'Sanoxy 802.11N' usb
2013-11-02 11:37:16 +00:00
Hans Petter Selasky
645826bef4
Fix a potential memory leak.
...
MFC after: 1 week
2013-10-31 11:03:36 +00:00
Hans Petter Selasky
35a2489852
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
Kevin Lo
30dfa97944
Add RT2860_BCN_OFFSET1 and RT2860_MAX_LEN_CFG register initialization to
...
match with the vendor driver. While here, remove unused RT2860_DEF_MAC
definition.
2013-10-31 02:03:30 +00:00
Kevin Lo
1365315d41
Initialize BBP68 to improve rx sensitivity.
2013-10-31 02:02:14 +00:00
Kevin Lo
c513ecfd12
Enable DC filter in RT3071 Version E.
2013-10-31 02:00:58 +00:00
Gleb Smirnoff
76039bc84f
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
Kevin Lo
d4d0412bc9
Fix the RT2860_TX_SW_CFG2 init value on older revisions of RT3070 chip.
2013-10-23 09:53:37 +00:00
Kevin Lo
d48971d0d2
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
Kevin Lo
6bf8d884ad
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
Kevin Lo
5d534170af
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
Kevin Lo
9648d6ae84
Fix rf registers for RT3070.
2013-10-18 07:42:16 +00:00
Hans Petter Selasky
57733723fe
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
Ruslan Bukin
c7e4729da4
Add support for DLINK DWA-127 Wireless Adapter
...
Approved by: cognet (mentor)
2013-09-05 10:09:24 +00:00
Rui Paulo
53dfd5c108
Cleanup the allocations when the attachment fails.
2013-07-31 06:05:34 +00:00
Rui Paulo
6d9b2f85f8
Unbreak sparc64 LINT. Need to fix this correctly at some point in the future.
2013-07-30 16:17:30 +00:00
Rui Paulo
31d9867769
Import OpenBSD's rsu(4) WLAN driver.
...
Support chipsets are the Realtek RTL8188SU, RTL8191SU, and RTL8192SU.
Many thanks to Idwer Vollering for porting/writing the man page and for
testing.
Reviewed by: adrian, hselasky
Obtained from: OpenBSD
Tested by: kevlo, Idwer Vollering <vidwer at gmail.com>
2013-07-30 02:07:57 +00:00
Hans Petter Selasky
e8353a7a69
Fix alignment of USB WLAN radiotap headers. This makes USB WLAN adapters
...
work on ARM, MIPS and similar platforms, where alignment matters.
MFC after: 1 week
Reported by: XiaoQI Ge <ghw@7axu.com>
2013-07-29 05:54:13 +00:00
Rui Paulo
fc4153c26f
Revert r252725 as it breaks WPA.
...
We need to fix wpa_supplicant because it checks whether the card has
ic_cryptocaps set. Since net80211 can do software encryption this check in
wpa_supplicant is wrong.
2013-07-14 18:26:47 +00:00
Hiren Panchasara
3c9d5a037d
Adding urtwn(4) firmware and related changes.
...
Reviewed by: rpaulo
Approved by: sbruno (mentor)
2013-07-10 08:21:09 +00:00
Rui Paulo
2173825bac
Set ic_cryptocaps to make sure wpa_supplicant works with WEP.
2013-07-04 20:57:15 +00:00
Rui Paulo
efb6af5c24
Fix a typo.
2013-06-30 06:05:32 +00:00
Rui Paulo
d718126e58
Fix the RSSI calculation.
2013-06-30 06:04:00 +00:00
Rui Paulo
bd3d8bed6c
Fix the ni_txrate calculation.
2013-06-30 05:25:24 +00:00
Rui Paulo
fd57292555
Fix a reference count bug in urtwn_ra_init().
2013-06-30 05:10:33 +00:00
Kevin Lo
1d02cf7c8d
Add support for D-Link DWA-131.
2013-06-25 06:43:04 +00:00
Rui Paulo
71c50b9ef2
Use STRUCT_USB_HOST_ID to make sure we have the right ELF section.
2013-06-10 05:45:16 +00:00
Rui Paulo
c2c2fc4d86
Import Kevin Lo's port of urtwn(4) from OpenBSD. urtwn(4) is a driver for the
...
Realtek RTL8188CU/RTL8192CU USB IEEE 802.11b/g/n wireless cards.
This driver requires microcode which is available in FreeBSD ports:
net/urtwn-firmware-kmod.
Hiren ported the urtwn(4) man page from OpenBSD and Glen just commited a port
for the firmware.
TODO:
- 802.11n support
- Stability fixes - the driver can sustain lots of traffic but has trouble
coping with simultaneous iperf sessions.
- fix debugging
MFC after: 2 months
Tested by: kevlo, hiren, gjb
2013-06-08 16:02:31 +00:00
Gabor Kovesdan
f0d0985ee9
- Correct mispellings of word miscellaneous
...
Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
2013-04-17 11:43:46 +00:00
Hans Petter Selasky
3232aae327
Add new USB ID.
...
PR: usb/177173
MFC after: 1 week
2013-03-21 07:04:17 +00:00
Hans Petter Selasky
bd247e9ddd
Add new USB ID.
...
PR: usb/177013
MFC after: 1 week
2013-03-18 07:02:58 +00:00
Hans Petter Selasky
1b9c9ab29a
Fix bad EEPROM parsing code.
...
MFC after: 2 weeks
2013-02-18 17:55:27 +00:00
Hans Petter Selasky
626d8465fb
Remove unused variable.
...
MFC after: 1 week
2013-02-13 15:43:15 +00:00