summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_pf.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r286799:hselasky2015-08-291-0/+6
| | | | | | | Fix race in USB PF which can happen if we stop tracing exactly when the kernel is tapping an USB transfer. This leads to a NULL pointer access. The solution is to only trace while the USB bus lock is locked.
* MFC r265779:hselasky2014-05-161-1/+1
| | | | Fix for NULL pointer.
* There's nothing to free if the unit wasn't allocated.np2013-07-191-1/+0
|
* Fix init/uninit function type.hselasky2013-02-251-4/+4
|
* Modify the FreeBSD USB kernel code so that it can be compiled directlyhselasky2013-01-301-2/+5
| | | | | | | | | | | | | | | | | | | | | | into the FreeBSD boot loader, typically for non-USB aware BIOSes, EFI systems or embedded platforms. This is also useful for out of the system compilation of the FreeBSD USB stack for various purposes. The USB kernel files can now optionally include a global header file which should include all needed definitions required to compile the FreeBSD USB stack. When the global USB header file is included, no other USB header files will be included by default. Add new file containing the USB stack configuration for the FreeBSD loader build. Replace some __FBSDID()'s by /* $FreeBSD$ */ comments. Now all USB files follow the same style. Use cases: - console in loader via USB - loading kernel via USB Discussed with: Hiroki Sato, hrs @ EuroBSDCon
* Make the "struct if_clone" opaque to users of the cloning API. Usersglebius2012-10-161-13/+11
| | | | | | | | | | | | now use function calls: if_clone_simple() if_clone_advanced() to initialize a cloner, instead of macros that initialize if_clone structure. Discussed with: brooks, bz, 1 year ago
* If devclass_get_devices(9) returns success but a count of 0,kevlo2012-09-291-0/+1
| | | | free the pointer.
* Merge from r234532:hrs2012-07-111-2/+4
| | | | | | | | - Fix an ifname matching issue which prevented "ifconfig wlan0 create" from working. - Return non-zero status when unit < 0. Spotted by: dhw
* Make usbusN logging pseudo-interface used by usbdump(8) clonable. One ishrs2012-07-091-26/+156
| | | | | | | | now created/destroyed automatically by usbdump(8). Note that "hw.usb.no_pf" loader tunable is now obsolete. Reviewed by: hselasky
* - Improvements to USB PF solutionhselasky2011-04-031-61/+203
| | | | | | | | | | | | | | - Add more fields for USB device and host mode - Add more information to USB PF header so that decoding can easily be done by software analyzer tools like Wireshark. - Optimise usbdump to display USB streams in text format more efficiently. - Software using USB PF must be recompiled after this commit, due to structure changes. MFC after: 7 days Approved by: thompsa (mentor)
* Use correct kernel types for all fields in USB PF code and headers.hselasky2011-02-011-3/+3
| | | | Approved by: thompsa (mentor)
* Introduces IFF_CANTCONFIG interface flag to point that the interfaceweongyo2010-12-071-0/+1
| | | | | | | | | isn't configurable in a meaningful way. This is for ifconfig(8) or other tools not to change code whenever IFT_USB-like interfaces are registered at the interface list. Reviewed by: brooks No objections: gavin, jkim
* Explicitly UP and DOWN the usbus interfaces (IFT_USB) when it's attachedweongyo2010-12-011-0/+2
| | | | | | | | | | or detached. Normally it should be changed through user land ioctl(2) system calls but it looks there's no apps for USB and no need. With this patch, libpcap would detect the usbus interfaces correctly and tcpdump(1) could dump the USB packets into PCAP format with -w option. However it couldn't print the output to console because there's no printer-routine at tcpdump(1).
* Handles the unit number correctly that the previous commit had a problemweongyo2010-11-251-2/+1
| | | | | | | | (wrong unit number for a host controller) when the module is load / unloaded repeatly. Attaching the USB pf is moved to usbus device's attach. Pointed by: yongari
* Assigning the unit number for each interfaces could not use ubus->parentweongyo2010-11-251-1/+2
| | | | | because it could differ depending on the host controller type. It could lead the duplicate unit number assignment.
* Fixes a compiler warning when it's compiled with INVARIANTS.weongyo2010-11-241-1/+1
| | | | Pointy hat to: me
* Removes all duplicated code with BPF that it's greatly simplified andweongyo2010-11-241-1652/+23
| | | | | | | take all benefits whenever BPF code is improved. Pointed by: jkim Reviewed by: thompsa
* Fixes a kernel crash when usb module is reloaded after unload that itweongyo2010-11-231-2/+16
| | | | | | | didn't destroy the cdev properly. Pointy hat to: me Reported by: Brandon Gooch <jamesbrandongooch at gmail dot com>, jkim
* Adds a USB packet filter feature to the stack that it could captureweongyo2010-11-221-0/+1862
packets which go through each USB host controllers. Its implementations are almost based on BPF code and very similar with it except it's little bit customized for USB packet only. The userland program usbdump(8) would be committed soon. Discussed with: hps, thompsa, yongari
OpenPOWER on IntegriCloud