]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/log
mirror_ubuntu-disco-kernel.git
13 years agowl12xx_sdio: set MMC_PM_KEEP_POWER flag on suspend
Eliad Peller [Fri, 13 May 2011 08:57:10 +0000 (11:57 +0300)]
wl12xx_sdio: set MMC_PM_KEEP_POWER flag on suspend

if a wow trigger was configured, set the MMC_PM_KEEP_POWER flag
on suspend, so our power will be kept while the system is suspended.

We needed to set this flag on each suspend attempt (when we want
to keep power)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: declare suspend/resume callbacks (for wowlan)
Eliad Peller [Fri, 13 May 2011 08:57:09 +0000 (11:57 +0300)]
wl12xx: declare suspend/resume callbacks (for wowlan)

Additionally, add wow_enabled field to wl, to indicate
whether wowlan was configured.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx_sdio: set interrupt as wake_up interrupt
Eliad Peller [Fri, 13 May 2011 08:57:08 +0000 (11:57 +0300)]
wl12xx_sdio: set interrupt as wake_up interrupt

set the sdio interrupt as wake_up interrupt, so we will be able
to wake up the suspended system (Wake-On-Wireless)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: remove unused flag WL1271_FLAG_IDLE_REQUESTED
Luciano Coelho [Thu, 12 May 2011 13:50:41 +0000 (16:50 +0300)]
wl12xx: remove unused flag WL1271_FLAG_IDLE_REQUESTED

This flag is not used anymore, remove it from the list.

Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: prevent sched_scan when not idle or not in station mode
Luciano Coelho [Thu, 12 May 2011 14:07:55 +0000 (17:07 +0300)]
wl12xx: prevent sched_scan when not idle or not in station mode

The current firmware only supports scheduled scan in station mode and
when idle.  To prevent the firmware from crashing, return -EOPNOTSUPP
when sched_scan start is called in an invalid state.

Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: export scheduled scan state in debugfs
Luciano Coelho [Tue, 10 May 2011 11:47:45 +0000 (14:47 +0300)]
wl12xx: export scheduled scan state in debugfs

Add the sched_scanning value to the driver_status debugfs entry.

Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: implement scheduled scan driver operations and reporting
Luciano Coelho [Tue, 10 May 2011 11:46:02 +0000 (14:46 +0300)]
wl12xx: implement scheduled scan driver operations and reporting

This patch adds the mac80211 operations for scheduled scan and the
scheduled scan results reporting.

Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: add scheduled scan structures and commands
Luciano Coelho [Tue, 10 May 2011 11:38:59 +0000 (14:38 +0300)]
wl12xx: add scheduled scan structures and commands

Add firmware command structures, definitions and code to to configure,
start and stop scheduled scans.

Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: listen to scheduled scan events
Luciano Coelho [Tue, 10 May 2011 11:28:27 +0000 (14:28 +0300)]
wl12xx: listen to scheduled scan events

Subscribe and listen to PERIODIC_SCAN_REPORT_EVENT_ID and
PERIODIC_SCAN_COMPLETE_EVENT_ID in preparation for the scheduled scan
implementation.

Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: add configuration values for scheduled scan
Luciano Coelho [Tue, 10 May 2011 11:06:31 +0000 (14:06 +0300)]
wl12xx: add configuration values for scheduled scan

Add the structures and values for driver-configured scheduled scan
parameters.

Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: add IEEE80211_HW_SPECTRUM_MGMT bit to the hw flags
Shahar Levi [Wed, 11 May 2011 09:12:56 +0000 (12:12 +0300)]
wl12xx: add IEEE80211_HW_SPECTRUM_MGMT bit to the hw flags

Set the spectrum management bit in the hw flags so that mac80211 will
set the WLAN_CAPABILITY_SPECTRUM_MGMT bit in association requests
(which in practice means that we support 802.11h spectrum management).

[Reworded the commit log -- Luca.]

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Don't filter beacons that include changed HT IEs
Shahar Levi [Wed, 11 May 2011 08:14:22 +0000 (11:14 +0300)]
wl12xx: Don't filter beacons that include changed HT IEs

This patch adds a beacon filter rule to pass up the beacons that
contain changed HT information elements.  These beacons need to be
passed to mac80211 so that it can act on such changes.

[Reworded commit log -- Luca.]

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: simplify wl1271_ssid_set()
Eliad Peller [Sun, 1 May 2011 06:56:45 +0000 (09:56 +0300)]
wl12xx: simplify wl1271_ssid_set()

Simplify wl1271_ssid_set by re-using cfg80211_find_ie instead of
reimplementing it.

Additionally, add a length check to prevent a potential buffer overflow.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agomac80211: mesh: move some code to make it static
Johannes Berg [Thu, 12 May 2011 11:38:50 +0000 (13:38 +0200)]
mac80211: mesh: move some code to make it static

There's no need to have table functions in one
file and all users in another, move the functions
to the right file and make them static. Also move
a static variable to the beginning of the file to
make it easier to find.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211/mac80211: avoid bounce back mac->cfg->mac on sched_scan_stopped
Luciano Coelho [Thu, 12 May 2011 13:28:29 +0000 (16:28 +0300)]
cfg80211/mac80211: avoid bounce back mac->cfg->mac on sched_scan_stopped

When sched_scan_stopped was called by the driver, mac80211 calls
cfg80211, which in turn was calling mac80211 back with a flag
"driver_initiated".  This flag was used so that mac80211 would do the
necessary cleanup but would not call the driver.  This was enough to
prevent the bounce back between the driver and mac80211, but not
between mac80211 and cfg80211.

To fix this, we now do the cleanup in mac80211 before calling
cfg80211.  To help with locking issues, the workqueue was moved from
cfg80211 to mac80211.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix a few RCU issues
Johannes Berg [Thu, 12 May 2011 13:11:37 +0000 (15:11 +0200)]
mac80211: fix a few RCU issues

A few configuration functions correctly do
rcu_read_lock() but don't correctly reference
some pointers protected by RCU. Fix that.

Cc: stable@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix another key non-race
Johannes Berg [Thu, 12 May 2011 13:07:15 +0000 (15:07 +0200)]
mac80211: fix another key non-race

The code here is only not racy because all the
places that assign the pointers it uses are
holding the sta_mtx as well as the key_mtx and
so can't race against this because this code
holds the sta_mtx. But that's not intuitive,
so fix it to hold the key_mtx.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: make key locking clearer
Johannes Berg [Thu, 12 May 2011 12:31:49 +0000 (14:31 +0200)]
mac80211: make key locking clearer

The code in ieee80211_del_key() doesn't acquire the
key_mtx properly when it dereferences the keys. It
turns out that isn't actually necessary since the
key_mtx itself seems to be redundant since all key
manipulations are done under the RTNL, but as long
as we have the key_mtx we should use it the right
way too.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: remove pointless mesh path timer RCU code
Johannes Berg [Thu, 12 May 2011 13:03:32 +0000 (15:03 +0200)]
mac80211: remove pointless mesh path timer RCU code

The code here to RCU-dereference a pointer that's
on the stack is totally pointless, RCU isn't magic
(like say Java's weak references are), so the code
can't work like whoever wrote it thought it might.

Remove it so readers don't get confused. Note that
it seems that a bug is there anyway: I don't see
any code that cancels the timer when a mesh path
struct is destroyed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix STA connection issues with AR9380 (XB113).
Senthil Balasubramanian [Thu, 12 May 2011 10:54:28 +0000 (16:24 +0530)]
ath9k_hw: Fix STA connection issues with AR9380 (XB113).

XB113 (AR9380) 3x3 SB 5G only cards were failing to connect to APs
due to incorrect xpabiaslevel configuration. fix it.

Cc: stable@kernel.org
Cc: Ray Li <ray.li@greenwavereality.com>
Cc: Kathy Giori <kathy.giori@atheros.com>
Cc: Aeolus Yang <aeolus.yang@atheros.com>
Cc: compat@orbit-lab.org
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove mwifiex_recv_complete function
Amitkumar Karwar [Thu, 12 May 2011 02:47:11 +0000 (19:47 -0700)]
mwifiex: remove mwifiex_recv_complete function

The function
- increments dropped rx_packet count if status code
  passed to it is "-1".
- frees SKB buffer.

But currently the function is being called with "0" status code.
This patch replaces above function by dev_kfree_skb_any() call.

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>
13 years agobcma: pci: trivial: correct amount of maximum retries
Rafał Miłecki [Wed, 11 May 2011 22:01:47 +0000 (00:01 +0200)]
bcma: pci: trivial: correct amount of maximum retries

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix dual band assumption for XB113
Luis R. Rodriguez [Wed, 11 May 2011 21:57:26 +0000 (14:57 -0700)]
ath9k_hw: fix dual band assumption for XB113

The XB113 cards are single band, 5 GHz-only, but the
default settings were configured to assume it was dual
band. Users of these cards then would see 2.4 GHz channels
but you would never get any scan results from these channels
given that the radio is not present.

Cc: stable@kernel.org
Cc: Fiona Cain <Fiona.Cain@atheros.com>
Cc: Ray Li <ray.li@greenwavereality.com>
Cc: Kathy Giori <kathy.giori@atheros.com>
Cc: Aeolus Yang <aeolus.yang@atheros.com>
Cc: Dan Friedman <dan.friedman@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix contention time computation in minstrel, minstrel_ht
Daniel Halperin [Wed, 11 May 2011 02:00:45 +0000 (19:00 -0700)]
mac80211: fix contention time computation in minstrel, minstrel_ht

When transmitting a frame, the transmitter waits a random number of
slots between 0 and cw. Thus, the contention time is (cw / 2) * t_slot
which we can represent instead as (cw * t_slot) >> 1. Also fix a few
other accounting bugs around contention time, and add comments.

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: restrict AP beacon intervals
Johannes Berg [Mon, 9 May 2011 16:41:15 +0000 (18:41 +0200)]
cfg80211: restrict AP beacon intervals

Multiple virtual AP interfaces can currently try
to use different beacon intervals, but that just
leads to problems since it won't actually be done
that way by drivers. Return an error in this case
to make sure it won't be done wrong.

Also, ignore attempts to change the DTIM period
or beacon interval during the lifetime of the BSS.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/blueto...
John W. Linville [Thu, 12 May 2011 18:06:10 +0000 (14:06 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-next-2.6

13 years agomac80211: Fix mesh-related build breakage...
Yogesh Ashok Powar [Thu, 12 May 2011 13:32:17 +0000 (09:32 -0400)]
mac80211: Fix mesh-related build breakage...

net/mac80211/cfg.c: In function ‘sta_apply_parameters’:
net/mac80211/cfg.c:746: error: ‘struct sta_info’ has no member named ‘plink_state’
make[1]: *** [net/mac80211/cfg.o] Error 1
make: *** [net/mac80211/mac80211.ko] Error 2

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoBluetooth: Remove leftover debug messages
Gustavo F. Padovan [Wed, 11 May 2011 22:26:06 +0000 (19:26 -0300)]
Bluetooth: Remove leftover debug messages

They were added by me while testing and I forgot to remove.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add support for disconnecting LE links via mgmt
Vinicius Costa Gomes [Fri, 6 May 2011 21:41:44 +0000 (18:41 -0300)]
Bluetooth: Add support for disconnecting LE links via mgmt

If we can't find a ACL link between the devices, we search
the connection list one second time looking for LE links.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add support for sending connection events for LE links
Vinicius Costa Gomes [Fri, 6 May 2011 21:41:43 +0000 (18:41 -0300)]
Bluetooth: Add support for sending connection events for LE links

We need to be able for receive events notifying that the connection
was established, the connection attempt failed or that disconnection
happened.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agocfg80211/nl80211: add interval attribute for scheduled scans
Luciano Coelho [Wed, 11 May 2011 14:09:37 +0000 (17:09 +0300)]
cfg80211/nl80211: add interval attribute for scheduled scans

Introduce NL80211_ATTR_SCHED_SCAN_INTERVAL as a required attribute for
NL80211_CMD_START_SCHED_SCAN.  This value informs the driver at which
intervals the scheduled scan cycles should be executed.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add support for HW scheduled scan
Luciano Coelho [Wed, 11 May 2011 14:09:36 +0000 (17:09 +0300)]
mac80211: add support for HW scheduled scan

Implement support for HW scheduled scan.  The mac80211 code doesn't perform
scheduled scans itself, but calls the driver to start and stop scheduled
scans.

This patch also creates a trace event class to be used by drv_hw_scan
and the new drv_sched_scan_start and drv_sched_stop functions, in
order to avoid duplicate code.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211/nl80211: add support for scheduled scans
Luciano Coelho [Wed, 11 May 2011 14:09:35 +0000 (17:09 +0300)]
cfg80211/nl80211: add support for scheduled scans

Implement new functionality for scheduled scan offload.  With this feature we
can scan automatically at certain intervals.

The idea is that the hardware can perform scan automatically and filter on
desired results without waking up the host unnecessarily.

Add NL80211_CMD_START_SCHED_SCAN and NL80211_CMD_STOP_SCHED_SCAN
commands to the nl80211 interface.  When results are available they are
reported by NL80211_CMD_SCHED_SCAN_RESULTS events.  The userspace is
informed when the scheduled scan has stopped with a
NL80211_CMD_SCHED_SCAN_STOPPED event, which can be triggered either by
the driver or by a call to NL80211_CMD_STOP_SCHED_SCAN.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolibertas: Add libertas_disablemesh module parameter to disable mesh interface
Sascha Silbe [Wed, 11 May 2011 12:52:34 +0000 (14:52 +0200)]
libertas: Add libertas_disablemesh module parameter to disable mesh interface

This allows individual users and deployments to disable mesh support at
runtime, i.e. without having to build and maintain a custom kernel.

Based on a patch by Paul Fox <pgf@laptop.org>.
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: cleanup ioctl.h
Bing Zhao [Wed, 11 May 2011 03:47:36 +0000 (20:47 -0700)]
mwifiex: cleanup ioctl.h

Some structures and macros in ioctl.h are redundant or no longer
used.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove redundant local structures
Amitkumar Karwar [Wed, 11 May 2011 03:47:35 +0000 (20:47 -0700)]
mwifiex: remove redundant local structures

Avoid use of local structure in the function if the structure is
already allocated by the caller and the structure pointer is passed.

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>
13 years agob43: implement timeouts workaround
Rafał Miłecki [Wed, 11 May 2011 00:10:59 +0000 (02:10 +0200)]
b43: implement timeouts workaround

Documented in: <4DCA7E40.9070709@lwfinger.net>

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: move ssb_commit_settings and export it
Rafał Miłecki [Wed, 11 May 2011 00:10:58 +0000 (02:10 +0200)]
ssb: move ssb_commit_settings and export it

Commiting settings is possible on devices without PCI core (but with CC
core). Export it for usage in drivers supporting other cores.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobcma: add missing GPIO defines, use PULL register only when available
Rafał Miłecki [Wed, 11 May 2011 00:08:09 +0000 (02:08 +0200)]
bcma: add missing GPIO defines, use PULL register only when available

Similar patch was commited to ssb.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix a regression in PS frame filter handling
Felix Fietkau [Tue, 10 May 2011 18:52:22 +0000 (20:52 +0200)]
ath9k: fix a regression in PS frame filter handling

Only leave filtering enabled for AP or VLAN interfaces, clear the
destination mask for all other interfaces.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Ben Greear <greearb@candelatech.com>
Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: move MAC PHY clock controling function
Rafał Miłecki [Tue, 10 May 2011 14:05:33 +0000 (16:05 +0200)]
b43: move MAC PHY clock controling function

This is not N-PHY specific function, we partially duplicate code.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43legacy: trivial: use TMSLOW def instead of magic value
Rafał Miłecki [Tue, 10 May 2011 13:53:16 +0000 (15:53 +0200)]
b43legacy: trivial: use TMSLOW def instead of magic value

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add a couple of trace event classes to reduce duplicated code
Luciano Coelho [Mon, 9 May 2011 11:40:06 +0000 (14:40 +0300)]
mac80211: add a couple of trace event classes to reduce duplicated code

The functions drv_add_interface() and drv_remove_interface() print out
the same values in the traces.  Combine the traces of these two
functions into one event class to remove some duplicate code.

Also add a new class for functions drv_set_frag_threshold() and
drv_set_rts_threshold().

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Fix lockup due to un-init spinlock.
Ben Greear [Fri, 6 May 2011 22:24:34 +0000 (15:24 -0700)]
ath5k: Fix lockup due to un-init spinlock.

This was introduced in 2.6.39-rc1 it seems.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Sedat Dilek <sedat.dilek@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Only process mesh PREPs with equal seq number if metric is better.
Fabrice Deyber [Fri, 6 May 2011 22:11:51 +0000 (15:11 -0700)]
mac80211: Only process mesh PREPs with equal seq number if metric is better.

This fixes routing loops in PREP propagation and is in accordance with Draft
11, Section: 11C.9.8.4.

Signed-off-by: Fabrice Deyber <fabricedeyber@agilemesh.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix beaconing for mesh interfaces
Javier Cardona [Tue, 3 May 2011 23:57:19 +0000 (16:57 -0700)]
ath9k: fix beaconing for mesh interfaces

Mesh beaconing on ath9k was broken by this commit:

commit 4801416c76a3a355076d6d371c00270dfe332e1c
Author: Ben Greear <greearb@candelatech.com>
Date:   Sat Jan 15 19:13:48 2011 +0000

This patch assigns the right opmode when the device is used in mesh
mode.

Reported-by: Fabrice Deyber fabricedeyber@agilemesh.com
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: allow setting supported rates on mesh peers
Javier Cardona [Tue, 3 May 2011 23:57:18 +0000 (16:57 -0700)]
mac80211: allow setting supported rates on mesh peers

This is necessary for userspace managed stations.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Move call to mpp_path_lookup inside RCU-read section
Javier Cardona [Tue, 3 May 2011 23:57:17 +0000 (16:57 -0700)]
mac80211: Move call to mpp_path_lookup inside RCU-read section

PROVE_RCU caught that one:

[  431.214070] ===================================================
[  431.215341] [ INFO: suspicious rcu_dereference_check() usage. ]
[  431.215674] ---------------------------------------------------
[  431.216043] net/mac80211/mesh_pathtbl.c:184 invoked
rcu_dereference_check() without protection!

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Fix locking bug on mesh path table access
Javier Cardona [Tue, 3 May 2011 23:57:16 +0000 (16:57 -0700)]
mac80211: Fix locking bug on mesh path table access

The mesh and mpp path tables are accessed from softirq and workqueue
context so non-irq locking cannot be used.  Or at least that's what
PROVE_RCU seems to tell us here:

[  431.240946] =================================
[  431.241061] [ INFO: inconsistent lock state ]
[  431.241061] 2.6.39-rc3-wl+ #354
[  431.241061] ---------------------------------
[  431.241061] inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
[  431.241061] kworker/u:1/1423 [HC0[0]:SC0[0]:HE1:SE1] takes:
[  431.241061]  (&(&newtbl->hashwlock[i])->rlock){+.?...}, at:
[<c14671bf>] mesh_path_add+0x167/0x257

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Check size of a new mesh path table for changes since allocation.
Javier Cardona [Tue, 3 May 2011 23:57:15 +0000 (16:57 -0700)]
mac80211: Check size of a new mesh path table for changes since allocation.

Not sure if I'm chasing a ghost here, seems like the
mesh_path->size_order needs to be inside an RCU-read section to prevent
that value from changing between table allocation and copying.  We have
observed crashes that might be caused by this.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Self-protected management frames are not robust
Thomas Pedersen [Tue, 3 May 2011 23:57:14 +0000 (16:57 -0700)]
mac80211: Self-protected management frames are not robust

They may contain encrypted information elements (as AMPE frames do)
but they are not encrypted.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: allow setting MFP flag for a meshif
Thomas Pedersen [Tue, 3 May 2011 23:57:13 +0000 (16:57 -0700)]
nl80211: allow setting MFP flag for a meshif

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: allow installing keys for a meshif
Thomas Pedersen [Tue, 3 May 2011 23:57:12 +0000 (16:57 -0700)]
nl80211: allow installing keys for a meshif

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: Let userspace drive the peer link management states.
Javier Cardona [Tue, 3 May 2011 23:57:11 +0000 (16:57 -0700)]
nl80211: Let userspace drive the peer link management states.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: Use capability info to detect mesh beacons.
Javier Cardona [Wed, 4 May 2011 17:24:56 +0000 (10:24 -0700)]
cfg80211: Use capability info to detect mesh beacons.

Mesh beacons no longer use all-zeroes BSSID.  Beacon frames for MBSS,
infrastructure BSS, or IBSS are differentiated by the Capability
Information field in the Beacon frame.  A mesh STA sets the ESS and IBSS
subfields to 0 in transmitted Beacon or Probe Response management
frames.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoopen80211s: Stop using zero for address 3 in mesh plink mgmt frames
Javier Cardona [Tue, 3 May 2011 23:57:10 +0000 (16:57 -0700)]
open80211s: Stop using zero for address 3 in mesh plink mgmt frames

Previous versions of 11s draft used the all zeroes address.  Current
draft uses the same address as address 2.

Also, use the ANA-approved action category code for peer establishment frames.

Note: This breaks compatibility with previous mesh protocol instances.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Drop MESH_PLINK category and use new ANA-approved MESH_ACTION
Javier Cardona [Tue, 3 May 2011 23:57:09 +0000 (16:57 -0700)]
mac80211: Drop MESH_PLINK category and use new ANA-approved MESH_ACTION

Note: This breaks compatibility with previous mesh protocol instances.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Let userspace send action frames over mesh interfaces
Javier Cardona [Tue, 3 May 2011 23:57:08 +0000 (16:57 -0700)]
mac80211: Let userspace send action frames over mesh interfaces

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211: Introduce NL80211_MESH_SETUP_USERSPACE_AMPE
Javier Cardona [Tue, 3 May 2011 23:57:07 +0000 (16:57 -0700)]
nl80211: Introduce NL80211_MESH_SETUP_USERSPACE_AMPE

Introduce a new configuration option to support AMPE from userspace.

Prior to this series we only supported authentication in userspace: an
authentication daemon would authenticate peer candidates in userspace
and hand them over to the kernel.  From that point the mesh stack would
take over and establish a peer link (Mesh Peering Management).

These patches introduce support for Authenticated Mesh Peering Exchange
in userspace.  The userspace daemon implements the AMPE protocol and on
successfull completion create mesh peers and install encryption keys.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoBluetooth: Double check sec req for pre 2.1 device
Waldemar Rymarkiewicz [Fri, 6 May 2011 07:42:31 +0000 (09:42 +0200)]
Bluetooth: Double check sec req for pre 2.1 device

In case of pre v2.1 devices authentication request will return
success immediately if the link key already exists without any
authentication process.

That means, it's not possible to re-authenticate the link if you
already have combination key and for instance want to re-authenticate
to get the high security (use 16 digit pin).

Therefore, it's necessary to check security requirements on auth
complete event to prevent not enough secure connection.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Device ids for ath3k on Pegatron Lucid tablets
Andy Ross [Mon, 9 May 2011 23:11:16 +0000 (16:11 -0700)]
Bluetooth: Device ids for ath3k on Pegatron Lucid tablets

New ath3k device IDs used on the Pegatron Lucid (ExoPC and WeTab) units.

Signed-off-by: Andy Ross <andy.ross@windriver.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agolibertas: Use netdev_<level> or dev_<level> where possible
Joe Perches [Mon, 2 May 2011 23:49:15 +0000 (16:49 -0700)]
libertas: Use netdev_<level> or dev_<level> where possible

Using the more descriptive logging styles gives a bit
more information about the device being operated on.

Makes the object trivially smaller too.

$ size drivers/net/wireless/libertas/built-in.o.*
 187730    2973   38488  229191   37f47 drivers/net/wireless/libertas/built-in.o.new
 188195    2973   38488  229656   38118 drivers/net/wireless/libertas/built-in.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolibertas: Convert lbs_pr_<level> to pr_<level>
Joe Perches [Mon, 2 May 2011 23:49:14 +0000 (16:49 -0700)]
libertas: Convert lbs_pr_<level> to pr_<level>

Use the standard pr_<level> functions eases grep a bit.

Added a few missing terminating newlines to messages.
Coalesced long formats.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: update list of devices supporting multiple 80211 cores
Rafał Miłecki [Sun, 8 May 2011 18:30:31 +0000 (20:30 +0200)]
ssb: update list of devices supporting multiple 80211 cores

Some of the BCM43xx chips contain cores that are attached to the SSB, but are
inactive as they do not connect to the external environment. These must not be
registered. Several of these types are handled in driver ssb; however, the
specific case of an inactive 802.11 cores is now treated in b43 and b43legacy.
Although the current setup works, this minor change will place all such
workarounds in ssb, and simplify the code in drivers b43 and b43legacy.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: remove unnecessary struct mwifiex_opt_sleep_confirm_buffer
Amitkumar Karwar [Tue, 10 May 2011 02:00:18 +0000 (19:00 -0700)]
mwifiex: remove unnecessary struct mwifiex_opt_sleep_confirm_buffer

The structure definition is
struct mwifiex_opt_sleep_confirm_buffer {
       u8 hdr[4];
       struct mwifiex_opt_sleep_confirm ps_cfm_sleep;
} __packed;

For sleep_confirm command we already reserve 4 bytes (using skb_reserve())
for an interface header. It will be filled later by interface specific code.
We don't need "hdr[4]" element in above structure. So we can use
"struct mwifiex_opt_sleep_confirm" directly instead of
"struct mwifiex_opt_sleep_confirm_buffer".

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobcma: add Broadcom specific AMBA bus driver
Rafał Miłecki [Mon, 9 May 2011 16:56:46 +0000 (18:56 +0200)]
bcma: add Broadcom specific AMBA bus driver

Broadcom has released cards based on a new AMBA-based bus type. From a
programming point of view, this new bus type differs from AMBA and does
not use AMBA common registers. It also differs enough from SSB. We
decided that a new bus driver is needed to keep the code clean.

In its current form, the driver detects devices present on the bus and
registers them in the system. It allows registering BCMA drivers for
specified bus devices and provides them basic operations. The bus driver
itself includes two important bus managing drivers: ChipCommon core
driver and PCI(c) core driver. They are early used to allow correct
initialization.

Currently code is limited to supporting buses on PCI(e) devices, however
the driver is designed to be used also on other hosts. The host
abstraction layer is implemented and already used for PCI(e).

Support for PCI(e) hosts is working and seems to be stable (access to
80211 core was tested successfully on a few devices). We can still
optimize it by using some fixed windows, but this can be done later
without affecting any external code. Windows are just ranges in MMIO
used for accessing cores on the bus.

Cc: Greg KH <greg@kroah.com>
Cc: Michael Büsch <mb@bu3sch.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: George Kashperko <george@znau.edu.ua>
Cc: Arend van Spriel <arend@broadcom.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andy Botting <andy@andybotting.com>
Cc: linuxdriverproject <devel@linuxdriverproject.org>
Cc: linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: don't drop frames where skb->len < 24 in ieee80211_scan_rx()
Luciano Coelho [Mon, 9 May 2011 16:15:04 +0000 (19:15 +0300)]
mac80211: don't drop frames where skb->len < 24 in ieee80211_scan_rx()

This seems to be a leftover from the old days, when we didn't support
any frames that didn't contain the full ieee802.11 header.  This is
not the case anymore.  It does not cause problems now, because they
are only dropped during scan.  But when scheduled scans get merged,
this would become a problem because we would drop all small frames
while scheduled scan is running.

To fix this, return RX_CONTINUE instead of RX_DROP_MONITOR.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Failed to set default beacon rssi in AP/IBSS mode
Rajkumar Manoharan [Mon, 9 May 2011 13:41:29 +0000 (19:11 +0530)]
ath9k: Failed to set default beacon rssi in AP/IBSS mode

This beacon rssi will be used to set noisefloor during ani reset.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix rssi update in ad-hoc mode
Rajkumar Manoharan [Mon, 9 May 2011 13:41:28 +0000 (19:11 +0530)]
ath9k: Fix rssi update in ad-hoc mode

The average beacon rssi which will be used by ani is not updated
in adhoc mode.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Change DCU backoff thresh for AR9340
Rajkumar Manoharan [Mon, 9 May 2011 13:41:27 +0000 (19:11 +0530)]
ath9k_hw: Change DCU backoff thresh for AR9340

By changing DCU backoff threshold for AR9340 to 1, helps to
reduce rx overrurns seen while running bidirectional traffic.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Corrected xpabiaslevel register settings for AR9340
Rajkumar Manoharan [Mon, 9 May 2011 13:41:26 +0000 (19:11 +0530)]
ath9k_hw: Corrected xpabiaslevel register settings for AR9340

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192cu: Fix memset/memcpy using sizeof(ptr) not sizeof(*ptr)
Joe Perches [Mon, 9 May 2011 19:51:57 +0000 (12:51 -0700)]
rtlwifi: rtl8192cu: Fix memset/memcpy using sizeof(ptr) not sizeof(*ptr)

Found via coccinelle script

@@
type T;
T* ptr;
expression E1;
@@
* memset(E1, 0, sizeof(ptr));

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: remove get_channel_noise function
Mohammed Shafi Shajakhan [Mon, 9 May 2011 04:59:01 +0000 (10:29 +0530)]
ath9k_hw: remove get_channel_noise function

currently ath9k_hw_getchan_noise is not used anywhere

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: trivial: include ssb word in ssb specific functions
Rafał Miłecki [Sun, 8 May 2011 22:21:18 +0000 (00:21 +0200)]
b43: trivial: include ssb word in ssb specific functions

This can be helpful when we decide to add support for other buses.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: fix null derefs, mem leaks and trivia
Christoph Fritz [Sun, 8 May 2011 20:50:09 +0000 (22:50 +0200)]
mwifiex: fix null derefs, mem leaks and trivia

This patch:
 - adds kfree() where necessary
 - prevents potential null dereferences
 - makes use of kfree_skb()
 - replaces -1 for failed kzallocs with -ENOMEM

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Reviewed-by: Kiran Divekar <dkiran@marvell.com>
Tested-by: Amitkumar Karwar <akarwar@marvell.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43legacy: drop ssb-duplicated workaround for dangling cores
Rafał Miłecki [Sun, 8 May 2011 18:30:33 +0000 (20:30 +0200)]
b43legacy: drop ssb-duplicated workaround for dangling cores

Remove the code to detect inactive 802.11 cores, as that function is now done
in ssb.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: drop ssb-duplicated workaround for dangling cores
Rafał Miłecki [Sun, 8 May 2011 18:30:32 +0000 (20:30 +0200)]
b43: drop ssb-duplicated workaround for dangling cores

Remove the code to detect inactive 802.11 cores, as that function is now done
in ssb.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix rmmod hang of rt2800pci
Gertjan van Wingerde [Sat, 7 May 2011 15:27:46 +0000 (17:27 +0200)]
rt2x00: Fix rmmod hang of rt2800pci

txstatus_timer should only be deleted for USB devices, as it is only
initialized for USB devices.

Reported-by: Andreas Hartmann <andihartmann@01019freenet.de>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agop54pci: fix -Wunused-but-set-variable warnings
Christian Lamparter [Sat, 7 May 2011 09:16:08 +0000 (11:16 +0200)]
p54pci: fix -Wunused-but-set-variable warnings

p54pci.c: In function ‘p54p_tx’:
p54pci.c:334:6: warning: variable ‘device_idx’ set but not used

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: fix -Wunused-but-set-variable warnings
Christian Lamparter [Sat, 7 May 2011 09:13:37 +0000 (11:13 +0200)]
carl9170: fix -Wunused-but-set-variable warnings

tx.c: In function ‘carl9170_tx_accounting_free’:
tx.c:159:28: warning: variable ‘txinfo’ set but not used
tx.c: In function ‘carl9170_tx_status_process_ampdu’:
tx.c:383:27: warning: variable ‘ar_info’ set but not used
tx.c: In function ‘__carl9170_tx_process_status’:
tx.c:626:27: warning: variable ‘arinfo’ set but not used
tx.c: In function ‘carl9170_tx_ampdu_queue’:
tx.c:1324:15: warning: variable ‘max’ set but not used

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192se: Remove need to disable ASPM
Chaoming Li [Fri, 6 May 2011 20:32:02 +0000 (15:32 -0500)]
rtlwifi: rtl8192se: Remove need to disable ASPM

When this driver was initially submitted, the system would crash unless
ASPM was disabled. This problem has been fixed.

This patch also adds a printk that outputs the name of the firmware
file that is used.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Move 2 large arrays off stack
Larry Finger [Fri, 6 May 2011 18:56:18 +0000 (13:56 -0500)]
rtlwifi: Move 2 large arrays off stack

In driver rtlwifi, efuse_read() places two relatively large arrays on the
stack - a 1D u8 array of size 128, and a 2D array of u16 with 128 * 4 elements.
With driver rtl8192de, the sizes will be 256 and 256 * 4 respectively. As that
will make the 2D array be 2048 bytes, I have changed the code to use kmalloc to
allocate the space.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: fix iwl_is_any_associated
Johannes Berg [Fri, 6 May 2011 18:11:20 +0000 (11:11 -0700)]
iwlagn: fix iwl_is_any_associated

The function iwl_is_any_associated() was intended
to check both contexts, but due to an oversight
it only checks the BSS context. This leads to a
problem with scanning since the passive dwell
time isn't restricted appropriately and a scan
that includes passive channels will never finish
if only the PAN context is associated since the
default dwell time of 120ms won't fit into the
normal 100 TU DTIM interval.

Fix the function by using for_each_context() and
also reorganise the other functions a bit to take
advantage of each other making the code easier to
read.

Cc: stable@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: process TSF out of range before RX
Rajkumar Manoharan [Fri, 6 May 2011 12:57:47 +0000 (18:27 +0530)]
ath9k: process TSF out of range before RX

Processing TSF out of range before RX helps to update beacon
timers so early in the succeeding rx process.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: avoid enabling interrupts while processing rx
Rajkumar Manoharan [Fri, 6 May 2011 12:57:46 +0000 (18:27 +0530)]
ath9k: avoid enabling interrupts while processing rx

The assumsion is that while processing ath9k tasklet,
interrupts were already disabled and it will be enabled
at the completion of ath9k tasklet. But whenever TSFOOR is raised,
the driver configures the beacon timers after having received a
beacon frame from the AP which inturn enables the interrupts.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Fix build error when CONFIG_PM is not defined
Larry Finger [Thu, 5 May 2011 23:48:47 +0000 (18:48 -0500)]
mac80211: Fix build error when CONFIG_PM is not defined

When mac80211 is built without CONFIG_PM being defined, the following errors
are output:

net/mac80211/main.c: In function ‘ieee80211_register_hw’:
net/mac80211/main.c:700: error: ‘const struct ieee80211_ops’ has no member named ‘suspend’
net/mac80211/main.c:700: error: ‘const struct ieee80211_ops’ has no member named ‘resume’
make[2]: *** [net/mac80211/main.o] Error 1
make[1]: *** [net/mac80211] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [net] Error 2

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: led stay solid on when no traffic
Wey-Yi Guy [Sat, 30 Apr 2011 15:38:16 +0000 (08:38 -0700)]
iwlagn: led stay solid on when no traffic

commit 5ed540aecc2aae92d5c97b9a9306a5bf88ad5574 change the led behavior
for iwlwifi driver; the side effect cause led blink all the time.

Modify the led blink table to fix this problem

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: Fix warnings due to -Wunused-but-set-variable
Rajkumar Manoharan [Mon, 25 Apr 2011 10:26:16 +0000 (15:56 +0530)]
wireless: Fix warnings due to -Wunused-but-set-variable

These warnings are exposed by gcc 4.6.
net/wireless/reg.c: In function 'freq_reg_info_regd':
net/wireless/reg.c:675:38: warning: variable 'pr' set but not used
[-Wunused-but-set-variable]
net/wireless/lib80211_crypt_wep.c: In function 'lib80211_wep_build_iv':
net/wireless/lib80211_crypt_wep.c:99:12: warning: variable 'len' set but
not used [-Wunused-but-set-variable]

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
John W. Linville [Tue, 10 May 2011 19:49:11 +0000 (15:49 -0400)]
Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6

13 years agoiwlagn: check DMA mapping errors
Johannes Berg [Thu, 28 Apr 2011 14:27:10 +0000 (07:27 -0700)]
iwlagn: check DMA mapping errors

DMA mappings can fail, but the current code
doesn't check for that. Add checking, which
requires some restructuring for proper error
paths.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove bytecount indirection
Johannes Berg [Thu, 28 Apr 2011 14:27:09 +0000 (07:27 -0700)]
iwlagn: remove bytecount indirection

All AGN devices need the bytecount table, so
remove the indirection and make the functions
static again.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: dont update bytecount table for command queue
Johannes Berg [Thu, 28 Apr 2011 14:27:08 +0000 (07:27 -0700)]
iwlagn: dont update bytecount table for command queue

The device doesn't use the bytecount table for the
command queue, only for aggregation queues to make
aggregation decisions. So don't update it for the
command queue (and we even updated it with wrong
values).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove unused variable
Johannes Berg [Thu, 28 Apr 2011 14:27:07 +0000 (07:27 -0700)]
iwlagn: remove unused variable

The variable 'len' here is set but never used.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove frame pre-allocation
Johannes Berg [Fri, 29 Apr 2011 16:48:14 +0000 (09:48 -0700)]
iwlagn: remove frame pre-allocation

The frame pre-allocation is quite a bit of complex
code, all to avoid a single allocation. Remove it
and consolidate the beacon sending code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove get_hcmd_size indirection
Johannes Berg [Thu, 28 Apr 2011 14:27:05 +0000 (07:27 -0700)]
iwlagn: remove get_hcmd_size indirection

There's no need for this, all commands are the right size.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: support the svtool messages interactions through nl80211 test mode
Cindy H. Kao [Fri, 6 May 2011 17:40:15 +0000 (10:40 -0700)]
iwlwifi: support the svtool messages interactions through nl80211 test mode

This patch adds the feature to support the test mode operation through
the generic netlink channel NL80211_CMD_TESTMODE between intel
wireless device iwlwifi and the user space application svtool.

The main purpose is to create a transportation layer between the iwlwifi
device and the user space application so that the interaction between the
user space application svtool and the iwlwifi device in the kernel space is
in a way of generic netlink messaging.

The detail specific functions are:

1. The function iwl_testmode_cmd() is added to digest the svtool test command
   from the user space application. The svtool test commands are categorized  to
   three types : commands to be processed by the device ucode, commands to access
   the registers, and commands to be processed at the driver level(such as reload
   the ucode). iwl_testmode_cmd() dispatches the commands the corresponding handlers
   and reply to user space regarding the command execution status. Extra data is
   returned to the user space application if there's any.

2. The function iwl_testmode_ucode_rx_pkt() is added to multicast all the spontaneous
   messages from the iwlwifi device to the user space. Regardless the message types,
   whenever there is a valid spontaneous message received by the iwlwifi ISR,
   iwl_testmode_ucode_rx_pkt() is invoked to multicast the message content to user
   space. The message content is not attacked and the message parsing is left to
   the user space application.

Implementation guidelines:

1. The generic netlink messaging for iwliwif test mode is through  NL80211_CMD_TESTMODE
   channel, therefore, the codes need to follow the regulations set by cfg80211.ko
   to get the actual device instance ieee80211_ops via cfg80211.ko, so that the iwlwifi
   device is indicated with ieee80211_ops and can be actually accessed.

   Therefore, a callback iwl_testmode_cmd() is added to the structure
   iwlagn_hw_ops in iwl-agn.c.

2. It intends to utilize those low level device access APIs from iwlwifi device driver
   (ie. iwlagn.ko) rather than creating it's own set of device access functions.
   For example, iwl_send_cmd(), iwl_read32(), iwl_write8(), and iwl_write32() are reused.

3. The main functions are maintained in new files instead of spreading all over the
   existing iwlwifi driver files.

   The new files added are :

   drivers/net/wireless/iwlwifi/iwl-sv-open.c
        - to handle the user space test mode application command
          and reply the respective command status to the user space application.
        - to multicast the spontaneous messages from device to user space.

   drivers/net/wireless/iwlwifi/iwl-testmode.h
        - the commonly referenced definitions for the TLVs used in
          the generic netlink messages

Signed-off-by: Cindy H. Kao <cindy.h.kao@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agomwl8k: Do not ask mac80211 to generate IV for crypto keys
Yogesh Ashok Powar [Thu, 5 May 2011 11:00:48 +0000 (16:30 +0530)]
mwl8k: Do not ask mac80211 to generate IV for crypto keys

Since firmware is capable of generating IV's for all crypto
suits (TKIP, CCMP and WEP), do not ask mac80211 to generate
IV when HW crypto is being used. Instead only reserve
appropriate space in tx skb's in the driver, so that the
firmware can write IV's values.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43legacy: drop invalid IMCFGLO workaround
Rafał Miłecki [Thu, 5 May 2011 10:46:04 +0000 (12:46 +0200)]
b43legacy: drop invalid IMCFGLO workaround

We were performing it on wrong core, it was outdated and is already
implemented in ssb.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: drop invalid IMCFGLO workaround
Rafał Miłecki [Thu, 5 May 2011 10:45:52 +0000 (12:45 +0200)]
b43: drop invalid IMCFGLO workaround

We were performing it on wrong core, it was outdated and is already
implemented in ssb.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix power for the HT40 duplicate frames
Luis R. Rodriguez [Wed, 4 May 2011 21:01:26 +0000 (14:01 -0700)]
ath9k_hw: fix power for the HT40 duplicate frames

With AR9003 at about ~ 10 feet from an AP that uses RTS / CTS you
will be able to associate but not not get data through given that
the power for the rates used was set too low. This increases the
power and permits data connectivity at longer distances from
access points when connected with HT40. Without this you will not
get any data through when associated to APs configured in HT40
at about more than 10 feet away.

Cc: stable@kernel.org
Cc: Fiona Cain <fcain@atheros.com>
Cc: Zhen Xie <Zhen.Xie@Atheros.com>
Cc: Kathy Giori <kathy.giori@atheros.com>
Cc: Neha Choksi <neha.choksi@atheros.com>
Cc: Wayne Daniel <wayne.daniel@atheros.com>
Cc: Gaurav Jauhar <gaurav.jauhar@atheros.com>
Cc: Samira Naraghi <samira.naraghi@atheros.com>
CC: Ashok Chennupati <ashok.chennupati@atheros.com>
Cc: Lance Zimmerman <lance.zimmerman@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>