Commit Graph

185386 Commits

Author SHA1 Message Date
Reinette Chatre
f6c8f1523a iwlwifi: fix regulatory
Commit "cfg80211: convert bools into flags" mistakenly modified iwlwifi's
regulatory settings instead of just converting it. Fix this.

This fixes http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2172

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
CC: stable@kernel.org
2010-03-30 15:37:29 -04:00
Johannes Berg
7236fe29fd mac80211: move netdev queue enabling to correct spot
"mac80211: fix skb buffering issue" still left a race
between enabling the hardware queues and the virtual
interface queues. In hindsight it's totally obvious
that enabling the netdev queues for a hardware queue
when the hardware queue is enabled is wrong, because
it could well possible that we can fill the hw queue
with packets we already have pending. Thus, we must
only enable the netdev queues once all the pending
packets have been processed and sent off to the device.

In testing, I haven't been able to trigger this race
condition, but it's clearly there, possibly only when
aggregation is being enabled.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-30 15:37:28 -04:00
Hans de Goede
05a9a16170 Add USB ID for Thomson SpeedTouch 120g to p54usb id table
Thanks to Chris Chabot for giving his old wireless usb dongle to me
to test it under Linux.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-30 15:37:26 -04:00
Benjamin Larsson
e5868ba10c Add a pci-id to the mwl8k driver
Signed-off-by: Benjamin Larsson <banan@ludd.ltu.se>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-30 15:37:25 -04:00
Ben Konrath
eb3d72c8b7 ar9170: add support for NEC WL300NU-G USB dongle
This patch adds support for the NEC WL300NU-G USB wifi dongle.

Signed-off-by: Ben Konrath <ben@bagu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-30 15:37:24 -04:00
Porsch, Marco
533866b12c mac80211: fix PREQ processing and one small bug
1st) a PREQ should only be processed, if it has the same SN and better
metric (instead of better or equal).
2nd) next_hop[ETH_ALEN] now actually used to buffer
mpath->next_hop->sta.addr for use out of lock.

Signed-off-by: Marco Porsch <marco.porsch@siemens.com>
Acked-by: Javier Cardona <javier@cozybit.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-30 15:37:23 -04:00
John W. Linville
c7a00dc73b mac80211: correct typos in "unavailable upon resume" warning
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-30 15:37:22 -04:00
John W. Linville
368d06f5b0 wireless: convert reg_regdb_search_lock to mutex
Stanse discovered that kmalloc is being called with GFP_KERNEL while
holding this spinlock.  The spinlock can be a mutex instead, which also
enables the removal of the unlock/lock around the lock/unlock of
cfg80211_mutex and the call to set_regdom.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-30 15:37:20 -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
Joe Perches
adc009e2e7 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>
2010-03-23 16:50:28 -04:00
Joe Perches
56b632e8cc 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>
2010-03-23 16:50:28 -04:00
Joe Perches
270020e85e 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>
2010-03-23 16:50:27 -04:00
Joe Perches
76326f1d4c 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>
2010-03-23 16:50:27 -04:00
Joe Perches
44608f8012 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>
2010-03-23 16:50:27 -04:00
Joe Perches
2ae2332ed1 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>
2010-03-23 16:50:26 -04:00
Joe Perches
f6e0bb56d4 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>
2010-03-23 16:50:26 -04:00
Teemu Paasikivi
3b56dd6a09 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>
2010-03-23 16:50:25 -04:00
Juuso Oikarinen
2ea9fb3d79 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>
2010-03-23 16:50:25 -04:00
Juuso Oikarinen
a0cb7be4f4 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>
2010-03-23 16:50:24 -04:00