Commit Graph

130672 Commits

Author SHA1 Message Date
Dan Williams f55d4517eb airo: clean up and clarify interrupt-time task handling
Split each specific interrupt-time task out into its own function to
make airo_interrupt() actually readable.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:38 -05:00
Winkler, Tomas 0d21044eff iwlwifi: fix probe mask for 39 scan API
This pach make use of 39 own scan probe mask
the variables or of different types

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:38 -05:00
Samuel Ortiz 17f841cd6c iwl3945: Remaining host command cleanups
With the recent host command routines merge, we can now look at the various
host command helpers and get rid of the duplicated ones.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:37 -05:00
Samuel Ortiz af48d048ac iwl3945: Add restart_fw module parameter
In order to be in sync with the agn code, we're ading a fw_restart3945 module
parameter to iwl3945.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:37 -05:00
Samuel Ortiz 7e4bca5e5b iwl3945: Getting rid of priv->antenna
The iwl_priv antenna field is useless as we can simply use the corresponding
mod_params antenna field.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:36 -05:00
Samuel Ortiz d08853a399 iwlwifi: Remove IWL3945_DEBUG
IWL3945_DEBUG is pointless and obsolete. We already have an IWLWIFI_DEBUG
symbol, that needs to be set if we actually want to get 3945 debug (see
iwl-debug.h).
Thus, we can simply get rid of this symbol.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:36 -05:00
Samuel Ortiz 534166deda iwl3945: Use the iwlcore geos routines
By removing the init_rates() routine outside of the init_geos() one, we can
share the geos routines between 3945 and agn.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:35 -05:00
Samuel Ortiz e6148917db iwl3945: Use iwl-eeprom.c routines
By adding the eeprom ops to the 3945 code, we can now use the iwlcore eeprom
routines (defined in iwl-eeprom.c).
We also removed the heavy eeprom39 reference from iwl_priv and use the eeprom
pointer instead.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:35 -05:00
Samuel Ortiz a8e74e2774 iwl3945: Use iwlcore TX queue management routines
By adding an additional hw_params (tfd_size) and a new iwl_lib ops (txq_init),
we can now use the iwlcore TX queue management routines.
We had to add a new hw_params because we need to allocate the right DMA buffer
for TFDs, and those have a different sizes depending if you're on 3945 or agn.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:34 -05:00
Samuel Ortiz 59606ffa91 iwlwifi: make iwl_tx_queue->tfds void*
Instead of having both tfds and tfds39, we can just have a void *tfds.
It makes the tx_queue structure nicer, and the code cleaner. It also helps
with further TX queues management code merging.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:33 -05:00
Samuel Ortiz 77fecfb88f iwl3945: Use iwlcore scan code
A lot of the scanning related code is duplicated between 3945 and agn. Let's
use the iwlcore one and get rid of the 3945.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:33 -05:00
Samuel Ortiz 75bcfae97d iwl3945: Define send_tx_power
We can define this iwl_lib ops for 3945, as this would help us cleaning the
scanning code.

Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:32 -05:00
Rick Farrington 7b841727d2 iwlagn: reduce off channel reception for 4965
Force use of chains B and C (0x6) for Rx for 4965
Avoid A (0x1) because of its off-channel reception on A-band.

Signed-off-by: Rick Farrington <rickdic@hotmail.com>
Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:31 -05:00
Chatre, Reinette 4c4df78f5e iwlwifi: add test to determine if interface in monitor mode
mac80211 sets driver in monitor mode through configuring the
RX filters. We cannot trust priv->iw_mode to be accurate
regarding monitor mode as iw_mode is only set in add_interface,
which is not called by mac80211 when in monitor mode.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:31 -05:00
Michael Buesch 1a9f509368 b43: Automatically probe for opensource firmware
First probe for proprietary firmware and then probe for opensource firmware.
This way around it's a win-win situation.
1) If proprietary fw is available, it will work.
2) If opensource firmware is available, but no proprietary (Distros can only ship open fw)
   it might work.
3) If both open and proprietary are available, it will work, because it selects
   the proprietary. We currently don't prefer the open fw in this case, because it doesn't
   work on all devices. It would introduce a regression otherwise.

The remaining FIXMEs in this patch are harmless, because they only matter on multiband
devices, which are not implemented yet anyway.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:30 -05:00
Larry Finger 2f47690ed4 rtl8187: Fix driver to return TX retry info for RTL8187L
Current code for the RTL8187 is not returning valid retry information, thus the
rate-setting mechanism is not functioning. As a further complication, this info
is only obtained by reading a register, which cannot be read while in interrupt
context.

This patch implements the TX status return to mac80211 through the use of a
work queue.

One additional problem is that the driver currently enables the rate fallback
mechanism of the device, which conflicts with the mac80211 rate-setting
algorithm. This version of the patch disables rate fallback.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Martín Ernesto Barreyro <barreyromartin@gmail.com>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:30 -05:00
Larry Finger 2a57cf3e83 rtl8187: Increase receive queue depth
The receive queue depth in rtl8187 may not be long enough to keep
the pipe full.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:29 -05:00
Larry Finger 66aafd9a31 rtl8187: Fix locking of private data
In rtl8187_add_interface(), the mutex that protects the data in struct
rtl8187_priv does not include all references to that structure.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:28 -05:00
Dan Williams 1fac36ee7d libertas: fix CF firmware loading for some cards
if_cs_poll_while_fw_download() returned the number of iterations
remaining on success, which in turn got returned as the value from
if_cs_prog_real() and if_cs_prog_helper().  But since if_cs_probe()
interprets non-zero return values from firmware load functions as an
error, this sometimes caused spurious firmware load failures.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Tested-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:27 -05:00
Ivo van Doorn 0712612741 rt2x00: Simplify suspend/resume handling
With mac80211 handling all open interfaces during
suspend and resume we can simplify suspend/resume
within rt2x00lib.

The only thing rt2x00 needs to do is free up memory
during suspend and bring back the minimal required
components during resume.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:27 -05:00
Ivo van Doorn 9752a7bd7f rt2x00: Restrict firmware file lengths
Add extra security to the drivers for firmware loading,
check the firmware file length before uploading it to
the hardware. Incorrect lengths might indicate a firmware
upgrade (which is not yet supported by the driver) or
otherwise incorrect firmware.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:26 -05:00
Ivo van Doorn 6ba265e9cc rt2x00: rt2x00_rev() should return u32
The "rev" field in chipset definition is an u32,
which means that rt2x00_rev() which returns that field
should be of the same type.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:26 -05:00
Vasanthakumar Thiagarajan 81b1e19ac2 ath9k: Clean up the way the eeprom antenna configuration is read
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:25 -05:00
Vasanthakumar Thiagarajan 3aa24e6031 ath9k: Remove unused ath9k_hw_select_antconfig() from hw.c
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:24 -05:00
Sujith 5dad40c13e ath9k: Fix bug in NF calibration
The number of chainmasks for AR9285 weren't being
setup when running NF calibration.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:23 -05:00
Sujith f8206e0534 ath9k: Fix bug in rate control capability registration
Dual stream capability must be registered only when the
hardware supports it.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:23 -05:00
Sujith eb2599ca25 ath9k: Fix MCS rates registration bug for AR9285
AR9285 based devices support only single stream MCS rates.
This patch fixes a bug where dual stream stream rates were
also being registered.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:22 -05:00
Alina Friedrichsen 27abe060aa ath9k: Read and write the TSF via debugfs
This patch adds an ath9k specific entry to read, write and reset the TSF into the debugfs, like in ath5k. This makes debugging the IBSS handling of wifi drivers _much_ easier.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:22 -05:00
Alina Friedrichsen 8cab7581db ath5k: Read and write the TSF via debugfs
This patch updates the ath5k specific entry in the debugfs to read and reset the TSF value, to allowing write it, too. This makes debugging the IBSS handling of wifi drivers _much_ easier.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:21 -05:00
Alina Friedrichsen ae54c985cc mac80211: Read the TSF via debugfs
This patch adds an low-level driver independent entry to read the TSF value into the debugfs of mac80211. This makes debugging the IBSS handling of wifi drivers easier.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:20 -05:00
Luis R. Rodriguez 5f8e077c0a ath9k: simplify regulatory code
Now that cfg80211 has its own regulatory infrastructure we can
condense ath9k's regulatory code considerably. We only keep data
we need to provide our own regulatory_hint(), reg_notifier() and
information necessary for calibration.

Atheros hardware supports 12 world regulatory domains, since these
are custom we apply them through the the new wiphy_apply_custom_regulatory().
Although we have 12 we can consolidate these into 5 structures based on
frequency and apply a different set of flags that differentiate them on
a case by case basis through the reg_notifier().

If CRDA is not found our own custom world regulatory domain is applied,
this is identical to cfg80211's except we enable passive scan on most
frequencies.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:20 -05:00
Luis R. Rodriguez 24ed1da133 cfg80211: allow users to help a driver's compliance
Let users be more compliant if so desired.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:19 -05:00
Luis R. Rodriguez 9a95371aa2 mac80211: allow mac80211 drivers to get to struct ieee80211_hw from wiphy
If a driver is given a wiphy and it wants to get to its private
mac80211 driver area it can use wiphy_to_ieee80211_hw() to get first
to its ieee80211_hw and then access the private structure via hw->priv. The
wiphy_priv() is already being used internally by mac80211 and drivers
should not use this. This can be helpful in a drivers reg_notifier().

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:19 -05:00
Luis R. Rodriguez f976376de0 cfg80211: Allow for strict regulatory settings
This allows drivers to request strict regulatory settings to
be applied to its devices. This is desirable for devices where
proper calibration and compliance can only be gauranteed for
for the device's programmed regulatory domain. Regulatory
domain settings will be ignored until the device's own
regulatory domain is properly configured. If no regulatory
domain is received only the world regulatory domain will be
applied -- if OLD_REG (default to "US") is not enabled. If
OLD_REG behaviour is not acceptable to drivers they must
update their wiphy with a custom reuglatory prior to wiphy
registration.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:18 -05:00
Luis R. Rodriguez 716f9392e2 cfg80211: pass more detailed regulatory request information on reg_notifier()
Drivers may need more information than just who set the last regulatory domain,
as such lets just pass the last regulatory_request receipt. To do this we need
to move out to headers struct regulatory_request, and enum environment_cap. While
at it lets add documentation for enum environment_cap.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:17 -05:00
Luis R. Rodriguez d46e5b1d0c cfg80211: move check for ignore_reg_update() on wiphy_update_regulatory()
This ensures that the initial REGDOM_SET_BY_CORE upon wiphy registration
respects the wiphy->custom_regulatory setting. Without this and if OLD_REG
is disabled (which will be default soon as we remove it) the
wiphy->custom_regulatory is simply ignored.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:17 -05:00
Luis R. Rodriguez 2a44f911d8 cfg80211: rename fw_handles_regulatory to custom_regulatory
Drivers without firmware can also have custom regulatory maps
which do not map to a specific ISO / IEC alpha2 country code.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:16 -05:00
Luis R. Rodriguez e74b1e7fb2 cfg80211: ignore consecutive equal regulatory hints
We ignore regulatory hints for the same alpha2 if we already
have processed the same alpha2 on the current regulatory domain.
For a driver regulatory_hint() this means we copy onto its
wiphy->regd the previously procesed regulatory domain from CRDA
without having to call CRDA again.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:15 -05:00
Luis R. Rodriguez 5eebade608 cfg80211: process user requests only after previous user/driver/core requests
This prevents user regulatory changes to be considered prior to previous
pending user, core or driver requests which have not be applied.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:15 -05:00
Luis R. Rodriguez 34f573473a cfg80211: export freq_reg_info()
This can be used by drivers on the reg_notifier()

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:14 -05:00
Luis R. Rodriguez 1fa25e4136 cfg80211: add wiphy_apply_custom_regulatory()
This adds wiphy_apply_custom_regulatory() to be used by drivers
prior to wiphy registration to apply a custom regulatory domain.
This can be used by drivers that do not have a direct 1-1 mapping
between a regulatory domain and a country.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:14 -05:00
Johannes Berg 078e1e60dd mac80211: Add capability to enable/disable beaconing
This patch adds a flag to notify drivers to start and stop
beaconing when needed, for example, during a scan run. Based
on Sujith's first patch to do the same, but now disables
beaconing for all virtual interfaces while scanning, has a
separate change flag and tracks user-space requests.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:13 -05:00
Bob Copeland 07c1e85251 ath5k: honor the RTS/CTS bits
The ath5k driver didn't use set_rts_threshold or use_cts_prot, and also
didn't check the IEEE80211_TX_RC_USE_{RTS_CTS,CTS_PROTECT} RC flags.
Tell the hardware about these so RTS/CTS will work, and so the device
will work better in mixed b/g environments.

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-01-29 16:01:13 -05:00
Bob Copeland 8902ff4e56 ath5k: use short preamble when possible
ath5k previously ignored TX_RC_SHORT_PREAMBLE and did not use
config->use_short_preamble, so the long preamble was always
used for transmitted packets.

Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:12 -05:00
Bob Copeland 5ef4017a72 ath5k: remove unused led_off parameter
ath5k_softc->led_off hasn't been used since commit
3a078876ca, "convert LED code to use
mac80211 triggers."

Changes-licensed-under: 3-Clause-BSD

Reported-by: Tobias Doerffel <tobias.doerffel@gmail.com>
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-01-29 16:01:11 -05:00
Sujith 2134e7e724 mac80211: Add documentation bits for mac80211_rate_control_flags
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:10 -05:00
Andrey Borzenkov e129a948c9 orinoco: trivial cleanup in alloc_orinocodev
Remove extra space; remove redundant cast

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:10 -05:00
Andrey Borzenkov 89ea40905f orinoco: convert to struct net_device_ops
No functional changes; use new kernel interface for netdev methods.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:09 -05:00
Johannes Berg 881d948c23 wireless: restrict to 32 legacy rates
Since the standards only define 12 legacy rates, 32 is certainly
a sane upper limit and we don't need to use u64 everywhere. Add
sanity checking that no more than 32 rates are registered and
change the variables to u32 throughout.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:09 -05:00
Vasanthakumar Thiagarajan 369391db1a ath9k: Remove unnecessary gpio configuration in ath9k_hw_reset()
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29 16:01:08 -05:00