Commit Graph

131 Commits

Author SHA1 Message Date
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
Hans Petter Selasky
645e4d17f0 - Streamline detach logic in wlan drivers, so that
freed memory cannot be used during detach.
- Remove all panic() calls from the urtw driver because
  panic() is not appropriate here.
- Remove redundant checks for device detached in
  device detach callbacks.
- Use DEVMETHOD_END to mark end of device methods.

MFC after:	2 weeks
2013-02-10 10:36:16 +00:00
Hans Petter Selasky
056e0b5dcd Make sure we don't leak command buffers when a USB
command transfer fails.

MFC after:	1 week
Reported by:	Ian FREISLICH
2013-02-08 22:51:09 +00:00
Hans Petter Selasky
2d8a425be0 Fix regression issue after r244503:
Correct init order to fix a NULL pointer access.

MFC after:	1 week
Reported by:	Ian FREISLICH
2013-02-08 21:15:47 +00:00
Hans Petter Selasky
d021dd19b6 Fix for "run0: wcid=xx out of range" error message.
MFC after:	1 week
PR:		usb/174963
Submitted by:	PseudoCylon <moonlightakkiy@yahoo.ca>
2013-01-04 20:44:17 +00:00
Hans Petter Selasky
607bbcba30 Fix more regression issue after r244503.
usbd_transfer_setup() does not set a default length for USB transfers.
Only the number of frames is automatically setup.

MFC after:	1 week
2012-12-24 10:10:18 +00:00
Hans Petter Selasky
c180b3986d Make sure all USB drivers allocate buffer memory
through the USB API and/or busdma.

The following assumptions have been made:
umass - buffers passed from CAM/SCSI layer are OK
network - mbufs are OK.

Some other nits while at it.

MFC after:	1 week
Suggested by:	imp
2012-12-20 18:38:02 +00:00
Gleb Smirnoff
c6499eccad Mechanically substitute flags from historic mbuf allocator with
malloc(9) flags in sys/dev.
2012-12-04 09:32:43 +00:00
Hans Petter Selasky
83cadd7dcc Add missing CTLFLAG_TUN flag to tunable sysctls in USB stack.
Rearrange the tunables and belonging sysctl declarations, so
that they are next to eachother.

Submitted by:	n_hibma @
MFC after:	1 week
2012-10-26 06:04:47 +00:00
Hans Petter Selasky
419ce5a654 Add new USB device ID.
PR:		usb/170688
MFC after:	1 week
2012-08-17 16:27:11 +00:00
Hiroki Sato
be5033937a - Add support of the following USB devices to run(4):
* Logitec LAN-W150N/U2
 * Buffalo WLI-UC-GNM2

- Add device id of Planex GW-USValue-EZ.
2012-07-09 06:34:15 +00:00
Hans Petter Selasky
bb57146269 Add appropriate checks for ic_bsschan being set to IEEE80211_CHAN_ANYC in
some of the USB WLAN drivers. This fixes a panic when using monitor mode.

MFC after:	1 week
Submitted by:	PseudoCylon
2012-06-02 09:10:51 +00:00
Hans Petter Selasky
6d917491f5 Fix compiler warnings, mostly signed issues,
when USB modules are compiled with WARNS=9.

MFC after:	1 weeks
2012-04-02 10:50:42 +00:00
Bernhard Schmidt
f9d032660b Load the firmware during init not attach, as a root filesystem might
not yet be available. While here, also print the firmware version.

Submitted by:	PseudoCylon
MFC after:	3 days
2012-03-21 19:08:44 +00:00
Hans Petter Selasky
6f0e06a10e Add support for new USB device.
PR:		usb/164275
MFC after:	3 days
2012-01-19 18:03:52 +00:00
Bernhard Schmidt
fcd9500f91 Fix some net80211 enum nits:
- ic_vap_create() uses an ieee80211_opmode argument
- ieee80211_rate2media() takes an ieee80211_phymode argument
- ieee80211_plcp2rate() takes an ieee80211_phytype argument
- cast to enum ieee80211_protmode and ieee80211_roamingmode to silence
  compiler warnings

Submitted by:	arundel@
2011-12-17 10:23:17 +00:00
Hans Petter Selasky
58a1ff3bf4 Improve fix for random USB transfer time out.
Suggested by:	YougHyeon
MFC after:	3 days
2011-12-14 22:14:05 +00:00
Hans Petter Selasky
663e39b0b5 Fix for random USB transfer time out.
Submitted by:	PseudoCylon
MFC after:	3 days
2011-12-14 08:52:27 +00:00
Hans Petter Selasky
677034d566 Fix compile warning when using clang to compile the code.
Submitted by:	arundel @
MFC after:	3 days
2011-12-06 07:55:25 +00:00
Kevin Lo
aba07fdf5a Fix checks for error return from urtw_alloc_rx_data_list() and
urtw_alloc_tx_data_list().
2011-12-02 02:19:03 +00:00
Hans Petter Selasky
2634f5d710 Add new USB IDs to RUN driver.
PR:		usb/162712
MFC after:	1 week
2011-11-21 07:50:29 +00:00
Hans Petter Selasky
271ae033e9 Style change.
- Make it easier to port the USB code to other platforms by only using
one set of memory functions for clearing and copying memory. None of
the memory copies are overlapping. This means using bcopy() is not
required.
- Fix a compile warning when USB_HAVE_BUSDMA=0
- Add missing semicolon in avr32dci.
- Update some comments.

MFC after:	1 week
2011-11-12 08:16:45 +00:00
Ed Schouten
6472ac3d8a Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.
The SYSCTL_NODE macro defines a list that stores all child-elements of
that node. If there's no SYSCTL_DECL macro anywhere else, there's no
reason why it shouldn't be static.
2011-11-07 15:43:11 +00:00
Hans Petter Selasky
c8eeb97178 Add new USB IDs to RUN driver. Update usb.conf.
PR:		usb/161798
MFC after:	3 days
2011-10-19 10:09:01 +00:00
Bjoern A. Zeeb
8797cafe81 Fix build after r226465.
Cast void * to char * for arithmetics and make function return "no error".

MFC after:	3 days
2011-10-17 13:51:00 +00:00
Adrian Chadd
65d7e4d9f1 Fix an issue with 11g beacon frames which looks to be a limitation
on the largest multi-write size.

From the submitter:

==
I looked further into the magic 88-byte threshold after which the bug
occurs.  It turns out that figure included the 24-byte tx_desc, and up
to 64 bytes of beacon frame (header+data).

rum_write_multi doesn't seem happy with writing >64 bytes at a time to
the MAC register.  If I break it up into separate calls (e.g. bytes
0-63, then bytes 64-65, written at the appropriate offset) I see the
proper beacon frames being transmitted now.
==

Submitted by:	Steven Chamberlain <steven@pyro.eu.org>
MFC after:	3 days
2011-10-17 13:12:47 +00:00
Gavin Atkinson
16169457f0 The SMCWUSBG is a zyd(4) device, not an uath(4) device. Remove from the
latter.

It appears that the addition to uath(4) came in through PR kern/135009,
which had tested another device, the SMCWUSBTG2, successfully with uath(4)
and included the SMCWUSBG as it "has the same chipset".  I can find no
other evidence that these two do actually share the same chipset.  Moreover,
Linux treats the SMCWUSBG as a zyd(4) device also.

This reverts r223537.

Discussed with:	hselasky, kevlo
MFC after:	1 week
2011-06-26 11:37:24 +00:00
Hans Petter Selasky
4c8ffb2300 - Remove duplicate USB ID.
MFC after:	3 days
2011-06-25 15:46:24 +00:00
Hans Petter Selasky
f1a16106b6 - Move all USB device ID arrays into so-called sections,
sorted according to the mode which they support:
	host, device or dual mode
- Add generic tool to extract these data:
	tools/bus_autoconf

Discussed with:	imp
Suggested by:	Robert Millan <rmh@debian.org>
PR:		misc/157903
MFC after:	14 days
2011-06-24 02:30:02 +00:00
Gavin Atkinson
95db0bf798 Use USB_VENDOR_OVISLINK define rather than the vendor ID.
PR:		usb/158142
Submitted by:	Robert Millan <rmh debian.org>
MFC after:	1 week
2011-06-22 22:08:55 +00:00
Kevin Lo
f620e64d23 Guard against default ni_chan
PR: kern/144642
Submitted by: Arthur Hartwig <a_hartwig at fastmaildot fm>
2011-04-29 06:28:29 +00:00
Kevin Lo
329f91ff62 - Minor style(9) cleanup
- Make functions static
2011-04-01 03:27:55 +00:00
Kevin Lo
bf9d222b88 Fix panic while associating access point.
While here, add the SMC SMCWUSB-G
2011-03-25 05:01:13 +00:00
Daichi GOTO
f1168f9929 Add the Buffalo (Melco Inc.) WLI-UC-G301N
PR:		usb/155229
Submitted by:	Yoshiaki UCHIKAWA
MFC after:	1 week
2011-03-04 07:01:45 +00:00
Hans Petter Selasky
f417369bdd * Fix page fault caused by referring freed node.
While updating Tx stats, already freed node could be referred and cause
page fault. To avoid such panic, spool Tx stats in driver's softc. Then,
on every ratectl interval, grab node though ieee80211_iterate_nodes() and
update ratectl stats.

* Simplify some code in run_iter_func().

* Fix typo

* Use memset instead of bzero (hselasky @)

PR:		kern/153938
Submitted by:	PseudoCylon <moonlightakkiy@yahoo.ca>
Approved by:	thompsa (mentor)
2011-02-14 08:14:06 +00:00
Bernhard Schmidt
e7d14e9bcc Rework beacon handling re-enable run_updateslot().
Drivers which rely on net80211 to create the beacon need to call
ieee80211_beacon_update() on iv_update_beacon() calls. This is required
that certain bits, e.g. TIM, get updated. A call to ieee80211_beacon_alloc()
is not enough because it does not care about flags which can only change
during runtime. By design a beacon is supposed to be allocated only once
while moving into RUN state.

To handle all possible calls to iv_update_beacon() the run_updateslot()
function has been revived and run_updateprot() has been added.
run_updateslot() handles slot time changes and run_updateprot() changes
to protection, both can change while nodes associate/leave.

Submitted by:	Alexander Zagrebin <alex at zagrebin.ru>,
		PseudoCylon <moonlightakkiy atyahoo.ca>
MFC after:	3 weeks
2011-02-09 18:09:27 +00:00
Bernhard Schmidt
bd56e71b4b Pull ieee80211_ratectl_node_init() calls from drivers into net80211.
This fixes hostap mode for at least ral(4) and run(4), because there is
no sufficient call into drivers which could be used initialize the node
related ratectl variables.

MFC after:	3 days
2011-01-17 20:15:15 +00:00
MIHIRA Sanpei Yoshiro
54de08a963 Add new device ids.
Buffalo (Melco Inc.) WLI-UC-G

PR:		141777
2010-11-29 15:08:18 +00:00
Bernhard Schmidt
a7c6aabdc3 Instead of using the AMRR ratectl algo as default for drivers which have
the IEEE80211_C_RATECTL flag set, default to NONE for all drivers. Only if
a driver calls ieee80211_ratectl_init() check if the NONE algo is still
selected and try to use AMRR in that case. Drivers are still free to use
any other algo by calling ieee80211_ratectl_set() prior to the
ieee80211_ratectl_init() call.

After this change it is now safe to assume that a ratectl algo is always
available and selected, which renders the IEEE80211_C_RATECTL flag pretty
much useless. Therefore revert r211314 and 211546.

Reviewed by:	rpaulo
MFC after:	2 weeks
2010-11-06 18:17:20 +00:00
Hans Petter Selasky
e11ad60db2 Add new USB device IDs to the list of supported devices.
PR:	usb/151043
Approved by:    thompsa (mentor)
2010-10-14 22:14:55 +00:00
Hans Petter Selasky
fb78ea8bd1 USB WLAN:
- Add new device ID

PR:	usb/150989
Approved by:    thompsa (mentor)
2010-10-13 20:56:54 +00:00