pandora-kernel.git
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 13 Jul 2011 20:51:32 +0000 (13:51 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
  slip: fix wrong SLIP6 ifdef-endif placing
  natsemi: fix another dma-debug report
  sctp: ABORT if receive, reassmbly, or reodering queue is not empty while closing socket
  net: Fix default in docs for tcp_orphan_retries.
  hso: fix a use after free condition
  net/natsemi: Fix module parameter permissions
  XFRM: Fix memory leak in xfrm_state_update
  sctp: Enforce retransmission limit during shutdown
  mac80211: fix TKIP replay vulnerability
  mac80211: fix ie memory allocation for scheduled scans
  ssb: fix init regression of hostmode PCI core
  rtlwifi: rtl8192cu: Add new USB ID for Netgear WNA1000M
  ath9k: Fix tx throughput drops for AR9003 chips with AES encryption
  carl9170: add NEC WL300NU-AG usbid
  cfg80211: fix deadlock with rfkill/sched_scan by adding new mutex
  ath5k: fix incorrect use of drvdata in PCI suspend/resume code
  ath5k: fix incorrect use of drvdata in sysfs code
  Bluetooth: Fix memory leak under page timeouts
  Bluetooth: Fix regression with incoming L2CAP connections
  Bluetooth: Fix hidp disconnect deadlocks and lost wakeup
  ...

12 years agommc: core: Bus width testing needs to handle suspend/resume
Philip Rakity [Thu, 7 Jul 2011 16:04:55 +0000 (09:04 -0700)]
mmc: core: Bus width testing needs to handle suspend/resume

On reading the ext_csd for the first time (in 1 bit mode), save the
ext_csd information needed for bus width compare.

On every pass we make re-reading the ext_csd, compare the data
against the saved ext_csd data.

This fixes a regression introduced in 3.0-rc1 by 08ee80cc397ac1a3
("mmc: core: eMMC bus width may not work on all platforms"), which
incorrectly assumed we would be re-reading the ext_csd at resume-
time.

Signed-off-by: Philip Rakity <prakity@marvell.com>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agomac80211: allow driver to disconnect after resume
Johannes Berg [Tue, 12 Jul 2011 10:30:59 +0000 (12:30 +0200)]
mac80211: allow driver to disconnect after resume

In WoWLAN, devices may use crypto keys for TX/RX
and could also implement GTK rekeying. If the
driver isn't able to retrieve replay counters and
similar information from the device upon resume,
or if the device isn't responsive due to platform
issues, it isn't safe to keep the connection up
as GTK rekey messages from during the sleep time
could be replayed against it.

The only protection against that is disconnecting
from the AP. Modifying mac80211 to do that while
it is resuming would be very complex and invasive
in the case that the driver requires a reconfig,
so do it after it has resumed completely. In that
case, however, packets might be replayed since it
can then only happen after TX/RX are up again, so
mark keys for interfaces that need to disconnect
as "tainted" and drop all packets that are sent
or received with those keys.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove a redundant check
Mohammed Shafi Shajakhan [Tue, 12 Jul 2011 09:49:04 +0000 (15:19 +0530)]
mac80211: remove a redundant check

is_valid_ether_addr itself checks for is_zero_ether_addr

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: add cfg80211 handler for set_bitrate_mask
Yogesh Ashok Powar [Tue, 12 Jul 2011 03:04:44 +0000 (20:04 -0700)]
mwifiex: add cfg80211 handler for set_bitrate_mask

Currently, setting only legacy bitrates on 2.4GHz band
are supported. Mode 802.11b/g/bg is enabled based on
bitrates selection. If only CCK bitrates selected then
802.11b mode is enabled. If only OFDM bitrates are
selected then 802.11g mode is enabled. For both: CCK
and OFDM rates 802.11bg mixed mode is enabled.

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>
12 years agoath5k: do not call ieee80211_stop_queue for queues not managed by mac80211
Felix Fietkau [Tue, 12 Jul 2011 01:02:05 +0000 (09:02 +0800)]
ath5k: do not call ieee80211_stop_queue for queues not managed by mac80211

Instead of using ieee80211_stop_queue, check the configured tx queue
limit before calling ieee80211_get_buffered_bc.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: disable 32KHz sleep clock operation by default
Felix Fietkau [Tue, 12 Jul 2011 01:02:04 +0000 (09:02 +0800)]
ath5k: disable 32KHz sleep clock operation by default

While 32 KHz sleep clock might provide some power saving benefits,
it is also a major source of stability issues, on OpenWrt it produced
some reproducible data bus errors on register accesses on several
different MIPS platforms.

All the Atheros drivers that I can find do not enable this feature,
so it makes sense to leave it disabled in ath5k as well.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: fix reference clock usec duration setting restore
Felix Fietkau [Tue, 12 Jul 2011 01:02:03 +0000 (09:02 +0800)]
ath5k: fix reference clock usec duration setting restore

enabling the sleep clock alters the AR5K_USEC_32 field, but disabling
it didn't restore it.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: delay full calibration after reset
Felix Fietkau [Tue, 12 Jul 2011 01:02:02 +0000 (09:02 +0800)]
ath5k: delay full calibration after reset

During scans the full calibration usually does not make much sense,
PAPD probing and IQ calibration should be deferred until there is
enough time to complete them. Adding 100 ms to the initial full
calibration delay should be enough to do this.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: initialize common->clockrate
Felix Fietkau [Tue, 12 Jul 2011 01:02:01 +0000 (09:02 +0800)]
ath5k: initialize common->clockrate

Fixes a division by zero when setting distance before activating the
device for the first time.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: fix reference clock frequency for spur mitigation on AR2413
Felix Fietkau [Tue, 12 Jul 2011 01:02:00 +0000 (09:02 +0800)]
ath5k: fix reference clock frequency for spur mitigation on AR2413

AR2413 uses the same reference clock as AR5413

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: apply the synth voltage tweak only on AR5112 rev 2
Felix Fietkau [Tue, 12 Jul 2011 01:01:59 +0000 (09:01 +0800)]
ath5k: apply the synth voltage tweak only on AR5112 rev 2

Might fix some stability issues on newer chips

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: add missing checks for rfgain probe
Felix Fietkau [Tue, 12 Jul 2011 01:01:58 +0000 (09:01 +0800)]
ath5k: add missing checks for rfgain probe

rfgain probe is only necessary for OFDM operation on AR5111 and AR5112.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Fix incorrect key_miss handling
Senthil Balasubramanian [Mon, 11 Jul 2011 18:32:56 +0000 (00:02 +0530)]
ath9k_hw: Fix incorrect key_miss handling

Decryping frames on key_miss handling shouldn't be done for Michael
MIC failed frames as h/w would have already decrypted such frames
successfully anyway.

Also leaving CRC and PHY error(where the frame is going to be dropped
anyway), we are left to prcoess Decrypt error for which s/w decrypt is
selected anway and so having key_miss as a separate check doesn't serve
anything. So making key_miss handling mutually exlusive with other RX
status handling makes much more sense.

This patch addresses an issue with STA not reporting MIC failure events
resulting in STA being disconnected immediately.

Cc: stable@kernel.org
Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: Add missing comma between constant string array
Joe Perches [Sat, 9 Jul 2011 06:20:25 +0000 (23:20 -0700)]
iwlagn: Add missing comma between constant string array

Multiple quoted strings are concatenated without comma separators.

Make the array const while there.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: Add missing comma between constant string array
Joe Perches [Sat, 9 Jul 2011 06:20:24 +0000 (23:20 -0700)]
iwlegacy: Add missing comma between constant string array

Multiple quoted strings are concatenated without comma separators.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agosfc: Remove 'Solarstorm' from Kconfig descriptions
Ben Hutchings [Wed, 13 Jul 2011 15:10:02 +0000 (16:10 +0100)]
sfc: Remove 'Solarstorm' from Kconfig descriptions

The 'Solarstorm' brand is being retired and it's redundant with the
company name.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
12 years agoslip: remove dead code within the slip initialization
Matvejchikov Ilya [Tue, 12 Jul 2011 21:47:38 +0000 (21:47 +0000)]
slip: remove dead code within the slip initialization

This following code contains a dead "if (dev).." block:
        ...
        for (i = 0; i < slip_maxdev; i++) {
                dev = slip_devs[i];
                if (dev == NULL)
                        break;
        }
        /* Sorry, too many, all slots in use */
        if (i >= slip_maxdev)
                return NULL;

        if (dev) {
                sl = netdev_priv(dev);
                if (test_bit(SLF_INUSE, &sl->flags)) {
                        unregister_netdevice(dev);
                        dev = NULL;
                        slip_devs[i] = NULL;
                }
         }
        ...
The reason is that the code starting with "if (dev).." is never called as
when we found an empty slot (dev == NULL) we break the loop and "if (dev).."
not works eiter the loop ends and we get out with "i >= slip_maxdev".

Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoslip: remove redundant check slip_devs for NULL
Matvejchikov Ilya [Tue, 12 Jul 2011 21:46:57 +0000 (21:46 +0000)]
slip: remove redundant check slip_devs for NULL

As slip_devs is initialized on module load stage there is no reason to
check it for NULL anywhere instead of the deinitialization routine because
if we can't get enough memory on startup we don't run at all.

Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoslip: fix MTU comparation operation when reallocating buffers
Matvejchikov Ilya [Tue, 12 Jul 2011 21:46:17 +0000 (21:46 +0000)]
slip: fix MTU comparation operation when reallocating buffers

In sl_realloc_bufs() there is no reason to check if the requested MTU greater
than or equal to the current MTU value as this function called only
when requested
MTU not equals to the current value. So, the ">=" operation can be
safely replaced
with the ">".

Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoslip: remove redundant NULL-pointer check before calling slhc_free
Matvejchikov Ilya [Tue, 12 Jul 2011 21:45:37 +0000 (21:45 +0000)]
slip: remove redundant NULL-pointer check before calling slhc_free

Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Kill support for multiple hh_cache entries per neighbour
David S. Miller [Wed, 13 Jul 2011 07:51:10 +0000 (00:51 -0700)]
net: Kill support for multiple hh_cache entries per neighbour

This never, ever, happens.

Neighbour entries are always tied to one address family, and therefore
one set of dst_ops, and therefore one dst_ops->protocol "hh_type"
value.

This capability was blindly imported by Alexey Kuznetsov when he wrote
the neighbour layer.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Push protocol type directly down to header_ops->cache()
David S. Miller [Wed, 13 Jul 2011 06:28:12 +0000 (23:28 -0700)]
net: Push protocol type directly down to header_ops->cache()

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Inline neigh binding.
David Miller [Mon, 11 Jul 2011 22:44:24 +0000 (22:44 +0000)]
ipv4: Inline neigh binding.

Get rid of all of the useless and costly indirection
by doing the neigh hash table lookup directly inside
of the neighbour binding.

Rename from arp_bind_neighbour to rt_bind_neighbour.

Use new helpers {__,}ipv4_neigh_lookup()

In rt_bind_neighbour() get rid of useless tests which
are never true in the context this function is called,
namely dev is never NULL and the dst->neighbour is
always NULL.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodrm/radeon/kms/evergreen: emit SQ_LDS_RESOURCE_MGMT for blits
Alex Deucher [Tue, 12 Jul 2011 15:53:23 +0000 (11:53 -0400)]
drm/radeon/kms/evergreen: emit SQ_LDS_RESOURCE_MGMT for blits

Compute drivers may change this, so make sure to emit it to
avoid errors in bo blits.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=39119

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoagp/intel: Fix typo in G4x_GMCH_SIZE_VT_2M
Chris Wilson [Tue, 12 Jul 2011 22:38:18 +0000 (23:38 +0100)]
agp/intel: Fix typo in G4x_GMCH_SIZE_VT_2M

Konstantin Belousov found an error in the define of G4x_GMCH_SIZE_VT_2M
relative to the GMCH specs, and confirmed that indeed one of his users
with a Q45 reports 0xb not 0xc for a 2/2MiB GATT.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Konstantin Belousov <kostikbel@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agonet: Add documentation for netdev features handling
Michał Mirosław [Wed, 13 Jul 2011 05:27:00 +0000 (22:27 -0700)]
net: Add documentation for netdev features handling

v2: incorporated suggestions from Randy Dunlap

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: move to new vlan model
Ajit Khaparde [Wed, 13 Jul 2011 05:10:01 +0000 (22:10 -0700)]
be2net: move to new vlan model

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: account for skb allocation failures
Eric Dumazet [Wed, 13 Jul 2011 05:09:18 +0000 (22:09 -0700)]
be2net: account for skb allocation failures

If we cannot allocate new skbs in RX completion handler, we should
increase netdevice rx_dropped counter, not spam console messages.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoe1000e: use GFP_KERNEL allocations at init time
Jeff Kirsher [Tue, 12 Jul 2011 16:10:12 +0000 (16:10 +0000)]
e1000e: use GFP_KERNEL allocations at init time

In process and sleep allowed context, favor GFP_KERNEL allocations over
GFP_ATOMIC ones.

-v2: fixed checkpatch.pl warnings

CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Ben Greear <greearb@candelatech.com>
CC: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoe1000e: Add Jumbo Frame support to 82583 devices
Carolyn Wyborny [Tue, 12 Jul 2011 16:10:11 +0000 (16:10 +0000)]
e1000e: Add Jumbo Frame support to 82583 devices

This patch adds support for the Jumbo Frames feature on 82583 devices.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Tue, 12 Jul 2011 21:21:19 +0000 (14:21 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/mm: Fix memory_block_size_bytes() for non-pseries
  mm: Move definition of MIN_MEMORY_BLOCK_SIZE to a header

12 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc
Linus Torvalds [Tue, 12 Jul 2011 21:19:51 +0000 (14:19 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/arm/linux-arm-soc

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc:
  pcmcia: pxa2xx/vpac270: free gpios on exist rather than requesting
  ARM: pxa/raumfeld: fix device name for codec ak4104
  ARM: pxa/raumfeld: display initialisation fixes
  ARM: pxa/raumfeld: adapt to upcoming hardware change
  ARM: pxa: fix gpio_to_chip() clash with gpiolib namespace
  genirq: replace irq_gc_ack() with {set,clr}_bit variants (fwd)
  arm: mach-vt8500: add forgotten irq_data conversion
  ARM: pxa168: correct nand pmu setting
  ARM: pxa910: correct nand pmu setting
  ARM: pxa: fix PGSR register address calculation

12 years agoMerge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keith...
Linus Torvalds [Tue, 12 Jul 2011 21:18:00 +0000 (14:18 -0700)]
Merge branch 'drm-intel-fixes' of git://git./linux/kernel/git/keithp/linux-2.6

* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6:
  drm/i915/ringbuffer: Idling requires waiting for the ring to be empty
  Revert "drm/i915: enable rc6 by default"
  drm/i915: Clean up i915_driver_load failure path
  drm/i915: Enable GPU reset on Ivybridge.
  drm/i915/dp: manage sink power state if possible
  drm/i915/dp: consolidate AUX retry code
  drm/i915/dp: remove DPMS mode tracking from DP
  drm/i915/dp: try to read receiver capabilities 3 times when detecting
  drm/i915/dp: read more receiver capability bits on hotplug
  drm/i915/dp: use DP DPCD defines when looking at DPCD values
  drm/i915/dp: retry link status read 3 times on failure

12 years agonetdevice: Kill 'feature' test macros.
David S. Miller [Tue, 12 Jul 2011 17:37:21 +0000 (10:37 -0700)]
netdevice: Kill 'feature' test macros.

Almost all of these have long outstayed their welcome.

And for every one of these macros, there are 10 features for which we
didn't add macros.

Let's just delete them all, and get out of habit of doing things this
way.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
12 years agoSUNRPC: Fix use of static variable in rpcb_getport_async
Ben Greear [Tue, 12 Jul 2011 17:27:55 +0000 (10:27 -0700)]
SUNRPC: Fix use of static variable in rpcb_getport_async

Because struct rpcbind_args *map was declared static, if two
threads entered this method at the same time, the values
assigned to map could be sent two two differen tasks.
This could cause all sorts of problems, include use-after-free
and double-free of memory.

Fix this by removing the static declaration so that the map
pointer is on the stack.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Cc: stable@kernel.org
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agodrm/i915/ringbuffer: Idling requires waiting for the ring to be empty
Chris Wilson [Tue, 12 Jul 2011 17:03:29 +0000 (18:03 +0100)]
drm/i915/ringbuffer: Idling requires waiting for the ring to be empty

...which is measured by the size and not the amount of space remaining.

Waiting upon size-8, did one of two things. In the common case with more
than 8 bytes available to write into the ring, it would return
immediately. Otherwise, it would timeout given the impossible condition
of waiting for more space than is available in the ring, leading to
warnings such as:

[drm:intel_cleanup_ring_buffer] *ERROR* failed to quiesce render ring
whilst cleaning up: -16

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoRevert "drm/i915: enable rc6 by default"
Keith Packard [Tue, 12 Jul 2011 15:49:31 +0000 (08:49 -0700)]
Revert "drm/i915: enable rc6 by default"

This reverts commit a51f7a66fb5e4af5ec4286baef940d06594b59d2.

We still have a few Ironlake and Sandybridge machines which fail when
RC6 is enabled. Better luck next release?

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agodrm/i915: Clean up i915_driver_load failure path
Keith Packard [Sun, 10 Jul 2011 20:12:17 +0000 (13:12 -0700)]
drm/i915: Clean up i915_driver_load failure path

i915_driver_load adds a write-combining MTRR region for the GTT
aperture to improve memory speeds through the aperture. If
i915_driver_load fails after this, it would not have cleaned up the
MTRR. This shouldn't cause any problems, except for consuming an MTRR
register. Still, it's best to clean up completely in the failure path,
which is easily done by calling mtrr_del if the mtrr was successfully
allocated.

i915_driver_load calls i915_gem_load which register
i915_gem_inactive_shrink. If i915_driver_load fails after calling
i915_gem_load, the shrinker will be left registered. When called, it
will access freed memory and crash. The fix is to unregister the shrinker in the
failure path using code duplicated from i915_driver_unload.

i915_driver_load also has some incorrect gotos in the error cleanup
paths:

 * After failing to initialize the GTT (which cannot happen, btw,
   intel_gtt_get returns a fixed (non-NULL) value), it tries to
   free the uninitialized WC IO mapping. Fixed this by changing the
   target from out_iomapfree to out_rmmap

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Lin Ming <ming.m.lin@intel.com>
12 years agolanai: use pci_dev->subsystem_device
Sergei Shtylyov [Tue, 12 Jul 2011 14:59:38 +0000 (07:59 -0700)]
lanai: use pci_dev->subsystem_device

The driver reads PCI subsystem IDs from the PCI configuration registers while
it is already stored by the PCI subsystem in the 'subsystem_device' field of
'struct pci_dev'...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agokbuild: Do not write to builddir in modules_install
Michal Marek [Tue, 12 Jul 2011 09:54:48 +0000 (11:54 +0200)]
kbuild: Do not write to builddir in modules_install

Let depmod.sh create a temporary directory in /tmp instead of writing to
the build directory as root. The mktemp utility should be available on
any recent system (and there is already scripts/gen_initramfs_list.sh
relying on it).

Reported-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
12 years agodrm/radeon/kms: fix typo in read_disabled vbios code
Alex Deucher [Mon, 11 Jul 2011 20:22:33 +0000 (20:22 +0000)]
drm/radeon/kms: fix typo in read_disabled vbios code

BUS_CNTL reg and bits moved between pre-PCIE and PCIE asics.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/kms: use correct BUS_CNTL reg on rs600
Alex Deucher [Mon, 11 Jul 2011 20:27:23 +0000 (20:27 +0000)]
drm/radeon/kms: use correct BUS_CNTL reg on rs600

BUS_CNTL is at 0x30 on rs600, not 0x4c.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/kms: fix backend map typo on juniper
Alex Deucher [Mon, 11 Jul 2011 19:45:32 +0000 (19:45 +0000)]
drm/radeon/kms: fix backend map typo on juniper

Don't enable backends that don't exist.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/kms: fix regression in hotplug
Alex Deucher [Mon, 11 Jul 2011 14:49:28 +0000 (14:49 +0000)]
drm/radeon/kms: fix regression in hotplug

Skip connectors that do not have an HPD pin.

Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=39027

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Tested-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrivers/net: static should be at beginning of declaration
Jesper Juhl [Tue, 12 Jul 2011 05:15:02 +0000 (22:15 -0700)]
drivers/net: static should be at beginning of declaration

Make sure that the 'static' keywork is at the beginning of declaration
for drivers/net/usb/kalmia.c

This gets rid of warnings like
  warning: ‘static’ is not at beginning of declaration
when building with -Wold-style-declaration (and/or -Wextra which also
enables it).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoslip: fix wrong SLIP6 ifdef-endif placing
Matvejchikov Ilya [Sun, 10 Jul 2011 08:49:26 +0000 (08:49 +0000)]
slip: fix wrong SLIP6 ifdef-endif placing

SLIP6 have nothing to do with CSLIP so placing a block of
SLIP6-related code within a CSLIP ifdef-endif block is incorrect.

Signed-off-by: Ilya Matvejchikov <matvejchikov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoinetpeer: kill inet_putpeer race
Eric Dumazet [Mon, 11 Jul 2011 02:49:52 +0000 (02:49 +0000)]
inetpeer: kill inet_putpeer race

We currently can free inetpeer entries too early :

[  782.636674] WARNING: kmemcheck: Caught 32-bit read from uninitialized memory (f130f44c)
[  782.636677] 1f7b13c100000000000000000000000002000000000000000000000000000000
[  782.636686]  i i i i u u u u i i i i u u u u i i i i u u u u u u u u u u u u
[  782.636694]                          ^
[  782.636696]
[  782.636698] Pid: 4638, comm: ssh Not tainted 3.0.0-rc5+ #270 Hewlett-Packard HP Compaq 6005 Pro SFF PC/3047h
[  782.636702] EIP: 0060:[<c13fefbb>] EFLAGS: 00010286 CPU: 0
[  782.636707] EIP is at inet_getpeer+0x25b/0x5a0
[  782.636709] EAX: 00000002 EBX: 00010080 ECX: f130f3c0 EDX: f0209d30
[  782.636711] ESI: 0000bc87 EDI: 0000ea60 EBP: f0209ddc ESP: c173134c
[  782.636712]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  782.636714] CR0: 8005003b CR2: f0beca80 CR3: 30246000 CR4: 000006d0
[  782.636716] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[  782.636717] DR6: ffff4ff0 DR7: 00000400
[  782.636718]  [<c13fbf76>] rt_set_nexthop.clone.45+0x56/0x220
[  782.636722]  [<c13fc449>] __ip_route_output_key+0x309/0x860
[  782.636724]  [<c141dc54>] tcp_v4_connect+0x124/0x450
[  782.636728]  [<c142ce43>] inet_stream_connect+0xa3/0x270
[  782.636731]  [<c13a8da1>] sys_connect+0xa1/0xb0
[  782.636733]  [<c13a99dd>] sys_socketcall+0x25d/0x2a0
[  782.636736]  [<c149deb8>] sysenter_do_call+0x12/0x28
[  782.636738]  [<ffffffff>] 0xffffffff

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoe1000e: remove e1000_queue_stats
Eric Dumazet [Mon, 11 Jul 2011 10:00:40 +0000 (10:00 +0000)]
e1000e: remove e1000_queue_stats

struct e1000_queue_stats is not used, lets remove it

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: introduce __netdev_alloc_skb_ip_align
Eric Dumazet [Tue, 12 Jul 2011 03:08:34 +0000 (20:08 -0700)]
net: introduce __netdev_alloc_skb_ip_align

RX rings should use GFP_KERNEL allocations if possible, add
__netdev_alloc_skb_ip_align() helper to ease this.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Tue, 12 Jul 2011 03:07:20 +0000 (20:07 -0700)]
Merge branch 'master' of /linux/kernel/git/jkirsher/net-next-2.6

12 years agoixgbe: Make certain to initialize the fdir_perfect_lock in all cases
Alexander Duyck [Thu, 2 Jun 2011 04:28:39 +0000 (04:28 +0000)]
ixgbe: Make certain to initialize the fdir_perfect_lock in all cases

This fix makes it so that the fdir_perfect_lock is initialized in all
cases.  This is necessary as the fdir_filter_exit routine will always
attempt to take the lock before inspecting the filter table.

Reported-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Add support of SerDes Forced mode for certain hardware
Carolyn Wyborny [Tue, 24 May 2011 06:52:51 +0000 (06:52 +0000)]
igb: Add support of SerDes Forced mode for certain hardware

This patch changes the serdes link code to support a forced mode for
some hardware, based on bit set in EEPROM.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Update copyright on all igb driver files.
Carolyn Wyborny [Wed, 29 Jun 2011 01:16:10 +0000 (01:16 +0000)]
igb: Update copyright on all igb driver files.

This patch updates the copyright on the igb driver files to 2011.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Fix lack of flush after register write and before delay
Carolyn Wyborny [Sat, 25 Jun 2011 13:18:12 +0000 (13:18 +0000)]
igb: Fix lack of flush after register write and before delay

Register writes followed by a delay are required to have a flush
before the delay in order to commit the values to the register.  Without
the flush, the code following the delay may not function correctly.

Reported-by: Tong Ho <tong.ho@ericsson.com>
Reported-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agopowerpc/mm: Fix memory_block_size_bytes() for non-pseries
Benjamin Herrenschmidt [Tue, 14 Jun 2011 00:57:51 +0000 (10:57 +1000)]
powerpc/mm: Fix memory_block_size_bytes() for non-pseries

Just compiling pseries in the kernel causes it to override
memory_block_size_bytes() regardless of what is the runtime
platform.

This cleans up the implementation of that function, fixing
a bug or two while at it, so that it's harmless (and potentially
useful) for other platforms. Without this, bugs in that code
would trigger a WARN_ON() in drivers/base/memory.c when
booting some different platforms.

If/when we have another platform supporting memory hotplug we
might want to either move that out to a generic place or
make it a ppc_md. callback.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agomm: Move definition of MIN_MEMORY_BLOCK_SIZE to a header
Benjamin Herrenschmidt [Tue, 14 Jun 2011 00:57:50 +0000 (10:57 +1000)]
mm: Move definition of MIN_MEMORY_BLOCK_SIZE to a header

The macro MIN_MEMORY_BLOCK_SIZE is currently defined twice in two .c
files, and I need it in a third one to fix a powerpc bug, so let's
first move it into a header

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
12 years agoLinux 3.0-rc7 v3.0-rc7
Linus Torvalds [Mon, 11 Jul 2011 23:51:52 +0000 (16:51 -0700)]
Linux 3.0-rc7

12 years agoDocumentation/Changes: remove some really obsolete text
Linus Torvalds [Mon, 11 Jul 2011 23:48:38 +0000 (16:48 -0700)]
Documentation/Changes: remove some really obsolete text

That file harkens back to the days of the big 2.4 -> 2.6 version jump,
and was based even then on older versions.  Some of it is just obsolete,
and Jesper Juhl points out that it talks about kernel versions 2.6 and
should be updated to 3.0.

Remove some obsolete text, and re-phrase some other to not be 2.6-specific.

Reported-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Mon, 11 Jul 2011 23:43:27 +0000 (16:43 -0700)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] msp3400: fill in v4l2_tuner based on vt->type field
  [media] tuner-core.c: don't change type field in g_tuner or g_frequency
  [media] cx18/ivtv: fix g_tuner support
  [media] tuner-core: power up tuner when called with s_power(1)
  [media] v4l2-ioctl.c: check for valid tuner type in S_HW_FREQ_SEEK
  [media] tuner-core: simplify the standard fixup
  [media] tuner-core/v4l2-subdev: document that the type field has to be filled in
  [media] v4l2-subdev.h: remove unused s_mode tuner op
  [media] feature-removal-schedule: change in how radio device nodes are handled
  [media] bttv: fix s_tuner for radio
  [media] pvrusb2: fix g/s_tuner support
  [media] v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner
  [media] tuner-core: fix tuner_resume: use t->mode instead of t->type
  [media] tuner-core: fix s_std and s_tuner

12 years agoNFSv4.1: update nfs4_fattr_bitmap_maxsz
Andy Adamson [Mon, 11 Jul 2011 21:17:42 +0000 (17:17 -0400)]
NFSv4.1: update nfs4_fattr_bitmap_maxsz

Attribute IDs assigned in RFC 5661 now require three bitmaps.
Fixes hitting a BUG_ON in xdr_shrink_bufhead when getting ACLs.

Signed-off-by: Andy Adamson <andros@netapp.com>
Cc:stable@kernel.org [2.6.39]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoMerge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux...
Arnd Bergmann [Mon, 11 Jul 2011 21:26:16 +0000 (23:26 +0200)]
Merge branch 'fix' of git://git./linux/kernel/git/ycmiao/pxa-linux-2.6 into fixes

12 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspe...
Linus Torvalds [Mon, 11 Jul 2011 19:49:03 +0000 (12:49 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/suspend-2.6

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM: Reintroduce dropped call to check_wakeup_irqs

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Mon, 11 Jul 2011 19:48:24 +0000 (12:48 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: drop spinlock before calling cifs_put_tlink
  cifs: fix expand_dfs_referral
  cifs: move bdi_setup_and_register outside of CONFIG_CIFS_DFS_UPCALL
  cifs: factor smb_vol allocation out of cifs_setup_volume_info
  cifs: have cifs_cleanup_volume_info not take a double pointer
  cifs: fix build_unc_path_to_root to account for a prefixpath
  cifs: remove bogus call to cifs_cleanup_volume_info

12 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
Linus Torvalds [Mon, 11 Jul 2011 19:47:53 +0000 (12:47 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/davej/cpufreq

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] fix cpumask memory leak in acpi-cpufreq on cpu hotplug.

12 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platf...
Linus Torvalds [Mon, 11 Jul 2011 19:47:09 +0000 (12:47 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mjg59/platform-drivers-x86

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
  hp-wmi: fix use after free
  dell-laptop - using buffer without mutex_lock
  Revert: "dell-laptop: Toggle the unsupported hardware killswitch"
  platform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM
  thinkpad-acpi: handle HKEY 0x4010, 0x4011 events
  drivers/platform/x86: Fix memory leak
  thinkpad-acpi: handle some new HKEY 0x60xx events
  acer-wmi: fix bitwise bug when set device state
  acer-wmi: Only update rfkill status for associated hotkey events

12 years agoMerge branch 'movieboard' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Mon, 11 Jul 2011 19:46:39 +0000 (12:46 -0700)]
Merge branch 'movieboard' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'movieboard' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: ohci: do not bind to Pinnacle cards, avert panic

12 years agoath5k: Add missing breaks in switch/case
Joe Perches [Sun, 10 Jul 2011 09:28:26 +0000 (02:28 -0700)]
ath5k: Add missing breaks in switch/case

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation/spinlocks.txt: Remove reference to sti()/cli()
Muthu Kumar [Mon, 11 Jul 2011 18:04:58 +0000 (11:04 -0700)]
Documentation/spinlocks.txt: Remove reference to sti()/cli()

Since we removed sti()/cli() and related, how about removing it from
Documentation/spinlocks.txt?

Signed-off-by: Muthukumar R <muthur@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoiwlagn: fix warning in testmode attribute table
Wey-Yi Guy [Mon, 11 Jul 2011 17:47:39 +0000 (10:47 -0700)]
iwlagn: fix warning in testmode attribute table

Fix the compile warning cause by [IWL_TM_ATTR_MAX - 1]

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove an unnecessary function declaration
Mohammed Shafi Shajakhan [Mon, 11 Jul 2011 14:44:14 +0000 (20:14 +0530)]
ath9k: remove an unnecessary function declaration

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800usb: Add new device ID for Belkin
Eduardo Bacchi Kienetz [Sun, 10 Jul 2011 15:05:14 +0000 (17:05 +0200)]
rt2800usb: Add new device ID for Belkin

Belkin's Connect N150 Wireless USB Adapter, model F7D1101 version 2, uses ID 0x945b.
Chipset info: rt: 3390, rf: 000b, rev: 3213.
I have just bought one, which started to work perfectly after the ID was added through this patch.

Signed-off-by: Eduardo Bacchi Kienetz <eduardo@kienetz.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>
12 years agoath5k: Add missing breaks in switch/case
Joe Perches [Sun, 10 Jul 2011 09:28:26 +0000 (02:28 -0700)]
ath5k: Add missing breaks in switch/case

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192cu: Fix duplicate if test
Larry Finger [Sat, 9 Jul 2011 18:15:58 +0000 (13:15 -0500)]
rtlwifi: rtl8192cu: Fix duplicate if test

A typo causes routine rtl92cu_phy_rf6052_set_cck_txpower() to test the
same condition twice. The problem was found using cppcheck-1.49, and the
proper fix was verified against the pre-mac80211 version of the code.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable <stable@kernel.org> [back to 2.6.39]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas: fix handling of command timeout, completion and interruption
Daniel Drake [Sat, 9 Jul 2011 14:41:25 +0000 (15:41 +0100)]
libertas: fix handling of command timeout, completion and interruption

When commands time out, corruption ensues. As lbs_complete_command()
is called without locking, the command node is mistakenly freed twice.
Also fixed up locking here in a few other places.

The nature of command timeout may be that the card didn't even
acknowledge receipt of the request. Detect this case and reset dnld_sent
so that other commands don't hang forever.

When cmdnodes are moved between the free list and the pending list,
their list heads should be reinitialized. Fixed this.

Sometimes commands are completed without actually submitting them or
removing them from cmdpendingq. We must remember to remove them from
cmdpendingq in these cases, so handle this in lbs_complete_command().

Harmless signals generated during suspend/resume were interrupting
lbs_cmd. Convert to an uninterruptible sleep to avoid this.

lbs_thread must be woken up every time there is some new work to do.
I found that when 2 commands are queued, ther completion of the first
command would not wake up lbs_thread to submit the second. Poke lbs_thread
at the end of lbs_complete_command() to fix this.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: allocate only one RX queue
Johannes Berg [Sat, 9 Jul 2011 13:39:16 +0000 (15:39 +0200)]
mac80211: allocate only one RX queue

We don't have multiple RX queues, so there's no use
in allocating multiple, use alloc_netdev_mqs() to
allocate multiple TX but only one RX queue.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix docbook
Johannes Berg [Sat, 9 Jul 2011 12:48:31 +0000 (14:48 +0200)]
mac80211: fix docbook

I changed the TKIP key functions, but forgot to
update the documentation includes, fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: fix docbook
Johannes Berg [Sat, 9 Jul 2011 12:48:30 +0000 (14:48 +0200)]
cfg80211: fix docbook

Looks like I forgot to document the "gfp" parameter
to cfg80211_gtk_rekey_notify, add it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add check if sprom is available before accessing it.
Hauke Mehrtens [Sat, 9 Jul 2011 11:22:03 +0000 (13:22 +0200)]
bcma: add check if sprom is available before accessing it.

The SoCs like the bcm4716 do not have a sprom on the bcma bus like a
pcie device. It stores the values in some partition on flash memory.
For ssb this informations are read out in the bcm47xx arch code,
something like that should also be implemented for bcma. Without this
patch bcma panics on SoCs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas: fix errors in functions accessing module registers
Olivier Sobrie [Sat, 9 Jul 2011 10:57:05 +0000 (12:57 +0200)]
libertas: fix errors in functions accessing module registers

Problems located in the two functions lbs_set_reg() and lbs_get_reg():
- The offset field of struct cmd_ds_reg_access was not filled in
- The test on the return code of lbs_cmd_with_response() in function
  lbs_get_reg() was inverted

Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: fix typos, bad comment formatting and GHz in place of MHz
Pavel Roskin [Sat, 9 Jul 2011 04:17:51 +0000 (00:17 -0400)]
ath5k: fix typos, bad comment formatting and GHz in place of MHz

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: validate mode in ath5k_ani_init() before trying to set it
Pavel Roskin [Sat, 9 Jul 2011 04:17:45 +0000 (00:17 -0400)]
ath5k: validate mode in ath5k_ani_init() before trying to set it

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: add a missing delay for an analog register
Felix Fietkau [Sat, 9 Jul 2011 04:12:54 +0000 (11:12 +0700)]
ath9k_hw: add a missing delay for an analog register

AR_AN_SYNTH9 is in the analog shift register range and thus needs to be
written using the ath9k_hw_analog_shift_rmw function.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix synth delay for half/quarter channels
Felix Fietkau [Sat, 9 Jul 2011 04:12:53 +0000 (11:12 +0700)]
ath9k_hw: fix synth delay for half/quarter channels

The radio needs twice / four times as much time to stabilize for half/quarter
channels.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: set 5 GHz half/quarter channels on AR9002 using fractional mode
Felix Fietkau [Sat, 9 Jul 2011 04:12:52 +0000 (11:12 +0700)]
ath9k_hw: set 5 GHz half/quarter channels on AR9002 using fractional mode

The radio seems to perform better that way

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove ar9287 v1.3+ specific hardcoded register hacks
Felix Fietkau [Sat, 9 Jul 2011 04:12:51 +0000 (11:12 +0700)]
ath9k_hw: remove ar9287 v1.3+ specific hardcoded register hacks

Now that the clock rate is initialized properly and SIFS, EIFS, USEC,
slot time and ACK timeout are properly calculated by the generic code,
the 'async FIFO' register hacks are no longer necessary.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: initialize more timing related registers for half/quarter channels
Felix Fietkau [Sat, 9 Jul 2011 04:12:50 +0000 (11:12 +0700)]
ath9k_hw: initialize more timing related registers for half/quarter channels

Initialize the the clock-to-TSF field of AR_USEC and the SIFS and EIFS time
registers based on the clock rate instead of relying on initvals.
With those changes, some of the hardcoded AR9287 1.3+ specific overrides
can be dropped.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix MAC clock rate for AR9287 v1.3+
Felix Fietkau [Sat, 9 Jul 2011 04:12:49 +0000 (11:12 +0700)]
ath9k_hw: fix MAC clock rate for AR9287 v1.3+

This chip uses the async FIFO feature and runs the MAC at 117 MHz

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix MAC clock for half/quarter rate
Felix Fietkau [Sat, 9 Jul 2011 04:12:48 +0000 (11:12 +0700)]
ath9k_hw: fix MAC clock for half/quarter rate

Enabling half/quarter rate makes the MAC run at half/quarter clock speed.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: always enable 5 GHz fast clock for AR9280
Felix Fietkau [Sat, 9 Jul 2011 04:12:47 +0000 (11:12 +0700)]
ath9k_hw: always enable 5 GHz fast clock for AR9280

All devices support this, but some disable it using an EEPROM flag
for some reason. Improves 5 GHz performance on those devices.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove hardcoded PLL overrides for AR9280
Felix Fietkau [Sat, 9 Jul 2011 04:12:46 +0000 (11:12 +0700)]
ath9k_hw: remove hardcoded PLL overrides for AR9280

Use the proper masks for the register instead.
Fixes adding the (still unused) half/quarter PLL flags.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: 11n specific configuration for transmit
Amitkumar Karwar [Sat, 9 Jul 2011 03:40:30 +0000 (20:40 -0700)]
mwifiex: 11n specific configuration for transmit

Currently device is not able to transmit in 40MHz in spite of
enabling 40MHz support in HTCapInfo IE in assoc req, because
11n specific FW capabilities for transmission are not initialized.
This patch adds code to initilize these capabilities.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove iwlagn_hcmd_utils structure and call directly
Don Fry [Fri, 8 Jul 2011 15:46:29 +0000 (08:46 -0700)]
iwlagn: remove iwlagn_hcmd_utils structure and call directly

Not needed since the driver split.  Move single use routines to
calling location and keep static where possible.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: separate and enhance the fixed rate from
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:28 +0000 (08:46 -0700)]
iwlagn: separate and enhance the fixed rate from

For testing purpose, we need better control of msc from user application.
Separate the fixed_rate between debugfs and testmode and enforce it.

Signed-off-by: Kenny Hsu <kenny.hsu@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: block regular host commands if driver don't own uCode
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:27 +0000 (08:46 -0700)]
iwlagn: block regular host commands if driver don't own uCode

The only host command allow to send to uCode is the one initiated from
testmode if testmode is the owner of uCode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: allow application own the uCode operation
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:26 +0000 (08:46 -0700)]
iwlagn: allow application own the uCode operation

Since we open the door to allow application control the device behavior through
testmode, add command to allow application request the ownership of the uCode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add CMD_ON_DEMAND flag for host command from testmode
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:25 +0000 (08:46 -0700)]
iwlagn: add CMD_ON_DEMAND flag for host command from testmode

For all the hist command request from testmode, set the CMD_ON_DEMAND flag.
this flag will be used later to control the uCode behavior

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: declare static
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:24 +0000 (08:46 -0700)]
iwlagn: declare static

Declare iwl_mac_rssi_callback as "static"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: Enable/disable PS poll based on RSSI and BT coex traffic state
Meenakshi Venkataraman [Fri, 8 Jul 2011 15:46:23 +0000 (08:46 -0700)]
iwlagn: Enable/disable PS poll based on RSSI and BT coex traffic state

WiFi throughput drops drastically when BT is turned on, BT and WiFi
are simultaneously transmitting/receiving traffic. This is particularly true
when BT has higher priority over WiFi, and hence the device defers TX frames.
The AP assumes that the channel is bad and reduces the data rate, implying
longer airtime, which exacerbates the problem further, resulting ultimately
in what is popularly called the "death-spiral" phenomenon. The use of PS-poll
in such scenarios guarantees a low but consistent throughput.

Since the death-spiral phenomenon is observed only when the RSSI is low, use
PS-poll only when RSSI is low and disable when high, with a known hysterisis.

This feature specifies the high and low thresholds and implements the
callbacks registered with mac80211, which will be called when threshold events
occur.

iwlwifi: dynamic pspoll: optimize rssi monitor code

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: add driver RSSI threshold events
Meenakshi Venkataraman [Fri, 8 Jul 2011 15:46:22 +0000 (08:46 -0700)]
mac80211: add driver RSSI threshold events

mac80211 maintains a running average of the RSSI when a STA
is associated to an AP. Report threshold events to any driver
that has registered callbacks for getting RSSI measurements.

Implement callbacks in mac80211 so that driver can set thresholds.
Add callbacks in mac80211 which is invoked when an RSSI threshold
event occurs.

mac80211: add tracing to rssi_reports api and remove extraneous fn argument
mac80211: scale up rssi thresholds from driver by 16 before storing

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>