summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_wpi.c
AgeCommit message (Collapse)Author
2010-04-20remove proc.h include from uvm_map.h. This has far reaching effects, asTed Unangst
sysctl.h was reliant on this particular include, and many drivers included sysctl.h unnecessarily. remove sysctl.h or add proc.h as needed. ok deraadt
2009-11-17nuke the temperature sensor.Damien Bergamini
it is totally useless since (contrary to the one in iwn(4)) it is not in any known unit (can't be converted to degK or degC).
2009-11-03use BUS_DMA_{READ,WRITE} hints when mapping mbufs for Rx/Tx evenDamien Bergamini
though this does nothing on i386 and amd64.
2009-10-31reorder operations in detach(), call powerhook_disestablish() earlier,Damien Bergamini
call if_detach() last. no need to splnet() since we are already called at the right ipl. iwn(4) diff from deraadt@
2009-10-26start Tx at lowest available rate to give initial WPA handshake andDamien Bergamini
DHCP more chance to succeed w/o too much retries. AMRR is good enough at raising the Tx rate fast.
2009-10-24call wpi_power_calibration() at splnet().Damien Bergamini
2009-10-24add explicit barriers for read/write accesses to prph and internal memory.Damien Bergamini
2009-10-24- update bluetooth coexistence commandDamien Bergamini
- rename CMD_CONFIGURE into CMD_RXON (like iwn) - properly stop TX FIFOs
2009-09-20Implement a detach function in wpi(4) and iwn(4).Damien Bergamini
Some laptops will power off the PCIe socket when the radio kill switch is turned on. Reported and tested by Frantisek Holop on iwn(4). Initial diff for iwn(4) by jsg@ Some additional bits by Frantisek Holop (sensor_detach). Some tweaks and adaptation to wpi(4) by me. Fixes kernel/6223.
2009-08-10i prefer (m == NULL) over (!m)Damien Bergamini
change two error messages while i'm here.
2009-08-09MCLGETI() will now allocate a mbuf header if it is not provided, thusTheo de Raadt
reducing the amount of splnet/splx dancing required.. especially in the worst case (of m_cldrop) ok dlg kettenis damien
2009-07-11timeout_add -> timeout_add_msecBret Lambert
Been running this on my laptop for a while now with no apparent ill effects. originally from a longer list from grange@ ok krw@ as part of that list
2009-06-02do not leak mbufs in the Rx path in case hardware decryption failed.Damien Bergamini
this leak was introduced when i switched to MCLGETI. reported by mpf@ and others.
2009-05-29fix confusion between number of DMA channels and number of Tx queues.Damien Bergamini
2009-05-12switch wpi(4) and iwn(4) over to MCLGETI.Damien Bergamini
notice that i'm not using the per-ifp mbuf accounting/mitigation yet. for iwn(4), this means we wont' be able to support full 8KB AMSDU on machines without an IOMMU since >4KB clusters are not guaranteed to be physcontig. fortunately, we can program the hardware to do 4KB AMSDUs only. simplify {pwi,iwn}_dma_contig_alloc while i'm here: use BUS_DMA_ZERO
2009-04-26in ca_attach() there is no need to set .value and .flags of sensors to 0,Constantine A. Murenin
since autoconf(9) allocates softc with M_ZERO; ok deraadt
2009-03-29make various strings ("can't map mem space" and similar) more consistentStuart Henderson
between instances, saving space in the kernel. feedback from many (some incorporated, some left for future work). ok deraadt, kettenis, "why not" miod.
2009-02-05fix uninitialized var (in a code path that is not used yet).Damien Bergamini
found by chl@ using llvm/clang
2009-01-26I changed the IEEE80211_QOS_ACK_POLICY_* definitions to be more in lineDamien Bergamini
with other net80211 flags (we no longer need to shift.)
2009-01-03remove check for rfkill switch state using GP_CNTRL as it does notDamien Bergamini
seem to work properly. it is checked later in wpi_post_alive() anyway. pointed out by many, further investigated by Tim van der Molen.
2008-12-22I swapped MGETHDR arguments in my m_defrag removal commit.Damien Bergamini
2008-12-21Undo m_defrag().Damien Bergamini
m_defrag() does not work. It seems to assume that if the length of the mbuf passed as parameter is less than MHLEN, then it is an mbuf header and not a cluster (or something like that.) It thus fails miserably in the bcopy path. I don't have the time to investigate further into this. Thanks to Okan Demirmen for reporting the issue on a ral(4) RT2560. The RT2560 chipset does not support TX scatter and thus m_defrag() was called much more often than in other drivers using m_defrag() where it was less noticeable.
2008-12-03allow users to select a fixed rate.Damien Bergamini
2008-12-03don't overwrite an error code from wpi_init() in wpi_ioctl(), logic isConstantine A. Murenin
now in line with iwn_ioctl(); 'dead assignment' llvm/clang; ok damien
2008-11-25more sizeof->nitemsDamien Bergamini
2008-11-25use shiny new m_defrag() and nitems() instead of rolling our own.Damien Bergamini
2008-11-25add a shitload of bus_dmamap_sync() calls, even though they are no-opsDamien Bergamini
on i386 and amd64 (we do not implement bounce buffers) where this hardware is likely to be found. this is good programming practice.
2008-11-22- Slight wording tweak.. leave -> let.Brad Smith
- Sync wpi(4)'s set_key comment with the comment from iwn(4). ok damien@
2008-11-16clear pending interrupts in the driver attach routine.Damien Bergamini
otherwise the chip comes up with the RF_TOGGLED bit set which triggers an if_stop() call if a shared interrupt occurs.
2008-11-09rework the rate coding code to get rid of the ugly {wpi,iwn}_plcp_signal()Damien Bergamini
function. will be required for future MCS support in iwn.
2008-11-09uninitialized value, caused by a typo.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok damien@
2008-11-08when defragmenting an mbuf chain, do not call M_DUP_PKTHDR.Damien Bergamini
this is an overkill in this case as it duplicates mbuf tags etc... following a discussion with kettenis@ a few months ago about gem(4) did some cleanup while i was there.
2008-11-08initialize k to NULL in wpi_tx_data()Damien Bergamini
2008-11-08do not allocate cmd memory for rings 5 and 6 (HCCA) which are unused.Damien Bergamini
2008-11-08major wpi(4) overhaul.Damien Bergamini
wpi(4) and iwn(4) used to be in sync but with the latest iwn(4) changes, this was no longer the case. that commit repair this. it brings HW CCMP encryption/decryption among other things. requires an update of the wpi-firmware package. please report any regression you might see.
2008-11-08major wpi(4) overhaul.Damien Bergamini
wpi(4) and iwn(4) used to be in sync but with the latest iwn(4) changes, this was no longer the case. that commit repair this. it brings HW CCMP encryption/decryption among other things. requires an update of the wpi-firmware package. please report any regression you might see.
2008-08-27introduce new IEEE80211_STA_ONLY kernel option that can be set toDamien Bergamini
remove IBSS and HostAP support from net80211 and 802.11 drivers. it can be used to shrink RAMDISK kernels for instance (like what was done for wi(4)). it also has the benefit of highlighting what is specific to IBSS and HostAP modes in the code. the cost is that we now have two code paths to maintain.
2008-07-31Wait much longer for clock stabilization.Damien Bergamini
From jcs@ and in accordance with what the Intel Linux driver does.
2008-07-21instead of passing rx tstamp and rssi to the ieee80211_input function,Damien Bergamini
pass a pointer to an ieee80211_rxinfo structure containing those two fields plus an extra flags field that indicates whether the frame was decrypted by hardware or not. required for a future fix.
2008-06-16replace min() and max() function calls by MIN() and MAX().Damien Bergamini
MIN() and MAX() are macros that can evaluate their arguments twice but it is safe in this context. following a post from miod@ about the harmfulness of min() and max() in the kernel.
2008-04-16Kernel implementation of the 4-way handshake and group-keyDamien Bergamini
handshake protocols (both supplicant and authenticator state machines) as defined in the IEEE 802.11i standard. Software implementation of the TKIP (Temporal Key Integrity Protocol) and CCMP (CTR with CBC-MAC Protocol) protocols. This diff doesn't implement any of the 802.1X authentication protocols and thus only PSK authentication (using pre-shared keys) is currently supported. In concrete terms, this adds support for WPA-PSK and WPA2-PSK protocols, both in station and hostap modes. The following drivers are marked as WPA-capable and should work: bwi(4), malo(4), ral(4), iwn(4), wpi(4), ural(4), rum(4), upgt(4), and zyd(4) The following options have been added to ifconfig(8): wpa, wpapsk, wpaprotos, wpaakms, wpaciphers, wpagroupcipher wpa-psk(8) can be used to generate keys from passphrases. tested by many@ ok deraadt@
2008-03-08allows SMALL_KERNEL compilesMarc Espie
okay damien@
2007-11-19all TX rings have the same fixed size (256 entries) and this is notDamien Bergamini
configurable so simplify rings allocation a bit.
2007-11-03fix ENETRESET handling in {wpi,iwn}_ioctl() so that the firmware won'tDamien Bergamini
panic when resetting the device - requested by many fix ifconfig -M (the interface still has to be down though ie it won't work while the interface is up). fix AMPDU window for 4965AGN (has no effect since 802.11n is not supported yet).
2007-09-11- add callbacks for setting EDCA parameters and pairwise crypto keys.Damien Bergamini
- tweaks to make it look more like iwn(4).
2007-09-11fix a bug in the scan command I introduced with my previous commit.Damien Bergamini
2007-09-10- add support for 802.11 headers with various sizes (will be requiredDamien Bergamini
for EDCA support). - remove an unused function. - fix scan command. - detect if the hardware radio switch is on instead of failing in the calibration of the thermal sensor with an obscure message.
2007-09-07use new malloc M_ZERO flag to shrink kernel.Damien Bergamini
remove <malloc.h> from files where malloc is not used.
2007-08-28unify firmware load failure messages; ok mglockerTheo de Raadt
2007-08-22when running out of rx buffers, allocate a new mbuf and copy the rxDamien Bergamini
buffer into it using m_copym2() instead of just dropping the received frame. otherwise, it may happen that all rx buffers are queued by tcp_input() waiting for a frame that will never arrive because we are dropping it. when it happens, rx stop working and it is hard to recover from this. the problem is not visible when using WEP because WEP decryption is currently done by software and that rx buffers are copied into mbufs by the software decryption code. while i'm here, increase the number of rx buffers allocated by wpi(4) from 80 to 96 to limit the number of copies. problem and solution found by bluhm@ - thanks.