Commit Graph

184205 Commits

Author SHA1 Message Date
Juuso Oikarinen
9cea461fb0 wl1271: Fix memory leak in scan command handling
This patch fixes a memory leak in the scan command handling code.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:12 -04:00
Juuso Oikarinen
f83cce3551 wl1271: Fix memory leaks in SPI initialization
This patch fixes two memory leaks in the SPI initialization code.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:11 -04:00
Juuso Oikarinen
31627dc59b wl1271: Add TX rate reporting
Add reporting of the used TX rate to mac80211 in the tx_status.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:11 -04:00
Juuso Oikarinen
f876bb9aaf wl1271: Clean up RX rate reporting
Clean up the code to convert a firmware rate class index into an index
for the rate configuration table.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:11 -04:00
Luciano Coelho
7fdd50d07f wl1271: fix wl1271_spi driver name
When forward porting some patches to upstream, there was a mistake and the
wl1271_spi driver name remained, erroneously, as "wl1271".  This patch fixes
that.

Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:10 -04:00
Bruno Randolf
a8c944f8a0 ath5k: add capability flag for phyerror counters
Chipsets since revision AR5213A (0x59) have hardware counters for PHY errors
which we can read directly from the registers. Older hardware has to use the RX
descriptor status to get a count of PHY errors. This will be used in several
places in the ANI implementation, so a flag is useful.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:10 -04:00
Bruno Randolf
da35111ad9 ath5k: update phy errors codes
Update PHY error codes from the HAL, and keep them in statistics for debugging
via the 'frameerrors' file. This will also be used by ANI.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:10 -04:00
Bruno Randolf
495391d715 ath5k: simplify MIB counters
Let's keep MIB counter statistics in our own statistics structure and only
convert it to ieee80211_low_level_stats when needed by mac80211. Also we don't
need to read profile count registers in the MIB interrupt (they don't trigger
MIB interrupts).

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:09 -04:00
Bruno Randolf
9d332c82b4 ath5k: initialize default noise floor
Initialize noise floor variable with a default of -95. This was used
uninitialized in the signal strength (RSSI -> dBm) conversion until the first
noise floor calibration was completed.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:09 -04:00
Bruno Randolf
b4ea449df9 ath5k: keep beacon RSSI average
Keep an exponentially weighted moving average of the beacon RSSI in our BSS.
It will be used by the ANI implementation.

The averaging algorithm is copied from rt2x00, Thanks :)

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:09 -04:00
Bruno Randolf
6a8a3f6b2a ath5k: move ath5k_hw_calibration_poll to base.c
It's not a phy related funtion; It has more to do with the interrupt handler
and tasklet scheduling, so it belongs to base.c.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:09 -04:00
Bruno Randolf
a9167f9642 ath5k: optimize ath5k_hw_calibration_poll
Optimize ath5k_hw_calibration_poll() since it is called on every singe
interrupt.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:09 -04:00
Bruno Randolf
e65e1d7713 ath5k: remove the use of SWI interrupt
We don't need to generate a software interrupt (SWI) just to schedule a tasklet
- we can just schedule the tasklet directly.

Rename constants, names, etc to reflect the fact that we don't use SWI any more.

Also move the flag handling into the tasklet and prepare it to behave correctly
when there are multiple flags present.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:08 -04:00
Bruno Randolf
1063b176c0 ath5k: remove static calibration interval variable
Remove static variable ath5k_calinterval which was used as a constant. Use a
#define instead. Also we don't need ah_cal_intval.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:08 -04:00
Frans Pop
0e354fd01e wireless/libertas: remove trailing space in debugfs header
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: libertas-dev@lists.infradead.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:08 -04:00
Frans Pop
cb01b09c69 wireless/raylink: remove trailing space in messages
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Corey Thomas <coreythomas@charter.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:07 -04:00
Frans Pop
4a89852c35 wireless/prism54: remove trailing space in messages
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:39:07 -04:00
Frans Pop
55f98938b5 wireless: remove trailing space in messages
Also correct indentation in net/wireless/reg.c.

Signed-off-by: Frans Pop <elendil@planet.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31 14:38:51 -04:00
Wey-Yi Guy
d28667f871 iwlwifi: avoid device type checking in generic code
Avoid checking for specified device type to perform certain function,
switch to .cfg approach as more generic and better implementation
method.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:22:32 -07:00
Wey-Yi Guy
6e8cc38d5b iwlwifi: change spin_lock to spin_lock_irqsave
Use spin_lock_irqsave() in interrupt handler to disable interrupts locally
and provide the spinlock on SMP. This covers both interrupt and SMP
concurrency.

With this changes, also fix the sparse warning issues.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:22:08 -07:00
Wey-Yi Guy
6c69d12167 iwlwifi: remove "\n" from module parameter description
Remove the "\n" from following module parameter description:
 - enable wifi/bluetooth co-exist
 - led mode: 0=blinking, 1=On(RF On)/Off(RF Off), (default 0)
to be consistence with the rest of iwlagn/iwlcore module parameters format.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:21:11 -07:00
Wey-Yi Guy
2f3f7f9c23 iwlwifi: Generic approach to measure temperature
In stead of checking for 4965 and do KELVIN_TO_CELSIUS conversation, add
.cfg parameter for more generic approach.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:20:58 -07:00
Johannes Berg
ed1b6e99b5 iwlwifi: remove noise reporting
We go to great lengths to calculate this value
that is never used by mac80211. Additionally,
it is now deprecated by mac80211 and is causing
driver compilation to give warnings.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:20:44 -07:00
Wey-Yi Guy
3d2b162e7e iwlwifi: add missing email address information
Add missing contact email address to iwl-5000.c

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:20:32 -07:00
Wey-Yi Guy
510cb791ab iwlwifi: remove non-exist extern functions and structures
After re-structure the agn files layout and move all the
agn shared functions out from iwl-5000.c, all those functions and data
structures do not need to be declare "extern" from iwl-5000.c in
iwl-dev.h.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:20:18 -07:00
Jay Sternberg
0b5af201b2 iwlwifi: enable '6000 Series 2x2 AGN Gen2' adaptors
Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:20:05 -07:00
Wey-Yi Guy
8d801080dd iwlwifi: more clean up to move agn only rx functions from iwlcore to iwlagn
Move more functions only used by agn driver from iwlcore to iwlagn.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:19:54 -07:00
Wey-Yi Guy
54b81550dd iwlwifi: move agn only rx functions from iwlcore to iwlagn
Identify the rx functions only used by agn driver and move those from
iwlcore to iwlagn.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:19:33 -07:00
Wey-Yi Guy
74bcdb33e9 iwlwifi: move agn only tx functions from iwlcore to iwlagn
Identify the tx functions only used by agn driver and move those from
iwlcore to iwlagn.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:19:27 -07:00
Wey-Yi Guy
348ee7cd57 iwlwifi: move agn module parameter structure to common place
agn module parameter data structure shared by all agn devices, move it
iwl-agn-lib.c file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:19:09 -07:00
Wey-Yi Guy
00e70590dc iwlwifi: each device has its own eeprom tx power version
Each device has it own eeprom, so the tx power version could be
different, define TX_POWER_VERSION per device.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:18:50 -07:00
Wey-Yi Guy
e04ed0a5bb iwlwifi: move agn common code to iwlagn library file
Multiple iwlagn based devices share the same common functions.
Move those functions from iwl-5000.c to iwl-agn-lib.c file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:18:37 -07:00
Wey-Yi Guy
741a626627 iwlwifi: move ucode alive related code to separate file
uCode alive for iwlagn based devices share the same functions.
Move those functions from iwl-5000.c to iwl-agn-ucode.c.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:18:20 -07:00
Wey-Yi Guy
19e6cda094 iwlwifi: move hw related defines to separate file
Multiple iwlagn based devices shared the same hw definitions.
Move device hardware related defines from iwl-5000-hw.h to iwl-agn-hw.h
file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:18:05 -07:00
Wey-Yi Guy
b305a08058 iwlwifi: move tx queue related code to separate file
Multiple iwlagn based devices shared the same tansmit queue functions.
Move tx queue related code from iwl-5000.c to iwl-agn-tx.c file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:17:51 -07:00
Wey-Yi Guy
7dc77dba6a iwlwifi: move hcmd related code to separate file
Multiple iwlagn based devices shared the same hcmd related functions.
Move from iwl-5000.c to iwl-agn-hcmd.c file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:17:35 -07:00
Wey-Yi Guy
81b8176eb8 iwlwifi: code cleanup for "load ucode" function
Loading uCode functions are shared across multiple agn devices.
Move those functions to iwl-agn-ucode.c file with other uCode
related functions.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:17:20 -07:00
Wey-Yi Guy
792bc3cbe0 iwlwifi: move ucode loading related code to separated file
Multiple iwlagn based devices shared the same ucode loading procedure.
Move loading related code from iwl-5000.c to iwl-agn-ucode.c file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:17:04 -07:00
Wey-Yi Guy
872c8ddcbe iwlwifi: iwl_good_ack_health() only apply to AGN device
iwl_good_ack_health() check for expected and actual ack count which only
apply to aggregation mode. Move the function to iwlagn module.

Reported-by: Chantry Xavier <chantry.xavier@gmail.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:16:37 -07:00
Reinette Chatre
e184f67d39 Revert "iwlwifi: fix build error for CONFIG_IWLAGN=n"
This reverts commit 76232ebf89.

iwl_good_ack_health only applies to aggregation and thus only to iwlagn. We
can thus move the function to iwlagn instead of modifying compile flags.
This is done in following patch.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-03-25 11:14:52 -07:00
John W. Linville
76232ebf89 iwlwifi: fix build error for CONFIG_IWLAGN=n
drivers/net/wireless/iwlwifi/iwl-rx.c: In function 'iwl_good_ack_health':
drivers/net/wireless/iwlwifi/iwl-rx.c:647: error: 'struct iwl_priv' has no member named '_agn'

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-24 17:21:08 -04:00
Dan Carpenter
14b44974d5 mac80211: remove unneed variable from ieee80211_tx_pending()
We don't need "sdata" any more after:
	d84f323477
	mac80211: remove dev_hold/put calls

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-24 16:04:33 -04:00
Juuso Oikarinen
4ac5541bda cfg80211: Improve connection quality maintenance docs in nl80211.h
In nl80211.h, be a little more elaborate in the docs for the definitions
NL80211_ATTR_CQM_RSSI_THOLD and NL80211_ATTR_CQM_RSSI_HYST.

Reported-by: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-24 16:04:33 -04:00
Juuso Oikarinen
a97c13c345 mac80211: Add support for connection quality monitoring
Add support for the set_cqm_config op. This op function configures the
requested connection quality monitor rssi threshold and rssi hysteresis
values to the hardware  if the hardware supports
IEEE80211_HW_SUPPORTS_CQM.

For unsupported hardware, currently -EOPNOTSUPP is returned, so the mac80211
is currently not doing connection quality monitoring on the host. This could be
added later, if needed.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-24 16:04:33 -04:00
Juuso Oikarinen
d6dc1a3863 cfg80211: Add connection quality monitoring support to nl80211
Add support for basic configuration of a connection quality monitoring to the
nl80211 interface, and basic support for notifying about triggered monitoring
events.

Via this interface a user-space connection manager may configure and receive
pre-warning events of deteriorating WLAN connection quality, and start
preparing for roaming in advance, before the connection is already lost.

An example usage of such a trigger is starting scanning for nearby AP's in
an attempt to find one with better connection quality, and associate to it
before the connection characteristics of the existing connection become too bad
or the association is even lost, leading in a prolonged delay in connectivity.

The interface currently supports only RSSI, but it could be later extended
to include other parameters, such as signal-to-noise ratio, if need for that
arises.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-24 16:02:37 -04:00
Amitkumar Karwar
921ca03c8f libertas: add auto auth mode feature
Auto auth mode is enabled by default. If user doesn't specify the
auth mode, while association driver will first try with open mode
and then with shared key mode. If user specifies an auth mode,
auto auth is disabled and driver will not try association with
another auth mode.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-24 16:02:37 -04:00
Sujith
e1572c5eec ath9k_htc: Fix symbol collision with ath9k
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-24 10:26:01 -04:00
Daniel Ngu
c5a079f46a drivers/net/wireless/b43/main.c:4351: Fixed coding style
WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Daniel Ngu <daniel.dy.ngu@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-23 16:51:59 -04:00
Juuso Oikarinen
1e4dcd0124 mac80211: Add support for connection monitor in hardware
This patch is based on a RFC patch by Kalle Valo.

The wl1271 has a feature which handles the connection monitor logic
in hardware, basically sending periodically nullfunc frames and reporting
to the host if AP is lost, after attempting to recover by sending
probe-requests to the AP.

Add support to mac80211 by adding a new flag IEEE80211_HW_CONNECTION_MONITOR
which prevents conn_mon_timer from triggering during idle periods, and
prevents sending probe-requests to the AP if beacon-loss is indicated by the
hardware.

Cc: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-23 16:51:42 -04:00
Joe Perches
43ead78ac4 drivers/net/wireless/ray_cs.c: Use iw_handler function prototypes
Change local functions that are cast to iw_handler to
the more standard use with "union iwreq_data *wrqu"
so the iw_handler array no longer needs the casts.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-23 16:50:28 -04:00