]> Git Repo - linux.git/log
linux.git
10 years agoMerge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Thu, 2 Apr 2015 18:30:36 +0000 (11:30 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull dmaengine fixes from Vinod Koul:
 "This time we have addition of caps for jz4740 which fixes intentional
  warning at boot.  Then we have memory leak issues in drivers using
  virt-dma by Peter on few drive"

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine: moxart-dma: Fix memory leak when stopping a running transfer
  dmaengine: bcm2835-dma: Fix memory leak when stopping a running transfer
  dmaengine: omap-dma: Fix memory leak when terminating running transfer
  dmaengine: edma: fix memory leak when terminating running transfers
  dmaengine: jz4740: Define capabilities

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Thu, 2 Apr 2015 18:09:41 +0000 (11:09 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Fix use-after-free with mac80211 RX A-MPDU reorder timer, from
    Johannes Berg.

 2) iwlwifi leaks memory every module load/unload cycles, fix from Larry
    Finger.

 3) Need to use for_each_netdev_safe() in rtnl_group_changelink()
    otherwise we can crash, from WANG Cong.

 4) mlx4 driver does register_netdev() too early in the probe sequence,
    from Ido Shamay.

 5) Don't allow router discovery hop limit to decrease the interface's
    hop limit, from D.S. Ljungmark.

 6) tx_packets and tx_bytes improperly accounted for certain classes of
    USB network devices, fix from Ben Hutchings.

 7) ip{6}mr_rules_init() mistakenly use plain kfree to release the ipmr
    tables in the error path, they must instead use ip{6}mr_free_table().
    Fix from WANG Cong.

 8) cxgb4 doesn't properly quiesce all RX activity before unregistering
    the netdevice.  Fix from Hariprasad Shenai.

 9) Fix hash corruptions in ipvlan driver, from Jiri Benc.

10) nla_memcpy(), like a real memcpy, should fully initialize the
    destination buffer, even if the source attribute is smaller.  Fix
    from Jiri Benc.

11) Fix wrong error code returned from iucv_sock_sendmsg().  We should
    use whatever sock_alloc_send_skb() put into 'err'.  From Eugene
    Crosser.

12) Fix slab object leak on module unload in TIPC, from Ying Xue.

13) Need a READ_ONCE() when reading the cached RX socket route in
    tcp_v{4,6}_early_demux().  From Michal Kubecek.

14) Still too many problems with TPC support in the ath9k driver, so
    disable it for now.  From Felix Fietkau.

15) When in AP mode the rtlwifi driver can leak DMA mappings, fix from
    Larry Finger.

16) Missing kzalloc() failure check in gs_usb CAN driver, from Colin Ian
    King.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits)
  cxgb4: Fix to dump devlog, even if FW is crashed
  cxgb4: Firmware macro changes for fw verison 1.13.32.0
  bnx2x: Fix kdump when iommu=on
  bnx2x: Fix kdump on 4-port device
  mac80211: fix RX A-MPDU session reorder timer deletion
  MAINTAINERS: Update Intel Wired Ethernet Driver info
  tipc: fix a slab object leak
  net/usb/r8152: add device id for Lenovo TP USB 3.0 Ethernet
  af_iucv: fix AF_IUCV sendmsg() errno
  openvswitch: Return vport module ref before destruction
  netlink: pad nla_memcpy dest buffer with zeroes
  bonding: Bonding Overriding Configuration logic restored.
  ipvlan: fix check for IP addresses in control path
  ipvlan: do not use rcu operations for address list
  ipvlan: protect against concurrent link removal
  ipvlan: fix addr hash list corruption
  net: fec: setup right value for mdio hold time
  net: tcp6: fix double call of tcp_v6_fill_cb()
  cxgb4vf: Fix sparse warnings
  netns: don't clear nsid too early on removal
  ...

10 years agoMerge branch 'netdev_iflink_remove'
David S. Miller [Thu, 2 Apr 2015 18:05:02 +0000 (14:05 -0400)]
Merge branch 'netdev_iflink_remove'

Nicolas Dichtel says:

====================
Remove iflink field from the net_device structure

The first goal of this series was to advertise the veth peer via the IFLA_LINK
attribute, but iflink was not ready for network namespaces.

The iflink of an interface should be set to its ifindex for a physical interface
and to another value (0 if not relevant) for a virtual interface.
This was not the case for some interfaces, like vxlan, bond, or bridge for
example.
There is also a risk, if the targeted interface moves to another netns, that the
ifindex changes without updating corresponding iflink fields (eg. vlan).

Moving the management of this property into virtual interface drivers allows to
better handle this last case because most of virtual interface drivers have a
pointer to the link netdevice.
Anyway, dev->iflink value was always a copy of some internal data of the virtual
interface driver, thus let's use these internal data directly.

So, this series removes the iflink field and let the drivers manage it.
Only the last patch was present in the v1, but I fully rework it.
====================

Signed-off-by: David S. Miller <[email protected]>
10 years agoveth: set iflink to the peer veth
Nicolas Dichtel [Thu, 2 Apr 2015 15:07:11 +0000 (17:07 +0200)]
veth: set iflink to the peer veth

Now that the peer netns is advertised in rtnl messages, we can set this property
so that IFLA_LINK will advertise the peer ifindex. It allows the userland to get
the full veth configuration.

Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agodev: set iflink to 0 for virtual interfaces
Nicolas Dichtel [Thu, 2 Apr 2015 15:07:10 +0000 (17:07 +0200)]
dev: set iflink to 0 for virtual interfaces

Virtual interfaces are supposed to set an iflink value != of their ifindex.
It was not the case for some of them, like vxlan, bond or bridge.
Let's set iflink to 0 when dev->rtnl_link_ops is set.

Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: remove iflink field from struct net_device
Nicolas Dichtel [Thu, 2 Apr 2015 15:07:09 +0000 (17:07 +0200)]
net: remove iflink field from struct net_device

Now that all users of iflink have the ndo_get_iflink handler available, it's
possible to remove this field.

By default, dev_get_iflink() returns the ifindex of the interface.

Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agodsa: implement ndo_get_iflink
Nicolas Dichtel [Thu, 2 Apr 2015 15:07:08 +0000 (17:07 +0200)]
dsa: implement ndo_get_iflink

Don't use dev->iflink anymore.

CC: Florian Fainelli <[email protected]>
Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoinfiniband/ipoib: implement ndo_get_iflink
Nicolas Dichtel [Thu, 2 Apr 2015 15:07:07 +0000 (17:07 +0200)]
infiniband/ipoib: implement ndo_get_iflink

Don't use dev->iflink anymore.

CC: Roland Dreier <[email protected]>
Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoipvlan: implement ndo_get_iflink
Nicolas Dichtel [Thu, 2 Apr 2015 15:07:06 +0000 (17:07 +0200)]
ipvlan: implement ndo_get_iflink

Don't use dev->iflink anymore.

CC: Mahesh Bandewar <[email protected]>
Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agomacvlan: implement ndo_get_iflink
Nicolas Dichtel [Thu, 2 Apr 2015 15:07:05 +0000 (17:07 +0200)]
macvlan: implement ndo_get_iflink

Don't use dev->iflink anymore.

CC: Patrick McHardy <[email protected]>
Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agovlan: implement ndo_get_iflink
Nicolas Dichtel [Thu, 2 Apr 2015 15:07:04 +0000 (17:07 +0200)]
vlan: implement ndo_get_iflink

Don't use dev->iflink anymore.

CC: Patrick McHardy <[email protected]>
Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoipmr,ip6mr: implement ndo_get_iflink
Nicolas Dichtel [Thu, 2 Apr 2015 15:07:03 +0000 (17:07 +0200)]
ipmr,ip6mr: implement ndo_get_iflink

Don't use dev->iflink anymore.

Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoipip,gre,vti,sit: implement ndo_get_iflink
Nicolas Dichtel [Thu, 2 Apr 2015 15:07:02 +0000 (17:07 +0200)]
ipip,gre,vti,sit: implement ndo_get_iflink

Don't use dev->iflink anymore.

CC: Steffen Klassert <[email protected]>
Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoip6tnl,gre6,vti6: implement ndo_get_iflink
Nicolas Dichtel [Thu, 2 Apr 2015 15:07:01 +0000 (17:07 +0200)]
ip6tnl,gre6,vti6: implement ndo_get_iflink

Don't use dev->iflink anymore.

CC: Steffen Klassert <[email protected]>
Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agodev: introduce dev_get_iflink()
Nicolas Dichtel [Thu, 2 Apr 2015 15:07:00 +0000 (17:07 +0200)]
dev: introduce dev_get_iflink()

The goal of this patch is to prepare the removal of the iflink field. It
introduces a new ndo function, which will be implemented by virtual interfaces.

There is no functional change into this patch. All readers of iflink field
now call dev_get_iflink().

Signed-off-by: Nicolas Dichtel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoIB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic
Shachar Raindel [Wed, 18 Mar 2015 17:39:08 +0000 (17:39 +0000)]
IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic

Properly verify that the resulting page aligned end address is larger
than both the start address and the length of the memory area requested.

Both the start and length arguments for ib_umem_get are controlled by
the user. A misbehaving user can provide values which will cause an
integer overflow when calculating the page aligned end address.

This overflow can cause also miscalculation of the number of pages
mapped, and additional logic issues.

Addresses: CVE-2014-8159
Cc: <[email protected]>
Signed-off-by: Shachar Raindel <[email protected]>
Signed-off-by: Jack Morgenstein <[email protected]>
Signed-off-by: Or Gerlitz <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
10 years agoperf/x86/intel: Fix Haswell CYCLE_ACTIVITY.* counter constraints
Andi Kleen [Mon, 9 Mar 2015 18:20:22 +0000 (11:20 -0700)]
perf/x86/intel: Fix Haswell CYCLE_ACTIVITY.* counter constraints

Some of the CYCLE_ACTIVITY.* events can only be scheduled on
counter 2.  Due to a typo Haswell matched those with
INTEL_EVENT_CONSTRAINT, which lead to the events never
matching as the comparison does not expect anything
in the umask too. Fix the typo.

Signed-off-by: Andi Kleen <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
10 years agoperf/x86/intel: Filter branches for PEBS event
Kan Liang [Fri, 27 Mar 2015 14:38:25 +0000 (10:38 -0400)]
perf/x86/intel: Filter branches for PEBS event

For supporting Intel LBR branches filtering, Intel LBR sharing logic
mechanism is introduced from commit b36817e88630 ("perf/x86: Add Intel
LBR sharing logic"). It modifies __intel_shared_reg_get_constraints() to
config lbr_sel, which is finally used to set LBR_SELECT.

However, the intel_shared_regs_constraints() function is called after
intel_pebs_constraints(). The PEBS event will return immediately after
intel_pebs_constraints(). So it's impossible to filter branches for PEBS
events.

This patch moves intel_shared_regs_constraints() ahead of
intel_pebs_constraints().

We can safely do that because the intel_shared_regs_constraints() function
only returns empty constraint if its rejecting the event, otherwise it
returns NULL such that we continue calling intel_pebs_constraints() and
x86_get_event_constraint().

Signed-off-by: Kan Liang <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
10 years agoBluetooth: Convert local OOB data reading to use HCI request
Johan Hedberg [Thu, 2 Apr 2015 10:41:13 +0000 (13:41 +0300)]
Bluetooth: Convert local OOB data reading to use HCI request

Now that there's a HCI request API available where the callback receives
the resulting skb, we can convert the local OOB data reading to use this
new API. This patch does the necessary update in mgmt.c (which also
requires moving the callback higher up since it's now a static function)
and removes the custom calls from hci_event.c that are no-longer
necessary.

Signed-off-by: Johan Hedberg <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
10 years agoBluetooth: Move hci_get_cmd_complete() to hci_event.c
Johan Hedberg [Thu, 2 Apr 2015 10:41:12 +0000 (13:41 +0300)]
Bluetooth: Move hci_get_cmd_complete() to hci_event.c

To make the hci_req_run_skb() API consistent with hci_cmd_sync_ev()
the callback should receive the cmd_complete parameters in the 'normal'
case and the full HCI event if a special event was expected. This patch
moves the hci_get_cmd_complete() function from hci_core.c to hci_event.c
where it's used to strip the skb from the needed headers before passing
it on to the callback.

Signed-off-by: Johan Hedberg <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
10 years agoBluetooth: Remove unused hci_req_pending() function
Johan Hedberg [Thu, 2 Apr 2015 10:41:11 +0000 (13:41 +0300)]
Bluetooth: Remove unused hci_req_pending() function

The hci_req_pending() function has no users anymore, so simply remove
it.

Signed-off-by: Johan Hedberg <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
10 years agoBluetooth: Remove unneeded recv_event variable
Johan Hedberg [Thu, 2 Apr 2015 10:41:10 +0000 (13:41 +0300)]
Bluetooth: Remove unneeded recv_event variable

Now that the synchronous HCI requests use the new API and a new private
variable the recv_evt member of hci_dev is no-longer needed. This patch
removes it.

Signed-off-by: Johan Hedberg <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
10 years agoBluetooth: Convert hci_req_sync family of function to new request API
Johan Hedberg [Thu, 2 Apr 2015 10:41:09 +0000 (13:41 +0300)]
Bluetooth: Convert hci_req_sync family of function to new request API

Now that there's an API in place that allows passing the resulting skb
to the request callback we can conveniently convert the hci_req_sync and
related functions to use it. Since we still need to get the skb from the
async callback into the sleeping _sync() function the patch adds another
req_skb variable to hci_dev where the sync request state is tracked.

Signed-off-by: Johan Hedberg <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
10 years agoBluetooth: Add second hci_request callback option for full skb
Johan Hedberg [Thu, 2 Apr 2015 10:41:08 +0000 (13:41 +0300)]
Bluetooth: Add second hci_request callback option for full skb

This patch adds a second possible callback for HCI requests where the
callback will receive the full skb of the last successfully completed
HCI command. This API is useful for cases where we want to use a request
to read some data and the existing hci_event.c handlers do not store it
e.g. in the hci_dev struct.

The reason the patch is a bit bigger than just adding the new API is
because the hci_req_cmd_complete() functions required some refactoring
to enable it: now hci_req_cmd_complete() is simply used to request the
callback pointers if any, and the actual calling of them happens from a
single place at the end of hci_event_packet(). The reason for this is
that we need to pass the original skb (without any skb_pull, etc
modifications done to it) and it's simplest to keep track of it within
the hci_event_packet() function.

Signed-off-by: Johan Hedberg <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
10 years agoBluetooth: Add clarifying comment to command status handling
Johan Hedberg [Thu, 2 Apr 2015 10:41:07 +0000 (13:41 +0300)]
Bluetooth: Add clarifying comment to command status handling

When dealing with HCI command status events, the reasoning for trying to
mark a request as complete if no specific event is being waited for and
status was success is not self-evident. This patch adds a clarifying
comment above the if-statement.

Signed-off-by: Johan Hedberg <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
10 years agodrm/radeon: fix wait in radeon_mn_invalidate_range_start
Christian König [Tue, 31 Mar 2015 15:36:58 +0000 (17:36 +0200)]
drm/radeon: fix wait in radeon_mn_invalidate_range_start

We need to wait for all fences, not just the exclusive one.

Signed-off-by: Christian König <[email protected]>
Cc: <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
10 years agodrm/radeon: add extra check in radeon_ttm_tt_unpin_userptr
Christian König [Tue, 31 Mar 2015 15:36:57 +0000 (17:36 +0200)]
drm/radeon: add extra check in radeon_ttm_tt_unpin_userptr

We somehow try to free the SG table twice.

Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=89734

Signed-off-by: Christian König <[email protected]>
Cc: <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
10 years agodrm: Exynos: Respect framebuffer pitch for FIMD/Mixer
Daniel Stone [Tue, 17 Mar 2015 13:24:58 +0000 (13:24 +0000)]
drm: Exynos: Respect framebuffer pitch for FIMD/Mixer

When performing a modeset, use the framebuffer pitch value to set FIMD
IMG_SIZE and Mixer SPAN registers. These are both defined as pitch - the
distance between contiguous lines (bytes for FIMD, pixels for mixer).

Fixes display on Snow (1366x768).

Signed-off-by: Daniel Stone <[email protected]>
Tested-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
10 years agokgdb/x86: Fix reporting of 'si' in kgdb on x86_64
Steffen Liebergeld [Thu, 2 Apr 2015 09:01:59 +0000 (11:01 +0200)]
kgdb/x86: Fix reporting of 'si' in kgdb on x86_64

This patch fixes an error in kgdb for x86_64 which would report
the value of dx when asked to give the value of si.

Signed-off-by: Steffen Liebergeld <[email protected]>
Cc: Jason Wessel <[email protected]>
Cc: [email protected]
Signed-off-by: Ingo Molnar <[email protected]>
10 years agox86/asm/entry/64: Disable opportunistic SYSRET if regs->flags has TF set
Andy Lutomirski [Wed, 1 Apr 2015 21:26:34 +0000 (14:26 -0700)]
x86/asm/entry/64: Disable opportunistic SYSRET if regs->flags has TF set

When I wrote the opportunistic SYSRET code, I missed an important difference
between SYSRET and IRET.

Both instructions are capable of setting EFLAGS.TF, but they behave differently
when doing so:

 - IRET will not issue a #DB trap after execution when it sets TF.
   This is critical -- otherwise you'd never be able to make forward progress when
   returning to userspace.

 - SYSRET, on the other hand, will trap with #DB immediately after
   returning to CPL3, and the next instruction will never execute.

This breaks anything that opportunistically SYSRETs to a user
context with TF set.  For example, running this code with TF set
and a SIGTRAP handler loaded never gets past 'post_nop':

extern unsigned char post_nop[];
asm volatile ("pushfq\n\t"
      "popq %%r11\n\t"
      "nop\n\t"
      "post_nop:"
      : : "c" (post_nop) : "r11");

In my defense, I can't find this documented in the AMD or Intel manual.

Fix it by using IRET to restore TF.

Signed-off-by: Andy Lutomirski <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Fixes: 2a23c6b8a9c4 ("x86_64, entry: Use sysret to return to userspace when possible")
Link: http://lkml.kernel.org/r/9472f1ca4c19a38ecda45bba9c91b7168135fcfa.1427923514.git.luto@kernel.org
Signed-off-by: Ingo Molnar <[email protected]>
10 years agonetfilter: bridge: really save frag_max_size between PRE and POST_ROUTING
Florian Westphal [Wed, 1 Apr 2015 20:36:27 +0000 (22:36 +0200)]
netfilter: bridge: really save frag_max_size between PRE and POST_ROUTING

We also need to save/store in forward, else br_parse_ip_options call
will zero frag_max_size as well.

Fixes: 93fdd47e5 ('bridge: Save frag_max_size between PRE_ROUTING and POST_ROUTING')
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
10 years agodrm/i915: Reject the colorkey ioctls for primary and cursor planes
Ville Syrjälä [Fri, 27 Mar 2015 17:59:40 +0000 (19:59 +0200)]
drm/i915: Reject the colorkey ioctls for primary and cursor planes

The legcy colorkey ioctls are only implemented for sprite planes, so
reject the ioctl for primary/cursor planes. If we want to support
colorkeying with these planes (assuming we have hw support of course)
we should just move ahead with the colorkey property conversion.

Testcase: kms_legacy_colorkey
Cc: Tommi Rantala <[email protected]>
Cc: [email protected]
Reference: http://mid.gmane.org/CA+ydwtr+bCo7LJ44JFmUkVRx144UDFgOS+aJTfK6KHtvBDVuAw@mail.gmail.com
Reported-and-tested-by: Tommi Rantala <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
10 years agoiwlwifi: mvm: capture connection loss as part of MLME trigger
Emmanuel Grumbach [Mon, 30 Mar 2015 07:55:57 +0000 (10:55 +0300)]
iwlwifi: mvm: capture connection loss as part of MLME trigger

The only other way to catch these would have been to monitor
the Tx deauth event, but we can send a deauth when we roam.
So it would have been tricky to make sure we capture the
connection losses only.
Define a separate trigger for the connection losses to make
it easier to catch them.

Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
10 years agoiwlwifi: mvm: add trigger for time events
Emmanuel Grumbach [Wed, 25 Mar 2015 20:40:47 +0000 (22:40 +0200)]
iwlwifi: mvm: add trigger for time events

This will allow to collect data when a time event
notifcation with a certain id and action is coming from
the firmware. This can be very useful to debug various
flows.

Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
10 years agoiwlwifi: mvm: do string formatting in debug triggers
Johannes Berg [Tue, 31 Mar 2015 07:12:54 +0000 (09:12 +0200)]
iwlwifi: mvm: do string formatting in debug triggers

The current code has a lot of duplicates of printing into a buffer
(while having to make sure it's NUL-filled and -terminated) and
then passing that to the debug trigger collection.

Since that's error-prone, instead make the debug trigger collection
function take a format string and format arguments (with compiler
validity checking) and handle the buffer internally.

This makes one behavioural change -- instead of sending the whole
buffer to userspace (clearing is needed to not leak stack data) it
just passes the actual string (including NUL-terminator.)

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
10 years agoiwlwifi: fix spelling errors
Sara Sharon [Tue, 31 Mar 2015 09:24:05 +0000 (12:24 +0300)]
iwlwifi: fix spelling errors

Fix spelling error across the driver.
Modified only comments and prints.

Signed-off-by: Sara Sharon <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
10 years agoiwlwifi: mvm: don't return uninitialized value in get_survey()
Johannes Berg [Wed, 1 Apr 2015 08:00:31 +0000 (10:00 +0200)]
iwlwifi: mvm: don't return uninitialized value in get_survey()

If ucode_loaded isn't true the function returns the 'ret' variable
without having assigned a value properly. Fix that.

Reported-by: Haim Dreyfuss <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
10 years agoiwlwifi: mvm: add trigger for firmware dump upon MLME failures
Emmanuel Grumbach [Tue, 10 Feb 2015 12:29:48 +0000 (14:29 +0200)]
iwlwifi: mvm: add trigger for firmware dump upon MLME failures

This will allow to catch failures in MLME and get the
firmware data when this happens.

Signed-off-by: Emmanuel Grumbach <[email protected]>
10 years agoMerge tag 'mac80211-next-for-davem-2015-03-30' into iwlwifi-next
Emmanuel Grumbach [Thu, 2 Apr 2015 06:26:51 +0000 (09:26 +0300)]
Merge tag 'mac80211-next-for-davem-2015-03-30' into iwlwifi-next

Lots of updates for net-next; along with the usual flurry
of small fixes, cleanups and internal features we have:
 * VHT support for TDLS and IBSS (conditional on drivers though)
 * first TX performance improvements (the biggest will come later)
 * many suspend/resume (race) fixes
 * name_assign_type support from Tom Gundersen

10 years agoiwlwifi: mvm: remove unused arguments
Johannes Berg [Tue, 31 Mar 2015 06:58:16 +0000 (08:58 +0200)]
iwlwifi: mvm: remove unused arguments

The str/len arguments to iwl_fw_dbg_trigger_simple_stop() aren't used,
and for a simple trigger don't really need to be used as the trigger
code itself encodes the reason, so remove them.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
10 years agoiwlwifi: mvm: Fix wrongfully flushing frames in the roc/off channel queue
Matti Gottlieb [Mon, 30 Mar 2015 13:50:07 +0000 (16:50 +0300)]
iwlwifi: mvm: Fix wrongfully flushing frames in the roc/off channel queue

Sending multiple action frames off channel, one after the other can create
a race that will result in a timeout:

1. Start sending action frame off channel.
2. Once the frame is sent or the time event is over, the flow will
eventually call ieee80211_start_next_roc to start the next roc frame &
iwl_mvm_roc_finished schedules to schedule a work to flush the queue.
3. Start sending new roc frame and write it to the queue before the
flush work has started.
4. The work is called and it flushes the new packet that was placed on the
on the queue so the packet is lost.

This causes the frame to be removed & not sent, that causes a timeout in
userspace.

Flush the work queue that flushes the roc/off channel queue before starting
to send a new frame off channel, in order to avoid a race between the new
frame that is transmitted off channel & the flushing of the queue.

Signed-off-by: Matti Gottlieb <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
10 years agoiwlwifi: mvm: always reconfigure last MCC on init
Arik Nemtsov [Mon, 23 Mar 2015 12:32:53 +0000 (14:32 +0200)]
iwlwifi: mvm: always reconfigure last MCC on init

Currently the last found MCC is reconfigured only in the recovery flow.
But it should always be used when available, for the ifdown/up or
RF-Kill/CT-Kill scenarios.
While at it, fix a couple of bugs in the init-from-last-MCC flow. Return
an error value when a current MCC is not found. Pass on the regdomain to
cfg80211 only if it was changed and don't ignore the return value from
the cfg80211-setter function.

Signed-off-by: Arik Nemtsov <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
10 years agoiwlwifi: mvm: add debugfs entry with the number of net-detect scans
Luciano Coelho [Mon, 30 Mar 2015 17:46:32 +0000 (20:46 +0300)]
iwlwifi: mvm: add debugfs entry with the number of net-detect scans

Our testers need to know the number of scans performed while in
net-detect mode before the device wakes up.  The firmware already
passes this information to the driver, so we can save it and report it
in a debugfs entry.

Signed-off-by: Luciano Coelho <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
10 years agoiwlwifi: mvm: rs: refactor rs_update_rate_tbl
Eyal Shapira [Sun, 29 Mar 2015 15:38:07 +0000 (18:38 +0300)]
iwlwifi: mvm: rs: refactor rs_update_rate_tbl

Minor cleanup and refactoring.

Signed-off-by: Eyal Shapira <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
10 years agoBluetooth: Export SMP selftest result in debugfs
Marcel Holtmann [Wed, 1 Apr 2015 19:52:13 +0000 (12:52 -0700)]
Bluetooth: Export SMP selftest result in debugfs

When SMP selftest is enabled, then besides printing the result into the
kernel message buffer, also create a debugfs file that allows retrieving
the same information.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
10 years agoBluetooth: Export ECDH selftest result in debugfs
Marcel Holtmann [Wed, 1 Apr 2015 19:52:12 +0000 (12:52 -0700)]
Bluetooth: Export ECDH selftest result in debugfs

When ECDH selftest is enabled, then besides printing the result into the
kernel message buffer, also create a debugfs file that allows retrieving
the same information.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
10 years agoBluetooth: Restrict BNEP flags to only valid ones
Marcel Holtmann [Wed, 1 Apr 2015 20:51:54 +0000 (13:51 -0700)]
Bluetooth: Restrict BNEP flags to only valid ones

The BNEP flags should be clearly restricted to valid ones. So this puts
extra checks in place to ensure this.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
10 years agoBluetooth: Restrict HIDP flags to only valid ones
Marcel Holtmann [Wed, 1 Apr 2015 20:51:53 +0000 (13:51 -0700)]
Bluetooth: Restrict HIDP flags to only valid ones

The HIDP flags should be clearly restricted to valid ones. So this puts
extra checks in place to ensure this.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
10 years agoBluetooth: Restrict CMTP flags to only valid ones
Marcel Holtmann [Wed, 1 Apr 2015 20:51:52 +0000 (13:51 -0700)]
Bluetooth: Restrict CMTP flags to only valid ones

The CMTP flags should be clearly restricted to valid ones. So this puts
extra checks in place to ensure this.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
10 years agoBluetooth: Remove unneeded extra ( ) in valid flags check
Marcel Holtmann [Wed, 1 Apr 2015 20:51:51 +0000 (13:51 -0700)]
Bluetooth: Remove unneeded extra ( ) in valid flags check

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
10 years agoBluetooth: Expose current Device ID information via debugfs
Marcel Holtmann [Wed, 1 Apr 2015 20:21:37 +0000 (13:21 -0700)]
Bluetooth: Expose current Device ID information via debugfs

For debugging purposes it is good to be able to read the current
configured Device ID details.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
10 years agocrypto: algif - explicitly mark end of data
[email protected] [Wed, 1 Apr 2015 20:53:06 +0000 (13:53 -0700)]
crypto: algif - explicitly mark end of data

After the TX sgl is expanded we need to explicitly mark end of data
at the last buffer that contains data.

Changes in v2
 - use type 'bool' and true/false for 'mark'.

Signed-off-by: Tadeusz Struk <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge branch 'dsa-next'
David S. Miller [Thu, 2 Apr 2015 02:55:41 +0000 (22:55 -0400)]
Merge branch 'dsa-next'

Andrew Lunn says:

====================
DSA Mavell drivers refactoring and cleanup

v1->v2:
 * Add missing signed-of-by: For patches authored by Guenter Roeck.
 * Add Reviewed by from Guenter Roack to patch #5.

This is a collection of patches again net-next from today containing
refactoring and consolidate of code, cleanups and using #define's to
replace register numbers.

Patch #1 Swaps the 6131 driver to use the consolidated setup code.

Patch #2 Moves the Switch IDs used during probe into a central
         location.  We need these later so that we can differentiate
         the different features the devices have.

Patch #3 Makes the 6131 driver set the number of ports in the private
         state structure. It then uses this, rather than hard coded
         maximum number of ports.

Patch #4 Similar to Patch #3, but for the 6123_61_65 driver.

Patch #5 Similar to Patch #3, and #4, but for all the remaining
         drivers.  This greatly increases the similarity of the code
         between drivers, allow further patches to consolidate the
         duplicated code.

Patch #6 Consolidate the switch reset code, which has two minor
         variants. Removes around 35 lines per driver.

Patch #7 Moves phy page access functions out of the 6352 driver into
         the shared code. Currently only the 6352 driver uses this,
         but it is likely other devices will come along wanting this
         functionality.

Patch #8 Consolidates the code used to access phy registers. Removes
         around 40 lines of code per driver.

Patch #9 Fixes missing mutex locking in the EEE code, and refactors
         the code a bit to make it more understandable with respect to
         locks.

Patch #10 Consolidates reading statistics. This is very similar code
          for all devices, but the number of available statistics
          differ, which can be determined from the product ID. Removes
  around 65 lines per driver.

Patch #11 Add #defines for registers, and bits within the
          registers. For the moment, this is limited to the shared
          code. The individual drivers will be converted once the
          remaining duplicated code is consolidated

Patch #12 Fix broken statistic counters on the 6172. The 6352 family
          requires the port number is poked into a different set of
          bits in the register compared to other devices.

Many thanks to Guenter Roeck for repeatedly reviewing the patches and
testing them on his hardware.
====================

Signed-off-by: David S. Miller <[email protected]>
10 years agonet: dsa: mv88e6xxx: Fix stats counters for 6352 family
Andrew Lunn [Thu, 2 Apr 2015 02:06:40 +0000 (04:06 +0200)]
net: dsa: mv88e6xxx: Fix stats counters for 6352 family

The statistic counters for the mv88e6172 never worked. This device is
a member of the 6352 family of chips, which has a slightly different
layout of the register used for capturing statistics. Add support for
detecting this family and poking the port in the right place in the
register.

Signed-off-by: Andrew Lunn <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: dsa: Use mnemonics rather than register numbers
Andrew Lunn [Thu, 2 Apr 2015 02:06:39 +0000 (04:06 +0200)]
net: dsa: Use mnemonics rather than register numbers

Rather than refer to registers by number, define mnemonics. Also
define mnemonics for the commonly used bits within the registers.

Signed-off-by: Andrew Lunn <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: dsa: Consolidate getting the statistics
Andrew Lunn [Thu, 2 Apr 2015 02:06:38 +0000 (04:06 +0200)]
net: dsa: Consolidate getting the statistics

Reading the statistics from the hardware is the same for all
chips. What differs is the number of available statistics. Have just
one copy of the code in the shared mv88e6xxx.

Signed-off-by: Andrew Lunn <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: dsa: mv88e6xxx: Add missing mutex's in EEE operations.
Andrew Lunn [Thu, 2 Apr 2015 02:06:37 +0000 (04:06 +0200)]
net: dsa: mv88e6xxx: Add missing mutex's in EEE operations.

The phy_mutex should be held while reading and writing to the phy.

Signed-off-by: Andrew Lunn <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: dsa: Consolidate phy read and write functions
Andrew Lunn [Thu, 2 Apr 2015 02:06:36 +0000 (04:06 +0200)]
net: dsa: Consolidate phy read and write functions

Move the common code for reading and writing phy registers into the
shared mv88e6xxx.

Signed-off-by: Andrew Lunn <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: dsa: Move phy page access functions into shared code
Andrew Lunn [Thu, 2 Apr 2015 02:06:35 +0000 (04:06 +0200)]
net: dsa: Move phy page access functions into shared code

These functions could in future be used by other drivers. Move them
into the shared area.

Signed-off-by: Andrew Lunn <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: dsa: Centralize Marvell switch reset
Andrew Lunn [Thu, 2 Apr 2015 02:06:34 +0000 (04:06 +0200)]
net: dsa: Centralize Marvell switch reset

Marvell switches are all reset in nearly the same way. The only
difference is if the PPU should be enabled or not. Move this
code into the shared mv88x6xxx.c.

Signed-off-by: Andrew Lunn <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: dsa: Consistently set and use ps->num_ports
Andrew Lunn [Thu, 2 Apr 2015 02:06:33 +0000 (04:06 +0200)]
net: dsa: Consistently set and use ps->num_ports

As a step towards consolidating code, consistently set the
number of ports in the private state structure, and make use of it in
loops.

Signed-off-by: Andrew Lunn <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: dsa: mv88e6123_61_65: Determine and use number of switch ports
Guenter Roeck [Thu, 2 Apr 2015 02:06:32 +0000 (04:06 +0200)]
net: dsa: mv88e6123_61_65: Determine and use number of switch ports

Determine and use number of switch ports from chip ID instead of always
using the maximum, and return error when an attempt is made to access a
non-existing port.

Signed-off-by: Guenter Roeck <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Signed-off-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: dsa: mv88e6131: Determine and use number of switch ports
Guenter Roeck [Thu, 2 Apr 2015 02:06:31 +0000 (04:06 +0200)]
net: dsa: mv88e6131: Determine and use number of switch ports

Determine and use number of switch ports from chip ID instead of always
using the maximum, and return error when an attempt is made to access a
non-existing port.

Signed-off-by: Guenter Roeck <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Signed-off-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: dsa: mv88e6xxx: Move switch product IDs into common include file
Guenter Roeck [Thu, 2 Apr 2015 02:06:30 +0000 (04:06 +0200)]
net: dsa: mv88e6xxx: Move switch product IDs into common include file

This will let us use the switch product IDs in the common source code.

Signed-off-by: Guenter Roeck <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Signed-off-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agonet: dsa: mv88e6131: Use common initialization functions
Guenter Roeck [Thu, 2 Apr 2015 02:06:29 +0000 (04:06 +0200)]
net: dsa: mv88e6131: Use common initialization functions

Common initialization functions will be needed to enable
HW bridging support.

Signed-off-by: Guenter Roeck <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Signed-off-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agopkt_sched: fq: correct spelling of locally
Simon Horman [Thu, 2 Apr 2015 02:20:23 +0000 (11:20 +0900)]
pkt_sched: fq: correct spelling of locally

Correct spelling of locally.

Also remove extra space before tab character in struct fq_flow.

Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agovxlan: correct spelling in comments
Simon Horman [Thu, 2 Apr 2015 02:17:58 +0000 (11:17 +0900)]
vxlan: correct spelling in comments

Fix some spelling / typos:
* droppped -> dropped
* asddress -> address
* compatbility -> compatibility

Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agovmxnet3: spelling fixes
stephen hemminger [Wed, 1 Apr 2015 22:33:08 +0000 (15:33 -0700)]
vmxnet3: spelling fixes

Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agovxge: Add const to ethtool_driver_stats_keys
Joe Perches [Wed, 1 Apr 2015 19:29:13 +0000 (12:29 -0700)]
vxge: Add const to ethtool_driver_stats_keys

Move about half a KB of data to text.

Miscellanea:

o Move strings out of the .h file into the .c file
  in case the .h file is ever #included twice

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agocrypto: algif - use kmalloc instead of kzalloc
Tadeusz Struk [Mon, 30 Mar 2015 21:25:44 +0000 (14:25 -0700)]
crypto: algif - use kmalloc instead of kzalloc

No need to use kzalloc to allocate sgls as the structure is initialized anyway.

Signed-off-by: Tadeusz Struk <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agocrypto: af_alg - make exports consistant
Tadeusz Struk [Mon, 30 Mar 2015 21:25:43 +0000 (14:25 -0700)]
crypto: af_alg - make exports consistant

Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL.

Signed-off-by: Tadeusz Struk <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge tag 'wireless-drivers-for-davem-2015-04-01' of git://git.kernel.org/pub/scm...
David S. Miller [Wed, 1 Apr 2015 18:48:50 +0000 (14:48 -0400)]
Merge tag 'wireless-drivers-for-davem-2015-04-01' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers

Kalle Valo says:

====================
iwlwifi:

* fix a memory leak, we leaked memory each time the module
  was loaded.
====================

Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge branch 'cxgb4-net'
David S. Miller [Wed, 1 Apr 2015 18:47:21 +0000 (14:47 -0400)]
Merge branch 'cxgb4-net'

Hariprasad Shenai says:

====================
cxgb4 FW macro changes for new FW

Fix to dump device log even in the case of firmware crash. Also
incorporates changes for new FW.

This patch series has been created against net tree and includes patches on
cxgb4 driver.

We have included all the maintainers of respective drivers. Kindly review the
change and let us know in case of any review comments.
====================

Signed-off-by: David S. Miller <[email protected]>
10 years agocxgb4: Fix to dump devlog, even if FW is crashed
Hariprasad Shenai [Wed, 1 Apr 2015 16:11:16 +0000 (21:41 +0530)]
cxgb4: Fix to dump devlog, even if FW is crashed

Add new Common Code routines to retrieve Firmware Device Log
parameters from PCIE_FW_PF[7]. The firmware initializes its Device Log very
early on and stores the parameters for its location/size in that register.
Using the parameters from the register allows us to access the Firmware
Device Log even when the firmware crashes very early on or we're not
attached to the firmware

Based on original work by Casey Leedom <[email protected]>

Signed-off-by: Hariprasad Shenai <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agocxgb4: Firmware macro changes for fw verison 1.13.32.0
Hariprasad Shenai [Wed, 1 Apr 2015 16:11:15 +0000 (21:41 +0530)]
cxgb4: Firmware macro changes for fw verison 1.13.32.0

Adds new macro and few macro changes for fw version 1.13.32.0 also
changes version string in driver to match 1.13.32.0

Signed-off-by: Hariprasad Shenai <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agomac80211: add an intermediate software queue implementation
Felix Fietkau [Fri, 27 Mar 2015 20:30:37 +0000 (21:30 +0100)]
mac80211: add an intermediate software queue implementation

This allows drivers to request per-vif and per-sta-tid queues from which
they can pull frames. This makes it easier to keep the hardware queues
short, and to improve fairness between clients and vifs.

The task of scheduling packet transmission is left up to the driver -
queueing is controlled by mac80211. Drivers can only dequeue packets by
calling ieee80211_tx_dequeue. This makes it possible to add active queue
management later without changing drivers using this code.

This can also be used as a starting point to implement A-MSDU
aggregation in a way that does not add artificially induced latency.

Signed-off-by: Felix Fietkau <[email protected]>
[resolved minor context conflict, minor changes, endian annotations]
Signed-off-by: Johannes Berg <[email protected]>
10 years agomac80211: reduce log spam from ieee80211_handle_pwr_constr
John Linville [Tue, 31 Mar 2015 14:49:14 +0000 (10:49 -0400)]
mac80211: reduce log spam from ieee80211_handle_pwr_constr

This changes a couple of messages from sdata_info to sdata_dbg.
This should reduce some log spam, as reported here:

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

Signed-off-by: John W. Linville <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
10 years agomac80211: add standard deviation to Minstrel stats
Thomas Huehn [Tue, 24 Mar 2015 20:09:43 +0000 (21:09 +0100)]
mac80211: add standard deviation to Minstrel stats

This patch adds the statistical descriptor "standard deviation"
to better describe the current properties of Minstrel and
Minstrel-HTs success probability distribution. The standard
deviation (SD) is calculated as exponential weighted moving
standard deviation (EWMSD) and its current value is added as
new column in all rc_stats (in debugfs).

Signed-off-by: Thomas Huehn <[email protected]>
Acked-by: Felix Fietkau <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
10 years agomac80211: reduce calculation costs of EWMA
Thomas Huehn [Tue, 24 Mar 2015 20:09:42 +0000 (21:09 +0100)]
mac80211: reduce calculation costs of EWMA

This patch reduces the calculation costs of the EWMA macro from
"2x multiplication and 1 addition" down to "1x multiplication and
2x additions". This slightly improves performance depending on the
CPU architecture.

Signed-off-by: Thomas Huehn <[email protected]>
Acked-by: Felix Fietkau <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
10 years agomac80211: add max lossless throughput per rate
Thomas Huehn [Tue, 24 Mar 2015 20:09:41 +0000 (21:09 +0100)]
mac80211: add max lossless throughput per rate

This patch adds the new statistic "maximum possible lossless
throughput" to Minstrels and Minstrel-HTs rc_stats (in debugfs). This
enables comprehensive comparison between current per-rate throughput
and max. achievable per-rate throughput.

Signed-off-by: Thomas Huehn <[email protected]>
Acked-by: Felix Fietkau <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
10 years agomac80211: restructure per-rate throughput calculation into function
Thomas Huehn [Tue, 24 Mar 2015 20:09:40 +0000 (21:09 +0100)]
mac80211: restructure per-rate throughput calculation into function

This patch moves Minstrels and Minstrel-HTs per-rate throughput
calculation (EWMA(thr)) into a dedicated function to be called.
Therefore the variable "unsigned int cur_tp" within struct
"minstrel_rate_stats" becomes obsolete.  and is removed to free
up its space.

Signed-off-by: Thomas Huehn <[email protected]>
Acked-by: Felix Fietkau <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
10 years agomac80211: improve Minstrel variable & function naming
Thomas Huehn [Tue, 24 Mar 2015 20:09:39 +0000 (21:09 +0100)]
mac80211: improve Minstrel variable & function naming

This patch ensures a consistent usage of variable names for type
"minstrel_rate_stats" to be used as "mrs" and from type minstrel_rate
as "mr" across both Minstrel & Minstrel-HT. In addition some
variable and function names got changed to more meaningful ones.

Signed-off-by: Thomas Huehn <[email protected]>
Acked-by: Felix Fietkau <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
10 years agomac80211: unify Minstrel & Minstrel-HTs calculation of rate statistics
Thomas Huehn [Tue, 24 Mar 2015 20:09:38 +0000 (21:09 +0100)]
mac80211: unify Minstrel & Minstrel-HTs calculation of rate statistics

This patch unifies the calculation of Minstrels and Minstrel-HTs
per-rate statistic. The new common function minstrel_calc_rate_stats()
is called when a statistic update is performed.

Signed-off-by: Thomas Huehn <[email protected]>
Acked-by: Felix Fietkau <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
10 years agomac80211: add new Minstrel-HT statistic output via csv
Thomas Huehn [Tue, 24 Mar 2015 20:09:37 +0000 (21:09 +0100)]
mac80211: add new Minstrel-HT statistic output via csv

This patch adds a new debugfs file "rc_stats_csv" to output
Minstrel-HTs statistics in a common csv format that is easy
to parse.

Signed-off-by: Thomas Huehn <[email protected]>
Signed-off-by: Stefan Venz <[email protected]>
Acked-by: Felix Fietkau <[email protected]>
[remove printing current time of day]
Signed-off-by: Johannes Berg <[email protected]>
10 years agomac80211: add new Minstrel statistic output via csv
Thomas Huehn [Tue, 24 Mar 2015 20:09:36 +0000 (21:09 +0100)]
mac80211: add new Minstrel statistic output via csv

This patch adds a new debugfs file "rc_stats_csv" to output Minstrels
statistics in a common csv format that is easy to parse.

Signed-off-by: Thomas Huehn <[email protected]>
Signed-off-by: Stefan Venz <[email protected]>
Acked-by: Felix Fietkau <[email protected]>
[remove printing current time of day]
Signed-off-by: Johannes Berg <[email protected]>
10 years agochelsio cxgb/cxgb3: Make stats_strings arrays const
Joe Perches [Wed, 1 Apr 2015 15:49:24 +0000 (08:49 -0700)]
chelsio cxgb/cxgb3: Make stats_strings arrays const

Move ~2KB of strings in each driver from data to text.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge tag 'wireless-drivers-next-for-davem-2015-04-01' of git://git.kernel.org/pub...
David S. Miller [Wed, 1 Apr 2015 18:27:28 +0000 (14:27 -0400)]
Merge tag 'wireless-drivers-next-for-davem-2015-04-01' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next

Kalle Valo says:

====================
Major changes:

ath9k:

* add Active Interference Cancellation, a method implemented in the HW
  to counter WLAN RX > sensitivity degradation when BT is transmitting
  at the same time. This feature is supported by cards like WB222
  based on AR9462.

iwlwifi:

* Location Aware Regulatory was added by Arik
* 8000 device family work
* update to the BT Coex firmware API

brmcfmac:

* add new BCM43455 and BCM43457 SDIO device support
* add new BCM43430 SDIO device support

wil6210:

* take care of AP bridging
* fix NAPI behavior
* found approach to achieve 4*n+2 alignment of Rx frames

rt2x00:

* add new rt2800usb device DWA 130

rtlwifi:

* add USB ID for D-Link DWA-131
* add USB ID ASUS N10 WiFi dongle

mwifiex:

* throughput enhancements
====================

Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge tag 'mac80211-for-davem-2015-04-01' of git://git.kernel.org/pub/scm/linux/kerne...
David S. Miller [Wed, 1 Apr 2015 18:19:22 +0000 (14:19 -0400)]
Merge tag 'mac80211-for-davem-2015-04-01' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211

Johannes Berg says:

====================
This contains just a single fix for a crash I happened to randomly
run into today during testing. It's clearly been around for a while,
but is pretty hard to trigger, even when I tried explicitly (and
modified the code to make it more likely) it rarely did.
====================

Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge tag 'linux-can-next-for-4.1-20150401' of git://git.kernel.org/pub/scm/linux...
David S. Miller [Wed, 1 Apr 2015 17:58:06 +0000 (13:58 -0400)]
Merge tag 'linux-can-next-for-4.1-20150401' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next

Marc Kleine-Budde says:

====================
pull-request: can-next 2015-04-01

this is a pull request of 5 patches for net-next/master.

There are two patches for the ems_usb driver by Gerhard Uttenthaler and
me, which fix sparse endianess warnings. Oliver Hartkopp adds two
patches to improve and extend the CAN-ID filter handling on RAW CAN
sockets. The last patch is by me, it silences an uninitialized variable
warning in the peak_usb driver.
====================

Signed-off-by: David S. Miller <[email protected]>
10 years agonet: bcmgenet: enable MoCA link state change detection
Petri Gynther [Wed, 1 Apr 2015 07:40:00 +0000 (00:40 -0700)]
net: bcmgenet: enable MoCA link state change detection

Currently, MoCA fixed PHYs are always in link-up state, regardless of
whether the link is actually up or not.

Add code to properly detect MoCA link state changes and to reflect the
new state in MoCA fixed PHY. Only GENET V3 and V4 MACs are capable of
detecting MoCA link state changes.

The code works as follows:
1. GENET MAC detects MoCA link state change and issues UMAC_IRQ_LINK_UP
   or UMAC_IRQ_LINK_DOWN interrupt.
2. Link up/down interrupt is processed in bcmgenet_irq_task(), which
   calls phy_mac_interrupt().
3. phy_mac_interrupt() updates the fixed PHY phydev->link and kicks
   the PHY state machine.
4. PHY state machine proceeds to read the fixed PHY link status
   register.
5. When the fixed PHY link status register is being read, the new
   function bcmgenet_fixed_phy_link_update() gets called. It copies
   the fixed PHY phydev->link value to the fixed PHY status->link.
6. PHY state machine receives the new link state of the fixed PHY.
7. MoCA fixed PHY link state now correctly reflects the real MoCA
   hardware link state.

Signed-off-by: Petri Gynther <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge tag 'iommu-fixes-v4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 1 Apr 2015 17:29:55 +0000 (10:29 -0700)]
Merge tag 'iommu-fixes-v4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:
 "This contains fixes for:

   - a VT-d issue where hardware domain-ids might be freed while still
     in use.

   - an ipmmu-vmsa issue where where the device-table was not zero
     terminated

   - unchecked register access issue in the arm-smmu driver"

* tag 'iommu-fixes-v4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/vt-d: Remove unused variable
  iommu: ipmmu-vmsa: Add terminating entry for ipmmu_of_ids
  iommu/vt-d: Detach domain *only* from attached iommus
  iommu/arm-smmu: fix ARM_SMMU_FEAT_TRANS_OPS condition

10 years agolguest: now needs PCI_DIRECT.
Rusty Russell [Wed, 1 Apr 2015 06:33:30 +0000 (17:03 +1030)]
lguest: now needs PCI_DIRECT.

Since commit 8e7094694396 ("lguest: add a dummy PCI host bridge.")
lguest uses PCI, but it needs you to frob the ports directly.

Signed-off-by: Rusty Russell <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
10 years agoMerge tag 'lazytime_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Wed, 1 Apr 2015 17:05:42 +0000 (10:05 -0700)]
Merge tag 'lazytime_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull lazytime fixes from Ted Ts'o:
 "This fixes a problem in the lazy time patches, which can cause
  frequently updated inods to never have their timestamps updated.

  These changes guarantee that no timestamp on disk will be stale by
  more than 24 hours"

* tag 'lazytime_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  fs: add dirtytime_expire_seconds sysctl
  fs: make sure the timestamps for lazytime inodes eventually get written

10 years agoiwlwifi: check the size of the trigger struct from the firmware file
Emmanuel Grumbach [Thu, 19 Mar 2015 21:14:06 +0000 (23:14 +0200)]
iwlwifi: check the size of the trigger struct from the firmware file

When we access the triggers we need to make sure that the
data we expect was actually provided by the firmware file.
Check this when we decode the triggers from the firmware
file.

Signed-off-by: Emmanuel Grumbach <[email protected]>
10 years agoMerge branch 'for-4.0' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Wed, 1 Apr 2015 16:45:47 +0000 (09:45 -0700)]
Merge branch 'for-4.0' of git://linux-nfs.org/~bfields/linux

Pull nfsd fixes from Bruce Fields:
 "Two main issues:

   - We found that turning on pNFS by default (when it's configured at
     build time) was too aggressive, so we want to switch the default
     before the 4.0 release.

   - Recent client changes to increase open parallelism uncovered a
     serious bug lurking in the server's open code.

  Also fix a krb5/selinux regression.

  The rest is mainly smaller pNFS fixes"

* 'for-4.0' of git://linux-nfs.org/~bfields/linux:
  sunrpc: make debugfs file creation failure non-fatal
  nfsd: require an explicit option to enable pNFS
  NFSD: Fix bad update of layout in nfsd4_return_file_layout
  NFSD: Take care the return value from nfsd4_encode_stateid
  NFSD: Printk blocklayout length and offset as format 0x%llx
  nfsd: return correct lockowner when there is a race on hash insert
  nfsd: return correct openowner when there is a race to put one in the hash
  NFSD: Put exports after nfsd4_layout_verify fail
  NFSD: Error out when register_shrinker() fail
  NFSD: Take care the return value from nfsd4_decode_stateid
  NFSD: Check layout type when returning client layouts
  NFSD: restore trace event lost in mismerge

10 years agonet: phy: at803x: simplify using devm_gpiod_get_optional and its 4th argument
Uwe Kleine-König [Tue, 31 Mar 2015 20:08:45 +0000 (22:08 +0200)]
net: phy: at803x: simplify using devm_gpiod_get_optional and its 4th argument

Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for output.
Moreover use devm_gpiod_get_optional instead of ignoring all errors
returned by devm_gpiod_get and simplify accordingly.

The result is more strict error handling which is good.

Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agocaif: remove unused struct member
Rasmus Villemoes [Tue, 31 Mar 2015 14:05:23 +0000 (16:05 +0200)]
caif: remove unused struct member

The tty_name member of struct ser_device is never set or used, so it
can be removed. (The definition of struct ser_device is private to
this .c file, and the identifier tty_name only occurs in this one
place.)

Signed-off-by: Rasmus Villemoes <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agoMerge branch 'bnx2'
David S. Miller [Wed, 1 Apr 2015 16:30:39 +0000 (12:30 -0400)]
Merge branch 'bnx2'

Yuval Mintz says:

====================
bnx2x: kdump related fixes

This patch series aims to fix bnx2x driver issues when loading in kdump kernel.
Both issues fixed here would be fatal to the device, requiring full reset of
the system in order to recover, preventing the device from serving its purpose
in the kdump environment.
====================

Signed-off-by: David S. Miller <[email protected]>
10 years agobnx2x: Fix kdump when iommu=on
Yuval Mintz [Wed, 1 Apr 2015 07:02:20 +0000 (10:02 +0300)]
bnx2x: Fix kdump when iommu=on

When IOMM-vtd is active, once main kernel crashes unfinished DMAE transactions
will be blocked, putting the HW in an error state which will cause further
transactions to timeout.

Current employed logic uses wrong macros, causing the first function to be the
only function that cleanups that error state during its probe/load.

This patch allows all the functions to successfully re-load in kdump kernel.

Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: Ariel Elior <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
10 years agobnx2x: Fix kdump on 4-port device
Yuval Mintz [Wed, 1 Apr 2015 07:02:19 +0000 (10:02 +0300)]
bnx2x: Fix kdump on 4-port device

When running in a kdump kernel, it's very likely that due to sync. loss with
management firmware the first PCI function to probe and reach the previous
unload flow would decide it can reset the chip and continue onward. While doing
so, it will only close its own Rx port.

On a 4-port device where 2nd port on engine is a 1g-port, the 2nd port would
allow ingress traffic after the chip is reset [assuming it was active on the
first kernel]. This would later cause a HW attention.

This changes driver flow to close both ports' 1g capabilities during the
previous driver unload flow prior to the chip reset.

Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: Ariel Elior <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This page took 0.115554 seconds and 4 git commands to generate.