ath9k_hw: define registers/macros to support Antenna diversity
define few registers and macros to configure/enable Antenna diversity
parameters in AR9485
Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com> Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com> Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
read antenna diversity and combining information from the EEPROM.
Enable antenna diversity/combining feature only when both LNA
diversity and fast diversity are supported
Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com> Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com> Tested-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k_hw: make antenna diversity modules chip specific
this is necessary to support Antenna diversity and combining in new chip
sets such as AR9485, previously Antenna diversity support is available
only in AR9285
Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com> Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com> Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Julia Lawall [Fri, 13 May 2011 13:52:10 +0000 (15:52 +0200)]
net/rfkill/core.c: Avoid leaving freed data in a list
The list_for_each_entry loop can fail, in which case the list element is
not removed from the list rfkill_fds. Since this list is not accessed by
the loop, the addition of &data->list into the list is just moved after the
loop.
The sematic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression E,E1,E2;
identifier l;
@@
*list_add(&E->l,E1);
... when != E1
when != list_del(&E->l)
when != list_del_init(&E->l)
when != E = E2
*kfree(E);// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 13 May 2011 12:15:49 +0000 (14:15 +0200)]
mac80211: sparse RCU annotations
This adds sparse RCU annotations to most of
mac80211, only the mesh code remains to be
done.
Due the the previous patches, the annotations
are pretty simple. The only thing that this
actually changes is removing the RCU usage of
key->sta in debugfs since this pointer isn't
actually an RCU-managed pointer (it only has
a single assignment done before the key even
goes live). As that is otherwise harmless, I
decided to make it part of this patch.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 13 May 2011 11:35:40 +0000 (13:35 +0200)]
mac80211: fix TX a-MPDU locking
During my quest to make mac80211 not have any RCU
warnings from sparse, I came across the a-MPDU code
again and it wasn't quite clear why it isn't racy.
So instead of assigning the tid_tx array with just
the spinlock held in ieee80211_start_tx_ba_session
use a separate temporary array protected only by
the spinlock and protect all assignments to the
"live" array by both the spinlock and the mutex so
that other code is easily verified to be correct.
Due to pointer assignment atomicity I don't think
this is a real issue, but I'm not sure, especially
on Alpha the current code might be problematic.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 13 May 2011 08:58:57 +0000 (10:58 +0200)]
cfg80211: advertise possible interface combinations
Add the ability to advertise interface combinations in nl80211.
This allows the driver to indicate what the combinations are
that it supports. "Combinations" of just a single interface are
implicit, as previously. Note that cfg80211 will enforce that
the restrictions are met, but not for all drivers yet (once all
drivers are updated, we can remove the flag and enforce for all).
When no combinations are actually supported, an empty list will
be exported so that userspace can know if the kernel exported
this info or not (although it isn't clear to me what tools using
the info should do if the kernel didn't export it).
Since some interface types are purely virtual/software and don't
fit the restrictions, those are exposed in a new list of pure SW
types, not subject to restrictions. This mainly exists to handle
AP-VLAN and monitor interfaces in mac80211.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following
warning:
In file included from arch/x86/include/asm/uaccess.h:573,
from include/net/checksum.h:25,
from include/linux/skbuff.h:28,
from drivers/net/wireless/iwlwifi/iwl-agn-rs.c:28:
In function 'copy_from_user',
inlined from 'rs_sta_dbgfs_scale_table_write' at
drivers/net/wireless/iwlwifi/iwl-agn-rs.c:3099:
arch/x86/include/asm/uaccess_64.h:65:
warning: call to 'copy_from_user_overflow' declared with
attribute warning: copy_from_user() buffer size is not provably
correct
presumably due to buf_size being signed causing GCC to fail to
see that buf_size can't become negative.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following
warning:
In file included from arch/x86/include/asm/uaccess.h:573,
from include/net/checksum.h:25,
from include/linux/skbuff.h:28,
from drivers/net/wireless/iwlegacy/iwl-4965-rs.c:28:
In function 'copy_from_user',
inlined from 'iwl4965_rs_sta_dbgfs_scale_table_write' at
drivers/net/wireless/iwlegacy/iwl-4965-rs.c:2616:
arch/x86/include/asm/uaccess_64.h:65:
warning: call to 'copy_from_user_overflow' declared with
attribute warning: copy_from_user() buffer size is not provably
correct
presumably due to buf_size being signed causing GCC to fail to
see that buf_size can't become negative.
Cc: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Fri, 13 May 2011 13:23:47 +0000 (09:23 -0400)]
ssb: fix pcicore build breakage
drivers/ssb/main.c:1336: error: 'SSB_PCICORE_BCAST_ADDR' undeclared (first use in this function)
drivers/ssb/main.c:1337: error: 'SSB_PCICORE_BCAST_DATA' undeclared (first use in this function)
drivers/ssb/main.c:1349: error: 'struct ssb_pcicore' has no member named 'dev'
Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eliad Peller [Fri, 13 May 2011 08:57:12 +0000 (11:57 +0300)]
wl12xx_sdio: declare support for NL80211_WOW_TRIGGER_ANYTHING trigger
Since wowlan requires the ability to stay awake while the host
is suspended, declare support for NL80211_WOW_TRIGGER_ANYTHING
if the MMC_PM_KEEP_POWER capability is being supported.
Eliad Peller [Fri, 13 May 2011 08:57:11 +0000 (11:57 +0300)]
wl12xx: prevent scheduling while suspending (WoW enabled)
When WoW is enabled, the interface will stay up and the chip will
be powered on, so we have to flush/cancel any remaining work, and
prevent the irq handler from scheduling a new work until the system
is resumed.
Add 2 new flags:
* WL1271_FLAG_SUSPENDED - the system is (about to be) suspended.
* WL1271_FLAG_PENDING_WORK - there is a pending irq work which
should be scheduled when the system is being resumed.
In order to wake-up the system while getting an irq, we initialize
the device as wakeup device, and calling pm_wakeup_event() upon
getting the interrupt (while the system is about to be suspended)
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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:
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>