Commit Graph

452 Commits

Author SHA1 Message Date
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
Ed Maste
2c7dee3bf5 In r207768 I silenced a console warning from rum(4). There was legitimate
opposition to the change, since really we need to implement missing
functionality in drivers or the 802.3 layer.

For now, restore a reminder message for a missing rum_update_mcast, but
print it only once.
2010-10-08 01:03:30 +00:00
Andrew Thompson
13226c4c02 Fix build breakage from r212127 2010-09-02 03:50:11 +00:00
Andrew Thompson
8d8bdb018d We need to grab a node reference count to vap->iv_bss before using it as it is
possible for the node to be replaced and freed at any time by
ieee80211_sta_join1().
2010-09-02 03:28:03 +00:00
Andrew Thompson
910cb8feb9 Add missing MODULE_VERSION() definitions, this resolves problems around
duplicate module loads.

PR:		usb/125736
Submitted by:	danger, mm
Reviewed by:	hselasky
2010-09-01 23:47:53 +00:00
Bernhard Schmidt
ad8e331bf2 Introduce IEEE80211_C_RATECTL, drivers which use the ratectl framework
should set this capability.

MFC after:	2 weeks
2010-08-14 20:12:10 +00:00
Andrew Thompson
6bce5ae1c5 Use more compact deviceid table.
Submitted by:	Akinori Furukoshi
2010-07-11 23:54:44 +00:00
Andrew Thompson
75c7615952 Update for style(9).
Submitted by:	Akinori Furukoshi (author)
2010-07-11 23:52:12 +00:00
Andrew Thompson
33ba3721c9 Add new device id.
PR:		usb/147190
2010-06-22 21:08:45 +00:00
Jung-uk Kim
0f817de766 Fix typos that broke duration calculations on protection frames. A similar
fix was done for ral(4) long ago and it must be copy-and-paste bugs.

Found by:	clang
2010-06-14 23:01:50 +00:00
Andrew Thompson
beaa05370d - Because hostapd calls iv_key_set() before if_init(), make sure key_set
callback function will be executed, and that the key won't be deleted during
  the init process.
- txmic and rxmic are written into the chip the same place regardless of
  opmode.
- Make the hardware generate 802.11 sequence numbers.

Submitted by:	Akinori Furukoshi
Obtained from:	git://gitorious.org/run/run.git
2010-06-14 00:40:23 +00:00
Andrew Thompson
85e7bb81e9 Sync run(4) driver from author's site.
Submitted by:	Akinori Furukoshi
Obtained from:	git://gitorious.org/run/run.git
2010-05-13 00:19:03 +00:00
Ed Maste
6dd8e071f0 Add dummy function for ic_update_mcast (a la if_urtw) to avoid console
spam.
2010-05-08 11:56:00 +00:00
Maxim Sobolev
e50d35e6c6 Add new tunable 'net.link.ifqmaxlen' to set default send interface
queue length. The default value for this parameter is 50, which is
quite low for many of today's uses and the only way to modify this
parameter right now is to edit if_var.h file. Also add read-only
sysctl with the same name, so that it's possible to retrieve the
current value.

MFC after:	1 month
2010-05-03 07:32:50 +00:00
Andrew Thompson
b850ecc180 Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this had
the illusion of a tunable setting but was always turned on regardless.

MFC after:	1 week
2010-04-22 21:31:34 +00:00
Rui Paulo
ddc7073258 Remove previously added if 0's.
MFC after:	1 month
2010-04-09 11:56:38 +00:00
Rui Paulo
a31532b4ad Remove debugging code that snuck in. 2010-04-07 17:48:13 +00:00
Rui Paulo
b6108616ac net80211 rate control framework (net80211 ratectl).
This framework allows drivers to abstract the rate control algorithm and
just feed the framework with the usable parameters. The rate control
framework will now deal with passing the parameters to the selected
algorithm. Right now we have AMRR (the default) and RSSADAPT but there's
no way to select one with ifconfig, yet.
The objective is to have more rate control algorithms in the net80211
stack so all drivers[0] can use it. Ideally, we'll have the well-known
sample rate control algorithm in the net80211 at some point so all
drivers can use it (not just ath).

[0] all drivers that do rate control in software, that is.

Reviewed by:	bschmidt, thompsa, weyongo
MFC after:	1 months
2010-04-07 15:29:13 +00:00
Andrew Thompson
3707a5e930 - Integrate latest driver code from OpenBSD
- Drain our tasks from the ieee80211 taskqueue
- Add more IDs

Submitted by:	Akinori Furukoshi
2010-03-11 22:05:12 +00:00
Andrew Thompson
dae1952f93 Add the Netgear WPN111 2010-01-29 02:32:46 +00:00
Andrew Thompson
0283fab7f0 Attempt to recover on a TX error rather than stopping all transfers.
Submitted by:	Hans Petter Selesky
2010-01-29 02:31:33 +00:00
Andrew Thompson
031c7388a2 Add device ID.
PR:		usb/142427
2010-01-29 01:27:54 +00:00
Andrew Thompson
97ccc89052 Use device_printf rather than printf + device_get_nameunit. 2010-01-28 22:54:01 +00:00
Andrew Thompson
8b1d9a81e9 Release the firmware after loading to the device. 2010-01-28 22:46:04 +00:00
Andrew Thompson
069f1a8056 Add run(4), a driver for Ralink RT2700U/RT2800U/RT3000U USB 802.11agn devices.
This driver was written for OpenBSD by Damien Bergamini and ported over by
Akinori Furukoshi.
2010-01-28 22:24:54 +00:00
Weongyo Jeong
1d3d5952a3 adds sysctl knobs to show rate statistics that it could be useful to
debug slow TX speed.
2010-01-27 19:43:14 +00:00
Weongyo Jeong
97ac268fcb removes a hack to attach TRENDnet TEW-504UB/EU that I think this issue
is solved with r202607.  Now idProduct of all uath(4) devices should be
decreased after loading the firmware.
2010-01-19 01:11:27 +00:00
Andrew Thompson
9e6b53136e Use macros to strip off USB_VENDOR_ and USB_PRODUCT_ from some id tables to make
them more compact and readable.
2009-12-26 19:03:28 +00:00
Andrew Thompson
767cb2e29d Remove overuse of exclamation marks in kernel printfs, there mere fact a
message has been printed is enough to get someones attention. Also remove the
line number for DPRINTF/DPRINTFN, it already prints the funtion name and a
unique message.
2009-11-26 00:43:17 +00:00
Weongyo Jeong
35e8cd5f52 fixes a typo that value should be 0 not 10. 2009-11-03 21:47:07 +00:00
Weongyo Jeong
a0585a1450 overhauls urtw(4) for supporting RTL8187B devices properly that there
was major changes to initialize RF chipset and set H/W registers and
removed a lot of magic numbers on code.  Details are as follows:

  - uses the endpoint 0x89 to get TX status information which used to
    get TX complete or retry numbers or get a beacon interrupt.  It's
    only valuable for RTL8187B.
  - removes urtw_write[8|16|32]_i functions that it's useless now.
  - uses ic->ic_updateslot to set SLOT, SIFS, DIES, EIFS, CW_VAL
    registers that doesn't set these whenever the channel is changed.
  - code for initializing RF chipset for RTL8187B changed a lot that
    there was many problems on TX transfers so it doesn't work properly
    even if just for a ping/pong.  Now it becomes more stable than
    before that TX throughputs using netperf(1) were about 15 ~ 17Mbps/s
    though sometimes it encounters packet losses.
  - removes a lot of magic numbers that in the previous all of
    representing RX and TX descriptors were consisted of magic numbers
    and structures.  It'd be more readable rather than before.
  - calculates TX duration more accurately for urtw(4) devices.
  - style(9)
2009-10-18 00:11:49 +00:00
Weongyo Jeong
941da6d392 fixes a TX hang that could be possible to happen when the trasfers are
in the high speed that some drivers don't call if_start callback after
marking ~IFF_DRV_OACTIVE.

MFC after:	3 days
2009-10-14 20:30:27 +00:00
Weongyo Jeong
db63fc93cc fixes a TX hang bug that it could happen when if_start callback didn't
be restarted by full of the output queue.

MFC after:	3 days
Tested by:	bsduser <bsd at acd.homelinux.org>
2009-10-14 20:09:09 +00:00
Weongyo Jeong
f8b51ca5e9 updates device entries supported with the product name not magic numbers
and sorts entries.  WUSB54GCV2 is added.

Obtained from:	OpenBSD
2009-10-04 23:30:08 +00:00
Poul-Henning Kamp
6778431478 Revert previous commit and add myself to the list of people who should
know better than to commit with a cat in the area.
2009-09-08 13:19:05 +00:00
Poul-Henning Kamp
b34421bf9c Add necessary include. 2009-09-08 13:16:55 +00:00
Weongyo Jeong
a6b8e0e915 fix a TX issue on big endian machines like powerpc or sparc64. Now
zyd(4) should work on all architectures.

Obtained from:	OpenBSD
2009-09-04 05:28:09 +00:00
Alfred Perlstein
a5508450dc Remove redundant locking.
Submitted by:	hps
2009-08-24 05:03:59 +00:00
John Baldwin
a56fe095f0 Temporarily revert the new-bus locking for 8.0 release. It will be
reintroduced after HEAD is reopened for commits by re@.

Approved by:	re (kib), attilio
2009-08-20 19:17:53 +00:00
Attilio Rao
444b91868b Make the newbus subsystem Giant free by adding the new newbus sxlock.
The newbus lock is responsible for protecting newbus internIal structures,
device states and devclass flags. It is necessary to hold it when all
such datas are accessed. For the other operations, softc locking should
ensure enough protection to avoid races.

Newbus lock is automatically held when virtual operations on the device
and bus are invoked when loading the driver or when the suspend/resume
take place. For other 'spourious' operations trying to access/modify
the newbus topology, newbus lock needs to be automatically acquired and
dropped.

For the moment Giant is also acquired in some key point (modules subsystem)
in order to avoid problems before the 8.0 release as module handlers could
make assumptions about it. This Giant locking should go just after
the release happens.

Please keep in mind that the public interface can be expanded in order
to provide more support, if there are really necessities at some point
and also some bugs could arise as long as the patch needs a bit of
further testing.

Bump __FreeBSD_version in order to reflect the newbus lock introduction.

Reviewed by:    ed, hps, jhb, imp, mav, scottl
No answer by:   ariff, thompsa, yongari
Tested by:      pho,
                G. Trematerra <giovanni dot trematerra at gmail dot com>,
                Brandon Gooch <jamesbrandongooch at gmail dot com>
Sponsored by:   Yahoo! Incorporated
Approved by:	re (ksmith)
2009-08-02 14:28:40 +00:00
Weongyo Jeong
62dcd8657b adds DLINK2 DWA120 device.
PR:		usb/136950
Reported by:	Alexander Kuznetsov <skritku at gmail.com>
Approved by:	re (kib)
2009-07-27 20:17:20 +00:00
Poul-Henning Kamp
c92033c874 Add ids of Sitecom USB wlan gadget.
Approved by:	re (kib)
2009-06-28 10:30:53 +00:00
Robert Watson
eb956cd041 Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/
IF_ADDR_UNLOCK() across network device drivers when accessing the
per-interface multicast address list, if_multiaddrs.  This will
allow us to change the locking strategy without affecting our driver
programming interface or binary interface.

For two wireless drivers, remove unnecessary locking, since they
don't actually access the multicast address list.

Approved by:	re (kib)
MFC after:	6 weeks
2009-06-26 11:45:06 +00:00
Weongyo Jeong
90cbee43d6 updates AMRR statistics with tx complete status that if not the tx rate
always would be reduced.
2009-06-25 02:28:12 +00:00
Weongyo Jeong
7f97ca0347 uses ZYD_NOTIF_RETRYSTATUS info to count the number of retries. 2009-06-25 02:14:47 +00:00
Andrew Thompson
ed6d949afd - Make struct usb_xfer opaque so that drivers can not access the internals
- Reduce the number of headers needed for a usb driver, the common case is just   usb.h and usbdi.h
2009-06-23 02:19:59 +00:00
Weongyo Jeong
c39515adc4 reorders the sequence when the device is detached. After detaching the
interface is completed then it'll process other parts to avoid a race
condition.

Pointed by:	jhb
2009-06-17 04:15:19 +00:00
Andrew Thompson
a593f6b8de s/usb2_/usb_|usbd_/ on all function names for the USB stack. 2009-06-15 01:02:43 +00:00
Andrew Thompson
a8675cae2b Make variables static where appropriate.
Found by:	cscout
2009-06-13 04:56:45 +00:00
Weongyo Jeong
e87b19e38c unify zyd_tx_mgt() and zyd_tx_data() to simplify TX path and sorts
setting TX descritor.

While I'm here fixes a bug that the management frames only sent at 2
Mbits/s.
2009-06-09 04:17:08 +00:00
Weongyo Jeong
78cc4bbbb0 reimplements RF logic for GCT chipset (as known as UW2453) to support
ICIDU NI-707503 which is donated by Nick Hibma (great thanks!).  Though
it has a MAXIM RF (0x8) there's some success reports with using GCT RF
(0x9) codes and it worked well for ICIDU NI-707503 too.  So codes for
MAXIM and GCT RFs are integrated.

Before this commit, if I rememeber correctly, MAXIM RF is never tested
that it seems it's a first report working with FreeBSD.
2009-06-04 02:49:50 +00:00
Weongyo Jeong
9dde689c63 cleanups the device match list. 2009-06-04 01:55:13 +00:00
Weongyo Jeong
85531f0886 ZyXEL G-202 has zd1211b chipset, not zd1211.
Tested by:	Samuel Boivie <samuel at boivie.org>
2009-06-01 01:51:37 +00:00
Sam Leffler
515db61d2b validate tx rate(s) in the raw xmit path
Tested by:	"Paul B. Mahol" <onemda@gmail.com> (rum, bwi)
2009-05-29 23:41:31 +00:00
Andrew Thompson
e0a69b51ac s/usb2_/usb_/ on all typedefs for the USB stack. 2009-05-29 18:46:57 +00:00
Weongyo Jeong
e257fff483 adds new device IDs.
PR:		usb/135009
Submitted by:	Bill Squire <billsf at 2600.COM>
2009-05-29 10:10:23 +00:00
Andrew Thompson
760bc48e7e s/usb2_/usb_/ on all C structs for the USB stack. 2009-05-28 17:36:36 +00:00
Weongyo Jeong
f58ca84122 ports urtw(4) for USB2. Additionally it supports a 8187B chipset weakly
that it needs more stabilization.
2009-05-27 03:57:38 +00:00
Andrew Thompson
88f3df72ef Print out device attachment. 2009-05-21 02:26:51 +00:00
Andrew Thompson
9360ae4073 Rename the usb sysctl tree from hw.usb2.* back to hw.usb.*.
Submitted by:	Hans Petter Selasky
2009-05-21 01:48:42 +00:00
Andrew Thompson
f29a072444 - rename usb2_mode to usb_mode [1]
- change variable types to use the enum

Submitted by:	Hans Petter Selasky [1]
2009-05-21 00:04:17 +00:00
Sam Leffler
5463c4a485 Overhaul monitor mode handling:
o replace DLT_IEEE802_11 support in net80211 with DLT_IEEE802_11_RADIO
  and remove explicit bpf support from wireless drivers; drivers now
  use ieee80211_radiotap_attach to setup shared data structures that
  hold the radiotap header for each packet tx/rx
o remove rx timestamp from the rx path; it was used only by the tdma support
  for debugging and was mostly useless due to it being 32-bits and mostly
  unavailable
o track DLT_IEEE80211_RADIO bpf attachments and maintain per-vap and
  per-com state when there are active taps
o track the number of monitor mode vaps
o use bpf tap and monitor mode vap state to decide when to collect radiotap
  state and dispatch frames; drivers no longer explicitly directly check
  bpf state or use bpf calls to tap frames
o handle radiotap state updates on channel change in net80211; drivers
  should not do this (unless they bypass net80211 which is almost always
  a mistake)
o update various drivers to be more consistent/correct in handling radiotap
o update ral to include TSF in radiotap'd frames
o add promisc mode callback to wi

Reviewed by:	cbzimmer, rpaulo, thompsa
2009-05-20 20:00:40 +00:00
Weongyo Jeong
e557e68088 try to unsetup USB xfers before calling ieee80211_ifdetach() to fix a
bug referencing a destroyed lock within TX callbacks during device
detach.

Submitted by:	hps (original version)
Tested by:	Lucius Windschuh <lwindschuh at googlemail.com>
2009-05-20 03:49:16 +00:00
Sam Leffler
afb8a6b500 add TRENDnet TEW-504UB/EU
Submitted by:	Lucius Windschuh <lwindschuh@googlemail.com>
2009-05-17 19:51:08 +00:00
Sam Leffler
f61336e4cb fix 11a channel use; mark OFDM operation correctly
Submitted by:	Lucius Windschuh <lwindschuh@googlemail.com>
2009-05-17 19:46:50 +00:00
Weongyo Jeong
879f0eff53 ports upgt(4) driver for USB2. 2009-05-11 02:39:49 +00:00
Andrew Thompson
5efea30f03 Create a taskqueue for each wireless interface which provides a serialised
sleepable context for net80211 driver callbacks. This removes the need for USB
and firmware based drivers to roll their own code to defer the chip programming
for state changes, scan requests, channel changes and mcast/promisc updates.
When a driver callback completes the hardware state is now guaranteed to have
been updated and is in sync with net80211 layer.

This nukes around 1300 lines of code from the wireless device drivers making
them more readable and less race prone.

The net80211 layer has been updated as follows
 - all state/channel changes are serialised on the taskqueue.
 - ieee80211_new_state() always queues and can now be called from any context
 - scanning runs from a single taskq function and executes to completion. driver
   callbacks are synchronous so the channel, phy mode and rx filters are
   guaranteed to be set in hardware before probe request frames are
   transmitted.

Help and contributions from Sam Leffler.

Reviewed by:	sam
2009-05-02 15:14:18 +00:00
Andrew Thompson
6fca021096 We need to ref the bss node when sending the beacon since it goes through the
normal tx path and will be decremented on the mbuf free.
2009-04-30 22:30:01 +00:00
Andrew Thompson
5cbbd666e1 Catch up with usb2_config struct layout changes. 2009-04-05 18:26:19 +00:00
Andrew Thompson
4eae601ebd MFp4 //depot/projects/usb@159909
- make usb2_power_mask_t 16-bit
- remove "usb2_config_sub" structure from "usb2_config". To compensate for this
  "usb2_config" has a new field called "usb_mode" which select for which mode
  the current xfer entry is active. Options are: a) Device mode only b) Host
  mode only (default-by-zero) c) Both modes.  This change was scripted using
  the following sed script: "s/\.mh\././g".
- the standard packet size table in "usb_transfer.c" is now a function, hence
  the code for the function uses less memory than the table itself.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:38 +00:00
Weongyo Jeong
dc60165b73 Add uath(4) wireless USB driver for Atheros AR5005UG and AR5005UX
chipsets.

Reviewed by:	sam
2009-04-04 11:23:00 +00:00
Kevin Lo
2da462e383 Add another rum(4) device found in
http://www.fit-pc.com/new/whats-new.html
2009-03-31 07:40:36 +00:00
Sam Leffler
339ccfb391 Hoist 802.11 encapsulation up into net80211:
o call ieee80211_encap in ieee80211_start so frames passed down to drivers
  are already encapsulated
o remove ieee80211_encap calls in drivers
o fixup wi so it recreates the 802.3 head it requires from the 802.11
  header contents
o move fast-frame aggregation from ath to net80211 (conditional on
  IEEE80211_SUPPORT_SUPERG):
  - aggregation is now done in ieee80211_start; it is enabled when the
    packets/sec exceeds ieee80211_ffppsmin (net.wlan.ffppsmin) and frames
    are held on a staging queue according to ieee80211_ffagemax
    (net.wlan.ffagemax) to wait for a frame to combine with
  - drivers must call back to age/flush the staging queue (ath does this
    on tx done, at swba, and on rx according to the state of the tx queues
    and/or the contents of the staging queue)
  - remove fast-frame-related data structures from ath
  - add ieee80211_ff_node_init and ieee80211_ff_node_cleanup to handle
    per-node fast-frames state (we reuse 11n tx ampdu state)
o change ieee80211_encap calling convention to include an explicit vap
  so frames coming through a WDS vap are recognized w/o setting M_WDS

With these changes any device able to tx/rx 3Kbyte+ frames can use fast-frames.

Reviewed by:	thompsa, rpaulo, avatar, imp, sephe
2009-03-30 21:53:27 +00:00
Sam Leffler
26d39e2c68 o add ic_rt to track the rate table for the current channel; this enables
calculation of packet transmit times to do things like check txop limits
o remove equivalent driver code and convert to use net80211 state
2009-03-29 21:17:08 +00:00
Sam Leffler
29aca94080 Eliminate ic_myaddr so changing the mac address of a device works correctly:
o remove ic_myaddr from ieee80211com
o change ieee80211_ifattach to take the mac address of the physical device
  and use that to setup the lladdr.
o replace all references to ic_myaddr in drivers by IF_LLADDR
o related cleanups (e.g. kill dead code)

PR:		kern/133178
Reviewed by:	thompsa, rpaulo
2009-03-29 17:59:14 +00:00
Andrew Thompson
d953f72075 Ensure the cached rq pointer is still valid before waking up the address, the
zyd_cmd function may have timed out. It wouldnt cause a panic but could wakeup
someone.

Spotted by:	HPS
2009-03-06 17:04:47 +00:00
Andrew Thompson
9aef556d71 Rename the ushub device class back to uhub as it was in the old usb stack,
moused(8) looks for "uhub/ums" to decide if needs to load the module.

Reported by:	Garrett Cooper
2009-03-02 05:37:05 +00:00
Andrew Thompson
a09d8d7315 Remove ic_update_mcast calls that are not implemented.
Spotted by:	sam
Pointy hat:	me
2009-02-27 21:50:15 +00:00
Andrew Thompson
77ddf3d34a Partial sync to //depot/projects/usb
- Reissue the ctrl request on failure
- Ensure Tx and ctrl requests are not interleaved
- Add promisc callbacks

Obtained from:	Hans Petter Selasky
2009-02-27 21:14:29 +00:00
Ed Schouten
5d38a4d4f7 Also use proper capitalisation of FreeBSD in other source files.
Approved by:	thompsa
2009-02-24 17:15:29 +00:00
Andrew Thompson
96ca458f65 Make sure at least two tx slots are free before sending the mbuf since an
additional frame may be sent for 80211 protection.
2009-02-23 23:46:56 +00:00
Andrew Thompson
02ac645488 Move the new USB stack into its new home. 2009-02-23 18:31:00 +00:00