Commit Graph

244 Commits

Author SHA1 Message Date
Kevin Lo
997d8c7a89 - Fix a wrong R92C_USTIME_TSF register definition
- Fix intitial transmit rate to an 11g rate for the RTL8188EU
- Add a comment about response rate settings
2015-05-08 09:01:00 +00:00
Kevin Lo
32bbc2d0bb - Disable usb aggregation mode by default since it boots performance
- Minor tweak

PR:	199718
Submitted by:	Mikhail <mp39590 at gmail dot com>
2015-04-30 02:47:21 +00:00
Kevin Lo
9e2a7dccfe - Add a new urtwn(4) device
- Remove duplicate REALTEK RTL8188CU_0 entry.
2015-04-28 03:24:27 +00:00
Kevin Lo
0339d2cfcc - Fix the length of efuse content.
- Replace the magic numbers with something more readable.
2015-04-24 04:57:18 +00:00
Kevin Lo
8aa853d5c1 Add new USB ID.
PR:	199522
2015-04-19 15:53:58 +00:00
Kevin Lo
c3358f4ed2 Enable LDO to 2.5V before efuse r/w action in order to prevent
incorrect mac address read from efuse.

Reported by:	swills
Tested by:	rpaulo and myself on RPi
2015-04-16 07:40:01 +00:00
Rui Paulo
3d8e91f9ce urtwn: blink the LED when scanning.
Previously, the driver was trying to blink the LED in the newstate
function, but that only gets called once (unlike OpenBSD's net80211
stack).  Move the LED blinking to set_channel().

While there, don't try to set the channel when we switch to the SCAN
state.  This is already accomplished by the set_channel() function.

MFC after:	1 week
2015-04-04 08:41:02 +00:00
Rui Paulo
f13c5f5428 Remove whitespace. 2015-04-04 08:36:02 +00:00
Hans Petter Selasky
ece4b0bd43 Make a bunch of USB debug SYSCTLs tunable, so that their value(s) can
be set before the USB device(s) are probed.
2015-01-05 15:04:17 +00:00
Hans Petter Selasky
abfa11d612 Make sure an error case exits unlocked.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	1 week
2015-01-03 11:04:17 +00:00
Mark Peek
8723d2f43c Rename NETGEAR WG111V2_2 to WG111V1_2 to reflect external naming.
Reviewed by:	kevlo
2014-12-09 15:26:04 +00:00
Kevin Lo
fa20eb98a8 Add Trendnet TEW-646UBH.
Submitted by:	bolshakov_1 at yahoo dot com
2014-11-19 05:38:45 +00:00
Kevin Lo
66fef59616 Add D-Link DWA-123 rev D1 and Elecom WDC-150SU2M. 2014-10-24 15:36:30 +00:00
Kevin Lo
b1c5d8f7c3 Fix the kernel panic in hostap mode.
rvp->beacon_mbuf was NULL in run_update_beacon().

PR:	189405
Submitted by:	Gabor Simon <gabor.simon75 at gmail.com>
MFC after:	3 days
2014-10-22 03:32:27 +00:00
Hans Petter Selasky
e8fa59aa5e Add new USB ID.
PR:		194091
MFC after:	3 days
2014-10-02 12:27:41 +00:00
Gleb Smirnoff
a001989d9b Mechanically convert to if_inc_counter(). 2014-09-19 10:35:56 +00:00
Kevin Lo
141aa3b93a Drop frames that have larger than MCLBYTES. 2014-09-09 05:21:31 +00:00
Kevin Lo
15cb19cd6a Fix typo: s/mac_rev/mac_ver/
Submitted by:	Stefan Sperling <stsp at openbsd dot org>
2014-08-26 02:20:37 +00:00
Kevin Lo
51a25d3479 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
Kevin Lo
d4bcd25553 Add the D-Link DWA-125 rev D1.
Tested by myself.
2014-08-20 01:26:27 +00:00
Nick Hibma
7ae432c00d Remove unused defines.
Fix some device_printf's that were missing '\n' at the end or had
speling errors.

PR:		145319
Submitted by:	rozhuk.im gmail.com
2014-08-05 08:24:41 +00:00
Hans Petter Selasky
b8e3094c34 Fix for division by zero.
MFC after:	3 days
2014-07-26 16:06:01 +00:00
Kevin Lo
b11ce478cf Enable 8051 before downloading firmware.
Tested by:	Carlos Jacobo Puga Medina <cpm at fbsd dot es>
2014-07-10 09:42:34 +00:00
Hans Petter Selasky
af3b2549c4 Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
Glen Barber
37a107a407 Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output,
such as:

 1) no output from sysctl(8)
 2) erroneously returning ENOMEM with tools like truss(1)
    or uname(1)
 truss: can not get etype: Cannot allocate memory
2014-06-27 22:05:21 +00:00
Hans Petter Selasky
3da1cf1e88 Extend the meaning of the CTLFLAG_TUN flag to automatically check if
there is an environment variable which shall initialize the SYSCTL
during early boot. This works for all SYSCTL types both statically and
dynamically created ones, except for the SYSCTL NODE type and SYSCTLs
which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to
be used in the case a tunable sysctl has a custom initialisation
function allowing the sysctl to still be marked as a tunable. The
kernel SYSCTL API is mostly the same, with a few exceptions for some
special operations like iterating childrens of a static/extern SYSCTL
node. This operation should probably be made into a factored out
common macro, hence some device drivers use this. The reason for
changing the SYSCTL API was the need for a SYSCTL parent OID pointer
and not only the SYSCTL parent OID list pointer in order to quickly
generate the sysctl path. The motivation behind this patch is to avoid
parameter loading cludges inside the OFED driver subsystem. Instead of
adding special code to the OFED driver subsystem to post-load tunables
into dynamically created sysctls, we generalize this in the kernel.

Other changes:
- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"
to "hw.pcic.intr_mask".
- Removed redundant TUNABLE statements throughout the kernel.
- Some minor code rewrites in connection to removing not needed
TUNABLE statements.
- Added a missing SYSCTL_DECL().
- Wrapped two very long lines.
- Avoid malloc()/free() inside sysctl string handling, in case it is
called to initialize a sysctl from a tunable, hence malloc()/free() is
not ready when sysctls from the sysctl dataset are registered.
- Bumped FreeBSD version to indicate SYSCTL API change.

MFC after:	2 weeks
Sponsored by:	Mellanox Technologies
2014-06-27 16:33:43 +00:00
Kevin Lo
a080f71521 Remove D-Link DWA140 rev D1 by accident.
Pointed out by Anders Larsson in private email.
2014-06-05 01:55:23 +00:00
Hans Petter Selasky
bb03cd6fa1 More RSU fixes:
- Properly align temporary buffer to 32-bit.
- Add an extra parenthesis to make expression clear.
- Range check the association ID received from hardware.

MFC after:	1 week
2014-06-04 16:58:35 +00:00
Hans Petter Selasky
910593b55c Fixes for the RSU driver:
- The R92S_TCR register is an 8-bit register. Don't access it like a
16-bit register.
- Disable parsing the delete station event, due to many false events.
- Ensure that there is only one transfer queue for each endpoint, so
that packets transmitted don't get out of order.

MFC after:	1 week
2014-06-04 09:18:13 +00:00
Kevin Lo
26c79a7652 Remove r264317 by accident.
Spotted by:	Kuan-Chung Chiu
2014-05-27 01:47:23 +00:00
Hans Petter Selasky
1593e8754e - Give firmware loading more time.
MFC after:	3 days
2014-05-22 12:01:43 +00:00
Hans Petter Selasky
885476cb9a - Stop transfers when RSU init fails.
- Make sure TX/RX lists don't leak and are only allocated once.
- Fix off-by one transfer index computation.
- Give firmware loading more time.

MFC after:	3 days
2014-05-22 06:28:09 +00:00
Hans Petter Selasky
400b4e53bd - Split transmit queue into one for each type. Apparently there will
be a race when using a single active queue for all transmit types.
- Last argument of usb_pause_mtx() is ticks and not milliseconds.
- Remove unused watchdog.
- Remove some unused fields from the RSU softc structure.
- Workaround usbd_transfer_start() recursion from inside of completion
callback.

MFC after:	3 days
2014-05-21 16:52:55 +00:00
Hans Petter Selasky
302a703b5b Avoid starting a USB transfer inside the callback function, right
after its been submitted.

MFC after:	3 days
2014-05-21 06:23:52 +00:00
Hans Petter Selasky
aff6e94558 - The DELAY() should not be used in USB drivers.
- The usb_pause_mtx() function takes ticks and not milliseconds as last argument.

MFC after:	3 days
2014-05-20 15:53:17 +00:00
Hans Petter Selasky
b41381aea9 - The DELAY() should not be used in USB drivers.
- The usb_pause_mtx() function takes ticks and not milliseconds as last argument.

MFC after:	3 days
2014-05-20 15:47:37 +00:00
Hans Petter Selasky
7243077c9d Make sure detach code is executed in all cases. This fixes a panic
when debugging is enabled.

Reported by:	Idwer Vollering <vidwer@gmail.com>
MFC after:	3 days
2014-05-20 12:22:53 +00:00
Andreas Tobler
269aedcff5 Fix gcc build, initialize off variable. 2014-04-26 19:30:04 +00:00
Kevin Lo
11a4d354a2 Initialize rssi variable. 2014-04-26 14:39:58 +00:00
Kevin Lo
28bc7834e0 Add preliminary support for the Realtek RTL8188EUS and RTL8188ETV chipsets.
Committed over the TP-LINK TL-WN725N v2 (RTL8188EUS) on amd64 with WPA.
2014-04-25 08:01:22 +00:00
Kevin Lo
d0cc98c0b1 Fix panic by adding mtx_assert() to urtwn_init_locked() and
urtwn_stop_locked().

Tested by:	Anthony Jenkins <scoobi_doo at yahoo dot com>
2014-04-24 03:16:47 +00:00
Kevin Lo
ed8023f58b Add the Asus USB-N10 NANO.
Tested by:	Kuan-Chung Chiu <buganini@gmail.com>
2014-04-10 14:37:37 +00:00
Hans Petter Selasky
4ebc1ddf98 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
Kevin Lo
a275e26512 Reset the bit of the R92C_MCUFWDL associated with checksum report
before loading firmware page.  It may fix this problem:
"urtwn0: timeout waiting for checksum report"
2014-03-14 06:38:22 +00:00
Kevin Lo
9602062e96 Similar to r246614, fix panic on removing urtwn(4). It happens because
nodes are freed after the adapter is gone.
2014-03-14 06:37:08 +00:00
Kevin Lo
22584722c6 Fix a logic error when enabling MAC. 2014-03-06 06:39:55 +00:00
Hans Petter Selasky
44bf877e1a - 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
Kevin Lo
5c5e99d273 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
Rui Paulo
a999ce6abf Add urtwn_start_locked() to avoid unlocking during TX. 2014-02-14 01:47:12 +00:00
Kevin Lo
c1033bd401 Correct setting R92C_TXAGC_MCS11_MCS08 register. 2014-02-05 08:09:02 +00:00