firefly-linux-kernel-4.4.55.git
10 years agosctp: Fix FSF address in file headers
Jeff Kirsher [Fri, 6 Dec 2013 14:28:48 +0000 (06:28 -0800)]
sctp: Fix FSF address in file headers

Several files refer to an old address for the Free Software Foundation
in the file header comment.  Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.

CC: Vlad Yasevich <vyasevich@gmail.com>
CC: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agodrivers/net/*: Fix FSF address in file headers
Jeff Kirsher [Fri, 6 Dec 2013 14:28:47 +0000 (06:28 -0800)]
drivers/net/*: Fix FSF address in file headers

Several files refer to an old address for the Free Software Foundation
in the file header comment.  Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.

CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Veaceslav Falico <vfalico@redhat.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: Haiyang Zhang <haiyangz@microsoft.com>
CC: "K. Y. Srinivasan" <kys@microsoft.com>
CC: Paul Mackerras <paulus@samba.org>
CC: Ian Campbell <ian.campbell@citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agousb: Fix FSF address in file headers
Jeff Kirsher [Fri, 6 Dec 2013 14:28:46 +0000 (06:28 -0800)]
usb: Fix FSF address in file headers

Several files refer to an old address for the Free Software Foundation
in the file header comment.  Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.

CC: Oliver Neukum <oliver@neukum.org>
CC: Steve Glendinning <steve.glendinning@shawell.net>
CC: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoirda: Fix FSF address in file headers
Jeff Kirsher [Fri, 6 Dec 2013 14:28:44 +0000 (06:28 -0800)]
irda: Fix FSF address in file headers

Several files refer to an old address for the Free Software Foundation
in the file header comment.  Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.

CC: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoethernet: Fix FSF address in file headers
Jeff Kirsher [Fri, 6 Dec 2013 14:28:43 +0000 (06:28 -0800)]
ethernet: Fix FSF address in file headers

Several files refer to an old address for the Free Software Foundation
in the file header comment.  Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.

CC: Santosh Raspatur <santosh@chelsio.com>
CC: Dimitris Michailidis <dm@chelsio.com>
CC: Michael Chan <mchan@broadcom.com>
CC: Santiago Leon <santil@linux.vnet.ibm.com>
CC: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
CC: Olof Johansson <olof@lixom.net>
CC: Manish Chopra <manish.chopra@qlogic.com>
CC: Sony Chacko <sony.chacko@qlogic.com>
CC: Rajesh Borundia <rajesh.borundia@qlogic.com>
CC: Nicolas Pitre <nico@fluxnic.net>
CC: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Fri, 6 Dec 2013 15:37:24 +0000 (10:37 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into for-davem

10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Fri, 6 Dec 2013 14:50:45 +0000 (09:50 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless

Conflicts:
drivers/net/wireless/brcm80211/Kconfig
net/mac80211/util.c

10 years agoi40e: sync header files with hardware
Anjali Singhai Jain [Sat, 16 Nov 2013 10:00:47 +0000 (10:00 +0000)]
i40e: sync header files with hardware

Update the PCTYPE table
fix fcoe HMC object sizes

Change-Id: I1f12cd2653168859661e8700f929b7c65b0e21b7
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: restrict diag test length
Kamil Krawczyk [Sat, 16 Nov 2013 10:00:46 +0000 (10:00 +0000)]
i40e: restrict diag test length

The diagnostics test needs some slightly different limits
in order to succeed.

Change-Id: Ia1c49148af92fa4be20778a819f69350381bf865
Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: add support for triggering EMPR
Shannon Nelson [Sat, 16 Nov 2013 10:00:45 +0000 (10:00 +0000)]
i40e: add support for triggering EMPR

Allow debugfs to trigger a reset called EMPR.

Change-Id: I2f6600a8242759ec60c8198d03f70c2b774e0740
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: add interrupt test
Shannon Nelson [Sat, 16 Nov 2013 10:00:44 +0000 (10:00 +0000)]
i40e: add interrupt test

Add a quick ethtool test for interrupts using the SW interrupt.
Also, change the loopback test (for now) to not report failure.

Change-Id: Id8ef154b82475e3163087a8d1df01dfec4d529fc
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: default debug mask setting
Shannon Nelson [Sat, 16 Nov 2013 10:00:43 +0000 (10:00 +0000)]
i40e: default debug mask setting

Set the debug mask by default.

Change-Id: I10346ccb1a47f79747eb2108a83af059e947f1e2
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: fix debugging messages
Mitch Williams [Sat, 16 Nov 2013 10:00:42 +0000 (10:00 +0000)]
i40e: fix debugging messages

Clean up some messages that had arguments reversed.

Change-Id: I0f38a4f01132a2918d61dbaf23de1e1eaed5e56d
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: properly add VF MAC addresses
Mitch Williams [Sat, 16 Nov 2013 10:00:41 +0000 (10:00 +0000)]
i40e: properly add VF MAC addresses

The code that added new MAC addresses from the VFs did not, in
fact, work. Due to inverse logic, the only addresses that could
be added were addresses that already had been added.

Change-Id: Idce9169bd2f36e2c5ee10b130587a65705465d31
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: retry call on timeout
Shannon Nelson [Sat, 16 Nov 2013 10:00:40 +0000 (10:00 +0000)]
i40e: retry call on timeout

If the admin queue times out, retry some more to make driver load and
reset more robust.

Change-Id: I45c977b3d10a62c770d6072659ec27834849ca33
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: select reset counters correctly
Shannon Nelson [Sat, 16 Nov 2013 10:00:39 +0000 (10:00 +0000)]
i40e: select reset counters correctly

The indication for telling which reset happened is a value, not a
bit pattern, so select by ==, not &.

Change-Id: Ie04097388ff16b85015d6ab1236d7511ef653e8c
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: allow one more vector for VFs
Mitch Williams [Sat, 16 Nov 2013 10:00:38 +0000 (10:00 +0000)]
i40e: allow one more vector for VFs

The number of vectors per VF as reported by the hardware does not
include vector 0, so we need to account for this when checking to
see if the VF is configuring a valid vector.

Change-Id: I051d8bebae8f4722239f5a3fa5e1de4cf0f4e817
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: firmware version fields offsets update
Anjali Singhai jain [Sat, 16 Nov 2013 10:00:37 +0000 (10:00 +0000)]
i40e: firmware version fields offsets update

The version bits reported by the hardware changed, so fix
up the offsets to print the version correctly.

Change-Id: I8a8207b401ea88f6da024aebafe7d3826ee6512c
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: simplify aq head-tail-len setups
Shannon Nelson [Sat, 16 Nov 2013 10:00:36 +0000 (10:00 +0000)]
i40e: simplify aq head-tail-len setups

Use more virtual registers to simplify code flows.

Change-Id: I32cff3818c5ca3a3792487ba4fed8f1d0ea6145a
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: clear AQ head and tail registers
Shannon Nelson [Sat, 16 Nov 2013 10:00:35 +0000 (10:00 +0000)]
i40e: clear AQ head and tail registers

During admin queue shutdown clear some more registers
explicitly.

Change-Id: Ifb235c691e1c55e76bf66e0642207f464153d05a
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: register file updates
Anjali Singhai jain [Sat, 16 Nov 2013 10:00:34 +0000 (10:00 +0000)]
i40e: register file updates

Hardware definitions changed slightly so sync up the defines
file with the updated state of the hardware.

Change-Id: I8349d91630a3208df306bd1dc88f028c87be2248
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agoi40e: set pf_id based on device and function numbers
Christopher Pau [Sat, 16 Nov 2013 10:00:33 +0000 (10:00 +0000)]
i40e: set pf_id based on device and function numbers

pf_id needs to be encoded for cards with ARI enabled, which
allows for larger function numbers than 8.

Commit-Id: I23fa7df9dabf3878cc08c9b2151729c8539f5f17
Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
10 years agonet: clear local_df when passing skb between namespaces
Hannes Frederic Sowa [Thu, 5 Dec 2013 22:29:19 +0000 (23:29 +0100)]
net: clear local_df when passing skb between namespaces

We must clear local_df when passing the skb between namespaces as the
packet is not local to the new namespace any more and thus may not get
fragmented by local rules. Fred Templin noticed that other namespaces
do fragment IPv6 packets while forwarding. Instead they should have send
back a PTB.

The same problem should be present when forwarding DF-IPv4 packets
between namespaces.

Reported-by: Templin, Fred L <Fred.L.Templin@boeing.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agotcp_memcontrol: Cleanup/fix cg_proto->memory_pressure handling.
Eric W. Biederman [Thu, 5 Dec 2013 04:12:04 +0000 (20:12 -0800)]
tcp_memcontrol: Cleanup/fix cg_proto->memory_pressure handling.

kill memcg_tcp_enter_memory_pressure.  The only function of
memcg_tcp_enter_memory_pressure was to reduce deal with the
unnecessary abstraction that was tcp_memcontrol.  Now that struct
tcp_memcontrol is gone remove this unnecessary function, the
unnecessary function pointer, and modify sk_enter_memory_pressure to
set this field directly, just as sk_leave_memory_pressure cleas this
field directly.

This fixes a small bug I intruduced when killing struct tcp_memcontrol
that caused memcg_tcp_enter_memory_pressure to never be called and
thus failed to ever set cg_proto->memory_pressure.

Remove the cg_proto enter_memory_pressure function as it now serves
no useful purpose.

Don't test cg_proto->memory_presser in sk_leave_memory_pressure before
clearing it.  The test was originally there to ensure that the pointer
was non-NULL.  Now that cg_proto is not a pointer the pointer does not
matter.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoforcedeth: run loopback test only on chipsets that support it
Ivan Vecera [Wed, 4 Dec 2013 17:06:51 +0000 (18:06 +0100)]
forcedeth: run loopback test only on chipsets that support it

The driver incorrectly run loopback test on chips that don't support it.
Loopback test is only supported by chips that has DEV_HAS_TEST_EXTENDED
flag and returns 4 (NV_TEST_COUNT_EXTENDED) as test count.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobonding: add arp_ip_target checks when install the module
dingtianhong [Wed, 4 Dec 2013 10:59:31 +0000 (18:59 +0800)]
bonding: add arp_ip_target checks when install the module

When I install the bonding with the wrong arp_ip_target,
just like arp_ip_target=500.500.500.500, the arp_ip_target
was transfored to 245.245.245.244 and stored in the ip
target success, it is uncorrect, so I add checks to avoid
adding wrong address.

The in4_pton() will set wrong ip address to 0.0.0.0 and
return 0, also use the micro IS_IP_TARGET_UNUSABLE_ADDRESS
to simplify the code.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobnx2x: avoid null pointer dereference when enabling SR-IOV
Michal Kalderon [Wed, 4 Dec 2013 10:04:54 +0000 (12:04 +0200)]
bnx2x: avoid null pointer dereference when enabling SR-IOV

Fixed NULL pointer dereference when dynamically activating SR-IOV after vf
database failed to be allocated in probe stage (for example due to no ARI
support in pci hub).

Signed-off-by: Michal Kalderon <michals@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agosctp: disable max_burst when the max_burst is 0
wangweidong [Wed, 4 Dec 2013 09:32:39 +0000 (17:32 +0800)]
sctp: disable max_burst when the max_burst is 0

As Michael pointed out that when max_burst is 0, it just disable
max_burst. It declared in rfc6458#section-8.1.24. so add the check
in sctp_transport_burst_limited, when it 0, just do nothing.

Reviewed-by: Daniel Borkmann <dborkman@redhat.com>
Suggested-by: Vlad Yasevich <vyasevich@gmail.com>
Suggested-by: Michael Tuexen <Michael.Tuexen@lurchi.franken.de>
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: davinci_emac: Fix platform data handling and make usable for am3517
Tony Lindgren [Tue, 3 Dec 2013 23:13:02 +0000 (15:13 -0800)]
net: davinci_emac: Fix platform data handling and make usable for am3517

When booted with device tree, we may still have platform data passed
as auxdata. For am3517 this is needed for passing the interrupt_enable
and interrupt_disable callbacks that access the omap system control module
registers. These callback functions will eventually go away when we have
a separate system control module driver.

Some of the things that are currently passed as platform data we don't need
to set up as device tree properties as they are always the same on am3517.
So let's use a new compatible flag for those so we can get those from
the device tree match data.

Also note that we need to fix setting of phy_dev to NULL instead of an empty
string as the code later on uses that to find the first phy on the mdio bus.
This seems to have been caused by 5d69e0076a72 (net: davinci_emac: switch to
new mdio).

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoqlge: Update version to 1.00.00.34
Jitendra Kalsaria [Thu, 5 Dec 2013 23:11:24 +0000 (18:11 -0500)]
qlge: Update version to 1.00.00.34

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoqlge: Allow enable/disable rx/tx vlan acceleration independently
Jitendra Kalsaria [Thu, 5 Dec 2013 23:11:23 +0000 (18:11 -0500)]
qlge: Allow enable/disable rx/tx vlan acceleration independently

o Fix the driver to allow user to enable/disable rx/tx vlan acceleration independently.

  For example:
ethtool -K ethX rxvlan on/off
ethtool -K ethX txvlan on/off

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoqlge: Fix ethtool statistics
Jitendra Kalsaria [Thu, 5 Dec 2013 23:11:22 +0000 (18:11 -0500)]
qlge: Fix ethtool statistics

o Receive mac error stat was getting overwritten by other stats.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoxen-netback: fix fragment detection in checksum setup
Paul Durrant [Tue, 3 Dec 2013 17:39:29 +0000 (17:39 +0000)]
xen-netback: fix fragment detection in checksum setup

The code to detect fragments in checksum_setup() was missing for IPv4 and
too eager for IPv6. (It transpires that Windows seems to send IPv6 packets
with a fragment header even if they are not a fragment - i.e. offset is zero,
and M bit is not set).

This patch also incorporates a fix to callers of maybe_pull_tail() where
skb->network_header was being erroneously added to the length argument.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: David Vrabel <david.vrabel@citrix.com>
cc: David Miller <davem@davemloft.net>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMAINTAINERS: Update Intel Wired Ethernet LAN Maintainers
Jeff Kirsher [Fri, 6 Dec 2013 00:25:20 +0000 (16:25 -0800)]
MAINTAINERS: Update Intel Wired Ethernet LAN Maintainers

Remove Tushar and Peter (PJ) as maintainers, since they have moved out
of our group and no longer work on Wired Ethernet.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agomacvlan: Support creating macvtaps from macvlans
Kevin Wallace [Tue, 3 Dec 2013 10:55:22 +0000 (02:55 -0800)]
macvlan: Support creating macvtaps from macvlans

When running in a network namespace whose only link to the outside
world is a macvlan device, not being able to create a macvtap off of
it is a real pain.

So modify macvtap creation to automatically forward a creation of a
macvtap on a macvlan to become a creation of a macvtap on the
underlying network device, just like is currently done with
macvlan-on-macvlan devices.

v2: Use netif_is_macvlan and macvlan_dev_real_dev helpers to make it
    more clear what we're doing.

Signed-off-by: Kevin Wallace <kevin@pentabarf.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'siocghwtstamp' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh...
David S. Miller [Fri, 6 Dec 2013 00:45:14 +0000 (19:45 -0500)]
Merge branch 'siocghwtstamp' of git://git./linux/kernel/git/bwh/sfc-next

Ben Hutchings says:

====================
SIOCGHWTSTAMP ioctl

1. Add the SIOCGHWTSTAMP ioctl and update the timestamping
documentation.
2. Implement SIOCGHWTSTAMP in most drivers that support SIOCSHWTSTAMP.
3. Add a test program to exercise SIOC{G,S}HWTSTAMP.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'net_sched_actions'
David S. Miller [Fri, 6 Dec 2013 00:29:26 +0000 (19:29 -0500)]
Merge branch 'net_sched_actions'

Jamal Hadi Salim says:

====================
net_sched: actions - Add default lookup and walker

This set of patches provide defaults for lookup and walkers for actions.
Users can override when needed.
It also enforces mandatory action methods to be passed.

Thanks to David Miller who paid attention and made this patch set
much better.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet_sched: Use default action walker methods
Jamal Hadi Salim [Wed, 4 Dec 2013 14:26:56 +0000 (09:26 -0500)]
net_sched: Use default action walker methods

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet_sched: Provide default walker function for actions
Jamal Hadi Salim [Wed, 4 Dec 2013 14:26:55 +0000 (09:26 -0500)]
net_sched: Provide default walker function for actions

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet_sched: Use default action lookup functions
Jamal Hadi Salim [Wed, 4 Dec 2013 14:26:54 +0000 (09:26 -0500)]
net_sched: Use default action lookup functions

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet_sched: Default action lookup method for actions
Jamal Hadi Salim [Wed, 4 Dec 2013 14:26:53 +0000 (09:26 -0500)]
net_sched: Default action lookup method for actions

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet_sched: Fail if missing mandatory action operation methods
Jamal Hadi Salim [Wed, 4 Dec 2013 14:26:52 +0000 (09:26 -0500)]
net_sched: Fail if missing mandatory action operation methods

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Thu, 5 Dec 2013 21:02:56 +0000 (16:02 -0500)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless

John W. Linville says:

====================
Please pull this batch of fixes intende for the 3.13 stream!

For the mac80211 bits, Johannes says:

"For now I have various fixes all over, mostly for issues introduced in
relatively recent patches. There's no real pattern to it. Some of the
issues like go back longer, but still seemed 3.13 material."

And...

"These are just two patches disabling the broken CSA code. Once this
goes into your tree I'll merge it into mac80211-next and revert there
(since we fixed the bugs there)."

For the iwlwifi bits, Emmanuel says:

"I have here a few fixes for BT Coex. One of them is a NULL pointer
dereference. Another one avoids to enable a feature that can make the
firmware unhappy since the firmware isn't ready for it yet. WE also
avoid a WARNING that can be triggered upon association in not-so-bad
cases even if the association succeeded. We add support for new NICs
(not yet on the market) and bump the API so that 3.13 will be able to
work with the new firmware that will be out soon hopefully.
I also have a boundary check from Johannes."

In addition to those...

- Arend van Spriel fixes a brcmfmac problem that could use an
uninitialized variable in an error path.

- Borislav Petkov fixes a Kconfig-based build breakage problem for
brcmsmac.

- Michal Nazarewicz fixes a couple of NULL pointer dereference problems
in ath9k and wcn36xx.

- Sujith Manoharan fixes a couple of ath9k problems related to
incorrect interpretation of EEPROM configuration data.

- Ujjal Roy fixes a memory leak in mwifiex.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoath: fix dynamic user regulatory domain support
Luis R. Rodriguez [Tue, 29 Oct 2013 23:10:07 +0000 (00:10 +0100)]
ath: fix dynamic user regulatory domain support

As it stands dynamic user regulatory domain support is
only possible for a few programmed regulatory domains as
a few countries do not allow for this.

The existing code however only would take advantage of
the feature if a custom world regulatory domain is used
though as that's when we clear beconing flags. We need
to lift this restriction as otherwise this feature is
pointless.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath: dynamic user allow check helper to the top
Luis R. Rodriguez [Tue, 29 Oct 2013 22:39:05 +0000 (23:39 +0100)]
ath: dynamic user allow check helper to the top

This will be used later.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath: move dynamic_country_user_possible() to the top
Luis R. Rodriguez [Tue, 29 Oct 2013 22:39:04 +0000 (23:39 +0100)]
ath: move dynamic_country_user_possible() to the top

This will be used later.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath: fix usage of freq_reg_info()
Luis R. Rodriguez [Tue, 29 Oct 2013 18:34:24 +0000 (19:34 +0100)]
ath: fix usage of freq_reg_info()

freq_reg_info() expects KHz and not MHz, fix this. In
this case we'll now be getting the no-ir flags cleared
on channels for any channel when the country IE trusts
that channel.

@@
struct ieee80211_channel *ch;
struct wiphy *wiphy;
const struct ieee80211_reg_rule *rule;
@@

-rule = freq_reg_info(wiphy, ch->center_freq);
+rule = freq_reg_info(wiphy, MHZ_TO_KHZ(ch->center_freq));

Generated-by: Coccinelle SmPL
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>
Reported-by: Mihir Shete <smihir@qti.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath: move the channel for ath_reg_apply_beaconing_flags() into helper
Luis R. Rodriguez [Mon, 21 Oct 2013 17:14:51 +0000 (19:14 +0200)]
ath: move the channel for ath_reg_apply_beaconing_flags() into helper

While at it convert this into a switch statement, this
makes it easier and manage.

Cc: smihir@qti.qualcomm.com
Cc: tushnimb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath: simplify ath_reg_apply_beaconing_flags()
Luis R. Rodriguez [Mon, 21 Oct 2013 17:14:50 +0000 (19:14 +0200)]
ath: simplify ath_reg_apply_beaconing_flags()

Simplify ath_reg_apply_beaconing_flags() by making use of
thew new no-ir helper.

Cc: smihir@qti.qualcomm.com
Cc: tushnimb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath: rename ath_reg_apply_active_scan_flags() to ath_reg_apply_ir_flags()
Luis R. Rodriguez [Mon, 21 Oct 2013 17:14:49 +0000 (19:14 +0200)]
ath: rename ath_reg_apply_active_scan_flags() to ath_reg_apply_ir_flags()

This also applies the no-ibss flag to the channels or clears it.
The idea here is to clarify no initiated radiation should be
allowed on these channels.

Cc: smihir@qti.qualcomm.com
Cc: tushnimb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath: clean up ath_reg_apply_active_scan_flags()
Luis R. Rodriguez [Mon, 21 Oct 2013 17:14:48 +0000 (19:14 +0200)]
ath: clean up ath_reg_apply_active_scan_flags()

The routine ath_reg_apply_active_scan_flags() can be a bit
hard to read, this cleans it up by adding helpers for the
two cases of clearing IR flags or adding them. This approach
also makes no assumptions on the index of channels 12 and 13
so it should be portable accross different drivers.

Cc: smihir@qti.qualcomm.com
Cc: tushnimb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath: fix logic on ath_reg_apply_active_scan_flags()
Luis R. Rodriguez [Mon, 21 Oct 2013 17:14:47 +0000 (19:14 +0200)]
ath: fix logic on ath_reg_apply_active_scan_flags()

The existing logic removes the passive scan flag from
channels 12 and 13 when a regulatory hint coming from
something other than a country IE has been passed. This
is incorrect, the original intention was to ensure we
always have passive scan enabled for these two channels
for a specific set of custom world regulatory domains.

Cc: smihir@qti.qualcomm.com
Cc: tushnimb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: fix typo error
Chun-Yeow Yeoh [Fri, 29 Nov 2013 15:47:30 +0000 (23:47 +0800)]
wcn36xx: fix typo error

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: rtl8188ee: Fix typo in code
Larry Finger [Mon, 25 Nov 2013 16:45:28 +0000 (10:45 -0600)]
rtlwifi: rtl8188ee: Fix typo in code

The static analyser "cppcheck" shows the following typo:
drivers/net/wireless/rtlwifi/rtl8188ee/dm.c:1081]: (style) Same expression on both sides of '!='.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: David Binderman <dcb314@hotmail.com>
Cc: David Binderman <dcb314@hotmail.com>
Cc: Stable <stable@vger.kernel.org> [3.10+]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobcma: pci: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 25 Nov 2013 03:37:24 +0000 (12:37 +0900)]
bcma: pci: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowireless: libertas: remove unnecessary spi_set_drvdata()
Jingoo Han [Mon, 25 Nov 2013 02:11:15 +0000 (11:11 +0900)]
wireless: libertas: remove unnecessary spi_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowireless: rt2x00: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 25 Nov 2013 01:52:33 +0000 (10:52 +0900)]
wireless: rt2x00: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowireless: prism54: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 25 Nov 2013 01:51:09 +0000 (10:51 +0900)]
wireless: prism54: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowireless: ipw2100: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 25 Nov 2013 01:49:53 +0000 (10:49 +0900)]
wireless: ipw2100: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmsmac: remove dependency on CRC8 and CRC_CCITT
Hauke Mehrtens [Sun, 24 Nov 2013 21:03:41 +0000 (22:03 +0100)]
brcmsmac: remove dependency on CRC8 and CRC_CCITT

There is no code in brcmsmac that uses a function from CRC8 or
CRC_CCITT any more. Building brcmsmac with these two disabled works
without any problems. This was probably only used by the bus code which
was replaced by bcma some time ago.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: fix retry chain initialization in tx99 code
Lorenzo Bianconi [Sun, 24 Nov 2013 16:56:51 +0000 (17:56 +0100)]
ath9k: fix retry chain initialization in tx99 code

Initialize first chain attempt counter to 1 in ath9k_build_tx99_skb().
Otherwise multi-retry chain is initialized to {idx,count} = {-1, 0} in
rate_control_fill_sta_table() and tx99 transmission rate is not configured in
rate_control_apply_mask() since first chain idx is set to -1

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: set self STA default HT parameters
Chun-Yeow Yeoh [Wed, 20 Nov 2013 09:57:01 +0000 (17:57 +0800)]
wcn36xx: set self STA default HT parameters

These default HT parameters are required for self STA entry.
In example, set the HT capable of self STA entry for bss
configuration in mesh allows the MCS rate to be used. Otherwise,
only legacy rate will be used.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agolibertas sdio: claim device before calling sdio_disable_func()
Alexey Khoroshilov [Mon, 18 Nov 2013 21:45:08 +0000 (01:45 +0400)]
libertas sdio: claim device before calling sdio_disable_func()

There is a failure path in if_sdio_power_on(), where
sdio_disable_func() is called without claiming the device.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: rtl8192cu: Update table.c
Mark Cave-Ayland [Mon, 18 Nov 2013 19:06:57 +0000 (13:06 -0600)]
rtlwifi: rtl8192cu: Update table.c

The latest vendor driver has some new values.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: rtl8192cu: Bring rtl92cu_phy_bb_config() up to date
Mark Cave-Ayland [Mon, 18 Nov 2013 19:06:56 +0000 (13:06 -0600)]
rtlwifi: rtl8192cu: Bring rtl92cu_phy_bb_config() up to date

The latest vendor driver contains some changes not in the kernel version.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: Bring _rtl92c_phy_iq_calibrate() in line with the vendor driver
Mark Cave-Ayland [Mon, 18 Nov 2013 19:06:55 +0000 (13:06 -0600)]
rtlwifi: Bring _rtl92c_phy_iq_calibrate() in line with the vendor driver

Bring _rtl92c_phy_iq_calibrate() in line with the vendor driver function _PHY_IQCalibrate().

Also fix incorrect initialisation for rtl8192cu.

Signed-of-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: rtl8192c: Update dynamic gain calculations
Larry Finger [Mon, 18 Nov 2013 17:11:36 +0000 (11:11 -0600)]
rtlwifi: rtl8192c: Update dynamic gain calculations

The vendor driver contained a number of improvements in the gain settings
for the rtl8192c{e,u} devices. This patch implements them in the kernel
driver.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: Add missing code to PWDB statics routine
Larry Finger [Mon, 18 Nov 2013 17:11:35 +0000 (11:11 -0600)]
rtlwifi: Add missing code to PWDB statics routine

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: rtl8192cu: Fix some code in RF handling
Larry Finger [Mon, 18 Nov 2013 17:11:34 +0000 (11:11 -0600)]
rtlwifi: rtl8192cu: Fix some code in RF handling

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: rtl8192cu: Update the power index registers
Larry Finger [Mon, 18 Nov 2013 17:11:33 +0000 (11:11 -0600)]
rtlwifi: rtl8192cu: Update the power index registers

This patch uses the newly introduced power index register routines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: rtl8192c: Add routines to save/restore power index registers
Larry Finger [Mon, 18 Nov 2013 17:11:32 +0000 (11:11 -0600)]
rtlwifi: rtl8192c: Add routines to save/restore power index registers

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: Update beacon statistics for USB driver
Larry Finger [Mon, 18 Nov 2013 17:11:31 +0000 (11:11 -0600)]
rtlwifi: Update beacon statistics for USB driver

The USB drivers were not updating the beacon statistics, which led to
false beacon loss indications.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: Increase the RX queue length for USB drivers
Larry Finger [Mon, 18 Nov 2013 17:11:30 +0000 (11:11 -0600)]
rtlwifi: Increase the RX queue length for USB drivers

The current number of RX buffers queued is 32, which is too small under
heavy load. That number is doubled.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: rtl8192c: Add new definitions in the dm_common header
Larry Finger [Mon, 18 Nov 2013 17:11:29 +0000 (11:11 -0600)]
rtlwifi: rtl8192c: Add new definitions in the dm_common header

Changes in the gain-control mechanism will require some changes in the header.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: Set the link state
Larry Finger [Mon, 18 Nov 2013 17:11:28 +0000 (11:11 -0600)]
rtlwifi: Set the link state

The present code fails to set the linked state when an interface is
added.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: Redo register save locations
Larry Finger [Mon, 18 Nov 2013 17:11:27 +0000 (11:11 -0600)]
rtlwifi: Redo register save locations

The initial USB driver did not use some register save locations in the
private data storage. To save some memory, a union was used to overlay these
variables with USB I/O components. In an update of the gain-control code,
these register save locations are now needed for USB drivers.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: rtl8192cu: Add new firmware
Larry Finger [Mon, 18 Nov 2013 17:11:26 +0000 (11:11 -0600)]
rtlwifi: rtl8192cu: Add new firmware

Vendor driver rtl8188C_8192C_8192D_usb_linux_v3.4.2_3727.20120404 introduced
new firmware for these chips. The code try for the new file, and fall back to
the original firmware if the new file is not available.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: rtl8192c: Prevent reconnect attempts if not connected
Larry Finger [Mon, 18 Nov 2013 17:11:25 +0000 (11:11 -0600)]
rtlwifi: rtl8192c: Prevent reconnect attempts if not connected

This driver has a watchdog timer that attempts to reconnect when beacon frames
are not seen for 6 seconds. This patch disables that reconnect whenever the
device has never been connected.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt2800lib: no need to write RF register 3 twice for RT5592
Kevin Lo [Thu, 14 Nov 2013 05:53:44 +0000 (13:53 +0800)]
rt2x00: rt2800lib: no need to write RF register 3 twice for RT5592

In rt2800_init_rfcsr_5592(), there's no need to write RF register 3 twice.

Signed-off-by: Kevin Lo <kevlo@kevlo.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: Remove unused calls to rtl_is_special_data()
Larry Finger [Tue, 12 Nov 2013 17:02:20 +0000 (11:02 -0600)]
rtlwifi: Remove unused calls to rtl_is_special_data()

When routine rtl_is_special_data() is called with false as its last argument,
and the returned value is not tested, the call is essentially an extended
no-op. Accordingly, these calls may be removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: Fix logging macro with unnecessary semicolon
Eugene Krasnikov [Fri, 8 Nov 2013 17:34:39 +0000 (17:34 +0000)]
wcn36xx: Fix logging macro with unnecessary semicolon

The wcn36xx_err macro should not end in a semicolon as
there are 2 consecutive semicolons in the preprocessed
output.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: enable beacon change using BSS_CHANGED_BEACON
Chun-Yeow Yeoh [Thu, 31 Oct 2013 06:07:45 +0000 (14:07 +0800)]
wcn36xx: enable beacon change using BSS_CHANGED_BEACON

Enable the beacon changed using BSS_CHANGED_BEACON. This is
especially useful for mesh mode.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortl8187: Increase RX queue depth
Larry Finger [Tue, 29 Oct 2013 22:06:41 +0000 (17:06 -0500)]
rtl8187: Increase RX queue depth

Under heavy load, the relatively small number of RX queue entries are
completely filled. With an increase from 16 to 32 entries, this condition
rarely happens.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortlwifi: fix usage of freq_reg_info()
Luis R. Rodriguez [Tue, 29 Oct 2013 18:34:26 +0000 (19:34 +0100)]
rtlwifi: fix usage of freq_reg_info()

freq_reg_info() expects KHz and not MHz, fix this. In
this case we'll now be getting the no-ir flags cleared
on channels for any channel when the country IE trusts
that channel.

@@
struct ieee80211_channel *ch;
struct wiphy *wiphy;
const struct ieee80211_reg_rule *rule;
@@

-rule = freq_reg_info(wiphy, ch->center_freq);
+rule = freq_reg_info(wiphy, MHZ_TO_KHZ(ch->center_freq));

Generated-by: Coccinelle SmPL
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: Mihir Shete <smihir@qti.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcm80211: fix usage of freq_reg_info()
Luis R. Rodriguez [Tue, 29 Oct 2013 18:34:25 +0000 (19:34 +0100)]
brcm80211: fix usage of freq_reg_info()

freq_reg_info() expects KHz and not MHz, fix this. In
this case we'll now be getting the no-ir flags cleared
on channels for any channel when the country IE trusts
that channel.

@@
struct ieee80211_channel *ch;
struct wiphy *wiphy;
const struct ieee80211_reg_rule *rule;
@@

-rule = freq_reg_info(wiphy, ch->center_freq);
+rule = freq_reg_info(wiphy, MHZ_TO_KHZ(ch->center_freq));

Generated-by: Coccinelle SmPL
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Seth Forshee <seth.forshee@canonical.com>
Cc: Arend van Spriel <arend@broadcom.com>
Reported-by: Mihir Shete <smihir@qti.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowireless: cw1200: Use consistent internal locking conventions
Solomon Peachy [Fri, 25 Oct 2013 22:15:43 +0000 (18:15 -0400)]
wireless: cw1200: Use consistent internal locking conventions

The cw1200_irq_handler() function expects the hwbus lock to be held when
it is called.  On the SDIO platform, this lock is implemented in terms
of sdio_claim_host/sdio_release_host.

This trivial patch makes it explicit that we are performing the hwbus
lock rather than something SDIO-specific.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agocw1200: Make the "scan failed" message into a warning
Solomon Peachy [Fri, 25 Oct 2013 22:15:42 +0000 (18:15 -0400)]
cw1200: Make the "scan failed" message into a warning

The reason that a scan failed for some reason (typically bad
parameters) should be logged even when debugging is turned off.

Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoiwl3945: do not print RFKILL message
Stanislaw Gruszka [Fri, 25 Oct 2013 10:37:54 +0000 (12:37 +0200)]
iwl3945: do not print RFKILL message

We can mess logs if user space try to open device again and again if
RFKILL switch is on. Do not print message and return ERFKILL error
instead to indicate where the problem is.

Note that iwl4965 handle this problem differently, it allows to open
device when radio is disabled.

Reported-by: Dietmar Rudolph <dietmar@crlf.de>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowl1251: return -ENOMEM if kzalloc fails
Jing Wang [Thu, 24 Oct 2013 08:14:11 +0000 (16:14 +0800)]
wl1251: return -ENOMEM if kzalloc fails

the original code used goto out if kzalloc fails,but the out include kfree,
so return -ENOMEM if kzalloc fails.

Signed-off-by: Jing Wang <windsdaemon@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agolibertas/sdio: make sure card enters power-off when firmware is loaded.
NeilBrown [Thu, 24 Oct 2013 07:33:33 +0000 (18:33 +1100)]
libertas/sdio: make sure card enters power-off when firmware is loaded.

Since firmware loading became async it is possible that if_sdio_finish_power_of
is called with only one remaining runtime_pm reference, so it isn't safe
to call pm_runtime_put_noidle.  We must call pm_runtime_put().

Diagnosed-by: "Dr. H. Nikolaus Schaller" <hns@goldelico.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt2800lib: update RF registers for RT5390
Kevin Lo [Thu, 24 Oct 2013 05:24:08 +0000 (13:24 +0800)]
rt2x00: rt2800lib: update RF registers for RT5390

Mirror the latest MediaTek/Ralink driver with respect to RT5390 RF register
programming.  The PCI and USB devices use different init values.

Signed-off-by: Kevin Lo <kevlo@kevlo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: improvements in mwifiex_ret_tx_power_cfg()
Amitkumar Karwar [Tue, 22 Oct 2013 22:24:47 +0000 (15:24 -0700)]
mwifiex: improvements in mwifiex_ret_tx_power_cfg()

1) Move common code out of switch case handling
2) Return from the function if number of bytes left in response buffer
are less than tlv size
3) Pass pg_tlv_hdr directly instead of txp_cfg to mwifiex_get_power_level()

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: rt2800lib: Update BBP register initialization for RT53xx
Kevin Lo [Mon, 21 Oct 2013 07:38:31 +0000 (15:38 +0800)]
rt2x00: rt2800lib: Update BBP register initialization for RT53xx

Update bbp register initialization for RT53xx chips to match with the
latest MediaTek/Ralink driver.

Based on: NICInitRT5390BbpRegisters()
From: DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5390.c

Signed-off-by: Kevin Lo <kevlo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Thu, 5 Dec 2013 14:29:56 +0000 (09:29 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless into for-davem

10 years agoMerge branch 'cxgb4'
David S. Miller [Tue, 3 Dec 2013 21:55:49 +0000 (16:55 -0500)]
Merge branch 'cxgb4'

Hariprasad Shenai says:

====================
Fixes T5 adapter init, due to incorrect FW version check

This patch series fixes, Chelsio T5 adapter initialization failure due to
incorrect firmware version check. This patch series modifies the firmware
flashing mechanism for T4/T5 adapter.

The patch series moves chip type from struct adapter to struct adapter_params.
It changes the references of chip type in cxgb4 and cxgb4vf drivers such that
build failure is avoided.

Patch 3/3 is dependent on patch 1/3
Patch 2/3 is also dependent on patch 1/3

We would like to request this patch series to get merged via David Miller's
'net' tree.

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 <davem@davemloft.net>
10 years agocxgb4: Add new scheme to update T4/T5 firmware
Hariprasad Shenai [Tue, 3 Dec 2013 11:35:58 +0000 (17:05 +0530)]
cxgb4: Add new scheme to update T4/T5 firmware

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agocxgb4vf: added much cleaner implementation of is_t4()
Hariprasad Shenai [Tue, 3 Dec 2013 11:35:57 +0000 (17:05 +0530)]
cxgb4vf: added much cleaner implementation of is_t4()

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agocxgb4: Much cleaner implementation of is_t4()/is_t5()
Hariprasad Shenai [Tue, 3 Dec 2013 11:35:56 +0000 (17:05 +0530)]
cxgb4: Much cleaner implementation of is_t4()/is_t5()

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet/mlx4_core: destroy workqueue when driver fails to register
Wei Yang [Tue, 3 Dec 2013 02:04:10 +0000 (10:04 +0800)]
net/mlx4_core: destroy workqueue when driver fails to register

When driver registration fails, we need to clean up the resources allocated
before. mlx4_core missed destroying the workqueue allocated.

This patch destroys the workqueue when registration fails.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agords: prevent BUG_ON triggered on congestion update to loopback
Venkat Venkatsubra [Mon, 2 Dec 2013 23:41:39 +0000 (15:41 -0800)]
rds: prevent BUG_ON triggered on congestion update to loopback

After congestion update on a local connection, when rds_ib_xmit returns
less bytes than that are there in the message, rds_send_xmit calls
back rds_ib_xmit with an offset that causes BUG_ON(off & RDS_FRAG_SIZE)
to trigger.

For a 4Kb PAGE_SIZE rds_ib_xmit returns min(8240,4096)=4096 when actually
the message contains 8240 bytes. rds_send_xmit thinks there is more to send
and calls rds_ib_xmit again with a data offset "off" of 4096-48(rds header)
=4048 bytes thus hitting the BUG_ON(off & RDS_FRAG_SIZE) [RDS_FRAG_SIZE=4k].

The commit 6094628bfd94323fc1cea05ec2c6affd98c18f7f
"rds: prevent BUG_ON triggering on congestion map updates" introduced
this regression. That change was addressing the triggering of a different
BUG_ON in rds_send_xmit() on PowerPC architecture with 64Kbytes PAGE_SIZE:
  BUG_ON(ret != 0 &&
      conn->c_xmit_sg == rm->data.op_nents);
This was the sequence it was going through:
(rds_ib_xmit)
/* Do not send cong updates to IB loopback */
if (conn->c_loopback
   && rm->m_inc.i_hdr.h_flags & RDS_FLAG_CONG_BITMAP) {
   rds_cong_map_updated(conn->c_fcong, ~(u64) 0);
     return sizeof(struct rds_header) + RDS_CONG_MAP_BYTES;
}
rds_ib_xmit returns 8240
rds_send_xmit:
  c_xmit_data_off = 0 + 8240 - 48 (rds header accounted only the first time)
     = 8192
  c_xmit_data_off < 65536 (sg->length), so calls rds_ib_xmit again
rds_ib_xmit returns 8240
rds_send_xmit:
  c_xmit_data_off = 8192 + 8240 = 16432, calls rds_ib_xmit again
  and so on (c_xmit_data_off 24672,32912,41152,49392,57632)
rds_ib_xmit returns 8240
On this iteration this sequence causes the BUG_ON in rds_send_xmit:
    while (ret) {
     tmp = min_t(int, ret, sg->length - conn->c_xmit_data_off);
     [tmp = 65536 - 57632 = 7904]
     conn->c_xmit_data_off += tmp;
     [c_xmit_data_off = 57632 + 7904 = 65536]
     ret -= tmp;
     [ret = 8240 - 7904 = 336]
     if (conn->c_xmit_data_off == sg->length) {
     conn->c_xmit_data_off = 0;
     sg++;
     conn->c_xmit_sg++;
     BUG_ON(ret != 0 &&
     conn->c_xmit_sg == rm->data.op_nents);
     [c_xmit_sg = 1, rm->data.op_nents = 1]

What the current fix does:
Since the congestion update over loopback is not actually transmitted
as a message, all that rds_ib_xmit needs to do is let the caller think
the full message has been transmitted and not return partial bytes.
It will return 8240 (RDS_CONG_MAP_BYTES+48) when PAGE_SIZE is 4Kb.
And 64Kb+48 when page size is 64Kb.

Reported-by: Josh Hunt <joshhunt00@gmail.com>
Tested-by: Honggang Li <honli@redhat.com>
Acked-by: Bang Nguyen <bang.nguyen@oracle.com>
Signed-off-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>