Commit graph

143650 commits

Author SHA1 Message Date
Johannes Berg d726405af6 nl80211: send wiphy along with netdev
When listing all wireless netdevs in the system this
is useful to print which wiphy they belong to. Just
add the attribute, any program that doesn't care will
just ignore it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:16 -04:00
Christian Lamparter fef99929cd mac80211: set CLEAR_PS for pspolled frames
This patch sets IEEE80211_TX_CTL_CLEAR_PS_FILT for outgoing
frames for a half-wake station.

this is necessary if one wants to get ps-poll working properly with a p54 ap.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:16 -04:00
Christian Lamparter d577e7cdb1 p54: fix ps-poll delivery in ap mode
PS-Polled frames must be sent with OUT_NOCANCEL flag set,
or the firmware will reject all of them, at the station is still blacklisted.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:16 -04:00
Larry Finger a027087a6b rtl8187: Implement TX/RX blink for LED
The following patch implements some control over the LED on RTL8187B and
RTL8187L devices. Triggers are registered for TX and RX. Whenever the
trigger event occurs, the LED is turned off for 1/20 second, then turned
back on.

Note: For those RTL8187X devices that are built into the computer and have
a LED that is expected to be controlled with a radio switch, this patch will
not operate that LED. That will take a separate patch to be prepared later.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:16 -04:00
Jouni Malinen 357303e2b6 mac80211: Allow scan to be requested in AP mode
We can allow scan requests in AP mode as long as the interface has not
yet been configured to send out Beacon frames (or if beaconing has
been disabled prior to the scan request). This makes it easier to scan
for neighboring BSSes during AP initialization and makes it possible
to run a scan without setting the interface down, if needed. Without
this change, the only available option would be to set the interface
down, move into station mode, and set the interface up, prior to
requesting the scan.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:16 -04:00
Johannes Berg 955394c98c mac80211: document powersaving/beacon filter future
Document what mac80211 will do in the future to help save power.
We're not quite there yet, but a plan helps. Also, while at it,
fix the docs wrt. multicast traffic.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:16 -04:00
Johannes Berg bbbdff9e00 mac80211: enable PS by default
Enable PS by default (depending on Kconfig) -- rely on drivers
to control the level using pm_qos. Due to the previous patch
we turn off PS when necessary due to latency requirements.

This has a Kconfig symbol so people can, if they really want,
configure the default in their kernels. We may want to keep it
at "default y" only in wireless-testing for a while.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:16 -04:00
Johannes Berg d91f36db51 mac80211: implement beacon filtering in software
Regardless of whether the hardware implements beacon filtering,
there's no need to process all beacons in software all the time
throughout the stack (mac80211 does a lot, then cfg80211, then
in the future possibly userspace).

This patch implements the "best possible" beacon filtering in
mac80211. "Best possible" means that it can look for changes in
all requested information elements, and distinguish vendor IEs
by their OUI.

In the future, we will add nl80211 API for userspace to request
information elements and vendor IE OUIs to watch -- drivers can
then implement the best they can do while software implements
it fully.

It is unclear whether or not this actually saves CPU time, but
the data is all in the cache already so it should be fairly
cheap. The additional _testing_, however, has great benefit;
Without this, and on hardware that doesn't implement beacon
filtering, wrong assumptions about, for example, scan result
updates could quickly creep into code.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:16 -04:00
Johannes Berg 10f644a47b mac80211: disable powersave if pm_qos asks for low latency
When an application asks for a latency lower than the beacon interval
there's nothing we can do -- we need to stay awake and not have the
AP buffer frames for us. Add code to automatically calculate this
constraint in mac80211 so drivers need not concern themselves with it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:16 -04:00
Johannes Berg 965bedadc0 mac80211: improve powersave implementation
When you have multiple virtual interfaces the current
implementation requires setting them up properly from
userspace, which is undesirable when we want to default
to power save mode. Keep track of powersave requested
from userspace per managed mode interface, and only
enable powersave globally when exactly one managed mode
interface is active and has powersave turned on.

Second, only start the dynPS timer when PS is turned
on, and properly turn it off when PS is turned off.

Third, fix the scan_sdata abuse in the dynps code.

Finally, also reorder the code and refactor the code
that enables PS or the dynps timer instead of having
it copied in two places.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:15 -04:00
Marek Vasut dc7d243d75 Add support for CF8381 WiFi card.
A detection function was added for identifying CF8381.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:15 -04:00
Christian Lamparter fade5db4f2 p54: deactivate broken powersave function (part 2)
This patch deactivates powersave in station mode.

It does not work correctly yet, so the code does more harm than good.

(I split the original patch and sent part of it for 2.6.30, which didn't
have the IEEE80211_HW_BEACON_FILTER flag. -- JWL)

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:15 -04:00
Luis R. Rodriguez 85efc86eb7 atheros: fix propagation of bad EEPROM on regulatory init
When the EEPROM is not in good condition we cannot continue so
we currently bail out but only ath5k is bailing out properly.
Both ath9k and ar9170 were proceeding and if a user were to run
into this they'd see an obscure panic. Lets propagate the error
as intended and make sure we inform the user by lifting the
error message from debug to a kernel error.

Stable note: You can find a port of this page here:

http://bombadil.infradead.org/~mcgrof/patches/ath9k/ath9k-fix-eeprom.patch.txt

Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:15 -04:00
Bob Copeland 26925042b6 ath5k: manipulate rxlink and descriptor address under rxbuf lock
Grabbing an ath5k_buf then dropping the lock is racy because the
referenced descriptor can be obtained in another thread and released
before the buffer is handed to the hardware.  Likewise, manipulating
sc->rxlink without the lock can lead to having multiple self-linked
hardware descriptors.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:15 -04:00
Bob Copeland c57ca81576 ath5k: use rx hw descriptor pointer for self-linked check
This patch simplifies the code used to detect when the
self-linked DMA buffer is still in use by hardware, by
checking the hardware's rxdp register instead of looking
at the software buffer list.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:14 -04:00
Bob Copeland 46802a4f07 ath5k: use bool for modparams
Current code uses int types, but both modparams are boolean values.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:14 -04:00
Bob Copeland 56d2ac7638 ath5k: use tasklet_hi_schedule for beacon queue
For embedded platforms, beacon transmission can be starved when
flooded with data packets.  Prioritize beacons by giving the beacon
queue the first shot when the isr completes.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:14 -04:00
Bob Copeland 77ded01cc2 ath5k: fix initvals errors
This patch corrects a few errors in the initvals tables to match those
in the HAL tables.  Namely, remove a couple of repetitions, fix some
turbo mode errors, and correct a register for the CCK rate power table.

Changes-licensed-under: ISC

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:14 -04:00
Christian Lamparter 45f483c002 p54: remove module_ stubs
Christoph Hellwig pointed out that these stubs are unnecessary.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:14 -04:00
Vivek Natarajan 882b709230 ath9k: Disable autosleep feature for AR9285 based chipsets.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:14 -04:00
Johannes Berg f2753ddbad mac80211: add hardware restart function
Some hardware defects may require the hardware to be re-initialised
completely from scratch. Drivers would need much information (for
instance the current MAC address, crypto keys, beaconing information,
etc.) stored duplicated from mac80211 to be able to do this, so let
mac80211 help them.

The new ieee80211_restart_hw() function requires the same code as
resuming, so move that code into a new ieee80211_reconfig() function
in util.c and leave only the suspend code in pm.c.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:57:14 -04:00
Christian Lamparter a1c555802a ath: add module information
This patch adds licensing, author information and a description to the module.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:47 -04:00
Gábor Stefanik 06bfd0d3db rtl8187: Remove the "8187B chip detected" message when probing RTL8187B cards
This message appears to be nothing more than a leftover of the
experimental-8187B era. Also, we print the HW type in the hwaddr line,
making this message reduntant. And it's definitely not important
enough to be a KERN_WARNING.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:47 -04:00
Sujith 386aeacfa8 ath9k: Remove CHANNEL_CW_INT handling in ath9k_hw_calibrate
It is already handled properly in ath9k_hw_getnf.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:47 -04:00
Sujith 04d19ddd25 ath9k: Fix bug in calibration initialization
This patch fixes a bug in ath9k_hw_init_cal() where the wrong
calibration was being done for non-AR9285 chipsets.
Also add a few helpful comments.

Cc: stable@kernel.org
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:46 -04:00
Sujith cbfe946860 ath9k: Use a consistent naming convention
This patch replaces old 'hal_' prefixes with 'ath9k_'.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:46 -04:00
Sujith 379f04407c ath9k: Cleanup calibration interface
This patch cleans up the functions dealing with calibration,
using proper return values.
ath9k_hw_per_calibration(), ath9k_hw_calibrate now return bool values
instead of setting error values in the function arguments.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:46 -04:00
Sujith 415f738ecf ath9k: Initialize ANI timers
The various ANI timers have to be initialized properly when
starting the calibration timer.

Cc: stable@kernel.org
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:46 -04:00
Sujith a451aa66dc ath9k: Fix bug in determining calibration support
ADC gain calibration has to be done for all non 2GHZ-HT20 channels.
Regression from "ath9k: use ieee80211_conf on ath9k_hw_iscal_supported()"

Cc: stable@kernel.org
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:46 -04:00
Sujith db2f63f60a ath9k: Fix bug in checking HT flag
The operating HT mode is stored in chanmode and
not channelFlags.

Cc: stable@kernel.org
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:46 -04:00
Sujith 822b0dfc13 ath9k: Remove unused channel flags
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:46 -04:00
Sujith 9c07a7777f ath9k: Fix bug in scan termination
A full HW reset needs to be done on termination of a scan run.
Not setting SC_OP_FULL_RESET resulted in doing a
fast channel change.

Cc: stable@kernel.org
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:46 -04:00
Sujith 675902ef82 ath9k: Fix memleak on TX DMA failure
The driver-specific region has to be freed in case
of a DMA mapping failure.

Cc: stable@kernel.org
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:46 -04:00
Sujith d2f5b3a677 ath9k: Handle ASPM properly for RFKILL
Radio enable/disable have to handle ASPM state properly.
This patch fixes it.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:45 -04:00
Steven Luo a89bff9a78 ath9k: reset after PCI FATAL/PERR interrupts
ath9k_hw_getisr() doesn't appear to set anything in the status mask for
PCI FATAL or PERR interrupts (AR_INTR_SYNC_HOST1_FATAL/PERR), which
the open-source HAL seems to do.  This means that the card isn't reset
after these interrupts.

This patch seems to fix a problem where the wireless drops out with an
"ath9k: received PCI FATAL interrupt" in dmesg after some time; the
hardware is an AR5416 in an ASUS WL-500W running 2.6.28.7 (OpenWRT) and
compat-wireless 2009-03-31.

Signed-off-by: Steven Luo <steven@steven676.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:45 -04:00
Larry Finger 2d1f96dd90 b43legacy: Clean up beacon IRQ
This patch ports commit c97a4ccc1f "b43: Fix beacon BH update" to
b43legacy. It fixes beacon updating in the bottomhalf. In case the device
is busy, we will defer to later in the IRQ handler.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Michael Buesch <mb@bu3sch.de>
Tested-by: David Ellingsworth <david@identd.dyndns.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:45 -04:00
Larry Finger 7858e07b7c b43legacy: Fixes for beaconing
This patch ports the beaconing fixes from commit a82d992261 "b43: Beaconing
fixes" to b43legacy. Basically it prevents the card from triggering the beacon
IRQ over and over again.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Michael Buesch <mb@bu3sch.de>
Tested-by: David Ellingsworth <david@identd.dyndns.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:45 -04:00
Johannes Berg 7edfab7ade cfg80211: convert mutex assert to macro
That will make the various cases where the WARN_ON
can happen distinguishable.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:45 -04:00
Christian Lamparter 4312a86b68 p54: remove obsolet signal quality calculation
The signal quality percentage is now calculated by mac80211 stack.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:45 -04:00
Christian Lamparter 6dfe9a884f p54: utilize all available key slots for decryption offload
This patch takes care of outstanding TODOs:
/* TODO: some devices have 4 more free slots for rx keys */

Now the driver can utilize all available key slots instead of just 4.
Obviously, this helps most in AP/IBSS(/MESH) mode, when
we have to use more different keys.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:45 -04:00
Larry Finger 492301fb5d rfkill: Fix broken rfkill LED in 2.6.30-rc1
The rfkill system fails to issue a LED trigger event when the rfkill state
changes.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:45 -04:00
Michael Buesch 1379072877 b43: Remove unnecessary MMIO in interrupt hotpath
This removes unnecessary MMIO accesses in the interrupt hotpath.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:45 -04:00
John W. Linville a2caba6b5f libertas: fix warning about %zd:
drivers/net/wireless/libertas/rx.c: In function ‘lbs_process_rxed_packet’:
drivers/net/wireless/libertas/rx.c:184: warning: format ‘%zd’ expects type ‘signed size_t’, but argument 4 has type ‘__le32’
drivers/net/wireless/libertas/rx.c:184: warning: format ‘%zd’ expects type ‘signed size_t’, but argument 5 has type ‘unsigned int’

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:44 -04:00
Wey-Yi Guy a83b9141b5 iwlwifi: adding interrupt counter in debugfs for debugging
This patch adds interrupt statistics report to debugfs, this can help to
understand number of interrupts happened which including HW/SW error for
easier and better debugging.

in /sys/kernel/debug/ieee80211/phyN/iwlagn/data directory
use "cat interrupt" to view the current interrupt counter
use "echo 0 > interrupt" to clear interrupt counter

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:44 -04:00
Mohamed Abbas 1620108910 iwlcore: fix channel display in debugfs
Fix displaying of wrong channel information when user query
channel through debugfs

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:44 -04:00
Daniel C Halperin c2105fa7b6 iwlwifi: check triple_stream_basic_rates in iwl_full_rxon_required
For completeness, we should also make sure that the 3x3 MIMO rates are also checked when seeing if one rxon struct matches another.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:44 -04:00
Mohamed Abbas 3a6502927f iwlagn: Sync rxon active with changes
We need to sync rxon_active with changes after we commit rxon_assoc,
without rxon_active will still have the old data that cause
iwl_send_rxon_assoc to fail with no change in rxon command.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:44 -04:00
Daniel C Halperin ddfcf99927 iwlwifi: do not set dual_stream_ant_msk for 3 streams
This patch fixes a bug introduced by commit "iwlwifi: adding MIMO3 support
in rate scaling". We should not set the dual_stream_ant_msk (for 2x2 MIMO)
when using a 3x3 rate, this will cause a SYSASSERT in uCode.

Note: there is no triple_stream_ant_msk, because all three antennas are used.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:43 -04:00
Wey-Yi Guy 12b9681721 iwlwifi: Display decoded rate/mcs information
This patch adding MCS information in rate_scale_table, it help for
debugging rate scaling algorithm, easy to understand what is the current
rate scale table and matching modulation, plus the last mcs used for tx.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:43 -04:00
Abhijeet Kolekar bd564261d7 iwl3945: use iwl_mac_reset_tsf from iwlwifi
3945 can now use iwl_mac_reset_tsf from iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22 16:54:43 -04:00