Commit Graph

42 Commits

Author SHA1 Message Date
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