Commit Graph

90 Commits

Author SHA1 Message Date
msaitoh 3cd62456f9 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

 This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
2018-06-26 06:47:57 +00:00
maya eddea7af1c GC private 802.11 rateset declarations, use the standard ones.
Build tested only.
2018-05-01 16:18:13 +00:00
christos 01bc43e387 add an annotation. 2018-01-28 16:12:41 +00:00
maxv 9a70976984 Fix overflow. 2018-01-16 07:05:24 +00:00
msaitoh 916c83ee9b If if_initialize() failed in the attach function, free resources and return. 2017-10-23 09:31:17 +00:00
mlelstv b5afb4ec18 Pull in some hardware support from FreeBSD. Also fix 5GHz mode by
adapting the method described in: https://forums.freebsd.org/threads/53574/.
2017-07-19 16:55:12 +00:00
nonaka 5ffb0503f3 wlan interfaces make interrupt routine running on softint context.
see http://mail-index.netbsd.org/tech-kern/2016/12/06/msg021281.html

tested device:
 * ath at pci: AR5212, AR5424
 * athn at pci: AR9287
 * ipw at pci: 2100BG
 * iwi at pci: 2915ABG
 * iwm at pci: 3165, 7260, 8260
 * iwn at pci: 4945, 6235
 * ral at pci: RT2560
 * rtwn at pci: RTL8192CE
2017-02-02 10:05:35 +00:00
nonaka 4cb74e69ad iwn(4): use MSI if available. 2017-02-02 03:20:19 +00:00
nonaka 08620666eb Export some 802.11 IE manipulate functions. 2017-01-04 03:05:24 +00:00
ozaki-r c0e7885f20 Apply deferred if_start framework
if_schedule_deferred_start checks if the if_snd queue contains packets,
so drivers don't need to check it by themselves.
2016-12-08 01:12:00 +00:00
hkenken 2439407e97 bus_dmamap_sync() is required for ICT table read/write.
Tested by arm platform.
2016-11-24 12:32:47 +00:00
mlelstv f1ad7238eb be less noisy with concurrent scan requests. 2016-08-03 19:56:41 +00:00
ozaki-r d938d837b3 Introduce m_set_rcvif and m_reset_rcvif
The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
2016-06-10 13:27:10 +00:00
ozaki-r ea0349e714 Use M_GETCTX
No functional change.
2016-05-26 05:01:11 +00:00
nonaka d21bc91971 PR/50187: Don't use DS parameter set when 5GHz channel is scanning.
XXX: pullup-7
2015-09-22 23:23:06 +00:00
pooka 34edd5d090 Remove "#ifdef INET" code. Por que? Because opt_inet.h was not included
and "#ifdef INET" was just a fancy way of saying "#ifndef NetBSD".
2015-08-24 23:52:18 +00:00
nonaka 7a921b20ed Use correct IWN_HW_REV_TYPE_MASK. 2014-11-09 14:40:54 +00:00
nonaka 573a5a695c fix error messages. 2014-11-09 14:29:13 +00:00
nonaka 0e71d7ed9c Add support for Intel Centrino Wireless-N 100/105/130/135/2200/2230.
From OpenBSD.
2014-10-30 13:05:58 +00:00
christos e58a356cba make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
2014-03-29 19:28:24 +00:00
christos d64c5a360b - remove unused variables
- move debugging code inside debugging sections
2013-10-17 21:06:15 +00:00
joerg d8c7c44423 Conditionalize iwn_memwrite_2 and friends under !IEEE80211_NO_HT. 2013-09-14 13:11:31 +00:00
christos 684703fca4 PR/48150: Noriyuki Koizumi: Add support for Intel Centrino Advanced-N 6235
Wi-Fi controller
2013-08-23 16:49:53 +00:00
prlw1 71a1d1de35 Add support for Centrino Wireless-N 1030 and Centrino Advanced-N 6230
http://mail-index.netbsd.org/tech-net/2013/01/04/msg003802.html
2013-07-28 11:46:24 +00:00
christos da0e2b2a1d reflect the correct OpenBSD versions we are synced with. 2013-06-15 13:05:35 +00:00
msaitoh 4184db8f84 Delete "PCI_" from PCIX and PICE capability registers. 2013-04-21 19:59:39 +00:00
christos a79b8830d2 replace function with macro 2013-03-30 03:21:43 +00:00
christos 2f36e318cc remove trailing whitespace 2013-03-30 03:21:02 +00:00
drochner d8e1a7b61a Use pci_aprint_devinfo(9) instead of pci_devinfo+aprint_{normal,naive}
where it looks straightforward, and pci_aprint_devinfo_fancy in a few
others where drivers want to supply their own device names instead
of the pcidevs generated one. More complicated cases, where names
are composed at runtime, are left alone for now. It certainly makes
sense to simplify the drivers here rather than inventing a catch-all API.
This should serve as as example for new drivers, and also ensure
consistent output in the AB_QUIET ("boot -q") case. Also, it avoids
excessive stack usage where drivers attach child devices because the
buffer for the device name is not kept on the local stack anymore.
2012-01-30 19:41:18 +00:00
elric 4bcb2d3d59 Use aprint_error_dev(). 2011-10-08 11:07:09 +00:00
mbalmer 849588d14e Make this compile again: Use the device_xname() macro to get the devic name. 2011-10-08 10:21:16 +00:00
elric cad4bc7b44 Update from OpenBSD merging in 1.111 and 1.112 with log messages:
1.112	Differential gain calibration makes the 6005 firmware crap
	out, so skip it for now until we figure out why.  This
	probably means the device won't function optimally, but
	that's better than not functioning at all.  Makes my "Intel
	Centrinto Advanced-N 6205" work quite well.

1.111	The 6005 and 6050-based parts need DC calibration turned
	on, otherwise the firmware will crap out, at least on the
	6005.  First step to getting my "Intel Centrino Advanced-N
	6205" to work.

Both are commited by kettenis@openbsd.org.
2011-10-07 22:42:18 +00:00
elric 97d0788466 Revert prior inadvertent checkin. 2011-08-28 16:33:51 +00:00
elric 95bd2d4a1e Remove crypto/dist/heimdal and its associated build infrastructure as
it has been replaced by crypto/external/bsd/heimdal.
2011-08-28 16:21:57 +00:00
msaitoh ab5c26c930 Add newer Wireless WiFi Link 4965 devices, Centrino Wireless-N 1030
and Centrino Advanced-N 6230
2011-05-21 12:51:47 +00:00
msaitoh 56f5ce9baa Add support for 6050(6250 and 6150) and 6005(6205).
TODO: update iwn.4 manpage.
2011-05-20 01:59:14 +00:00
dyoung b11777e520 #include <sys/bus.h>, not <machine/bus.h>. 2011-05-18 01:02:43 +00:00
christos 97a122a2f7 update from OpenBSD by msaitoh. Tested on amd64. 2011-05-15 13:56:20 +00:00
jruoho b4492a071f Use "temperature" rather than "TEMP" as the sensor name. No functional change. 2010-12-30 19:27:27 +00:00
jruoho 37ec4d38de Fill out struct ifnet::if_stop, which is required for network class devices
in pmf(9). Fixes the panic reported in PR # kern/44296.
2010-12-30 18:27:01 +00:00
christos 26a6b06d3f Don't try to hold the mutex if we are disabling the card because we can
be called from an interrupt context. While this is not strictly correct,
we are SoL anyway so this does not matter.
2010-08-29 07:00:13 +00:00
christos b34f73e19d V() the mutex when firmware is initialized, duh! 2010-07-10 04:09:35 +00:00
christos 5ee8feafcc Don't use spinlocks. 2010-07-03 21:43:37 +00:00
christos 4ab501cfa2 - Fix the recursive iwn_init() call problem properly.
- Don't print the scan request while scanning all the time. Perhaps I will
  remove this completely.
2010-07-02 14:47:25 +00:00
christos e59f7b7733 Patch from Sverre Froyen to avoid panic when an ioctl happens while the
driver is initializing.
2010-06-18 21:10:23 +00:00
christos 6eb8e73a91 Use device names from the OpenBSD iwn driver, adding and modifying device
names as needed. From Sverre Froyen
2010-05-12 12:26:16 +00:00
christos ecc4179d07 Replace iwn_tx from rev. 1.39 with a port of the current OpenBSD version.
Remove superfluous call to bpf_detach.
Add comments regarding porting issues and add a couple of cosmetic changes
that reduce the diffs to the OpenBSD version. From Sverre Froyen
2010-05-02 02:06:15 +00:00
christos b3bbb37fdf kill stray free. from Sverre Froyen. 2010-04-28 15:56:24 +00:00
christos 6d79f6d119 Align usage of *free and *alloc and clean up the firmware read code.
This fixes two panics that occur for kernels compiled with DIAGNOSTIC and
DEBUG. From Sverre Froyen
2010-04-23 20:56:20 +00:00
christos 3f46aa477c add support for the 6000. From sverre froyen 2010-04-17 15:57:22 +00:00