summaryrefslogtreecommitdiff
path: root/sys/gnu/dev
AgeCommit message (Collapse)Author
2025-06-22bwn(4): BWN_GPL_PHY: make compile againBjoern A. Zeeb
compiler complains about error: comparison of different enumeration types ('bwn_phy_band_t' and 'bwn_band_t'); so use the correct enum value. Sponsored by: The FreeBSD Foundation PR: 287695 Reported by: (tom.mcclean gmail.com) MFC after: 3 days
2023-11-26sys: Automated cleanup of cdefs and other formattingWarner Losh
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
2023-08-16sys: Remove $FreeBSD$: one-line .c patternWarner Losh
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16sys: Remove $FreeBSD$: one-line .h patternWarner Losh
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
2023-08-16sys: Remove $FreeBSD$: two-line .h patternWarner Losh
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2022-05-04bwn: eliminate dead writes in BWN_GPL_PHYGreg V
This fixes the newly Werror'ed useless write warnings with options BWN_GPL_PHY. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35105
2018-02-13bwn(4): txpid2g/txpid5g[lh] are not defined after sromrev 7; the defaultLandon J. Fuller
indices into the TX power gain table should be used instead. This enables use of bwn(4) with later BCM4321 revisions. Reported by: Trev Roydhouse Notes: svn path=/head/; revision=329228
2018-02-05bwn(4): migrate bwn(4) to the native bhnd(9) interface, and drop siba_bwn.Landon J. Fuller
- Remove the shim interface that allowed bwn(4) to use either siba_bwn or bhnd(4), replacing all siba_bwn calls with their bhnd(4) bus equivalents. - Drop the legay, now-unused siba_bwn bus driver. - Clean up bhnd(4) board flag defines referenced by bwn(4). Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D13518 Notes: svn path=/head/; revision=328912
2018-01-21Revert r327828, r327949, r327953, r328016-r328026, r328041:Pedro F. Giffuni
Uses of mallocarray(9). The use of mallocarray(9) has rocketed the required swap to build FreeBSD. This is likely caused by the allocation size attributes which put extra pressure on the compiler. Given that most of these checks are superfluous we have to choose better where to use mallocarray(9). We still have more uses of mallocarray(9) but hopefully this is enough to bring swap usage to a reasonable level. Reported by: wosch PR: 225197 Notes: svn path=/head/; revision=328218
2018-01-15misc geom and gnu: make some use of mallocarray(9).Pedro F. Giffuni
Focus on code where we are doing multiplications within malloc(9). None of these ire likely to overflow, however the change is still useful as some static checkers can benefit from the allocation attributes we use for mallocarray. This initial sweep only covers malloc(9) calls with M_NOWAIT. No good reason but I started doing the changes before r327796 and at that time it was convenient to make sure the sorrounding code could handle NULL values. Differential revision: https://reviews.freebsd.org/D13837 Notes: svn path=/head/; revision=328026
2017-12-02Introduce bwn(4) support for the bhnd(4) bus.Landon J. Fuller
Currently, bwn(4) relies on the siba_bwn(4) bus driver to provide support for the on-chip SSB interconnect found in Broadcom's older PCI(e) Wi-Fi adapters. Non-PCI Wi-Fi adapters, as well as the newer BCMA interconnect found in post-2009 Broadcom Wi-Fi hardware, are not supported by siba_bwn(4). The bhnd(4) bus driver (also used by the FreeBSD/MIPS Broadcom port) provides a unified kernel interface to a superset of the hardware supported by siba_bwn; by attaching bwn(4) via bhnd(4), we can support both modern PCI(e) Wi-Fi devices based on the BCMA backplane interconnect, as well as Broadcom MIPS WiSoCs that include a D11 MAC core directly attached to their SSB or BCMA backplane. This diff introduces opt-in bwn(4) support for bhnd(4) by providing: - A small bwn(4) driver subclass, if_bwn_bhnd, that attaches via bhnd(4) instead of siba_bwn(4). - A bhndb(4)-based PCI host bridge driver, if_bwn_pci, that optionally probes at a higher priority than the siba_bwn(4) PCI driver. - A set of compatibility shims that perform translation of bwn(4)'s siba_bwn function calls into their bhnd(9) API equivalents when bwn(4) is attached via a bhnd(4) bus parent. When bwn(4) is attached via siba_bwn(4), all siba_bwn function calls are simply passed through to their original implementations. To test bwn(4) with bhnd(4), place the following lines in loader.conf(5): hw.bwn_pci.preferred="1" if_bwn_pci_load="YES bwn_v4_ucode_load="YES" bwn_v4_lp_ucode_load="YES" To verify that bwn(4) is using bhnd(4), you can check dmesg: bwn0: <Broadcom 802.11 MAC/PHY/Radio, rev 15> ... on bhnd0 ... or devinfo(8): pcib2 pci2 bwn_pci0 bhndb0 bhnd0 bwn0 ... bwn(4)/bhnd(4) has been tested for regressions with most chipsets currently supported by bwn(4), including: - BCM4312 - BCM4318 - BCM4321 With minimal changes to the DMA code (not included in this commit), I was also able to test support for newer BCMA devices by bringing up basic working Wi-Fi on two previously unsupported, BCMA-based N-PHY chipsets: - BCM43224 - BCM43225 Approved by: adrian (mentor, implicit) Sponsored by: The FreeBSD Foundation & Plausible Labs Differential Revision: https://reviews.freebsd.org/D13041 Notes: svn path=/head/; revision=326454
2016-05-23[bwn] convert another PHY-N workaround to the freebsd bwn format.Adrian Chadd
These were hidden behind an #ifdef that we weren't setting. I don't have the hardware in question to check. Notes: svn path=/head/; revision=300448
2016-05-19[bwn] typo.Adrian Chadd
Notes: svn path=/head/; revision=300193
2016-05-19[bwn] disable rfon checks so the 2056/2057 radios are programmed.Adrian Chadd
This was the big missing piece for getting the BCM94322MC NIC to work at all. Tested: * BCM4322, STA mode (2g, 5g) Notes: svn path=/head/; revision=300192
2016-05-19[bwn] improve N-PHY debuggability a little bit.Adrian Chadd
Notes: svn path=/head/; revision=300191
2016-05-19[bwn] add opt_wlan.h and opt_bwn.h to each of the phy_n source files.Adrian Chadd
Notes: svn path=/head/; revision=300190
2016-05-17[bwn] add initial bwn(4) N-PHY code, ported from Linux b43.Adrian Chadd
This is a GPLv2 PHY-N implementation based on the Linux b43 driver, ported over to work in bwn(4). I've tested this on the BCM4321 11abgn device, in 11bg and 11a modes. The b43 PHY code only supports 11abg, no 11n, and 20MHz only wide channels. Yes, this is a GPLv2 driver, so it won't be included in the default builds. Tested: * BCM4321 11abgn device (Apple!), 11bg and 11a STA mode. Obtained from: Linux b43 Notes: svn path=/head/; revision=300016
2012-02-01Use new OSS-based BSD-licensed header for cs sound driver.Pedro F. Giffuni
The cs driver requires a table with firmware values. An alternative firmware is available in a similar Open Sound System driver. This is actually a partial revert of Revision 77504. Special thanks to joel@ for patiently testing several replacement attempts. The csa driver and the complete sound system are now free of the GPL. Tested by: joel Approved by: jhb (mentor) MFC after: 3 weeks Notes: svn path=/head/; revision=230897
2012-01-20Replace GPLd headers from the Maestro3 driver with BSD licensedPedro F. Giffuni
versions derived from /usr/ports/audio/oss. The particular headers used were taken from the attic/drv/oss_allegro directory and are mostly identical to the previous files. The Maestro3 driver is now free from the GPL. NOTE: due to lack of testers this driver is being considered for deprecation and removal. PR: kern/153920 Approved by: jhb (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=230401
2012-01-11Replace GPL'd headers in the emu10kx snd driver code.Pedro F. Giffuni
This uses the emuxkireg.h already used in the emu10k1 snd driver. Special thanks go to Alexander Motin as he was able to find some errors and reverse engineer some wrong values in the emuxkireg header. The emu10kx driver is now free from the GPL. PR: 153901 Tested by: mav, joel Approved by: jhb (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=229981
2006-07-15Add snd_emu10kx driver for Creative SoundBlaster Live! and Audigy seriesAlexander Leidinger
sound cards with optional pseudo-multichannel playback. It's based on snd_emu10k1 sound driver. Single channel version is available from audio/emu10kx port since some time. The two new ALSA header files (GPLed), which contain Audigy 2 ("p16v") and Audigy 2 Value ("p17v") specific interfaces, are latest versions from ALSA Mercurial repository. This is not connected to the build yet. Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru> Notes: svn path=/head/; revision=160383
2006-07-15- Update ALSA emu10k1.h (it was imported as emu10k1-alsa.h) header file toAlexander Leidinger
latest version from Mercurial repository. It brings definition of some additional Audigy 2 / Audigy 2 Value registers. - Use new #defines from ALSA emu10k1.h - Remove unused include files: + emu10k1-ac97.h was imported from ALSA and never used, + emu10k1.h was imported from Creative Linux emu10k1 driver, but only AUDIGY_CODEBASE was used from it. Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru> Notes: svn path=/head/; revision=160382
2005-01-06/* -> /*- for copyright notices, minor format tweaks as necessaryWarner Losh
Notes: svn path=/head/; revision=139778
2005-01-06Add dol FreeBSD dol and /*+ize licenseWarner Losh
Notes: svn path=/head/; revision=139777
2004-01-11This commit was generated by cvs2svn to compensate for changes in r124361,David E. O'Brien
which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=124362
2004-01-11Vendor import emu10k1.h from version 1.0.1 of the ALSA driver.vendor/alsaDavid E. O'Brien
ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.1.tar.bz2 or http://www.alsa-project.org/alsa/cvs/alsa-kernel/include/emu10k1.h Notes: svn path=/vendor-sys/alsa/dist/; revision=124361
2004-01-09Sync with Creative's 8010.h rev 1.51.David E. O'Brien
Notes: svn path=/head/; revision=124277
2004-01-09Dike out some very Linux-specific parts that we can't compile with.David E. O'Brien
Also protect AC97_MUTE which is also defined in our own ac97.h. Notes: svn path=/head/; revision=124276
2004-01-09Vendor import revision 1.9 of ac97_codec.h (we renamed the file) fromDavid E. O'Brien
http://cvs.sourceforge.net/viewcvs.py/emu10k1/emu10k1/ac97_codec.h Notes: svn path=/vendor-sys/alsa/dist/; revision=124273
2004-01-09This commit was generated by cvs2svn to compensate for changes in r124273,David E. O'Brien
which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=124274
2003-06-07Vendor import emu10k1.h from version 0.9.4 of the ALSA driver (whichDavid E. O'Brien
includes some needed Audigy support). This can be found at ftp://ftp.alsa-project.org/pub/driver/alsa-driver-0.9.4.tar.bz2 and http://www.alsa-project.org/alsa/cvs/alsa-kernel/include/emu10k1.h Notes: svn path=/vendor-sys/alsa/dist/; revision=115990
2003-06-07This commit was generated by cvs2svn to compensate for changes in r115990,David E. O'Brien
which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=115991
2003-04-21Vendor import revision 1.8 of ac97_codec.h (we renamed the file) fromDavid E. O'Brien
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/emu10k1/emu10k1/ac97_codec.h Notes: svn path=/vendor-sys/alsa/dist/; revision=113778
2003-04-21This commit was generated by cvs2svn to compensate for changes in r113778,David E. O'Brien
which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=113779
2003-04-18Vendor import revision 1.51 of 8010.h (we renamed the file) fromvendor/alsa/1.51David E. O'Brien
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/emu10k1/emu10k1/8010.h. This includes some Audigy support. Notes: svn path=/vendor-sys/alsa/dist/; revision=113654 svn path=/vendor-sys/alsa/1.51/; revision=113655; tag=vendor/alsa/1.51
2003-04-18Sync with Creative's 8010.h rev 1.39.David E. O'Brien
Notes: svn path=/head/; revision=113653
2003-04-18Vendor import revision 1.39 of 8010.h (we renamed the file) fromvendor/alsa/1.39David E. O'Brien
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/emu10k1/emu10k1/8010.h. Rev 1.39 best matches our rev 1.3. Notes: svn path=/vendor-sys/alsa/dist/; revision=113651 svn path=/vendor-sys/alsa/1.39/; revision=113652; tag=vendor/alsa/1.39
2001-05-30new (gpl licensed) firmware image for cs4280/cs46xx sound chipsCameron Grant
Notes: svn path=/head/; revision=77503
2001-05-27Close the opening comment line on these two files that mysteriouly vanished.Scott Long
Notes: svn path=/head/; revision=77275
2001-05-24Oops. Unremove vestiges of the old, broken sound drivers. They are nowBruce Evans
used in new drivers. Notes: svn path=/head/; revision=77141
2001-05-24Remove vestiges of the old, broken sound drivers.Bruce Evans
Notes: svn path=/head/; revision=77134
2001-02-01Driver for the ESS Maestro3 and Allegro sound chips. Note that due to theScott Long
amount of GPL'd firmware in the driver, it will only be built as a module. Approved by: cg Notes: svn path=/head/; revision=71901
2000-08-06sync CCR register definitions with creative sourcesCameron Grant
Notes: svn path=/head/; revision=64308
2000-04-03fix missing defines and prototype for emu_vdump()Cameron Grant
Notes: svn path=/head/; revision=58958
2000-04-02This commit was manufactured by cvs2svn to create branch 'ALSA'.cvs2svn
Notes: svn path=/vendor-sys/alsa/dist/; revision=58920
2000-04-02unfinished sblive driver, playback/mixer only for now - not enabled inCameron Grant
conf/files i don't seem to be clearing the cache right resulting in a short initial burst of noise, despite doing the same as creative and alsa. i'm committing now so more eyes can pore over the code. Notes: svn path=/head/; revision=58919