pandora-kernel.git
13 years agoiwlagn: remove Gen2 from Kconfig
Wey-Yi Guy [Tue, 11 Jan 2011 23:59:49 +0000 (15:59 -0800)]
iwlagn: remove Gen2 from Kconfig

Remove Gen 2 from Kconfig file since 6005/6030/6150 series of
products are released.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: add 2000 series to Kconfig
Wey-Yi Guy [Tue, 11 Jan 2011 23:54:19 +0000 (15:54 -0800)]
iwlagn: add 2000 series to Kconfig

Add 2000 series support to Kconfig

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: add 2000 series pci id
Wey-Yi Guy [Sat, 8 Jan 2011 19:47:56 +0000 (11:47 -0800)]
iwlagn: add 2000 series pci id

Add PCI ID supports for all 2000 series devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years ago iwlagn: 2000 series devices support
Wey-Yi Guy [Fri, 21 Jan 2011 23:47:21 +0000 (15:47 -0800)]
 iwlagn: 2000 series devices support

Adding 2000 series devices supports, the 2000 series devices has
many different SKUs which includes 1x1 and 2x2 devices,also with
and without BT combo.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: add 2000 series EEPROM version
Wey-Yi Guy [Sat, 8 Jan 2011 19:47:54 +0000 (11:47 -0800)]
iwlagn: add 2000 series EEPROM version

Adding EEPROM version for 2000 series devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove reference to gen2a and gen2b
Wey-Yi Guy [Sat, 8 Jan 2011 18:25:14 +0000 (10:25 -0800)]
iwlagn: remove reference to gen2a and gen2b

Since 6005, 6030 and 6150 series are offical released, remove the reference
to gen2x and use the product number instead.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: use mac80211 throughput trigger
Wey-Yi Guy [Fri, 21 Jan 2011 23:26:39 +0000 (15:26 -0800)]
iwlwifi: use mac80211 throughput trigger

Instead of keeping track of LED blink speed
in the driver, use the new mac80211 trigger
and link it up with an LED classdev that we
now register. This also allows users more
flexibility in how they want to have the LED
blink or not.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoath9k_hw: replace magic values in register writes with proper defines
Felix Fietkau [Fri, 21 Jan 2011 17:46:35 +0000 (18:46 +0100)]
ath9k_hw: replace magic values in register writes with proper defines

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Simplify loop when setting up channels
Bruno Randolf [Fri, 21 Jan 2011 03:19:52 +0000 (12:19 +0900)]
ath5k: Simplify loop when setting up channels

Simplify confusing code and get rid of an unnecessary variable.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove a bogus error message
Felix Fietkau [Thu, 20 Jan 2011 20:57:30 +0000 (21:57 +0100)]
ath9k: remove a bogus error message

When beacons are being added or removed for an interface, ieee80211_beacon_get
will sometimes not return a beacon. This is normal and should not result in
useless logspam.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Remove redundant sc->curband
Bruno Randolf [Wed, 19 Jan 2011 09:21:13 +0000 (18:21 +0900)]
ath5k: Remove redundant sc->curband

Remove sc->curband because the band is already stored in the current channel.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Remove unused sc->curmode
Bruno Randolf [Wed, 19 Jan 2011 09:21:08 +0000 (18:21 +0900)]
ath5k: Remove unused sc->curmode

sc->curmode is set but never used. Remove it and the helper function. Also the
ath5k_rate_update which is refered to in the comment does not exist (any more?)
so we don't need to setup the band in that place.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5: Remove unused CTL definitions
Bruno Randolf [Wed, 19 Jan 2011 09:21:02 +0000 (18:21 +0900)]
ath5: Remove unused CTL definitions

They are unused in ath5k and a more detailled definition is in
ath/regd_common.h.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Add 802.11j 4.9GHz channels to allowed channels
Bruno Randolf [Wed, 19 Jan 2011 09:20:57 +0000 (18:20 +0900)]
ath5k: Add 802.11j 4.9GHz channels to allowed channels

Add the 802.11j (20MHz channel width) channels to the allowed channels. This
still does not enable 802.11j in ath5k since these frequencies are out of the
configured range. A later patch will deal with that.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Rename ath5k_copy_channels
Bruno Randolf [Wed, 19 Jan 2011 09:20:47 +0000 (18:20 +0900)]
ath5k: Rename ath5k_copy_channels

Rename ath5k_copy_channels() to ath5k_setup_channels() - nothing is copied
here.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Use mac80211 channel mapping function
Bruno Randolf [Wed, 19 Jan 2011 09:20:36 +0000 (18:20 +0900)]
ath5k: Use mac80211 channel mapping function

Use mac80211 channel mapping function instead of own homegrown version.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Try more than one queue when scheduling new aggregate.
Ben Greear [Wed, 19 Jan 2011 01:30:00 +0000 (17:30 -0800)]
ath9k: Try more than one queue when scheduling new aggregate.

Try all xmit queues until the hardware buffers are full.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Add 'misc' file to debugfs, fix queue indexes.
Ben Greear [Mon, 17 Jan 2011 19:54:50 +0000 (11:54 -0800)]
ath9k: Add 'misc' file to debugfs, fix queue indexes.

Add a misc file to show hardware op-mode, irq setup,
number of various types of VIFs and more.

Also, previous patches were using the wrong xmit queue
indexes.  Change to use the internal ath9k indexes instead
of the mac80211 queue indexes.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: Extend channel to frequency mapping for 802.11j
Bruno Randolf [Mon, 17 Jan 2011 04:37:28 +0000 (13:37 +0900)]
cfg80211: Extend channel to frequency mapping for 802.11j

Extend channel to frequency mapping for 802.11j Japan 4.9GHz band, according to
IEEE802.11 section 17.3.8.3.2 and Annex J. Because there are now overlapping
channel numbers in the 2GHz and 5GHz band we can't map from channel to
frequency without knowing the band. This is no problem as in most contexts we
know the band. In places where we don't know the band (and WEXT compatibility)
we assume the 2GHz band for channels below 14.

This patch does not implement all channel to frequency mappings defined in
802.11, it's just an extension for 802.11j 20MHz channels. 5MHz and 10MHz
channels as well as 802.11y channels have been omitted.

The following drivers have been updated to reflect the API changes:
iwl-3945, iwl-agn, iwmc3200wifi, libertas, mwl8k, rt2x00, wl1251, wl12xx.
The drivers have been compile-tested only.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: Brian Prodoehl <bprodoehl@gmail.com>
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Restart xmit logic in xmit watchdog.
Ben Greear [Mon, 10 Jan 2011 07:11:52 +0000 (23:11 -0800)]
ath9k: Restart xmit logic in xmit watchdog.

The system can get into a state where the xmit queue
is stopped, but there are no packets pending, so
the queue will not be restarted.

Add logic to the xmit watchdog to attempt to restart
the xmit logic if this situation is detected.

Example 'dmesg' output:

ath: txq: f4e723e0 axq_qnum: 2, mac80211_qnum: 2 axq_link: f4e996c8 pending frames: 1 axq_acq empty: 1 stopped: 0 axq_depth: 0  Attempting to restart tx logic.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: More xmit queue debugfs information.
Ben Greear [Mon, 10 Jan 2011 07:11:50 +0000 (23:11 -0800)]
ath9k: More xmit queue debugfs information.

To try to figure out why xmit logic hangs.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Keep track of stations for debugfs.
Ben Greear [Mon, 10 Jan 2011 07:11:49 +0000 (23:11 -0800)]
ath9k: Keep track of stations for debugfs.

The stations hold the ath_node, which holds the tid
and other xmit logic structures.  In order to debug
stuck xmit logic, we need a way to print out the tid
state for the stations.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Add counters to distinquish AMPDU enqueues.
Ben Greear [Mon, 10 Jan 2011 07:11:48 +0000 (23:11 -0800)]
ath9k: Add counters to distinquish AMPDU enqueues.

Show counters for pkts sent directly to hardware and
those queued in software.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Ensure xmit makes progress.
Ben Greear [Mon, 10 Jan 2011 07:11:47 +0000 (23:11 -0800)]
ath9k: Ensure xmit makes progress.

If the txq->axq_q is empty, the code was breaking out
of the tx_processq logic without checking to see if it should
transmit other queued AMPDU frames (txq->axq_acq).

This patches ensures ath_txq_schedule is called.

This needs review.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Remove un-used member from ath_node.
Ben Greear [Mon, 10 Jan 2011 07:11:46 +0000 (23:11 -0800)]
ath9k: Remove un-used member from ath_node.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Add more information to debugfs xmit file.
Ben Greear [Mon, 10 Jan 2011 07:11:45 +0000 (23:11 -0800)]
ath9k: Add more information to debugfs xmit file.

Should help debug strange tx lockup type issues.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Initialize ah->hw
Ben Greear [Mon, 10 Jan 2011 07:11:44 +0000 (23:11 -0800)]
ath9k: Initialize ah->hw

Previous code left it NULL.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Show some live tx-queue values in debugfs.
Ben Greear [Mon, 10 Jan 2011 07:11:43 +0000 (23:11 -0800)]
ath9k: Show some live tx-queue values in debugfs.

I thought this might help track down stuck queues, etc.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Fix skb-copy failure debug message.
Ben Greear [Sat, 8 Jan 2011 18:30:54 +0000 (10:30 -0800)]
mac80211: Fix skb-copy failure debug message.

This particular error isn't about multicast.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: fix 4965 notification wait setup
Johannes Berg [Wed, 5 Jan 2011 00:22:03 +0000 (16:22 -0800)]
iwlwifi: fix 4965 notification wait setup

The notification wait support code is shared
between 4965 and other AGN devices, so 4965
also has to initialize the data structures
for it, otherwise it crashes.

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 agoiwlagn: return error if PAN disable timeout
Johannes Berg [Wed, 5 Jan 2011 00:22:02 +0000 (16:22 -0800)]
iwlagn: return error if PAN disable timeout

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 agoiwlagn: properly wait for PAN disable
Johannes Berg [Wed, 5 Jan 2011 00:22:01 +0000 (16:22 -0800)]
iwlagn: properly wait for PAN disable

Previously I hacked this with an msleep(300)
which was fine since we never had longer PAN
time slots, but now that we will have them I
need to fix that. Use the new notification
wait support to properly wait for the WIPAN
deactivation complete signal from the ucode.

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 agoiwlagn: add support for waiting for notifications
Johannes Berg [Wed, 5 Jan 2011 00:22:00 +0000 (16:22 -0800)]
iwlagn: add support for waiting for notifications

In order to implement waiting for notifications,
add a structure that captures the information,
and a list of such structures that will be
traversed when a command is received from the
ucode.

Use sparse checking to make sure calls to the
prepare/wait/cancel functions are always nested
correctly.

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 agoiwlagn: make iwl_rx_handle static
Johannes Berg [Wed, 5 Jan 2011 00:21:59 +0000 (16:21 -0800)]
iwlagn: make iwl_rx_handle static

It's not used or likely to be needed from other
files, so it can be static.

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 agortlwifi: Fix possible NULL dereference
Jesper Juhl [Fri, 21 Jan 2011 19:40:54 +0000 (13:40 -0600)]
rtlwifi: Fix possible NULL dereference

In drivers/net/wireless/rtlwifi/pci.c::_rtl_pci_rx_interrupt() we call
dev_alloc_skb(), which may fail and return NULL, but we do not check the
returned value against NULL before dereferencing the returned pointer.
This may lead to a NULL pointer dereference which means we'll crash - not
good.

In a separate call to dev_alloc_skb(), the debug level is changed so that
the failure message will always be logged.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: add missing ps wakeup/restore calls
Felix Fietkau [Fri, 21 Jan 2011 17:52:38 +0000 (18:52 +0100)]
ath9k: add missing ps wakeup/restore calls

There are several places where ath_reset() was called without proper
calls to ath9k_ps_wakeup/ath9k_ps_restore. To fix this, add those calls
directly to ath_reset and drop them from callers where it makes sense.

Also add them to the config callback around ath_update_txpow to fix a
crash that happens when the tx power changed before any vif is brought up.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: disabled PAPRD for AR9003
Luis R. Rodriguez [Fri, 21 Jan 2011 01:47:39 +0000 (17:47 -0800)]
ath9k_hw: disabled PAPRD for AR9003

AR9003's PAPRD was enabled prematurely, and is causing some
large discrepancies on throughput and network connectivity.
For example downlink (RX) throughput against an AR9280 AP
can vary widlely from 43-73 Mbit/s while disabling this
gets AR9382 (2x2) up to around 93 Mbit/s in a 2.4 GHz HT20 setup.

Cc: stable@kernel.org
Cc: Paul Shaw <paul.shaw@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: don't read sku information from EEPROM for 4965
Wey-Yi Guy [Thu, 20 Jan 2011 16:08:04 +0000 (08:08 -0800)]
iwlwifi: don't read sku information from EEPROM for 4965

For all the new devices, the sku information should read from EEPROM
but for legacy devices such as 4965, appearly the EEPROM does not
contain the necessary information. so skip the read from EEPROM
and go back to use software configuration.

Reported-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Tested-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoBluetooth: Fix race condition with conn->sec_level
Johan Hedberg [Wed, 19 Jan 2011 06:36:52 +0000 (12:06 +0530)]
Bluetooth: Fix race condition with conn->sec_level

The conn->sec_level value is supposed to represent the current level of
security that the connection has. However, by assigning to it before
requesting authentication it will have the wrong value during the
authentication procedure. To fix this a pending_sec_level variable is
added which is used to track the desired security level while making
sure that sec_level always represents the current level of security.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix authentication request for L2CAP raw sockets
Johan Hedberg [Wed, 19 Jan 2011 06:36:51 +0000 (12:06 +0530)]
Bluetooth: Fix authentication request for L2CAP raw sockets

When there is an existing connection l2cap_check_security needs to be
called to ensure that the security level of the new socket is fulfilled.
Normally l2cap_do_start takes care of this, but that function doesn't
get called for SOCK_RAW type sockets. This patch adds the necessary
l2cap_check_security call to the appropriate branch in l2cap_do_connect.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Create a unified auth_type evaluation function
Johan Hedberg [Wed, 19 Jan 2011 06:36:50 +0000 (12:06 +0530)]
Bluetooth: Create a unified auth_type evaluation function

The logic for determining the needed auth_type for an L2CAP socket is
rather complicated and has so far been duplicated in
l2cap_check_security as well as l2cap_do_connect. Additionally the
l2cap_check_security code was completely missing the handling of
SOCK_RAW type sockets. This patch creates a unified function for the
evaluation and makes l2cap_do_connect and l2cap_check_security use that
function.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix MITM protection requirement preservation
Johan Hedberg [Wed, 19 Jan 2011 06:36:49 +0000 (12:06 +0530)]
Bluetooth: Fix MITM protection requirement preservation

If an existing connection has a MITM protection requirement (the first
bit of the auth_type) then that requirement should not be cleared by new
sockets that reuse the ACL but don't have that requirement.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoRevert "Bluetooth: Update sec_level/auth_type for already existing connections"
Johan Hedberg [Wed, 19 Jan 2011 06:36:48 +0000 (12:06 +0530)]
Revert "Bluetooth: Update sec_level/auth_type for already existing connections"

This reverts commit 045309820afe047920a50de25634dab46a1e851d. That
commit is wrong for two reasons:

- The conn->sec_level shouldn't be updated without performing
authentication first (as it's supposed to represent the level of
security that the existing connection has)

- A higher auth_type value doesn't mean "more secure" like the commit
seems to assume. E.g. dedicated bonding with MITM protection is 0x03
whereas general bonding without MITM protection is 0x04. hci_conn_auth
already takes care of updating conn->auth_type so hci_connect doesn't
need to do it.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Never deallocate a session when some DLC points to it
Lukáš Turek [Wed, 5 Jan 2011 01:43:59 +0000 (02:43 +0100)]
Bluetooth: Never deallocate a session when some DLC points to it

Fix a bug introduced in commit 9cf5b0ea3a7f1432c61029f7aaf4b8b338628884:
function rfcomm_recv_ua calls rfcomm_session_put without checking that
the session is not referenced by some DLC. If the session is freed, that
DLC would refer to deallocated memory, causing an oops later, as shown
in this bug report: https://bugzilla.kernel.org/show_bug.cgi?id=15994

Signed-off-by: Lukas Turek <8an@praha12.net>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix leaking blacklist when unregistering a hci device
Johan Hedberg [Tue, 4 Jan 2011 10:08:50 +0000 (12:08 +0200)]
Bluetooth: Fix leaking blacklist when unregistering a hci device

The blacklist should be freed before the hci device gets unregistered.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: l2cap: fix misuse of logical operation in place of bitop
David Sterba [Fri, 14 Jan 2011 13:59:44 +0000 (14:59 +0100)]
Bluetooth: l2cap: fix misuse of logical operation in place of bitop

CC: Marcel Holtmann <marcel@holtmann.org>
CC: "Gustavo F. Padovan" <padovan@profusion.mobi>
CC: João Paulo Rechi Vita <jprvita@profusion.mobi>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: ath3k: reduce memory usage
Alexander Holler [Mon, 22 Nov 2010 20:09:01 +0000 (21:09 +0100)]
Bluetooth: ath3k: reduce memory usage

There is no need to hold the firmware in memory.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agomac80211: drop non-auth 3-addr data frames when running as a 4-addr station
Felix Fietkau [Tue, 18 Jan 2011 14:48:48 +0000 (15:48 +0100)]
mac80211: drop non-auth 3-addr data frames when running as a 4-addr station

When running as a 4-addr station against an AP that has the 4-addr VLAN
interface and the main 3-addr AP interface bridged together, sometimes
frames originating from the station were looping back from the 3-addr AP
interface, causing the bridge code to emit warnings about receiving frames
with its own source address.
I'm not sure why this is happening yet, but I think it's a good idea to
drop all frames (except 802.1x/EAP frames) that do not match the configured
addressing mode, including 4-address frames sent to a 3-address station.
User test reports indicate that the problem goes away with this patch.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: allow advertising correct maximum aggregate size
Johannes Berg [Tue, 18 Jan 2011 12:52:23 +0000 (13:52 +0100)]
mac80211: allow advertising correct maximum aggregate size

Currently, mac80211 always advertises that it may send
up to 64 subframes in an aggregate. This is fine, since
it's the max, but might as well be set to zero instead
since it doesn't have any information.

However, drivers might have that information, so allow
them to set a variable giving it, which will then be
used. The default of zero will be fine since to the
peer that means we don't know and it will just use its
own limit for the buffer size.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: track receiver's aggregation reorder buffer size
Johannes Berg [Tue, 18 Jan 2011 12:51:05 +0000 (13:51 +0100)]
mac80211: track receiver's aggregation reorder buffer size

The aggregation code currently doesn't implement the
buffer size negotiation. It will always request a max
buffer size (which is fine, if a little pointless, as
the mac80211 code doesn't know and might just use 0
instead), but if the peer requests a smaller size it
isn't possible to honour this request.

In order to fix this, look at the buffer size in the
addBA response frame, keep track of it and pass it to
the driver in the ampdu_action callback when called
with the IEEE80211_AMPDU_TX_OPERATIONAL action. That
way the driver can limit the number of subframes in
aggregates appropriately.

Note that this doesn't fix any drivers apart from the
addition of the new argument -- they all need to be
updated separately to use this variable!

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: don't return beacons when mesh is disabled
Johannes Berg [Tue, 18 Jan 2011 12:45:32 +0000 (13:45 +0100)]
mac80211: don't return beacons when mesh is disabled

When mesh is disabled, mac80211 was returning
beacons with an empty mesh ID. That isn't
desirable, even if drivers shouldn't be trying
to get beacons to start with.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix up hardware mode and beacons with multiple vifs.
Ben Greear [Sat, 15 Jan 2011 19:13:48 +0000 (19:13 +0000)]
ath9k: Fix up hardware mode and beacons with multiple vifs.

When using a mixture of AP and Station interfaces,
the hardware mode was using the type of the
last VIF registered.  Instead, we should keep track
of the number of different types of vifs and set the
mode accordingly.

In addtion, use the vif type instead of hardware opmode
when dealing with beacons.

Attempt to move some of the common setup code into smaller
methods so we can re-use it when changing vif mode as
well as adding/deleting vifs.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix excessive BAR sending when a frame exceeds its retry limit
Felix Fietkau [Sat, 15 Jan 2011 13:30:15 +0000 (14:30 +0100)]
ath9k: fix excessive BAR sending when a frame exceeds its retry limit

Because the sendbar variable was not reset to zero, the stack would send
Block ACK requests for all subframes following the one that failed, which
could mess up the receiver side block ack window.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: try more than one tid when scheduling a new aggregate
Felix Fietkau [Sat, 15 Jan 2011 13:30:14 +0000 (14:30 +0100)]
ath9k: try more than one tid when scheduling a new aggregate

Sometimes the first TID in the first AC's list is not available for forming
a new aggregate (the BAW might not allow it), however other TIDs may have
data available for sending.
Prevent a slowdown of other TIDs by going through multiple entries until
we've either hit the last one or enough AMPDUs are pending in the hardware
queue.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix carrier leakage calibration for AR9271
Rajkumar Manoharan [Fri, 14 Jan 2011 20:12:01 +0000 (01:42 +0530)]
ath9k_hw: fix carrier leakage calibration for AR9271

AR9285 carrier leakage calibration related workaround on high
temperature is not applicable for AR9271.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: keep calibrated noise floor value for oper channel
Rajkumar Manoharan [Fri, 14 Jan 2011 20:03:28 +0000 (01:33 +0530)]
ath9k_htc: keep calibrated noise floor value for oper channel

The ath9k_hw assumes that caldata is valid only for
oper channel. But with ath9k_htc case, the caldata is
passed for all channels on hw_reset though we are not doing
calibration on that channel. So the oper channel's nf history
got cleared to default due to mismatch in channel flags.
This patch also saves some space.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: preserve caldata history buffer across scanning
Rajkumar Manoharan [Fri, 14 Jan 2011 19:31:22 +0000 (01:01 +0530)]
ath9k: preserve caldata history buffer across scanning

caldata's channel info is never filled with operating channel
info which is causing the operating channel's noise floor
history buffer is reset to default nf during channel change.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Show max retry-counts in kernel messages.
Ben Greear [Fri, 14 Jan 2011 17:32:18 +0000 (09:32 -0800)]
mac80211: Show max retry-counts in kernel messages.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: mesh only parameter mppath maybe unused
Wey-Yi Guy [Fri, 14 Jan 2011 16:07:56 +0000 (08:07 -0800)]
mac80211: mesh only parameter mppath maybe unused

mppath is mesh related parameter and maybe unused

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: partially revert "fix dma descriptor rx error bit parsing"
Felix Fietkau [Thu, 13 Jan 2011 23:06:27 +0000 (00:06 +0100)]
ath9k_hw: partially revert "fix dma descriptor rx error bit parsing"

The rx error bit parsing was changed to consider PHY errors and various
decryption errors separately. While correct according to the documentation,
this is causing spurious decryption error reports in some situations.

Fix this by restoring the original order of the checks in those places,
where the errors are meant to be mutually exclusive.

If a CRC error is reported, then MIC failure and decryption errors
are irrelevant, and a PHY error is unlikely.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add hw configuration for max ampdu buffer size
Luciano Coelho [Wed, 12 Jan 2011 13:26:30 +0000 (15:26 +0200)]
mac80211: add hw configuration for max ampdu buffer size

Some devices don't support the maximum AMDPU buffer size of 64, so we
need to add an option to configure this in the hardware configuration.
This value will be used in the ADDBA response instead of the value
suggested in the request, if the latter is greater than the max
supported.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Tested-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211:mesh_mpp_table_grow call should depend on MESH_WORK_GROW_MPP_TABLE flag.
Nick Ledovskikh [Tue, 11 Jan 2011 14:35:12 +0000 (14:35 +0000)]
mac80211:mesh_mpp_table_grow call should depend on MESH_WORK_GROW_MPP_TABLE flag.

Replace MESH_WORK_GROW_MPATH_TABLE by MESH_WORK_GROW_MPP_TABLE in
mesh_mpp_table_grow call condition.

(Clearly the original was a typo... -- JWL)

Signed-off-by: Nickolay Ledovskikh <nledovskikh@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Fix return codes for eeprom read functions.
Wojciech Dubowik [Tue, 11 Jan 2011 08:00:31 +0000 (09:00 +0100)]
ath5k: Fix return codes for eeprom read functions.

Eeprom read functions are of bool type and not int.

Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: reduce the likelihood of baseband hang check false positives
Felix Fietkau [Tue, 11 Jan 2011 00:05:50 +0000 (17:05 -0700)]
ath9k: reduce the likelihood of baseband hang check false positives

Since baseband hangs are rare, but the hang check function has a high
false positive rate in some situations, we need to add more reliable
indicators.

In AP mode we can use blocked beacon transmissions as an indicator,
they should be rare enough.

In station mode, we can skip the hang check entirely, since a true
hang will trigger beacon loss detection, and mac80211 will rescan,
which leads to a hw reset that will bring the hardware back to life.

To make this more reliable, we need to skip fast channel changes
if the hardware appears to be stuck.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: reinitialize block ack window data when starting aggregation
Felix Fietkau [Tue, 11 Jan 2011 00:05:49 +0000 (17:05 -0700)]
ath9k: reinitialize block ack window data when starting aggregation

There might be some old stale data left, which could confuse tracking
of pending tx frames.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix initial sequence number after starting an ampdu session
Felix Fietkau [Tue, 11 Jan 2011 00:05:48 +0000 (17:05 -0700)]
ath9k: fix initial sequence number after starting an ampdu session

txtid->seq_start may not always be up to date, when there is HT non-AMPDU
traffic just before starting an AMPDU session. Relying on txtid->seq_next
is better, since it is also used to generate the sequence numbers for
all QoS data frames.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix bogus sequence number increases on aggregation tid flush
Felix Fietkau [Tue, 11 Jan 2011 00:05:47 +0000 (17:05 -0700)]
ath9k: fix bogus sequence number increases on aggregation tid flush

When a tid pointer is passed to ath_tx_send_normal(), it increases the
starting sequence number for the next AMPDU action frame, which should
only be done if the sequence number assignment is fresh. In this case
it is clearly not.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix and fine-tune rf registers for RT3070/RT3071/RT3090
RA-Jay Hung [Mon, 10 Jan 2011 10:28:10 +0000 (11:28 +0100)]
rt2x00: Fix and fine-tune rf registers for RT3070/RT3071/RT3090

Basically fix and fine-tune RT3070/RT3071/RT3090 chip RF initial value
when call rt2800_init_rfcsr

Signed-off-by: RA-Jay Hung <jay_hung@ralinktech.com>
Acked-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 agort2x00: Fix radio off hang issue for PCIE interface
RA-Jay Hung [Mon, 10 Jan 2011 10:27:43 +0000 (11:27 +0100)]
rt2x00: Fix radio off hang issue for PCIE interface

PCI/PCIE radio off behavior is different from SOC/USB.
They mainly use MCU command to disable DMA, TX/RX and enter power saving mode.

Signed-off-by: RA-Jay Hung <jay_hung@ralinktech.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Rewrote code for checking if destinations are proxied.
Joel A Fernandes [Mon, 10 Jan 2011 06:44:23 +0000 (00:44 -0600)]
mac80211: Rewrote code for checking if destinations are proxied.

Rewrote code for checking if the destination is proxied by a mesh portal, to facilitate better
understanding of the functionality.

Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com>
Acked-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Offload USB eeprom reading to target
Sujith Manoharan [Tue, 4 Jan 2011 07:47:28 +0000 (13:17 +0530)]
ath9k_hw: Offload USB eeprom reading to target

For USB devices, reading the EEPROM data can be offloaded
to the target. Use multiple register reads to take advantage
of this feature to reduce initialization time.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add multiple register read API
Sujith Manoharan [Tue, 4 Jan 2011 07:47:18 +0000 (13:17 +0530)]
ath9k_htc: Add multiple register read API

This would decrease latency in reading bulk registers.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: Enable HW encryption for AP mode
Nishant Sarmukadam [Thu, 30 Dec 2010 19:23:34 +0000 (11:23 -0800)]
mwl8k: Enable HW encryption for AP mode

set_key callback is defined for mac80211 to install keys for HW crypto in AP
mode. Driver currently falls back to SW crypto in STA mode.  Add support to
configure the keys appropriately in the hardware after the set_key routine is
called.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Pradeep Nemavat <pnemavat@marvell.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: Set mac80211 rx status flags appropriately when hw crypto is enabled
Nishant Sarmukadam [Thu, 30 Dec 2010 19:23:33 +0000 (11:23 -0800)]
mwl8k: Set mac80211 rx status flags appropriately when hw crypto is enabled

When hw crypto is enabled, set rx status flags appropriately depending on
whether hw crypto is enabled for a particular bss.
Also report MIC errors to mac80211, so that counter measures can be
initiated

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: yogesh powar <yogeshp@marvell.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: Add encapsulation of data packet for crypto
Nishant Sarmukadam [Thu, 30 Dec 2010 19:23:32 +0000 (11:23 -0800)]
mwl8k: Add encapsulation of data packet for crypto

Different tail pads will be needed for crypto depending on the crypto
mode. Add support to encapsulate the packets with appropriate pad
value.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Pradeep Nemavat <pnemavat@marvell.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: Modify add_dma_header to include pad parameters
Nishant Sarmukadam [Thu, 30 Dec 2010 19:23:31 +0000 (11:23 -0800)]
mwl8k: Modify add_dma_header to include pad parameters

Add capability to add_dma_header to support padding at tail of the data
packet to be transmitted when crypto is enabled. Padding is required for
adding crypto information in data packets for supporting 802.11 security
modes.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Pradeep Nemavat <pnemavat@marvell.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoLinux 2.6.38-rc1 v2.6.38-rc1
Linus Torvalds [Tue, 18 Jan 2011 23:14:02 +0000 (15:14 -0800)]
Linux 2.6.38-rc1

13 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Tue, 18 Jan 2011 22:30:00 +0000 (14:30 -0800)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
  hwmon: (lm93) Add support for LM94

13 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 18 Jan 2011 22:29:37 +0000 (14:29 -0800)]
Merge branch 'perf-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf: Validate cpu early in perf_event_alloc()
  perf: Find_get_context: fix the per-cpu-counter check
  perf: Fix contexted inheritance

13 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 18 Jan 2011 22:29:21 +0000 (14:29 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Clear irqstack thread_info
  x86: Make relocatable kernel work with new binutils

13 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Tue, 18 Jan 2011 22:28:48 +0000 (14:28 -0800)]
Merge branch 'upstream' of git://git.linux-mips.org/upstream-linus

* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (26 commits)
  MIPS: Malta: enable Cirrus FB console
  MIPS: add CONFIG_VIRTUALIZATION for virtio support
  MIPS: Implement __read_mostly
  MIPS: ath79: add common WMAC device for AR913X based boards
  MIPS: ath79: Add initial support for the Atheros AP81 reference board
  MIPS: ath79: add common SPI controller device
  SPI: Add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs
  MIPS: ath79: add common GPIO buttons device
  MIPS: ath79: add common watchdog device
  MIPS: ath79: add common GPIO LEDs device
  MIPS: ath79: add initial support for the Atheros PB44 reference board
  MIPS: ath79: utilize the MIPS multi-machine support
  MIPS: ath79: add GPIOLIB support
  MIPS: Add initial support for the Atheros AR71XX/AR724X/AR931X SoCs
  MIPS: jump label: Add MIPS support.
  MIPS: Use WARN() in uasm for better diagnostics.
  MIPS: Optimize TLB handlers for Octeon CPUs
  MIPS: Add LDX and LWX instructions to uasm.
  MIPS: Use BBIT instructions in TLB handlers
  MIPS: Declare uasm bbit0 and bbit1 functions.
  ...

13 years agohwmon: (lm93) Add support for LM94
Guenter Roeck [Mon, 17 Jan 2011 20:48:20 +0000 (12:48 -0800)]
hwmon: (lm93) Add support for LM94

This patch adds basic support for LM94 to the LM93 driver. LM94 specific
sensors and features are not supported.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
13 years agoiwlwifi: fix valid chain reading from EEPROM
Wey-Yi Guy [Tue, 18 Jan 2011 15:59:13 +0000 (07:59 -0800)]
iwlwifi: fix valid chain reading from EEPROM

When read valid tx/rx chains from EEPROM, there is a bug to use the
tx chain value for both tx and rx, the result of this cause low
receive throughput on 1x2 devices becuase rx will only utilize single
chain instead of two chains

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: fix locking in tx_complete_poll_work
Bob Copeland [Tue, 18 Jan 2011 13:06:43 +0000 (08:06 -0500)]
ath5k: fix locking in tx_complete_poll_work

ath5k_reset must be called with sc->lock.  Since the tx queue
watchdog runs in a workqueue and accesses sc, it's appropriate
to just take the lock over the whole function.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoperf: Validate cpu early in perf_event_alloc()
Oleg Nesterov [Tue, 18 Jan 2011 16:10:32 +0000 (17:10 +0100)]
perf: Validate cpu early in perf_event_alloc()

Starting from perf_event_alloc()->perf_init_event(), the kernel
assumes that event->cpu is either -1 or the valid CPU number.

Change perf_event_alloc() to validate this argument early. This
also means we can remove the similar check in
find_get_context().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: gregkh@suse.de
Cc: stable@kernel.org
LKML-Reference: <20110118161032.GC693@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoperf: Find_get_context: fix the per-cpu-counter check
Oleg Nesterov [Tue, 18 Jan 2011 16:10:08 +0000 (17:10 +0100)]
perf: Find_get_context: fix the per-cpu-counter check

If task == NULL, find_get_context() should always check that cpu
is correct.

Afaics, the bug was introduced by 38a81da2 "perf events: Clean
up pid passing", but even before that commit "&& cpu != -1" was
not exactly right, -ESRCH from find_task_by_vpid() is not
accurate.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: gregkh@suse.de
Cc: stable@kernel.org
LKML-Reference: <20110118161008.GB693@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoMIPS: Malta: enable Cirrus FB console
Aurelien Jarno [Tue, 18 Jan 2011 11:20:45 +0000 (12:20 +0100)]
MIPS: Malta: enable Cirrus FB console

While most users of a physical Malta board are using the serial port
as the console, a lot of QEMU users would prefer to interact with a
graphical console. Enable the Cirrus FB support in the Malta default
configuration to make that possible. Note that the default console will
still be the serial port, users have to pass "console=tty0" to the
kernel to use the Cirrus FB.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2001/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: add CONFIG_VIRTUALIZATION for virtio support
Aurelien Jarno [Tue, 18 Jan 2011 11:20:44 +0000 (12:20 +0100)]
MIPS: add CONFIG_VIRTUALIZATION for virtio support

Add CONFIG_VIRTUALIZATION to the MIPS architecture and include the
the virtio code there. Used to enable the virtio drivers under QEMU.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2002/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Implement __read_mostly
David Daney [Thu, 14 Oct 2010 19:36:49 +0000 (12:36 -0700)]
MIPS: Implement __read_mostly

Just do what everyone else is doing by placing __read_mostly things in
the .data.read_mostly section.

mips_io_port_base can not be read-only (const) and writable
(__read_mostly) at the same time.  One of them has to go, so I chose
to eliminate the __read_mostly.  It will still get stuck in a portion
of memory that is not adjacent to things that are written, and thus
not be on a dirty cache line, for whatever that is worth.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1702/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: ath79: add common WMAC device for AR913X based boards
Gabor Juhos [Tue, 4 Jan 2011 20:28:29 +0000 (21:28 +0100)]
MIPS: ath79: add common WMAC device for AR913X based boards

Add common platform_device and helper code to make the registration
of the built-in wireless MAC easier on the Atheros AR9130/AR9132
based boards. Also register the WMAC device on the AR81 board.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Imre Kaloz <kaloz@openwrt.org>,
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1962/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: ath79: Add initial support for the Atheros AP81 reference board
Gabor Juhos [Tue, 4 Jan 2011 20:28:28 +0000 (21:28 +0100)]
MIPS: ath79: Add initial support for the Atheros AP81 reference board

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1952/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: ath79: add common SPI controller device
Gabor Juhos [Tue, 4 Jan 2011 20:28:23 +0000 (21:28 +0100)]
MIPS: ath79: add common SPI controller device

Several boards are using the built-in SPI controller of the
AR71XX/AR724X/AR913X SoCs. This patch adds common platform_device
and helper code to register it. Additionally, the patch registers
the SPI bus on the PB44 board.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1956/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoSPI: Add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs
Gabor Juhos [Tue, 4 Jan 2011 20:28:22 +0000 (21:28 +0100)]
SPI: Add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This
patch implements a driver for that.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: spi-devel-general@lists.sourceforge.net
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-mips@linux-mips.org
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1960/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: ath79: add common GPIO buttons device
Gabor Juhos [Tue, 4 Jan 2011 20:28:21 +0000 (21:28 +0100)]
MIPS: ath79: add common GPIO buttons device

Almost all boards have one or more push buttons connected to GPIO lines.
This patch adds common code to register a platform_device for them.

The patch also adds support for the buttons on the PB44 board.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1954/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: ath79: add common watchdog device
Gabor Juhos [Tue, 4 Jan 2011 20:28:20 +0000 (21:28 +0100)]
MIPS: ath79: add common watchdog device

All supported SoCs have a built-in hardware watchdog driver. This patch
registers a platform_device for that to make it usable.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1955/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: ath79: add common GPIO LEDs device
Gabor Juhos [Tue, 4 Jan 2011 20:28:18 +0000 (21:28 +0100)]
MIPS: ath79: add common GPIO LEDs device

Almost all boards have one or more LEDs connected to GPIO lines. This
patch adds common code to register a platform_device for them.

The patch also adds support for the LEDs on the PB44 board.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1953/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: ath79: add initial support for the Atheros PB44 reference board
Gabor Juhos [Tue, 4 Jan 2011 20:28:17 +0000 (21:28 +0100)]
MIPS: ath79: add initial support for the Atheros PB44 reference board

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1950/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: ath79: utilize the MIPS multi-machine support
Gabor Juhos [Tue, 4 Jan 2011 20:28:16 +0000 (21:28 +0100)]
MIPS: ath79: utilize the MIPS multi-machine support

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1949/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: ath79: add GPIOLIB support
Gabor Juhos [Tue, 4 Jan 2011 20:28:15 +0000 (21:28 +0100)]
MIPS: ath79: add GPIOLIB support

This patch implements generic GPIO routines for the built-in
GPIO controllers of the Atheros AR71XX/AR724X/AR913X SoCs.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: linux-mips@linux-mips.org
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1948/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
13 years agoMIPS: Add initial support for the Atheros AR71XX/AR724X/AR931X SoCs
Gabor Juhos [Tue, 4 Jan 2011 20:28:14 +0000 (21:28 +0100)]
MIPS: Add initial support for the Atheros AR71XX/AR724X/AR931X SoCs

This patch adds initial support for various Atheros SoCs based on the
MIPS 24Kc core. The following models are supported at the moment:

  - AR7130
  - AR7141
  - AR7161
  - AR9130
  - AR9132
  - AR7240
  - AR7241
  - AR7242

The current patch contains minimal support only, but the resulting
kernel can boot into user-space with using of an initramfs image on
various boards which are using these SoCs. Support for more built-in
devices and individual boards will be implemented in further patches.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Cc: Kathy Giori <Kathy.Giori@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1947/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>