Bhumika Goyal [Mon, 8 Feb 2016 19:58:10 +0000 (01:28 +0530)]
Staging:wlan-ng:Merged two lines into one
The last two lines of these functions are compressed into one.
Also removed the variable ret as it is now not used.
Found using coccinelle:
@@
expression e, ret;
@@
Larry Finger [Tue, 5 Jan 2016 02:30:58 +0000 (20:30 -0600)]
staging: r8192U: Fix check pointer after usage problem
In routine rtl8192_tx_isr(), pointer skb is dereferenced before it is
checked for NULL. This patch has only been compile-tested, as I do not
have the hardware. This problem was reported at
https://bugzilla.kernel.org/show_bug.cgi?id=109951.
Fixes: bugzilla.kernel.org: #109951 Reported-by: Yong Shi <brave_shi@163.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Yong Shi <brave_shi@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The existing kerneldoc blocs had a few issues:
- some of them didn't start with /**
- some used -- instead of - to separate the short description
- some descriptions had text looking like section headers
- some descriptions started with "to" while some used the imperative: use the
imperative everywhere
- some had a "with:" at the end of the shortdesc that didn't make sense once
formatted by kernel-docs
- two argument names where out of sync with the prototype
Signed-off-by: Manuel Pégourié-Gonnard <mpg@elzevir.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: rts5208: Remove unnecessary synchronize_irq() before free_irq()
Calling synchronize_irq() right before free_irq() is quite useless. On one
hand the IRQ can easily fire again before free_irq() is entered, on the
other hand free_irq() itself calls synchronize_irq() internally (in a race
condition free way), before any state associated with the IRQ is freed.
Patch was generated using the following semantic patch:
// <smpl>
@@
expression irq;
@@
-synchronize_irq(irq);
free_irq(irq, ...);
// </smpl>
Arnd Bergmann [Fri, 20 Nov 2015 21:59:14 +0000 (22:59 +0100)]
staging: ste_rmi4: avoid unused function warnings
The rmi4 touchscreen driver encloses the power-management
functions in #ifdef CONFIG_PM, but the smtcfb_pci_suspend/resume
functions are only really used when CONFIG_PM_SLEEP is also
set, as a frequent gcc warning shows:
ste_rmi4/synaptics_i2c_rmi4.c:1050:12: warning: 'synaptics_rmi4_suspend' defined but not used
ste_rmi4/synaptics_i2c_rmi4.c:1084:12: warning: 'synaptics_rmi4_resume' defined but not used
This changes the driver to remove the #ifdef and instead mark
the functions as __maybe_unused, which is a nicer anyway, as it
provides build testing for all the code in all configurations
and is harder to get wrong.
Sean MacLennan [Mon, 16 Nov 2015 00:51:43 +0000 (19:51 -0500)]
staging:rtl8192e: Usage count off by one
The rtllib driver is not calling try_module_get() when loading the
encryption modules. Because of this, you can never remove the module
once you have used it one (i.e. bring up the wireless interface).
Replace the led_classdev_register() with the platform managed version
devm_led_classdev_register() & henceforth remove the redundant
nvec_paz00_remove() function.
Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Okash Khawaja [Thu, 17 Dec 2015 20:30:38 +0000 (20:30 +0000)]
staging: rtl8192u: fix large frame size compiler warning
This patch fixes following compiler warning:
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c: In function
‘RxReorderIndicatePacket’:
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:758:1: warning: the
frame size of 1064 bytes is larger than 1024 bytes
[-Wframe-larger-than=]
It replaces the statically allocated array prxbIndicateArray with
a kmalloc'd one.
Dan Carpenter [Sat, 30 Jan 2016 14:41:10 +0000 (17:41 +0300)]
staging: rtl8712: memory corruption in wpa_set_encryption()
->KeyMaterial is declared as a 16 byte array, but we only ever allocate
either 5 or 13 bytes of it. The problem is that we memset() all 16
bytes to zero so we're memsetting past the end of the allocated memory.
I fixed this in slightly lazy way, by just allocating 16 bytes. This
works but there is a lot more cleanup you could do to this code if you
wanted. Which is why this code is in staging.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cancel pending URBs during suspend operation to avoid receiving ESHUTDOWN
in read/write completion callbacks while the device is suspended.
Receiving ESHUTDOWN in read/write completion callbacks will cause the
driver to enter a non-functioning "stopped" state from which the driver is
unable to recover without reloading the module.
Anatoly Stepanov [Thu, 17 Dec 2015 13:47:36 +0000 (16:47 +0300)]
staging: rtl8723au: change parameter type in rtl8723a_set_rssi_cmd declaration
Previosly the function had the following prototype:
int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u8 *param)
My suggestion here is to modify the prototype this way:
int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u32 param)
We can do this based on the following considerations:
1. rtl8723a_set_rssi_cmd is used only with 32-bit "param" values
2. There's no point in using "u8 *param" until we pass param length
3. As we just read "param", it's ok to pass it by value
Luuk Paulussen [Tue, 22 Dec 2015 20:51:14 +0000 (09:51 +1300)]
staging: octeon: Fix logic for waking octeon ethernet tx queue.
Only wake tx queue when driver queue is back within bounds.
The logic here was just reenabling the queue when any buffers had been
freed. the queue was stopped whenever the length exceeded 1000
(MAX_OUT_QUEUE_DEPTH), but then was essentially immediately started again.
On a congested link, the queue length would just keep increasing up to
around 8000 (for average size packets), at which point the hardware would
start refusing the packets and they would begin to be dropped.
This prevented the qdisc layer from effectively managing and prioritising
packets, as essentially all packets were being allowed into the driver
queue and then were being dropped by the hardware.
This change only restarts the queue if the length is less than 1000
(MAX_OUT_QUEUE_DEPTH).
Reviewed-by: Kyeong Yoo <kyeong.yoo@alliedtelesis.co.nz> Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Richard Laing <richard.laing@alliedtelesis.co.nz> Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
If the network portion of a frame is preceded by more than 14 bytes of
data, the checksum calculated in the HW is done over the wrong data and
is put in the wrong place.
In our use case an Octeon ethernet controller is connected to a Broadcom
switch chip. Extra data is included in the frame prior to egressing the
Octeon ethernet (i.e. 4 bytes of an 802.1Q tag, 4 bytes of a proprietary
BCM tag later stripped by the switch chip). This extra data causes the
checksum calculation to be incorrect.
The fix in this patch is to make use of the network header offset of the
skb. This enables the checksum to be calculated correctly.
This has been tested in both the configuration with the switch chip in
the egress path (as described above) and in a simple connection direct
to the wire.
Reviewed-by: Richard Laing <richard.laing@alliedtelesis.co.nz> Reviewed-by: Tim Beale <tim.beale@alliedtelesis.co.nz> Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Signed-off-by: Hamish Martin <hamish.martin@alliedtelesis.co.nz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The interrupt handler for DPRC IRQs is added. DPRC IRQs are
generated for hot plug events related to DPAA2 objects in a given
DPRC. These events include, creating/destroying DPAA2 objects in
the DPRC, changing the "plugged" state of DPAA2 objects and moving
objects between DPRCs.
Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: fsl-mc: Populate the IRQ pool for an MC bus instance
Scan the corresponding DPRC container to get total count
of IRQs needed by all its child DPAA2 objects. Then,
preallocate a set of MSI IRQs with the DPRC's ICID
(GIT-ITS device Id) to populate the the DPRC's IRQ pool.
Each child DPAA2 object in the DPRC and the DPRC object itself
will allocate their necessary MSI IRQs from the DPRC's IRQ pool,
in their driver probe function.
Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: fsl-mc: Changed DPRC built-in portal's mc_io to be atomic
The DPRC built-in portal's mc_io is used to send commands to the MC
to program MSIs for MC objects. This is done by the
fsl_mc_msi_write_msg() callback, which is invoked by the generic MSI
layer with interrupts disabled. As a result, the mc_io used in
fsl_mc_msi_write_msg needs to be an atomic mc_io.
Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: fsl-mc: Extended MC bus allocator to include IRQs
All the IRQs for DPAA2 objects in the same DPRC must use
the ICID of that DPRC, as their device Id in the GIC-ITS.
Thus, all these IRQs must share the same ITT table in the GIC.
As a result, a pool of IRQs with the same device Id must be
preallocated per DPRC (fsl-mc bus instance). So, the fsl-mc
bus object allocator is extended to also provide services
to allocate IRQs to DPAA2 devices, from their parent fsl-mc bus
IRQ pool.
Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: fsl-mc: Added generic MSI support for FSL-MC devices
Created an MSI domain for the fsl-mc bus-- including functions
to create a domain, find a domain, alloc/free domain irqs, and
bus specific overrides for domain and irq_chip ops.
Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>