profile/ivi/kernel-adaptation-intel-automotive.git
14 years agowireless/prism54: remove trailing space in messages
Frans Pop [Wed, 24 Mar 2010 18:46:33 +0000 (19:46 +0100)]
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>
14 years agowireless: remove trailing space in messages
Frans Pop [Wed, 24 Mar 2010 18:46:29 +0000 (19:46 +0100)]
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>
14 years agoiwlwifi: avoid device type checking in generic code
Wey-Yi Guy [Fri, 19 Mar 2010 18:54:49 +0000 (11:54 -0700)]
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>
14 years agoiwlwifi: change spin_lock to spin_lock_irqsave
Wey-Yi Guy [Fri, 19 Mar 2010 17:36:09 +0000 (10:36 -0700)]
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>
14 years agoiwlwifi: remove "\n" from module parameter description
Wey-Yi Guy [Thu, 18 Mar 2010 22:37:49 +0000 (15:37 -0700)]
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>
14 years agoiwlwifi: Generic approach to measure temperature
Wey-Yi Guy [Thu, 18 Mar 2010 17:56:32 +0000 (10:56 -0700)]
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>
14 years agoiwlwifi: remove noise reporting
Johannes Berg [Thu, 18 Mar 2010 16:58:27 +0000 (09:58 -0700)]
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>
14 years agoiwlwifi: add missing email address information
Wey-Yi Guy [Thu, 18 Mar 2010 01:57:13 +0000 (18:57 -0700)]
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>
14 years agoiwlwifi: remove non-exist extern functions and structures
Wey-Yi Guy [Tue, 16 Mar 2010 19:37:28 +0000 (12:37 -0700)]
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>
14 years agoiwlwifi: enable '6000 Series 2x2 AGN Gen2' adaptors
Jay Sternberg [Wed, 17 Mar 2010 23:16:12 +0000 (16:16 -0700)]
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>
14 years agoiwlwifi: more clean up to move agn only rx functions from iwlcore to iwlagn
Wey-Yi Guy [Wed, 17 Mar 2010 20:34:36 +0000 (13:34 -0700)]
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>
14 years agoiwlwifi: move agn only rx functions from iwlcore to iwlagn
Wey-Yi Guy [Wed, 17 Mar 2010 20:34:35 +0000 (13:34 -0700)]
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>
14 years agoiwlwifi: move agn only tx functions from iwlcore to iwlagn
Wey-Yi Guy [Wed, 17 Mar 2010 20:34:34 +0000 (13:34 -0700)]
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>
14 years agoiwlwifi: move agn module parameter structure to common place
Wey-Yi Guy [Tue, 16 Mar 2010 19:37:27 +0000 (12:37 -0700)]
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>
14 years agoiwlwifi: each device has its own eeprom tx power version
Wey-Yi Guy [Tue, 16 Mar 2010 19:37:26 +0000 (12:37 -0700)]
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>
14 years agoiwlwifi: move agn common code to iwlagn library file
Wey-Yi Guy [Wed, 17 Mar 2010 00:47:58 +0000 (17:47 -0700)]
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>
14 years agoiwlwifi: move ucode alive related code to separate file
Wey-Yi Guy [Tue, 16 Mar 2010 19:37:24 +0000 (12:37 -0700)]
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>
14 years agoiwlwifi: move hw related defines to separate file
Wey-Yi Guy [Wed, 17 Mar 2010 00:41:23 +0000 (17:41 -0700)]
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>
14 years agoiwlwifi: move tx queue related code to separate file
Wey-Yi Guy [Wed, 17 Mar 2010 00:41:22 +0000 (17:41 -0700)]
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>
14 years agoiwlwifi: move hcmd related code to separate file
Wey-Yi Guy [Tue, 16 Mar 2010 17:23:31 +0000 (10:23 -0700)]
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>
14 years agoiwlwifi: code cleanup for "load ucode" function
Wey-Yi Guy [Tue, 16 Mar 2010 17:23:30 +0000 (10:23 -0700)]
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>
14 years agoiwlwifi: move ucode loading related code to separated file
Wey-Yi Guy [Tue, 16 Mar 2010 17:23:29 +0000 (10:23 -0700)]
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>
14 years agoiwlwifi: iwl_good_ack_health() only apply to AGN device
Wey-Yi Guy [Tue, 16 Mar 2010 17:46:31 +0000 (10:46 -0700)]
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>
14 years agoRevert "iwlwifi: fix build error for CONFIG_IWLAGN=n"
Reinette Chatre [Thu, 25 Mar 2010 18:14:52 +0000 (11:14 -0700)]
Revert "iwlwifi: fix build error for CONFIG_IWLAGN=n"

This reverts commit 76232ebf898c4d5e657f2b663fbf7108bca80ded.

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>
14 years agoiwlwifi: fix build error for CONFIG_IWLAGN=n
John W. Linville [Wed, 24 Mar 2010 21:21:08 +0000 (17:21 -0400)]
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>
14 years agomac80211: remove unneed variable from ieee80211_tx_pending()
Dan Carpenter [Wed, 24 Mar 2010 11:56:41 +0000 (14:56 +0300)]
mac80211: remove unneed variable from ieee80211_tx_pending()

We don't need "sdata" any more after:
d84f323477260e773d5317ad7cbe50f76115cb47
mac80211: remove dev_hold/put calls

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: Improve connection quality maintenance docs in nl80211.h
Juuso Oikarinen [Wed, 24 Mar 2010 08:11:14 +0000 (10:11 +0200)]
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>
14 years agomac80211: Add support for connection quality monitoring
Juuso Oikarinen [Tue, 23 Mar 2010 07:02:34 +0000 (09:02 +0200)]
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>
14 years agocfg80211: Add connection quality monitoring support to nl80211
Juuso Oikarinen [Tue, 23 Mar 2010 07:02:33 +0000 (09:02 +0200)]
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>
14 years agolibertas: add auto auth mode feature
Amitkumar Karwar [Fri, 26 Feb 2010 01:16:36 +0000 (17:16 -0800)]
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>
14 years agoath9k_htc: Fix symbol collision with ath9k
Sujith [Wed, 24 Mar 2010 08:12:13 +0000 (13:42 +0530)]
ath9k_htc: Fix symbol collision with ath9k

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agodrivers/net/wireless/b43/main.c:4351: Fixed coding style
Daniel Ngu [Mon, 22 Mar 2010 11:52:44 +0000 (00:52 +1300)]
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>
14 years agomac80211: Add support for connection monitor in hardware
Juuso Oikarinen [Fri, 19 Mar 2010 05:14:53 +0000 (07:14 +0200)]
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>
14 years agodrivers/net/wireless/ray_cs.c: Use iw_handler function prototypes
Joe Perches [Fri, 19 Mar 2010 01:29:40 +0000 (18:29 -0700)]
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>
14 years agoorinoco/wext.c: Remove local #define STD_IW_HANDLER
Joe Perches [Fri, 19 Mar 2010 01:29:39 +0000 (18:29 -0700)]
orinoco/wext.c: Remove local #define STD_IW_HANDLER

Use IW_HANDLER from wireless.h instead

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agodrivers/net: Remove local #define IW_IOCTL, use IW_HANDLER
Joe Perches [Fri, 19 Mar 2010 01:29:38 +0000 (18:29 -0700)]
drivers/net: Remove local #define IW_IOCTL, use IW_HANDLER

Use #define IW_HANDLER from wireless.h instead

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agodrivers/net/wireless: Use IW_HANDLER macro
Joe Perches [Fri, 19 Mar 2010 01:29:37 +0000 (18:29 -0700)]
drivers/net/wireless: Use IW_HANDLER macro

Convert direct uses of [ (foo - SIOCIWFIRST) , fn)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonet/wireless/wext-core.c: Use IW_EVENT_IDX macro
Joe Perches [Fri, 19 Mar 2010 01:29:36 +0000 (18:29 -0700)]
net/wireless/wext-core.c: Use IW_EVENT_IDX macro

There's a wireless.h macro for this, might as well use it.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonet/wireless/wext_core.c: Use IW_IOCTL_IDX macro
Joe Perches [Fri, 19 Mar 2010 01:29:35 +0000 (18:29 -0700)]
net/wireless/wext_core.c: Use IW_IOCTL_IDX macro

There's a wireless.h macro for this, might as well use it.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless.h: Use SIOCIWFIRST not SIOCSIWCOMMIT for range check
Joe Perches [Fri, 19 Mar 2010 01:29:33 +0000 (18:29 -0700)]
wireless.h: Use SIOCIWFIRST not SIOCSIWCOMMIT for range check

These two #defines use the same value, but
SIOCIWFIRST makes more sense in this use.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoinclude/linux/wireless.h: Add IW_HANDLER macro to initialize array entry
Joe Perches [Fri, 19 Mar 2010 01:29:32 +0000 (18:29 -0700)]
include/linux/wireless.h: Add IW_HANDLER macro to initialize array entry

Copied the idea from orinoco

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Changed platform_device to be dynamically allocated
Teemu Paasikivi [Thu, 18 Mar 2010 10:26:46 +0000 (12:26 +0200)]
wl1271: Changed platform_device to be dynamically allocated

Changed platform_device to be allocated dynamically from the
wl1271_alloc_hw function. Also cleaned up error handling in the
wl1271_alloc_hw function and module probe functions.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Remove circular interlocking related to the inetaddr notifier chain
Juuso Oikarinen [Thu, 18 Mar 2010 10:26:45 +0000 (12:26 +0200)]
wl1271: Remove circular interlocking related to the inetaddr notifier chain

Removing the wl1271 from the inet addr notifier chain sometimes causes the
registered handler to be called - causing locking problems if the removing
function is called from within the mutex.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Don't generate null func template for ad-hoc
Juuso Oikarinen [Thu, 18 Mar 2010 10:26:44 +0000 (12:26 +0200)]
wl1271: Don't generate null func template for ad-hoc

The null func template is not needed for ad-hoc, and it's generation is not
supported for ad-hoc (mac80211 will WARN about it.)

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Update filters properly
Juuso Oikarinen [Thu, 18 Mar 2010 10:26:43 +0000 (12:26 +0200)]
wl1271: Update filters properly

This patch adds support for the filters configured by the mac80211 stack.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Removed duplicate code from module remove function.
Teemu Paasikivi [Thu, 18 Mar 2010 10:26:42 +0000 (12:26 +0200)]
wl1271: Removed duplicate code from module remove function.

Removed duplicate code from wl1271_sdio module remove function. For
freeing stuff in the remove function wl1271_free_hw function is now
used.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Added DEBUG_SDIO flag
Teemu Paasikivi [Thu, 18 Mar 2010 10:26:41 +0000 (12:26 +0200)]
wl1271: Added DEBUG_SDIO flag

Added separate flag for SDIO debugging. Previously it has used
DEBUG_SPI flag. This patch also includes couple indentation fixes.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Remove deprecated interface config function
Juuso Oikarinen [Thu, 18 Mar 2010 10:26:40 +0000 (12:26 +0200)]
wl1271: Remove deprecated interface config function

It's no longer needed.

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>
14 years agowl1271: Fix MAC address handling
Juuso Oikarinen [Thu, 18 Mar 2010 10:26:39 +0000 (12:26 +0200)]
wl1271: Fix MAC address handling

This patch fixes MAC address handling. To achieve this, firmware booting had
to be delayed from the previous op_start to op_add_interface, which is the point
when the driver gets to know the configured MAC address. As the wl1271 only
supports one virtual interface, this even seems quite logical.

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>
14 years agowl1271: enable U-APSD
Kalle Valo [Thu, 18 Mar 2010 10:26:38 +0000 (12:26 +0200)]
wl1271: enable U-APSD

wl1271 supports U-APSD similarly as wl1251, so let's enable it.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: fix ps scheme in wl1271_op_conf_tx()
Kalle Valo [Thu, 18 Mar 2010 10:26:37 +0000 (12:26 +0200)]
wl1271: fix ps scheme in wl1271_op_conf_tx()

Commit "wl1271: implement WMM" accidentally used CONF_PS_SCHEME_LEGACY_PSPOLL,
but instead CONF_PS_SCHEME_LEGACY should be used as earlier.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: create qos nullfunc template
Kalle Valo [Thu, 18 Mar 2010 10:26:36 +0000 (12:26 +0200)]
wl1271: create qos nullfunc template

Needed for U-APSD.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: get probe request template from mac80211
Kalle Valo [Thu, 18 Mar 2010 10:26:35 +0000 (12:26 +0200)]
wl1271: get probe request template from mac80211

If we get probe request from mac80211, we can remove two functions.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: get pspoll and nullfunc templates from mac80211
Kalle Valo [Thu, 18 Mar 2010 10:26:34 +0000 (12:26 +0200)]
wl1271: get pspoll and nullfunc templates from mac80211

mac80211 now can create pspoll and nullfunc templates, better to use those.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: enable WMM
Kalle Valo [Thu, 18 Mar 2010 10:26:33 +0000 (12:26 +0200)]
wl1271: enable WMM

Everything is ready now and we can enable WMM in wl1271.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Add sysfs file to control BT co-ex state
Juuso Oikarinen [Thu, 18 Mar 2010 10:26:32 +0000 (12:26 +0200)]
wl1271: Add sysfs file to control BT co-ex state

Add a sysfs file to control the state of the BT co-ex (enable or disable it.)
By default, the BT co-ex is enabled.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Move platform device registration from _spi to _main
Juuso Oikarinen [Thu, 18 Mar 2010 10:26:31 +0000 (12:26 +0200)]
wl1271: Move platform device registration from _spi to _main

In order to get the platform device for both SPI and SDIO, move the platform
device registration to wl1271_main.c from wl1271_spi.c.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Add proper WLAN-BT co-ex configuration, and enable co-ex.
Juuso Oikarinen [Thu, 18 Mar 2010 10:26:30 +0000 (12:26 +0200)]
wl1271: Add proper WLAN-BT co-ex configuration, and enable co-ex.

Add configuration values for the varous WLAN-BT co-ex configuration parameters,
and finally enable WLAN-BT co-ex. Based on preliminary measurements, it
appears the co-ex feature is not increasing WLAN power consumption, if BT
is not activated.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fix SG configuration message structures
Juuso Oikarinen [Thu, 18 Mar 2010 10:26:29 +0000 (12:26 +0200)]
wl1271: Fix SG configuration message structures

The bluetooth coexistence (SG) configuration messages have changed and
were completely wrong. For instance, intending to enable the SG, it was
instead disabled.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Changed SDIO MMC host claiming
Teemu Paasikivi [Thu, 18 Mar 2010 10:26:28 +0000 (12:26 +0200)]
wl1271: Changed SDIO MMC host claiming

Changed driver to keep MMC host claimed while wlan interface is up.
This keeps MMC stack from powering the SDIO device down.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Cleaned up wlan power on/off functions
Teemu Paasikivi [Thu, 18 Mar 2010 10:26:27 +0000 (12:26 +0200)]
wl1271: Cleaned up wlan power on/off functions

Added method for wlan power control to io_ops struct and moved
wl1271_power_on and wl1271_power_off functions to wl1271_io.h.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Fix configuration of the TX opportunity value
Juuso Oikarinen [Thu, 18 Mar 2010 10:26:26 +0000 (12:26 +0200)]
wl1271: Fix configuration of the TX opportunity value

The per-queue TX opportunity value is configured by the mac80211 in units
of 32us. The firmware however wants it in us, so add the conversion.

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>
14 years agoath9k_htc: Support for AR9271 chipset.
Sujith [Wed, 17 Mar 2010 08:55:25 +0000 (14:25 +0530)]
ath9k_htc: Support for AR9271 chipset.

Features:

 * Station mode
 * IBSS mode
 * Monitor mode
 * Legacy support
 * HT support
 * TX/RX 11n Aggregation
 * HW encryption
 * LED
 * Suspend/Resume

For more information: http://wireless.kernel.org/en/users/Drivers/ath9k_htc

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: fix hardware deinit
Sujith [Wed, 17 Mar 2010 08:55:24 +0000 (14:25 +0530)]
ath9k_hw: fix hardware deinit

Without this you will get a panic if the device initialization
fails. Also, free ath_hw instance properly. ath9k_hw_deinit()
shouldn't do it.

Cc: stable@kernel.org
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: add HTC init hardware call for special resets for AR9271
Sujith [Wed, 17 Mar 2010 08:55:23 +0000 (14:25 +0530)]
ath9k_hw: add HTC init hardware call for special resets for AR9271

AR9271 needs a full reset only upon the first reset, add
a call for the driver to enable these special resets. We
can optimize this out later without an export.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: always set the core clock for AR9271
Sujith [Wed, 17 Mar 2010 08:55:22 +0000 (14:25 +0530)]
ath9k_hw: always set the core clock for AR9271

When initializing the PLL on AR9271 we always need
to set the core clock to 117MHz. While at it remove
the baud rate settings for the serial device on the
AR9271, the default settings work well unless you
want to customize it.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: use the skip count for PA calibration on AR9271
Sujith [Wed, 17 Mar 2010 08:55:21 +0000 (14:25 +0530)]
ath9k_hw: use the skip count for PA calibration on AR9271

Periodic power amplifier offset calibration is skipped on ath9k
algorithmically, this is required on AR9271.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: restrict valid nf readings for AR9271 to -114
Sujith [Wed, 17 Mar 2010 08:55:20 +0000 (14:25 +0530)]
ath9k_hw: restrict valid nf readings for AR9271 to -114

Noisefloor values read on AR9271 are unreliable if they
are less than -114, set those statically to -116.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: fix noisefloor history buffer usage on AR9271
Sujith [Wed, 17 Mar 2010 08:55:19 +0000 (14:25 +0530)]
ath9k_hw: fix noisefloor history buffer usage on AR9271

Noisefloor calibration involves querying hardware for samples
and storing this information on a history buffer in hardware for
actual noisefloor calibration processing in hardware. The history
buffer supports collecting information for all Atheros hardware,
one history buffer slot for each chain on each channel used for
MIMO operation. For current hardware this means one history
buffer slot for each chain on both the control (or primary) channel
and the extension (or secondary) channel. We know which noisefloor
registers to poke for collecting noisefloor data through the
chainmask.

For AR9285 and AR9271 devices, both 1x1, the chaimmask is defined as
0x9 = 0b0001001. The first four bits represent each chain out of
a maximum of 4 chains [0-3] on the primary channel. The last four
bits represent each chain on the extension channel. A chainmask
of 0x9 therefore indicates chain 1 is active on both the primary
and the extension channel.

AR9271 only requires collecting and storing noisefloor history buffer
data for the first chain on both the control and extension channel
(nfarray[0] and nfarray[3]) so fix the code and avoid which reads
and writes to the history buffer for the other chains.

Since the noisefloor varies depending on the number of chains your
device supports also initialize the noisefloor history buffer with
reasonable values seen on 1x1 devices such as AR9285.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: Fix full sleep setup for AR9271
Sujith [Wed, 17 Mar 2010 08:55:18 +0000 (14:25 +0530)]
ath9k_hw: Fix full sleep setup for AR9271

After telling the AR9271 to go into full sleep we do not need
to clear the RTC reset signal.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: fix TX descriptor setup for AR9271
Sujith [Wed, 17 Mar 2010 08:55:17 +0000 (14:25 +0530)]
ath9k_hw: fix TX descriptor setup for AR9271

The TX descriptors setup for AR971 requires the same
setup as AR9285, so use that.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: skip chip tests for AR9271
Sujith [Wed, 17 Mar 2010 08:55:16 +0000 (14:25 +0530)]
ath9k_hw: skip chip tests for AR9271

The chip test is not required for AR9271 on the host driver
code as the firmware will do the test internally on its own.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: add GPIO setup code for AR9271
Sujith [Wed, 17 Mar 2010 08:55:15 +0000 (14:25 +0530)]
ath9k_hw: add GPIO setup code for AR9271

Assign the proper number of GPIO pins for AR9271.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: update initialization values for AR9271
Sujith [Wed, 17 Mar 2010 08:55:14 +0000 (14:25 +0530)]
ath9k_hw: update initialization values for AR9271

Update the register initialization values for AR9271.
This is based on our last review from our systems team.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: decrease size of ath9k.ko
Ming Lei [Mon, 1 Mar 2010 15:13:29 +0000 (23:13 +0800)]
ath9k: decrease size of ath9k.ko

From e74b075cdb143d45be9b371ee8a8e2dcfc15ab34 Mon Sep 17 00:00:00 2001
From: Ming Lei <tom.leiming@gmail.com>
Date: Sat, 27 Feb 2010 23:50:54 +0800
Subject: [PATCH] ath9k: decrease size of ath9k.ko

The patch defines the fields of 'valid_single_stream' and 'valid' in
struct ath_rate_table as char type, so decrease the size of ath9k.ko
about 2KB.

old ath9k.ko
[tom@tom-lei ath9k]$ size ath9k.ko
   text    data     bss     dec     hex filename
  69344    3080     168   72592   11b90 ath9k.ko

new ath9k.ko
[tom@tom-lei ath9k]$ size ath9k.ko
   text    data     bss     dec     hex filename
  67304    3080     168   70552   11398 ath9k.ko

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
John W. Linville [Tue, 23 Mar 2010 20:46:43 +0000 (16:46 -0400)]
Merge branch 'wireless-next-2.6' of git://git./linux/kernel/git/iwlwifi/iwlwifi-2.6

14 years agoiwlwifi: code cleanup for connectivity recovery
Wey-Yi Guy [Fri, 5 Mar 2010 22:22:46 +0000 (14:22 -0800)]
iwlwifi: code cleanup for connectivity recovery

Split the connectivity check and recovery routine into separated
functions based on the types
   1. iwl_good_ack_health() - check for ack count
   2. iwl_good_plcp_health() - check for plcp error

Based on the type of errors being detected, different recovery methods
will be used to bring the system back to normal operational state.

Because different NIC has different HW and uCode, the behavior is also
different; these functions thus now form part of the ops infrastructure,
so we can have more control on how to monitor and recover from error condition
case per device.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: Recover TX flow failure
Wey-Yi Guy [Thu, 4 Mar 2010 21:38:59 +0000 (13:38 -0800)]
iwlwifi: Recover TX flow failure

Monitors the tx statistics to detect the drop in throughput.
When the throughput drops, the ratio of the actual_ack_count and the
expected_ack_count also drops.  At the same time, the aggregated
ba_timeout (the number of ba timeout retries) also rises.  If the
actual_ack_count/expected_ack_count ratio is 0 and the number of ba
timeout retries rises to BA_TIMEOUT_MAX, no tx packets can be delivered.
Reloading the uCode and bring the system back to normal operational
state.

Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: move plcp check to separated function
Wey-Yi Guy [Thu, 4 Mar 2010 21:38:58 +0000 (13:38 -0800)]
iwlwifi: move plcp check to separated function

Move the plcp error checking into stand alone function and pointed by ops
to accommodate devices not needing this recovery.

Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: Recover TX flow stall due to stuck queue
Wey-Yi Guy [Tue, 2 Mar 2010 01:23:50 +0000 (17:23 -0800)]
iwlwifi: Recover TX flow stall due to stuck queue

Monitors the internal TX queues periodically.  When a queue is stuck
for some unknown conditions causing the throughput to drop and the
transfer is stop, the driver will force firmware reload and bring the
system back to normal operational state.

The iwlwifi devices behave differently in this regard so this feature is
made part of the ops infrastructure so we can have more control on how to
monitor and recover from tx queue stall case per device.

Signed-off-by: Trieu 'Andrew' Nguyen <trieux.t.nguyen@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: clean up driver names for 1000/5000/6000
Shanyu Zhao [Sat, 6 Mar 2010 01:05:20 +0000 (17:05 -0800)]
iwlwifi: clean up driver names for 1000/5000/6000

Align the driver names with official product names for 1000/5000/6000
series. This change mainly affects the debug messages show up in system
log. No functional changes.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: sta_id cannot be invalid in rs_initialize_lq
Johannes Berg [Thu, 21 Jan 2010 15:07:44 +0000 (07:07 -0800)]
iwlwifi: sta_id cannot be invalid in rs_initialize_lq

The only caller of this is iwl_rs_rate_init
which is only called with a valid sta_id.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: implement new mac80211 station add/remove calls
Reinette Chatre [Tue, 23 Feb 2010 00:24:47 +0000 (16:24 -0800)]
iwlwifi: implement new mac80211 station add/remove calls

mac80211 recently implemented two new callbacks that are used to request
station add/remove from the driver. The benefot from these new callbacks
are that they enable the driver to sleep while performing this work.

This is a big patch since a few things need to be coordinated in this move.
First we need to decouple station management from rate scaling, which
caused a lot of code to be moved and/or deleted. Next we needed to tie in
with mac80211's station management callback and let it direct our station
management as well as trigger the rate scaling initialization.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlwifi: only add broadcast station once
Reinette Chatre [Fri, 19 Feb 2010 06:58:32 +0000 (22:58 -0800)]
iwlwifi: only add broadcast station once

Currently the broadcast station is added after every RXON command. Change
this to only add the broadcast station when interface is added by mac80211.
With this we need some extra work to ensure broadcast station is always
present since station table is cleared when RXON without ASSOC bit set is
sent. To deal with this we re-add all driver known stations to uCode after
such an RXON command is sent.

We also do some cleanup and remove the various calls to clear the station
table. We now only clear the station table in two scenarios:
- only clear uCode portion of station table when RXON command without ASSOC
bit is sent
- clear uCode and driver portion when interface goes down or is removed.

We need to do this clearing when interface goes down to deal with the
device restart/reconfigure routines which do not remove the interface, but
do add the interface during reconfiguration.

Previously the keys were also cleared when station table in driver is
cleared, this is not done anymore since mac80211 will take care that keys
are set and cleared correctly.

There is a known issue with this change. Associating with different AP
without bringing interface down fails with a firmware error. This is
because of the lack of full station notification support and the later
patches in this series that complete the station notification support will
fix this.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agoiwlagn: Add Flow-handler (FH) register dump for 4965.
Ben Cahill [Tue, 2 Mar 2010 20:48:25 +0000 (12:48 -0800)]
iwlagn: Add Flow-handler (FH) register dump for 4965.

FH register dump debug feature was recently added for 5000 and later;
4965 can use it also.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
14 years agorename new rfkill sysfs knobs
florian@mickler.org [Sat, 13 Mar 2010 12:31:05 +0000 (13:31 +0100)]
rename new rfkill sysfs knobs

This patch renames the (never officially released) sysfs-knobs
"blocked_hw" and "blocked_sw" to "hard" and "soft", as the hardware vs
software conotation is misleading.

It also gets rid of not needed locks around u32-read-access.

Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: (really) fix rates setup on IBSS merge
Bruno Randolf [Wed, 3 Mar 2010 09:45:42 +0000 (18:45 +0900)]
mac80211: (really) fix rates setup on IBSS merge

when an IBSS merge happened, the supported rates for the newly added station
were left empty, causing the rate control module to be initialized with only
the basic rates.

the section of the ibss code which deals with updating supported rates for
an already existing station failed to inform the rate control module about the
new rates. as both minstrel and pid don't have an update function i just use
the init function.

also remove unnecessary (unsigned long long) casts and edit debug message.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoRevert "mac80211: fix rates setup on IBSS merge"
John W. Linville [Tue, 16 Mar 2010 19:02:35 +0000 (15:02 -0400)]
Revert "mac80211: fix rates setup on IBSS merge"

I accidentally merged an incomplete version of the patch...

This reverts commit b4d59a9317e41faec3d0b6a03f0454d1e8abb710.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix TX status reporting for rt2800pci.
Alban Browaeys [Sun, 28 Feb 2010 16:14:40 +0000 (17:14 +0100)]
rt2x00: Fix TX status reporting for rt2800pci.

After testing, we found that TX_STA_FIFO_MCS is the last MCS value
tried. If the transmission failed, 8 frames have been transmitted. If the
transmission succeed, we can easily compute the number of retry.  This patch fix
the way status is reported to mac80211 rate control. It has 2 bugs :

1. mcs can contain the short preamble flag and it will lead to wrong
computations.

2. minstrel nearly always say that 54 Mbits is the best rate, even if we are
very far from the AP

Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
Signed-off-by: Alban Browaeys <prahal@yahoo.com>
Acked-by: Ivo van Doorn <ivdoorn@gmail.com>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: txdone implementation supporting hw encryption.
Alban Browaeys [Fri, 26 Feb 2010 22:19:59 +0000 (23:19 +0100)]
rt2x00: txdone implementation supporting hw encryption.

This is an implementation that support WCID being the encryption key.
Wireless Cli Id was set to be the encryption key in rt2800pci_write_tx_desc
and read (TX_STA_FIFO_WCID) as the current queue entry index.

Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
Signed-off-by: Alban Browaeys <prahal@yahoo.com>
Acked-by: Ivo van Doorn <ivdoorn@gmail.com>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: fix warning when building rt2800pci with just soc support
Helmut Schaa [Mon, 15 Mar 2010 16:22:26 +0000 (17:22 +0100)]
rt2x00: fix warning when building rt2800pci with just soc support

Fix compile warning "rt2800pci.c:1248: warning: 'rt2800pci_device_table'
defined but not used" when building rt2800pci with only soc support
(without pci).

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoipw2x00: replace "ieee80211" with "libipw" where appropriate
Pavel Roskin [Fri, 12 Mar 2010 05:01:22 +0000 (00:01 -0500)]
ipw2x00: replace "ieee80211" with "libipw" where appropriate

"ieee80211" was the old name of the common library for ipw2100 and
ipw2200.  It was renamed to "libipw", but some occurrences of the old
name remained.

Rename alloc_ieee80211() to alloc_libipw() and free_ieee80211() to
free_libipw().  Adjust comments and label names.  Change prefixes in
diagnostic messages.

Keep /proc/net/ieee80211 under the original name to avoid breaking user
interface.

Move the affected EXPORT_SYMBOL macros to their proper places.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoorinoco: disable support for prism chipset by default
Pavel Roskin [Fri, 12 Mar 2010 04:13:28 +0000 (23:13 -0500)]
orinoco: disable support for prism chipset by default

The hostap driver provides better support for Prism chipset.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: reduce eeprom read wait time
Grazvydas Ignotas [Thu, 11 Mar 2010 15:45:07 +0000 (17:45 +0200)]
wl1251: reduce eeprom read wait time

4sec wait is way too pessimistic, TI driver uses 40ms here,
and testing shows that is ebough, so let's also use that.
While at it, add useful sounding comment from the TI driver.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: fix ELP_CTRL register accesses when using SDIO
Grazvydas Ignotas [Thu, 11 Mar 2010 15:44:57 +0000 (17:44 +0200)]
wl1251: fix ELP_CTRL register accesses when using SDIO

For some unknown reason ELP_CTRL can't be accesed using
sdio_memcpy_* functions (any attemts to do so result in timeouts):

 wl1251: ERROR sdio write failed (-110)
 wl1251: ERROR sdio read failed (-110)
 wl1251: WARNING WLAN not ready

To fix this, add special IO functions for ELP_CTRL access that are
using sdio_readb/sdio_writeb. Similar handling is done in TI
reference driver from Android code drop.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Cc: Bob Copeland <me@bobcopeland.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: make local symbols static
Grazvydas Ignotas [Fri, 12 Mar 2010 10:28:41 +0000 (12:28 +0200)]
wl1251: make local symbols static

Make local functions and data static, also constify
some structures. While at it, clean up unneeded includes.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Cc: Bob Copeland <me@bobcopeland.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: optimize tx status processing
Felix Fietkau [Thu, 11 Mar 2010 15:28:24 +0000 (16:28 +0100)]
mac80211: optimize tx status processing

When a cooked monitor interface is active, ieee80211_tx_status()
generates a radiotap header for every single frame, even if it wasn't
injected and thus won't be sent to a monitor interface.
This patch reduces cpu utilization by moving the cooked monitor check a
bit earlier, before it generates the rtap header.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoDRIVER: Libertas: Fixed coding style in rx.c
Stewart Malik [Thu, 11 Mar 2010 09:58:29 +0000 (20:28 +1030)]
DRIVER: Libertas: Fixed coding style in rx.c

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove unused beacon timer code
John W. Linville [Wed, 10 Mar 2010 16:08:50 +0000 (11:08 -0500)]
ath5k: remove unused beacon timer code

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove dead source in ath5k_combine_linear_pcdac_curves
John W. Linville [Wed, 10 Mar 2010 16:08:49 +0000 (11:08 -0500)]
ath5k: remove dead source in ath5k_combine_linear_pcdac_curves

This code was commented-out when it was added about a year ago and
remains unchanged -- seems as if we don't need it...

Signed-off-by: John W. Linville <linville@tuxdriver.com>