]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Thu, 14 Jun 2012 12:38:48 +0000 (15:38 +0300)]
Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:

 - Fix a regression of USB-audio PCM assignment since 3.4
 - A few VGA-switcheroo-related fixes for proper HDMI audio enablement
 - Fixed the missing initializations of HD-audio verbs, which may have
   resulted in various breakage
 - Some driver-specific ASoC updates
 - A few fixes for the dynamic PCM code
 - The addition of pinctrl support for the i.MX audmux which didn't make
   it into -rc1 due to cross tree dependency issues
 - A few minor fixes in compress API codes

* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Don't forget to call init verbs added by fixup list
  ALSA: HDA: Pin fixup for Zotac Z68 motherboard
  ALSA: compress_core: cleanup pointers on stop
  ALSA: compress_core: don't wake up on pause
  ALSA: hda - Fix detection of Creative SoundCore3D controllers
  vga_switcheroo: Enable/disable audio clients at the right time
  ALSA: hda - HDMI Audio init all connectors when VGA-switcheroo is off
  vga_switcheroo: Fix error without CONFIG_VGA_SWITCHEROO
  ALSA: hda - Fix uninitialized HDMI controllers with VGA-switcheroo
  vga_switcheroo: Add a helper function to get the client state
  ALSA: usb-audio: Fix substream assignments
  ASoC: tegra: add MODULE_DEVICE_TABLE to tegra30_ahub
  ASoC: wm2000: Always use a 4s timeout for the firmware
  ASoC: dapm: Fix input list to use source widgets
  ASoC: dpcm: Fix dpcm_get_be() to check that DAI is BE
  ASoC: wm8994: Apply volume updates with clocks enabled
  ASoC: wm8994: Ensure all AIFnCLK events are run from the _late variants
  ASoC: imx-audmux: add pinctrl support
  ASoC: dapm: Fix connected widget capture path query.

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Thu, 14 Jun 2012 12:33:55 +0000 (15:33 +0300)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David S. Miller:

This has the fix for the wireless issues I ran into the other week as
well as:

 1) Fix CAN c_can driver transmit handling resulting in BUG check
    triggers, from AnilKumar Ch.

 2) Fix packet drop monitor sleeping in atomic context, from Eric
    Dumazet.

 3) Fix mv643xx_eth driver build regression, from Andrew Lunn.

 4) Inetpeer freeing needs an RCU grace period in order to avoid races
    during tree invalidation.  From Eric Dumazet.

 5) Fix endianness bugs in xt_HMARK netfilter module, from Hans
    Schillstrom.

 6) Add proper module refcounting to l2tp_eth to avoid crash on module
    unload, from Eric Dumazet.

 7) Fix truncation of neighbour entry dumps due to logic errors in
    neigh_dump_info() and friends, from Eric Dumazet.

 8) The conversion of fib6_age() to dst_neigh_lookup() accidently
    reversed the logic of a flags test, fix from Thomas Graf.

 9) Fix checksum configuration in newer sky2 chips, from Stephen
    Hemminger.

10) Revert BQL support in NIU driver, doesn't work.

11) l2tp_ip_sendmsg() illegally uses a route without a proper reference.
    From Eric Dumazet.

12) be2net driver references an SKB after it's potentially been freed,
    also from Eric Dumazet.

13) Fix RCU stalls in dummy net driver init.  Also from Eric Dumazet.

14) lpc_eth has several bugs in it's transmit engine leading to packet
    leaks and improper queue wakes, from Eric Dumazet.

15) Apply short DMA workaround to more tg3 chips, from Matt Carlson.

16) Add tilegx network driver.

17) Bonding queue mapping for a packet can get corrupted, fix from Eric
    Dumazet.

18) Fix bug in netpoll_send_udp() SKB management that can leave garbage
    in the payload in certain situations.  From Eric Dumazet.

19) bnx2x driver interprets chip RX checksum offload incorrectly in
    encapsulation situations.  Fix from Eric Dumazet.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (75 commits)
  bnx2x: fix checksum validation
  netpoll: fix netpoll_send_udp() bugs
  bonding: Fix corrupted queue_mapping
  bonding:record primary when modify it via sysfs
  tilegx network driver: initial support
  tg3: Apply short DMA frag workaround to 5906
  net: stmmac: Fix clock en-/disable calls
  lpc_eth: fix tx completion
  lpc_eth: add missing ndo_change_mtu()
  dummy: fix rcu_sched self-detected stalls
  net: Reorder initialization in ip_route_output to fix gcc warning
  virtio-net: fix a race on 32bit arches
  r8169: avoid NAPI scheduling delay.
  net: Make linux/tcp.h C++ friendly (trivial)
  netdev: fix drivers/net/phy/ kernel-doc warnings
  net/core: fix kernel-doc warnings
  be2net: fix a race in be_xmit()
  l2tp: fix a race in l2tp_ip_sendmsg()
  mac80211: add back channel change flag
  NFC: Fix possible NULL ptr deref when getting the name of a socket
  ...

11 years agoixgbe: Check PTP Rx timestamps via BPF filter
Jacob Keller [Tue, 22 May 2012 06:18:08 +0000 (06:18 +0000)]
ixgbe: Check PTP Rx timestamps via BPF filter

This patch fixes a potential Rx timestamp deadlock that causes the Rx
timestamping to stall indefinitely. The issue could occur when a PTP packet is
timestamped by hardware but never reaches the Rx queue. In order to prevent a
permanent loss of timestamping, the RXSTMP(L/H) registers have to be read to
unlock them. (This used to only occur when a packet that was timestamped
reached the software.) However the registers can't be read early otherwise
there is no way to correlate them to the packet.

This patch introduces a filter function which can be used to determine if a
packet should have been timestamped. Supplied with the filter setup by the
hwtstamp ioctl, check to make sure the PTP protocol and message type match the
expected values. If so, then read the timestamp registers (to free them.) At
this point check the descriptor bit, if the bit is set then we know this
packet correlates to the timestamp stored in the RXTSTAMP registers.
Otherwise, assume that packet was dropped by the hardware, and ignore this
timestamp value. However, we have at least unlocked the rxtstamp registers for
future timestamping.

Due to the way the driver handles skb data, it cannot be directly accessed. In
order to work around this, a copy of the skb data into a linear buffer is
made. From this buffer it becomes possible to read the data correctly

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Richard Cochran <richardcochran@gmail.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbe: PTP Fix hwtstamp mode settings
Jacob Keller [Tue, 22 May 2012 06:08:37 +0000 (06:08 +0000)]
ixgbe: PTP Fix hwtstamp mode settings

When enabling the hwtstamp mode for Rx timestamping the V2 ptp event type
specific modes (Delay Request and Sync) have been rolled into the V2 all event
packet modes, in order to more accurately represent what hardware is doing.
Hardware always timestamps the Path delay packets when a V2 mode is selected,
regardless of what type was selected (in order to always support Path delay
mode). However this means the user selected modes of timestamping only Sync or
Delay Request is not truly supported. This patch correctly sets the mode for
the hwtstamp config and returns to the user that all V2 event packets will be
timestamped.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbe: ptp code cleanup
Jacob Keller [Tue, 22 May 2012 06:08:32 +0000 (06:08 +0000)]
ixgbe: ptp code cleanup

This patch fixes two minor nits from Richard Cochran. The first is a case of
ambitious line wrapping that wasn't necessary. The second is to re-order the
flag checks for PPS support. Previously, the hardware test was done first, and
the interrupt flag test was done second. Now, test the interrupt flag and use
the unlikely macro.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbe: do not compile ixgbe_sysfs.c when CONFIG_IXGBE_HWMON is not set
Emil Tantilov [Wed, 16 May 2012 07:06:38 +0000 (07:06 +0000)]
ixgbe: do not compile ixgbe_sysfs.c when CONFIG_IXGBE_HWMON is not set

ixgbe_sysfs.c is only needed when CONFIG_IXGBE_HWMON is configured in the
kernel.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Acked-by: Don Skidmore <Donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbe: align flow control DV macros with datasheet
John Fastabend [Wed, 28 Mar 2012 11:42:45 +0000 (11:42 +0000)]
ixgbe: align flow control DV macros with datasheet

The flow control DV macros are used to calculate the flow control
high and low thresholds. This patch annotates these macros slightly
better and fixes the issues below.

The macro variables are renamed LINK to _max_frame_link and TC to
_max_frame_tc. This was to avoid confusion and make them more
readable. It was found that people auditing the code read TC to be
'traffic class' in the 802.1Q definition instead of the max frame
size of the tc. Hopefully it is clear now.

This audit also found the following real deviations from the
theoretical values. Fixed in this patch.

  * I multiplied the DV calculations by (36/25) which always
    evaluates to 1. This does not match the intended theoretical
    value of 1.44.

  * IXGBE_BT2KB added 1023 to account for rounding however this
    really should be 8 * 1023 - 1 to account for division by 8k.

  * x2 multiplication of max frame in DV calculations to account
    for updated hardware recommendations.

With this patch the DV values are inline with the recommendations
in the 82599 and 82598 data sheets. Its worth noting I did not
see any dropped frames with flow control on in my experiments without
this patch. However aligning with the hardware specs and
recommendations seems like a good idea here to account for worst
case scenarios.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoe1000e: use more informative logging macros when netdev not yet registered
Bruce Allan [Thu, 7 Jun 2012 02:23:37 +0000 (02:23 +0000)]
e1000e: use more informative logging macros when netdev not yet registered

Based on a report from Ethan Zhao, before calling register_netdev() the
driver should be using logging macros that do not display the potentially
confusing "(unregistered net_device)" yet still display the useful driver
name and PCI bus/device/function.

Reported-by: Ethan Zhao <ethan.kernel@gmail.com>
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agodcbnl: Use BUG_ON() instead of BUG()
Thomas Graf [Wed, 13 Jun 2012 22:40:15 +0000 (22:40 +0000)]
dcbnl: Use BUG_ON() instead of BUG()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodcbnl: Silence harmless gcc warning about uninitialized reply_nlh
Thomas Graf [Wed, 13 Jun 2012 22:34:03 +0000 (22:34 +0000)]
dcbnl: Silence harmless gcc warning about uninitialized reply_nlh

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: drop_monitor aware
Eric Dumazet [Wed, 13 Jun 2012 05:30:07 +0000 (05:30 +0000)]
bonding: drop_monitor aware

When packets are dropped in TX path, its better to use kfree_skb()
instead of dev_kfree_skb() to give proper drop_monitor events.

Also move the kfree_skb() call after read_unlock() in bond_alb_xmit()
and bond_xmit_activebackup()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobnx2x: fix checksum validation
Eric Dumazet [Tue, 12 Jun 2012 23:50:04 +0000 (23:50 +0000)]
bnx2x: fix checksum validation

bnx2x driver incorrectly sets ip_summed to CHECKSUM_UNNECESSARY on
encapsulated segments. TCP stack happily accepts frames with bad
checksums, if they are inside a GRE or IPIP encapsulation.

Our understanding is that if no IP or L4 csum validation was done by the
hardware, we should leave ip_summed as is (CHECKSUM_NONE), since
hardware doesn't provide CHECKSUM_COMPLETE support in its cqe.

Then, if IP/L4 checksumming was done by the hardware, set
CHECKSUM_UNNECESSARY if no error was flagged.

Patch based on findings and analysis from Robert Evans

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Eilon Greenstein <eilong@broadcom.com>
Cc: Yaniv Rosner <yanivr@broadcom.com>
Cc: Merav Sicron <meravs@broadcom.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Robert Evans <evansr@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonetpoll: fix netpoll_send_udp() bugs
Eric Dumazet [Tue, 12 Jun 2012 19:30:21 +0000 (19:30 +0000)]
netpoll: fix netpoll_send_udp() bugs

Bogdan Hamciuc diagnosed and fixed following bug in netpoll_send_udp() :

"skb->len += len;" instead of "skb_put(skb, len);"

Meaning that _if_ a network driver needs to call skb_realloc_headroom(),
only packet headers would be copied, leaving garbage in the payload.

However the skb_realloc_headroom() must be avoided as much as possible
since it requires memory and netpoll tries hard to work even if memory
is exhausted (using a pool of preallocated skbs)

It appears netpoll_send_udp() reserved 16 bytes for the ethernet header,
which happens to work for typicall drivers but not all.

Right thing is to use LL_RESERVED_SPACE(dev)
(And also add dev->needed_tailroom of tailroom)

This patch combines both fixes.

Many thanks to Bogdan for raising this issue.

Reported-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Neil Horman <nhorman@tuxdriver.com>
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodcbnl: Use type safe nlmsg_data()
Thomas Graf [Wed, 13 Jun 2012 02:55:01 +0000 (02:55 +0000)]
dcbnl: Use type safe nlmsg_data()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodcbnl: Move dcb app allocation into dcb_app_add()
Thomas Graf [Wed, 13 Jun 2012 02:55:00 +0000 (02:55 +0000)]
dcbnl: Move dcb app allocation into dcb_app_add()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodcbnl: Move dcb app lookup code into dcb_app_lookup()
Thomas Graf [Wed, 13 Jun 2012 02:54:59 +0000 (02:54 +0000)]
dcbnl: Move dcb app lookup code into dcb_app_lookup()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodcbnl: Return consistent error codes
Thomas Graf [Wed, 13 Jun 2012 02:54:58 +0000 (02:54 +0000)]
dcbnl: Return consistent error codes

EMSGSIZE - ran out of space while constructing message
EOPNOTSUPP - driver/hardware does not support operation
ENODEV - network device not found
EINVAL - invalid message

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodcbnl: Use dcbnl_newmsg() where possible
Thomas Graf [Wed, 13 Jun 2012 02:54:57 +0000 (02:54 +0000)]
dcbnl: Use dcbnl_newmsg() where possible

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodcbnl: Remove now unused dcbnl_reply()
Thomas Graf [Wed, 13 Jun 2012 02:54:56 +0000 (02:54 +0000)]
dcbnl: Remove now unused dcbnl_reply()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodcbnl: Shorten all command handling functions
Thomas Graf [Wed, 13 Jun 2012 02:54:55 +0000 (02:54 +0000)]
dcbnl: Shorten all command handling functions

Allocating and sending the skb in dcb_doit() allows for much
shorter and cleaner command handling functions.

The huge switch statement is replaced with an array based definition
of the handling function and reply message type.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodcbnl: Prepare framework to shorten handling functions
Thomas Graf [Wed, 13 Jun 2012 02:54:54 +0000 (02:54 +0000)]
dcbnl: Prepare framework to shorten handling functions

There is no need to allocate and send the reply message in each
handling function separately. Instead, the reply skb can be allocated
and sent in dcb_doit() directly.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Linus Torvalds [Wed, 13 Jun 2012 20:19:34 +0000 (23:19 +0300)]
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh

Pull SuperH fixes from Paul Mundt.

* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
  sh: Kill off additional asm-generic wrappers.
  sh: Setup CROSS_COMPILE at the top
  sh: Fix up link time defsym warnings.
  sh: use the new generic strnlen_user() function
  sh: switch to generic strncpy_from_user().
  sh: Kill off last dead UBC header
  serial: sh-sci: Make probe fail for ports that exceed the maximum count
  serial: sh-sci: Fix probe error paths
  clocksource: sh_tmu: Use clockevents_config_and_register().
  clocksource: sh_tmu: Convert timer lock to raw spinlock.
  clocksource: sh_mtu2: Convert timer lock to raw spinlock.
  clocksource: sh_cmt: Convert timer lock to raw spinlock.
  bug.h: need linux/kernel.h for TAINT_WARN.
  sh: convert to kbuild asm-generic support.
  sh64: Fix up fallout from generic init_task conversion.
  sh: arch/sh/kernel/process.c needs asm/fpu.h for unlazy_fpu().

11 years agoMerge branch 'fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/coolone...
Linus Torvalds [Wed, 13 Jun 2012 20:18:41 +0000 (23:18 +0300)]
Merge branch 'fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds

Pull led fixes from Bryan Wu.

* 'fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
  leds: Make LEDS_ASIC3 and LEDS_RENESAS_TPU depend on LEDS_CLASS=y
  leds: fixed a coding style issue.
  leds: don't disable blinking when writing the same value to delay_on or delay_off

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Wed, 13 Jun 2012 20:17:12 +0000 (23:17 +0300)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

Pull m68k update from Geert Uytterhoeven.

This makes m68k use the generic library functions for the user-space
strn[cpy|len] functions.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: Use generic strncpy_from_user(), strlen_user(), and strnlen_user()

11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Wed, 13 Jun 2012 19:35:35 +0000 (15:35 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

Conflicts:
drivers/net/wireless/ath/ath9k/main.c
net/bluetooth/hci_event.c

11 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Wed, 13 Jun 2012 19:12:07 +0000 (15:12 -0400)]
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next

11 years agoath9k_hw: remove MCI_STATE_SET_BT_SLEEP
Rajkumar Manoharan [Tue, 12 Jun 2012 14:48:23 +0000 (20:18 +0530)]
ath9k_hw: remove MCI_STATE_SET_BT_SLEEP

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: remove MCI_STATE_CONT_* state
Rajkumar Manoharan [Tue, 12 Jun 2012 14:48:22 +0000 (20:18 +0530)]
ath9k_hw: remove MCI_STATE_CONT_* state

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: remove MCI_STATE_BT
Rajkumar Manoharan [Tue, 12 Jun 2012 14:48:21 +0000 (20:18 +0530)]
ath9k_hw: remove MCI_STATE_BT

remove MCI_STATE_BT and use bt_state instead.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: remove p_data argument from ar9003_mci_state
Rajkumar Manoharan [Tue, 12 Jun 2012 14:48:20 +0000 (20:18 +0530)]
ath9k_hw: remove p_data argument from ar9003_mci_state

As p_data is unuse, lets remove it from ar9003_mci_state.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: remove MCI_STATE_NEED_FLUSH_BT_INFO
Rajkumar Manoharan [Tue, 12 Jun 2012 14:48:19 +0000 (20:18 +0530)]
ath9k_hw: remove MCI_STATE_NEED_FLUSH_BT_INFO

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: remove MCI_STATE_SEND_WLAN_CHANNELS
Rajkumar Manoharan [Tue, 12 Jun 2012 14:48:18 +0000 (20:18 +0530)]
ath9k_hw: remove MCI_STATE_SEND_WLAN_CHANNELS

Add a MCI util function to send wlan channel info to BT.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: add utility function to set BT version
Rajkumar Manoharan [Tue, 12 Jun 2012 14:48:17 +0000 (20:18 +0530)]
ath9k_hw: add utility function to set BT version

Add a utility function to set bluetooth version and remove
MCI_STATE_SET_BT_COEX_VERSION.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: cleanup MCI gpm offset state
Rajkumar Manoharan [Tue, 12 Jun 2012 14:48:16 +0000 (20:18 +0530)]
ath9k_hw: cleanup MCI gpm offset state

Add utility functions to get and test GPM offset and
remove MCI_STATE*_GPM_OFFSET states.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Fix softlockup in AR9485
Mohammed Shafi Shajakhan [Tue, 12 Jun 2012 14:43:43 +0000 (20:13 +0530)]
ath9k: Fix softlockup in AR9485

steps to recreate:
load latest ath9k driver with AR9485
stop the network-manager and wpa_supplicant
bring the interface up

Call Trace:
[<ffffffffa0517490>] ? ath_hw_check+0xe0/0xe0 [ath9k]
[<ffffffff812cd1e8>] __const_udelay+0x28/0x30
[<ffffffffa03bae7a>] ar9003_get_pll_sqsum_dvc+0x4a/0x80 [ath9k_hw]
[<ffffffffa05174eb>] ath_hw_pll_work+0x5b/0xe0 [ath9k]
[<ffffffff810744fe>] process_one_work+0x11e/0x470
[<ffffffff8107530f>] worker_thread+0x15f/0x360
[<ffffffff810751b0>] ? manage_workers+0x230/0x230
[<ffffffff81079af3>] kthread+0x93/0xa0
[<ffffffff815fd3a4>] kernel_thread_helper+0x4/0x10
[<ffffffff81079a60>] ? kthread_freezable_should_stop+0x70/0x70
[<ffffffff815fd3a0>] ? gs_change+0x13/0x13

ensure that the PLL-WAR for AR9485/AR9340 is executed only if the STA is
associated (or) IBSS/AP mode had started beaconing. Ideally this WAR
is needed to recover from some rare beacon stuck during stress testing.
Before the STA is associated/IBSS had started beaconing, PLL4(0x1618c)
always seem to have zero even though we had configured PLL3(0x16188) to
query about PLL's locking status. When we keep on polling infinitely PLL4's
8th bit(ie check for PLL locking measurements is done), machine hangs
due to softlockup.

fixes https://bugzilla.redhat.com/show_bug.cgi?id=811142

Reported-by: Rolf Offermanns <rolf.offermanns@gmx.net>
Cc: stable@vger.kernel.org
Tested-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: fix btcoex duty cycle
Rajkumar Manoharan [Tue, 12 Jun 2012 04:43:54 +0000 (10:13 +0530)]
ath9k: fix btcoex duty cycle

* Reset duty cycle before updating btcoex scheme. Otherwise duty cycle
  reaches max limit and never be reduced again
* Adjust duty cycle with proper BDR profile value

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: defer btcoex scheme update
Rajkumar Manoharan [Tue, 12 Jun 2012 04:43:53 +0000 (10:13 +0530)]
ath9k: defer btcoex scheme update

As btcoex scheme updation might sleep, remove the function call
from tasklet context and queue it up as a separate work.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: keep btcoex period in milliseconds
Rajkumar Manoharan [Mon, 11 Jun 2012 06:49:37 +0000 (12:19 +0530)]
ath9k: keep btcoex period in milliseconds

btcoex periord is converted into micro seconds during initialization
and converted back to milli seconds while starting timer. As MCI code
handles btcoex period in msec, lets keep the btcoex timer in msec and
convert them into other form whenever needed.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: simplify btcoex profile management
Rajkumar Manoharan [Mon, 11 Jun 2012 06:49:36 +0000 (12:19 +0530)]
ath9k: simplify btcoex profile management

This patch simplifies profile management utility functions.

* Separate find_profile from add/del functions
* Return correct values when the profile list is empty or
  profile is ot found
* flush the profiles when there are entries in the list

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: process MCI interrupts only when btcoex is enabled
Rajkumar Manoharan [Mon, 11 Jun 2012 06:49:35 +0000 (12:19 +0530)]
ath9k_hw: process MCI interrupts only when btcoex is enabled

let us process MCI interrupts only when BTCOEX is enabled to avoid
processing bogus interrupts.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: program OBS register only when MCI is disabled
Rajkumar Manoharan [Mon, 11 Jun 2012 06:49:34 +0000 (12:19 +0530)]
ath9k_hw: program OBS register only when MCI is disabled

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: fix incorrect LNA register settings
Rajkumar Manoharan [Mon, 11 Jun 2012 06:49:33 +0000 (12:19 +0530)]
ath9k_hw: fix incorrect LNA register settings

After a full reset, mci_reset will put LNA update to the setting
for 2G mode. Those registers need to be forced to update when
the channel is in 5G.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: check GPM HW write pointer before chip reset
Rajkumar Manoharan [Mon, 11 Jun 2012 06:49:32 +0000 (12:19 +0530)]
ath9k_hw: check GPM HW write pointer before chip reset

Both "MAC Warm Reset" and "MCI Reset Rx" will reset GPM HW write_ptr.
We should check software cached write_ptr against HW write_ptr before
reset. Otherwise the pending DMA data will be lost.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Fix AR9462 power consumption on idle associated
Rajkumar Manoharan [Mon, 11 Jun 2012 06:49:31 +0000 (12:19 +0530)]
ath9k_hw: Fix AR9462 power consumption on idle associated

The HW statemachine is sometimes found stuck in the state
WL_LNA_CTRL_DISABLE when BT is in sleep, which will cause
TX_HOLD always asserted and resmgr stuck in PENDING_TX state

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: restore power state on set channel failure
Rajkumar Manoharan [Mon, 11 Jun 2012 06:49:30 +0000 (12:19 +0530)]
ath9k: restore power state on set channel failure

Not doing so, could cause imbalance in powersave count.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: choose legacy rate as last rate of MRR series
Rajkumar Manoharan [Mon, 11 Jun 2012 06:49:29 +0000 (12:19 +0530)]
ath9k: choose legacy rate as last rate of MRR series

Choose legacy rate as the last rate of Multi Rate Retry series
if and only if the last selected rate is MCS and having higher
PER rate. The current code fills a legacy rate as last one even
though the previous rates in the series are having good PER value.
This could limit the aggregation that affects the uplink performance.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Update initvals for AR9462
Sujith Manoharan [Mon, 11 Jun 2012 04:48:36 +0000 (10:18 +0530)]
ath9k_hw: Update initvals for AR9462

Adjust quick_drop value in the baseband AGC register to
improve RX in HT20 mode.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: expose sdio internal counters in debugfs
Arend van Spriel [Sat, 9 Jun 2012 20:51:44 +0000 (22:51 +0200)]
brcmfmac: expose sdio internal counters in debugfs

The structure brcmf_sdio contains a number of counters that are useful
for debugging. These were not available in user-space. This patch
exposes them in debugfs under the filename 'counters'.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: add debugfs helper functions
Arend van Spriel [Sat, 9 Jun 2012 20:51:43 +0000 (22:51 +0200)]
brcmfmac: add debugfs helper functions

This patch adds debugfs support to brcmfmac. It provide helper functions
to setup the debugfs folder structure for the driver, which has following
hierarchy:

<debugfs_mount>/brcmfmac/<dev_name>/

ie.: /sys/kernel/debug/brcmfmac/mmc0:0001:2/

The new source file provides functions to create and remove the two
folders and a function to retrieve the device-specific folder so files
can be created in it.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: fix smatch warning found in ampdu.c
Arend van Spriel [Sat, 9 Jun 2012 20:51:42 +0000 (22:51 +0200)]
brcmsmac: fix smatch warning found in ampdu.c

This patch fixes potential NULL pointer dereference in ampdu. This
was found running smatch static code checker. Smatch warning says:

drivers/net/wireless/brcm80211/brcmsmac/ampdu.c:741 brcms_c_sendampdu()
 warn: variable dereferenced before check 'p'

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmsmac: remove brcms_set_hint() function
Arend van Spriel [Sat, 9 Jun 2012 20:51:41 +0000 (22:51 +0200)]
brcmsmac: remove brcms_set_hint() function

The function brcms_set_hint() does not add any functionality
so regulatory_hint() can be called directly. The error value
has been removed from the message when regulatory_hint() fails.

Reported-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Fix softlockup in AR9485
Mohammed Shafi Shajakhan [Wed, 13 Jun 2012 15:58:09 +0000 (21:28 +0530)]
ath9k: Fix softlockup in AR9485

steps to recreate:
load latest ath9k driver with AR9485
stop the network-manager and wpa_supplicant
bring the interface up

Call Trace:
[<ffffffffa0517490>] ? ath_hw_check+0xe0/0xe0 [ath9k]
[<ffffffff812cd1e8>] __const_udelay+0x28/0x30
[<ffffffffa03bae7a>] ar9003_get_pll_sqsum_dvc+0x4a/0x80 [ath9k_hw]
[<ffffffffa05174eb>] ath_hw_pll_work+0x5b/0xe0 [ath9k]
[<ffffffff810744fe>] process_one_work+0x11e/0x470
[<ffffffff8107530f>] worker_thread+0x15f/0x360
[<ffffffff810751b0>] ? manage_workers+0x230/0x230
[<ffffffff81079af3>] kthread+0x93/0xa0
[<ffffffff815fd3a4>] kernel_thread_helper+0x4/0x10
[<ffffffff81079a60>] ? kthread_freezable_should_stop+0x70/0x70
[<ffffffff815fd3a0>] ? gs_change+0x13/0x13

ensure that the PLL-WAR for AR9485/AR9340 is executed only if the STA is
associated (or) IBSS/AP mode had started beaconing. Ideally this WAR
is needed to recover from some rare beacon stuck during stress testing.
Before the STA is associated/IBSS had started beaconing, PLL4(0x1618c)
always seem to have zero even though we had configured PLL3(0x16188) to
query about PLL's locking status. When we keep on polling infinitely PLL4's
8th bit(ie check for PLL locking measurements is done), machine hangs
due to softlockup.

fixes https://bugzilla.redhat.com/show_bug.cgi?id=811142

Reported-by: Rolf Offermanns <rolf.offermanns@gmx.net>
Cc: stable@vger.kernel.org [3.0+]
Tested-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
John W. Linville [Wed, 13 Jun 2012 18:05:40 +0000 (14:05 -0400)]
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211

11 years agoMerge tag 'omapdss-for-3.5-rc2' of git://gitorious.org/linux-omap-dss2/linux
Linus Torvalds [Wed, 13 Jun 2012 14:57:30 +0000 (17:57 +0300)]
Merge tag 'omapdss-for-3.5-rc2' of git://gitorious.org/linux-omap-dss2/linux

Pull omapdss build problem fix from Tomi Valkeinen:
 "Small fixes for omapdss driver.  Most importantly, fixes a build
  problem when debugfs or omapdss debug support is turned off, and fixes
  a suspend related crash."

This has apparently been annoying rmk for a while..

* tag 'omapdss-for-3.5-rc2' of git://gitorious.org/linux-omap-dss2/linux:
  OMAPDSS: fix registration of DPI and SDI devices
  OMAPDSS: DSI: Fix bug when calculating LP command interleaving parameters
  OMAPDSS: fix bogus WARN_ON in dss_runtime_put()
  OMAPDSS: Taal: fix compilation warning
  OMAPDSS: fix build when DEBUG_FS or DSS_DEBUG_SUPPORT disabled

11 years agoALSA: hda - Don't forget to call init verbs added by fixup list
Takashi Iwai [Wed, 13 Jun 2012 14:47:32 +0000 (16:47 +0200)]
ALSA: hda - Don't forget to call init verbs added by fixup list

During the split to the auto-parser helper functions, the actual call
of init verbs was lost.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43366

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agomac80211: stop polling in disassociation
David Spinadel [Tue, 12 Jun 2012 06:59:45 +0000 (09:59 +0300)]
mac80211: stop polling in disassociation

Stop connection monitor poll during disassociation.
This clears the polling flags and if a scan was
deferred it will be run.

Without this fix, if a scan was deferred due to
connection monitoring while disassociation happens,
this scan blocks further scan requests until interface
down/up which causes problems connecting to another AP.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: check sdata_running on ieee80211_set_bitrate_mask
Eliad Peller [Tue, 12 Jun 2012 09:41:15 +0000 (12:41 +0300)]
mac80211: check sdata_running on ieee80211_set_bitrate_mask

Otherwise, we might call the driver callback before
the interface was uploaded.

Solves the following warning:
WARNING: at net/mac80211/driver-ops.h:12 ieee80211_set_bitrate_mask+0xbc/0x18c [mac80211]()
wlan0:  Failed check-sdata-in-driver check, flags: 0x0
Modules linked in: wlcore_sdio wl12xx wl18xx wlcore mac80211 cfg80211 [last unloaded: cfg80211]
[<c001b964>] (unwind_backtrace+0x0/0x12c) from [<c0495550>] (dump_stack+0x20/0x24)
[<c0495550>] (dump_stack+0x20/0x24) from [<c003ee28>] (warn_slowpath_common+0x5c/0x74)
[<c003ee28>] (warn_slowpath_common+0x5c/0x74) from [<c003eefc>] (warn_slowpath_fmt+0x40/0x48)
[<c003eefc>] (warn_slowpath_fmt+0x40/0x48) from [<bf5c1ad0>] (ieee80211_set_bitrate_mask+0xbc/0x18c [mac80211])
[<bf5c1ad0>] (ieee80211_set_bitrate_mask+0xbc/0x18c [mac80211]) from [<bf575960>] (nl80211_set_tx_bitrate_mask+0x350/0x358 [cfg80211])
[<bf575960>] (nl80211_set_tx_bitrate_mask+0x350/0x358 [cfg80211]) from [<c03e9e94>] (genl_rcv_msg+0x1a8/0x1e8)
[<c03e9e94>] (genl_rcv_msg+0x1a8/0x1e8) from [<c03e9164>] (netlink_rcv_skb+0x5c/0xc0)
[<c03e9164>] (netlink_rcv_skb+0x5c/0xc0) from [<c03e9ce0>] (genl_rcv+0x28/0x34)
[<c03e9ce0>] (genl_rcv+0x28/0x34) from [<c03e8e74>] (netlink_unicast+0x158/0x234)
[<c03e8e74>] (netlink_unicast+0x158/0x234) from [<c03e93e0>] (netlink_sendmsg+0x218/0x298)
[<c03e93e0>] (netlink_sendmsg+0x218/0x298) from [<c03b4e5c>] (sock_sendmsg+0xa4/0xc0)
[<c03b4e5c>] (sock_sendmsg+0xa4/0xc0) from [<c03b5af4>] (__sys_sendmsg+0x1d8/0x254)
[<c03b5af4>] (__sys_sendmsg+0x1d8/0x254) from [<c03b5ca8>] (sys_sendmsg+0x4c/0x70)
[<c03b5ca8>] (sys_sendmsg+0x4c/0x70) from [<c0013980>] (ret_fast_syscall+0x0/0x3c)

Note that calling the driver can also result
in undefined behaviour since it doesn't have
to deal with calls while down.

Signed-off-by: Eliad Peller <eliad@wizery.com>
[removed timestamps, added note - Johannes]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: fix potential deadlock in regulatory
Eliad Peller [Tue, 12 Jun 2012 09:53:13 +0000 (12:53 +0300)]
cfg80211: fix potential deadlock in regulatory

reg_timeout_work() calls restore_regulatory_settings() which
takes cfg80211_mutex.

reg_set_request_processed() already holds cfg80211_mutex
before calling cancel_delayed_work_sync(reg_timeout),
so it might deadlock.

Call the async cancel_delayed_work instead, in order
to avoid the potential deadlock.

This is the relevant lockdep warning:

cfg80211: Calling CRDA for country: XX

======================================================
[ INFO: possible circular locking dependency detected ]
3.4.0-rc5-wl+ #26 Not tainted
-------------------------------------------------------
kworker/0:2/1391 is trying to acquire lock:
 (cfg80211_mutex){+.+.+.}, at: [<bf28ae00>] restore_regulatory_settings+0x34/0x418 [cfg80211]

but task is already holding lock:
 ((reg_timeout).work){+.+...}, at: [<c0059e94>] process_one_work+0x1f0/0x480

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #2 ((reg_timeout).work){+.+...}:
       [<c008fd44>] validate_chain+0xb94/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c005b600>] wait_on_work+0x4c/0x154
       [<c005c000>] __cancel_work_timer+0xd4/0x11c
       [<c005c064>] cancel_delayed_work_sync+0x1c/0x20
       [<bf28b274>] reg_set_request_processed+0x50/0x78 [cfg80211]
       [<bf28bd84>] set_regdom+0x550/0x600 [cfg80211]
       [<bf294cd8>] nl80211_set_reg+0x218/0x258 [cfg80211]
       [<c03c7738>] genl_rcv_msg+0x1a8/0x1e8
       [<c03c6a00>] netlink_rcv_skb+0x5c/0xc0
       [<c03c7584>] genl_rcv+0x28/0x34
       [<c03c6720>] netlink_unicast+0x15c/0x228
       [<c03c6c7c>] netlink_sendmsg+0x218/0x298
       [<c03933c8>] sock_sendmsg+0xa4/0xc0
       [<c039406c>] __sys_sendmsg+0x1e4/0x268
       [<c0394228>] sys_sendmsg+0x4c/0x70
       [<c0013840>] ret_fast_syscall+0x0/0x3c

-> #1 (reg_mutex){+.+.+.}:
       [<c008fd44>] validate_chain+0xb94/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c04734dc>] mutex_lock_nested+0x48/0x320
       [<bf28b2cc>] reg_todo+0x30/0x538 [cfg80211]
       [<c0059f44>] process_one_work+0x2a0/0x480
       [<c005a4b4>] worker_thread+0x1bc/0x2bc
       [<c0061148>] kthread+0x98/0xa4
       [<c0014af4>] kernel_thread_exit+0x0/0x8

-> #0 (cfg80211_mutex){+.+.+.}:
       [<c008ed58>] print_circular_bug+0x68/0x2cc
       [<c008fb28>] validate_chain+0x978/0x10f0
       [<c0090b68>] __lock_acquire+0x8c8/0x9b0
       [<c0090d40>] lock_acquire+0xf0/0x114
       [<c04734dc>] mutex_lock_nested+0x48/0x320
       [<bf28ae00>] restore_regulatory_settings+0x34/0x418 [cfg80211]
       [<bf28b200>] reg_timeout_work+0x1c/0x20 [cfg80211]
       [<c0059f44>] process_one_work+0x2a0/0x480
       [<c005a4b4>] worker_thread+0x1bc/0x2bc
       [<c0061148>] kthread+0x98/0xa4
       [<c0014af4>] kernel_thread_exit+0x0/0x8

other info that might help us debug this:

Chain exists of:
  cfg80211_mutex --> reg_mutex --> (reg_timeout).work

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock((reg_timeout).work);
                               lock(reg_mutex);
                               lock((reg_timeout).work);
  lock(cfg80211_mutex);

 *** DEADLOCK ***

2 locks held by kworker/0:2/1391:
 #0:  (events){.+.+.+}, at: [<c0059e94>] process_one_work+0x1f0/0x480
 #1:  ((reg_timeout).work){+.+...}, at: [<c0059e94>] process_one_work+0x1f0/0x480

stack backtrace:
[<c001b928>] (unwind_backtrace+0x0/0x12c) from [<c0471d3c>] (dump_stack+0x20/0x24)
[<c0471d3c>] (dump_stack+0x20/0x24) from [<c008ef70>] (print_circular_bug+0x280/0x2cc)
[<c008ef70>] (print_circular_bug+0x280/0x2cc) from [<c008fb28>] (validate_chain+0x978/0x10f0)
[<c008fb28>] (validate_chain+0x978/0x10f0) from [<c0090b68>] (__lock_acquire+0x8c8/0x9b0)
[<c0090b68>] (__lock_acquire+0x8c8/0x9b0) from [<c0090d40>] (lock_acquire+0xf0/0x114)
[<c0090d40>] (lock_acquire+0xf0/0x114) from [<c04734dc>] (mutex_lock_nested+0x48/0x320)
[<c04734dc>] (mutex_lock_nested+0x48/0x320) from [<bf28ae00>] (restore_regulatory_settings+0x34/0x418 [cfg80211])
[<bf28ae00>] (restore_regulatory_settings+0x34/0x418 [cfg80211]) from [<bf28b200>] (reg_timeout_work+0x1c/0x20 [cfg80211])
[<bf28b200>] (reg_timeout_work+0x1c/0x20 [cfg80211]) from [<c0059f44>] (process_one_work+0x2a0/0x480)
[<c0059f44>] (process_one_work+0x2a0/0x480) from [<c005a4b4>] (worker_thread+0x1bc/0x2bc)
[<c005a4b4>] (worker_thread+0x1bc/0x2bc) from [<c0061148>] (kthread+0x98/0xa4)
[<c0061148>] (kthread+0x98/0xa4) from [<c0014af4>] (kernel_thread_exit+0x0/0x8)
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

Cc: stable@kernel.org
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: WARN only once when we have trouble in reclaim
Emmanuel Grumbach [Tue, 12 Jun 2012 15:31:21 +0000 (18:31 +0300)]
iwlwifi: WARN only once when we have trouble in reclaim

This flow can actually happen due to a corner case in
mac80211: the station is deleted before we get a chance
to reclaim all the packets in flight in AGG queue.
The tid_data for this station is zeroed, and we lose
the match with the Tx queue.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: use request_module instead of _nowait
Johannes Berg [Tue, 12 Jun 2012 17:50:43 +0000 (19:50 +0200)]
iwlwifi: use request_module instead of _nowait

Since request_module_nowait() can't be backported
use request_module() instead -- we don't need the
asynchronous behaviour of request_module_nowait()
here since we're running in the firmware request
work struct.

Tested-by: Donald H Fry <donald.h.fry@intel.com>
Reviewed-by: Donald H Fry <donald.h.fry@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: fix 6035 device parameters
Johannes Berg [Tue, 12 Jun 2012 19:43:28 +0000 (21:43 +0200)]
iwlwifi: fix 6035 device parameters

Due to commit 26a7ca9a71a ("iwlwifi: refactor EEPROM
reading/parsing") adding a new parameter, while commit
d2c8b15d0cb ("iwlwifi: use correct supported firmware
for 6035 and 6000g2") added a new device structure we
need to add the parameter to the new device structure
to make 6035 device work.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoMerge remote-tracking branch 'wireless-next/master' into iwlwifi-next
Johannes Berg [Wed, 13 Jun 2012 07:01:22 +0000 (09:01 +0200)]
Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next

11 years agoiwlwifi: warn if TFD index and WiFi Seq don't match
Emmanuel Grumbach [Sun, 10 Jun 2012 15:25:09 +0000 (18:25 +0300)]
iwlwifi: warn if TFD index and WiFi Seq don't match

For AGG queues, we must match between the WiFi sequence
number and the TFD number. This is a HW (SCD) requirement.

This is a take two of my

    iwlwifi: add debug in Tx path in AGG flow

    This will allow us to catch bad cases in which the packets aren't in
    the right place on the ring.

which disappeared during code move.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: don't modify the timer if we don't Tx
Emmanuel Grumbach [Sun, 10 Jun 2012 15:25:09 +0000 (18:25 +0300)]
iwlwifi: don't modify the timer if we don't Tx

In fragmentation we don't update the write pointer of the
HW immediately. So we shouldn't modify the timer in that
case.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: turn on a lockdep assertion
Dan Carpenter [Sun, 10 Jun 2012 11:25:22 +0000 (14:25 +0300)]
iwlwifi: turn on a lockdep assertion

CMD_SYNC is zero so the if (cmd->flags & CMD_SYNC) is never true and we
never check the assertion.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: print even more info when a queue is stuck
Emmanuel Grumbach [Mon, 11 Jun 2012 08:44:49 +0000 (11:44 +0300)]
iwlwifi: print even more info when a queue is stuck

Since the queue gets stuck from time to time, we are trying
to get as much information as we can when this occurs.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: Fix Makefile build order for built-in driver
Brandon Misemer [Fri, 8 Jun 2012 21:59:27 +0000 (14:59 -0700)]
iwlwifi: Fix Makefile build order for built-in driver

When the driver is built into the kernel instead of a module
when the system boots it results in a panic. The order things are built in
results in their initialization order when built into the kernel. Wifi
has to be initialized before mvm or dvm.

Reviewed-by: Donald H Fry <donald.h.fry@intel.com>
Tested-by: Donald H Fry <donald.h.fry@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Brandon Misemer <brandon.misemer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: comment that setting driver_data overrides info->control
Emmanuel Grumbach [Thu, 7 Jun 2012 11:23:06 +0000 (14:23 +0300)]
iwlwifi: comment that setting driver_data overrides info->control

Using the driver_data area in ieee80211_tx_info which
resides in the CB overrides the info->control field.
Add a comment to prevent mistakes.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: remove lock around txq_enable
Emmanuel Grumbach [Thu, 7 Jun 2012 10:44:14 +0000 (13:44 +0300)]
iwlwifi: remove lock around txq_enable

This locking isn't needed. The only locking we need is when
we access prph registers but there is already a separate
lock for that.
Since we haven't returned from the mac80211's
IEEE80211_AMPDU_TX_OPERATIONAL ampdu_action, we cannot
receive any Tx frame for that sta / tid while enabling the
queue.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: don't configure a txq that is being disabled
Emmanuel Grumbach [Mon, 4 Jun 2012 13:48:17 +0000 (16:48 +0300)]
iwlwifi: don't configure a txq that is being disabled

This is not needed, we just need to tell the SCD not to use
that queue. We will reconfigure that queue when we will use
it again.

Clean up a bit the code on the way.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: print more info when a queue is stuck
Emmanuel Grumbach [Sun, 10 Jun 2012 16:36:18 +0000 (19:36 +0300)]
iwlwifi: print more info when a queue is stuck

Print some more info from the SCD's SRAM and dump the TRB
from the FH.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: iwl_{read,write}_targ_mem_words takes dwords
Emmanuel Grumbach [Wed, 6 Jun 2012 05:18:40 +0000 (08:18 +0300)]
iwlwifi: iwl_{read,write}_targ_mem_words takes dwords

Change its name to better reflect this.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: s/iwl_read_targ_mem_words/iwl_read_targ_mem_bytes
Emmanuel Grumbach [Wed, 6 Jun 2012 05:11:33 +0000 (08:11 +0300)]
iwlwifi: s/iwl_read_targ_mem_words/iwl_read_targ_mem_bytes

This macro gets the bufsize in bytes.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: fix dynamic loading
Johannes Berg [Wed, 6 Jun 2012 07:42:57 +0000 (09:42 +0200)]
iwlwifi: fix dynamic loading

Add locking to the dynamic loading code to prevent
corrupting the list if multiple device ever init at
the same time (which cannot happen for multiple PCI
devices, but could happen when different busses init
concurrently.)

Also remove a device from the list when it stops so
the list isn't left corrupted, including a fix from
Don to not crash when it was never added.

Reviewed-by: Donald H Fry <donald.h.fry@intel.com>
Tested-by: Donald H Fry <donald.h.fry@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Wed, 13 Jun 2012 04:59:18 +0000 (21:59 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Conflicts:
MAINTAINERS
drivers/net/wireless/iwlwifi/pcie/trans.c

The iwlwifi conflict was resolved by keeping the code added
in 'net' that turns off the buggy chip feature.

The MAINTAINERS conflict was merely overlapping changes, one
change updated all the wireless web site URLs and the other
changed some GIT trees to be Johannes's instead of John's.

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branches 'sh/urgent', 'sh/core', 'sh/clockevents', 'sh/asm-generic' and 'sh...
Paul Mundt [Wed, 13 Jun 2012 03:01:33 +0000 (12:01 +0900)]
Merge branches 'sh/urgent', 'sh/core', 'sh/clockevents', 'sh/asm-generic' and 'sh/trivial' into sh-fixes-for-linus

11 years agosh: Kill off additional asm-generic wrappers.
Paul Mundt [Wed, 13 Jun 2012 02:59:47 +0000 (11:59 +0900)]
sh: Kill off additional asm-generic wrappers.

A few wrappers were overlooked in the initial conversion, take care of
them now.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agosh: Setup CROSS_COMPILE at the top
Geert Uytterhoeven [Sat, 12 May 2012 20:39:07 +0000 (22:39 +0200)]
sh: Setup CROSS_COMPILE at the top

CROSS_COMPILE must be setup before using e.g. cc-option (and a few other
as-*, cc-*, ld-* macros), else they will check against the wrong compiler
when cross-compiling, and may invoke the cross compiler with wrong or
suboptimal compiler options.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agosh: Fix up link time defsym warnings.
Paul Mundt [Wed, 13 Jun 2012 02:36:36 +0000 (11:36 +0900)]
sh: Fix up link time defsym warnings.

sh-linux-gnu-ld:--defsym 'jiffies=jiffies_64': ignoring invalid character `'' in expression

For some reason ld has recently started complaining about the quotes, so just
get rid of them, we don't need them for anything anyways.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agoethtool: Make more commands available to unprivileged processes
Ben Hutchings [Tue, 12 Jun 2012 13:05:41 +0000 (13:05 +0000)]
ethtool: Make more commands available to unprivileged processes

'Get' commands should generally not require CAP_NET_ADMIN, with
the exception of those that expose internal state.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet-next: add dev_loopback_xmit() to avoid duplicate code
Michel Machado [Tue, 12 Jun 2012 10:16:35 +0000 (10:16 +0000)]
net-next: add dev_loopback_xmit() to avoid duplicate code

Add dev_loopback_xmit() in order to deduplicate functions
ip_dev_loopback_xmit() (in net/ipv4/ip_output.c) and
ip6_dev_loopback_xmit() (in net/ipv6/ip6_output.c).

I was about to reinvent the wheel when I noticed that
ip_dev_loopback_xmit() and ip6_dev_loopback_xmit() do exactly what I
need and are not IP-only functions, but they were not available to reuse
elsewhere.

ip6_dev_loopback_xmit() does not have line "skb_dst_force(skb);", but I
understand that this is harmless, and should be in dev_loopback_xmit().

Signed-off-by: Michel Machado <michel@digirati.com.br>
CC: "David S. Miller" <davem@davemloft.net>
CC: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
CC: James Morris <jmorris@namei.org>
CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
CC: Patrick McHardy <kaber@trash.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Jiri Pirko <jpirko@redhat.com>
CC: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
CC: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding: remove packet cloning in recv_probe()
Eric Dumazet [Mon, 11 Jun 2012 19:23:07 +0000 (19:23 +0000)]
bonding: remove packet cloning in recv_probe()

Cloning all packets in input path have a significant cost.

Use skb_header_pointer()/skb_copy_bits() instead of pskb_may_pull() so
that recv_probe handlers (bond_3ad_lacpdu_recv / bond_arp_rcv /
rlb_arp_recv ) dont touch input skb.

bond_handle_frame() can avoid the skb_clone()/dev_kfree_skb()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Cc: Jiri Bohac <jbohac@suse.cz>
Cc: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Cc: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agousbnet: don't initialize transfer buffer before submit status URB
tom.leiming@gmail.com [Mon, 11 Jun 2012 15:19:45 +0000 (15:19 +0000)]
usbnet: don't initialize transfer buffer before submit status URB

The line below in intr_complete isn't needed,

memset(urb->transfer_buffer, 0, urb->transfer_buffer_length);

so just remove it.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agousbnet: remove declaration for intr_complete
tom.leiming@gmail.com [Mon, 11 Jun 2012 15:19:44 +0000 (15:19 +0000)]
usbnet: remove declaration for intr_complete

Remove declaration for intr_complete so that ctags may be happy to
decrease duplicated symbols, also decrease one line code.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agousbnet: remove flag of EVENT_DEV_WAKING
tom.leiming@gmail.com [Mon, 11 Jun 2012 15:19:43 +0000 (15:19 +0000)]
usbnet: remove flag of EVENT_DEV_WAKING

The flag of EVENT_DEV_WAKING is not used any more, so just remove it.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agousbnet:cdc-phonet: remove usb_get/put_dev in .probe and .disconnect
tom.leiming@gmail.com [Mon, 11 Jun 2012 15:19:41 +0000 (15:19 +0000)]
usbnet:cdc-phonet: remove usb_get/put_dev in .probe and .disconnect

usb_device is parent device of usb_interface in the view of driver
model, so its reference count is always held during .probe/.disconnect
of usb_interface instance.

This patch just removes the unnecessay usb_get/put_dev.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agousbnet:pegasus: remove usb_get/put_dev in .probe and .disconnect
tom.leiming@gmail.com [Mon, 11 Jun 2012 15:19:40 +0000 (15:19 +0000)]
usbnet:pegasus: remove usb_get/put_dev in .probe and .disconnect

usb_device is parent device of usb_interface in the view of driver
model, so its reference count is always held during .probe/.disconnect
of usb_interface instance.

This patch just removes the unnecessay usb_get/put_dev.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agousbnet: remove usb_get/put_dev in .probe and .disconnect
tom.leiming@gmail.com [Mon, 11 Jun 2012 15:19:39 +0000 (15:19 +0000)]
usbnet: remove usb_get/put_dev in .probe and .disconnect

usb_device is parent device of usb_interface in the view of driver
model, so its reference count is always held during .probe/.disconnect
of usb_interface instance.

This patch just removes the unnecessay usb_get/put_dev.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agosh: use the new generic strnlen_user() function
Paul Mundt [Mon, 4 Jun 2012 06:46:05 +0000 (15:46 +0900)]
sh: use the new generic strnlen_user() function

This discards both the _32 and _64 versions in favour of the consolidated
generic one.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agosh: switch to generic strncpy_from_user().
Paul Mundt [Fri, 25 May 2012 04:02:48 +0000 (13:02 +0900)]
sh: switch to generic strncpy_from_user().

This kills off the special sh32/64 versions and adopts the generic
version. It should be possible to optimize this for SH-4A unaligned
loads, but this is a corner case that can be supported incrementally.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agosh: Kill off last dead UBC header
Paul Bolle [Fri, 8 Jun 2012 20:49:17 +0000 (22:49 +0200)]
sh: Kill off last dead UBC header

Commit 7025bec9125b0a02edcaf22c2dce753bf2c95480 ("sh: Kill off dead UBC
headers.") skipped arch/sh/include/cpu-sh2a/cpu/ubc.h. Since nothing is
using that header either, kill it off too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agoserial: sh-sci: Make probe fail for ports that exceed the maximum count
Laurent Pinchart [Tue, 12 Jun 2012 22:28:24 +0000 (00:28 +0200)]
serial: sh-sci: Make probe fail for ports that exceed the maximum count

The driver supports a maximum number of ports configurable at compile
time. Make sure the probe() method fails when registering a port that
exceeds the maximum instead of returning success without registering the
port.

This fixes a crash at system suspend time, when the driver tried to
suspend a non-registered port using the UART core.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agoserial: sh-sci: Fix probe error paths
Laurent Pinchart [Tue, 12 Jun 2012 22:28:23 +0000 (00:28 +0200)]
serial: sh-sci: Fix probe error paths

When probing fails, the driver must not try to cleanup resources that
have not been initialized. Fix this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
11 years agobonding: Fix corrupted queue_mapping
Eric Dumazet [Tue, 12 Jun 2012 06:03:51 +0000 (06:03 +0000)]
bonding: Fix corrupted queue_mapping

In the transmit path of the bonding driver, skb->cb is used to
stash the skb->queue_mapping so that the bonding device can set its
own queue mapping.  This value becomes corrupted since the skb->cb is
also used in __dev_xmit_skb.

When transmitting through bonding driver, bond_select_queue is
called from dev_queue_xmit.  In bond_select_queue the original
skb->queue_mapping is copied into skb->cb (via bond_queue_mapping)
and skb->queue_mapping is overwritten with the bond driver queue.

Subsequently in dev_queue_xmit, __dev_xmit_skb is called which writes
the packet length into skb->cb, thereby overwriting the stashed
queue mappping.  In bond_dev_queue_xmit (called from hard_start_xmit),
the queue mapping for the skb is set to the stashed value which is now
the skb length and hence is an invalid queue for the slave device.

If we want to save skb->queue_mapping into skb->cb[], best place is to
add a field in struct qdisc_skb_cb, to make sure it wont conflict with
other layers (eg : Qdiscc, Infiniband...)

This patchs also makes sure (struct qdisc_skb_cb)->data is aligned on 8
bytes :

netem qdisc for example assumes it can store an u64 in it, without
misalignment penalty.

Note : we only have 20 bytes left in (struct qdisc_skb_cb)->data[].
The largest user is CHOKe and it fills it.

Based on a previous patch from Tom Herbert.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Tom Herbert <therbert@google.com>
Cc: John Fastabend <john.r.fastabend@intel.com>
Cc: Roland Dreier <roland@kernel.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv4: Add interface option to enable routing of 127.0.0.0/8
Thomas Graf [Tue, 12 Jun 2012 00:44:01 +0000 (00:44 +0000)]
ipv4: Add interface option to enable routing of 127.0.0.0/8

Routing of 127/8 is tradtionally forbidden, we consider
packets from that address block martian when routing and do
not process corresponding ARP requests.

This is a sane default but renders a huge address space
practically unuseable.

The RFC states that no address within the 127/8 block should
ever appear on any network anywhere but it does not forbid
the use of such addresses outside of the loopback device in
particular. For example to address a pool of virtual guests
behind a load balancer.

This patch adds a new interface option 'route_localnet'
enabling routing of the 127/8 address block and processing
of ARP requests on a specific interface.

Note that for the feature to work, the default local route
covering 127/8 dev lo needs to be removed.

Example:
  $ sysctl -w net.ipv4.conf.eth0.route_localnet=1
  $ ip route del 127.0.0.0/8 dev lo table local
  $ ip addr add 127.1.0.1/16 dev eth0
  $ ip route flush cache

V2: Fix invalid check to auto flush cache (thanks davem)

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobonding:record primary when modify it via sysfs
Weiping Pan [Sun, 10 Jun 2012 23:00:20 +0000 (23:00 +0000)]
bonding:record primary when modify it via sysfs

If we modify primary via sysfs and it is not a valid slave,
we should record it for future use, and this behavior is the same with
bond_check_params().

Signed-off-by: Weiping Pan <wpan@redhat.com>
Acked-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'master' of git://1984.lsi.us.es/net
David S. Miller [Tue, 12 Jun 2012 22:18:15 +0000 (15:18 -0700)]
Merge branch 'master' of git://1984.lsi.us.es/net

11 years agomwifiex: fix incorrect privacy setting in beacon and probe response
Avinash Patil [Tue, 12 Jun 2012 01:13:57 +0000 (18:13 -0700)]
mwifiex: fix incorrect privacy setting in beacon and probe response

Test procedure:
1. Start AP with security setting (e.g. WPA2)
2. Stop AP
3. Start AP with open security

Here it's observed that privacy is enabled in beacons and
probe responses.

This patch fixes it by checking the privacy parameter from
cfg80211_ap_settings. If privacy is not set in cfg80211_ap_settings,
set open authentication and no encryption in FW.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Tue, 12 Jun 2012 18:25:04 +0000 (14:25 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem

11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Tue, 12 Jun 2012 18:09:59 +0000 (14:09 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

Conflicts:
MAINTAINERS
drivers/net/wireless/iwlwifi/pcie/trans.c