Commit Graph

246 Commits

Author SHA1 Message Date
glebius
8e50f6e398 Set ic_softc in all 802.11 drivers. Not required right now, but will be
used quite soon.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2015-05-25 18:50:26 +00:00
glebius
f67a4dcfd7 Make net80211 drivers supply their device name to the net80211 layer, so
that the latter doesn't need to go through struct ifnet to get their name.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2015-05-25 13:51:13 +00:00
kevlo
cfa86d773f - 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
kevlo
c6e45b8cb4 - 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
kevlo
738ac09f01 - Add a new urtwn(4) device
- Remove duplicate REALTEK RTL8188CU_0 entry.
2015-04-28 03:24:27 +00:00
kevlo
ee3e204ec5 - Fix the length of efuse content.
- Replace the magic numbers with something more readable.
2015-04-24 04:57:18 +00:00
kevlo
dae19aaa27 Add new USB ID.
PR:	199522
2015-04-19 15:53:58 +00:00
kevlo
b821126bb7 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
rpaulo
392f5f9c34 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
rpaulo
eb3d4ff1d0 Remove whitespace. 2015-04-04 08:36:02 +00:00
hselasky
47174a10af 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
hselasky
8f6650c3c5 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
mp
165484e7cf Rename NETGEAR WG111V2_2 to WG111V1_2 to reflect external naming.
Reviewed by:	kevlo
2014-12-09 15:26:04 +00:00
kevlo
20ccdec729 Add Trendnet TEW-646UBH.
Submitted by:	bolshakov_1 at yahoo dot com
2014-11-19 05:38:45 +00:00
kevlo
be49686e26 Add D-Link DWA-123 rev D1 and Elecom WDC-150SU2M. 2014-10-24 15:36:30 +00:00
kevlo
0944c94606 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
hselasky
cde325445b Add new USB ID.
PR:		194091
MFC after:	3 days
2014-10-02 12:27:41 +00:00
glebius
cedd8768c4 Mechanically convert to if_inc_counter(). 2014-09-19 10:35:56 +00:00
kevlo
f4235299d0 Drop frames that have larger than MCLBYTES. 2014-09-09 05:21:31 +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
b3cecf4442 Add the D-Link DWA-125 rev D1.
Tested by myself.
2014-08-20 01:26:27 +00:00
n_hibma
cd68ca5c6b 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
hselasky
4600967ac6 Fix for division by zero.
MFC after:	3 days
2014-07-26 16:06:01 +00:00
kevlo
5ac30f4f9f Enable 8051 before downloading firmware.
Tested by:	Carlos Jacobo Puga Medina <cpm at fbsd dot es>
2014-07-10 09:42:34 +00:00
hselasky
35b126e324 Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
gjb
fc21f40567 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
hselasky
bd1ed65f0f 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
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
5effc68b3c 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
hselasky
c5a2e72255 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
kevlo
8312939e3e Remove r264317 by accident.
Spotted by:	Kuan-Chung Chiu
2014-05-27 01:47:23 +00:00
hselasky
3a79be5b8c - Give firmware loading more time.
MFC after:	3 days
2014-05-22 12:01:43 +00:00
hselasky
11ac31389d - 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
hselasky
5b5a0e0ff5 - 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
hselasky
3685634095 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
hselasky
22a2a23b20 - 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
hselasky
e77e835ce8 - 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
hselasky
0363117cd5 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
andreast
044b3e1a2f Fix gcc build, initialize off variable. 2014-04-26 19:30:04 +00:00
kevlo
f16b6a346e Initialize rssi variable. 2014-04-26 14:39:58 +00:00
kevlo
867becd902 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
kevlo
1411f9e891 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
kevlo
41151c8ea6 Add the Asus USB-N10 NANO.
Tested by:	Kuan-Chung Chiu <buganini@gmail.com>
2014-04-10 14:37:37 +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
kevlo
5c3dbd2895 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
kevlo
c6b8469b0b 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
kevlo
8534e7cf72 Fix a logic error when enabling MAC. 2014-03-06 06:39:55 +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