Commit Graph

506449 Commits

Author SHA1 Message Date
Sujith Manoharan 6e6dd08dd3 ath9k: Fix issues in the main btcoex timer
* ath9k_mci_update_rssi() is required only for
  cards that use MCI scheme. Make sure that it
  is not called for 3-wire cards.

* Call ath9k_ps_wakeup() early since register
  accesses are made in ath9k_mci_update_rssi().

* Fix usage of btcoex_lock to handle no_stomp_timer.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:46:59 +02:00
Sujith Manoharan c7266e99b1 ath9k: Handle timers for MCI
Make sure that the btcoex timers are started/stopped
properly for both 3-wire and MCI schemes.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:46:57 +02:00
Sujith Manoharan 30b8189891 ath9k: Fix wlan-active gpio for the AR9003 family
When disabling BTCOEX, clearing the wlanactive gpio line
is required only for pre-AR9003 cards.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:46:56 +02:00
Sujith Manoharan e1ff147d87 ath9k: Fix MCI scheme initialization
Commit "ath9k_hw: remove ATH_BTCOEX_CFG_MCI" removed
MCI as a separate coex scheme, but we need it to
avoid fiddling with GPIO registers during
ath9k_init_btcoex() that are meant only for 3-wire
cards.

Cc: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:46:54 +02:00
Sujith Manoharan 510baea1e4 ath9k: Initialize MCI state correctly
The MCI configuration values are assigned
in ath9k_hw_btcoex_init_mci() which are used
by the MCI reset routine. When initializing
BTCOEX/MCI, ath_mci_setup() ends up using
uninitialized data. Fix this by setting up
the configuration parameters before issuing
a MCI reset.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:46:53 +02:00
Sujith Manoharan 44b9b56e50 ath9k: Remove useless return value check
ath_init_btcoex_timer() always returns 0, so
checking for error conditions is not required.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:46:51 +02:00
Taehee Yoo 3f5fe23648 rtlwifi: rtl8192cu: Add case in rtl92cu_get_hw_reg
Add HAL_DEF_WOWLAN case in rtl92cu_get_hw_reg

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:45:35 +02:00
Avinash Patil bf97bf226a mwifiex: do not initialize ext_scan in mwifiex_init_adapter
Features which are device specific are already updated in
interface specific initialization e.g. register_dev.
We should not initialize them in mwifiex_init_adapter();
else this would overwrite earlier settings.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:43:38 +02:00
Dan Carpenter 1114ce8f36 rtlwifi: rtl8188ee: missing curly braces in handle_branch1()
From the indenting, it seems like the READ_NEXT_PAIR() was supposed to
be inside the while loop.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:40:47 +02:00
Rasmus Villemoes df905570bb rtlwifi: rtl8821ae: Remove duplicate hex prefixes
The # flag in %X means print a 0X prefix. Remove the extra 0x prefix.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:39:34 +02:00
Lorenzo Bianconi 97bf861572 ath9k: add per-vif TX power capability to TX path
In order to add per-vif TX power capability cap per-packet TX power to vif
configured power if the latter is lower than per-rate TX power and mac80211
per-frame power. Use vif TX power if TPC has been disabled for current the
interface

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:36:02 +02:00
Lorenzo Bianconi 283dd11994 ath9k: add per-vif TX power capability
Configure the HW with highest TX power among all vif when HW TPC has been
enabled in order to add support to per-vif TX power capability. Use lowest
configured power among all interfaces when TPC is disabled

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:36:01 +02:00
Priit Laes be1f8d31c9 rtlwifi: Remove unused RTL_SUPPORTED_CTRL_FILTER define
Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:30:09 +02:00
Priit Laes baeeb3ca93 rtlwifi: Remove unused defines from efuse.h
Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:30:08 +02:00
Priit Laes 44a56d6c81 rtlwifi: Remove unused defines from base.h
Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:30:06 +02:00
Priit Laes 8a09dd2ed2 rtlwifi: Remove unused defines from cam.h
Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:30:05 +02:00
Priit Laes 6d4007fd6a rtlwifi: Remove unused RF6052_MAX_REG define
Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:30:03 +02:00
Priit Laes 6e7c1baa97 rtlwifi: Remove unused defines from driver-specific def.h
HAL_RETRY_LIMIT_*
RESET_DELAY_8185
RT_IBSS_INT_MASKS
RT_AC_INT_MASKS
NUM_OF_*
BT_*,
MAX_{LINES,BYTES}_*,
*_THREE_WIRE
*_QUEUE related

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:30:01 +02:00
Priit Laes b4926aff3e rtlwifi: Remove unused defines from rtl8192cu driver
Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:29:59 +02:00
Rafał Miłecki 2264fc857d bcma: add missing includes
kbuild found out that commit 804e27dee4 ("bcma: support bringing up
bus hosted on PCIe Gen 2") broke the build on m68k:

   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
>> drivers/bcma/driver_pcie2.c:196:2: error: implicit declaration of function 'pcie_set_readrq' [-Werror\
=implicit-function-declaration]
     err = pcie_set_readrq(dev, pcie2->reqsize);
     ^
   cc1: some warnings being treated as errors

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 15:26:38 +02:00
Sujith Manoharan 2f890caba6 ath9k: Mute BT properly
Set The BT/WLAN priority weights correctly and make sure
that MCI_LNA_TAKE is sent only for cards that share
PA/LNA.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 14:55:27 +02:00
Sujith Manoharan ad1dc63872 ath9k: Fix GPM initialization
Handle MCI_STATE_INIT_GPM_OFFSET separately and do not
overload ar9003_mci_get_next_gpm_offset() with a special
case.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 14:55:24 +02:00
Sujith Manoharan bc80d526d3 ath9k: Prepare MCI interface correctly
The LNA_TRANS message needs to be sent only for
chips which have shared PA/LNA.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 14:55:23 +02:00
Sujith Manoharan 4d9f7c68b7 ath9k: Setup MCI statistics properly
Use a subroutine to enable MCI debug statistics
if it is present in the global configuration.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 14:55:22 +02:00
Sujith Manoharan d808ecd874 ath9k: Fix MCI TX control
This patch makes sure that the antenna configuration
is used properly when setting AR_MCI_TX_CTRL.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 14:55:21 +02:00
Sujith Manoharan e18e164e9a ath9k: Handle 2-ANT AR9565 in MCI reset
The value programmed in the BTCOEX control register
is different for each chip. This patch adds support
for 2-ANT, 1-ANT solutions based on AR9565.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 14:55:19 +02:00
Sujith Manoharan d1d07813bb ath9k: Add new MCI configuration parameters
Several new MCI parameters need to be handled for
new chips, add them.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 14:55:18 +02:00
Sujith Manoharan 7d1805e194 ath9k: Remove useless check in MCI reset
If we fail to allocate the sched/gpm buffers when
initializing MCI, we bail out properly. Checking
them in ar9003_mci_reset() is unnecessary, so remove it.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 14:55:16 +02:00
Sujith Manoharan ae55099f5b ath9k: Move MCI registers to reg_mci.h
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 14:55:13 +02:00
Geert Uytterhoeven ff5e56859d iwlegacy: 4965-rs: Remove bogus colon after newline from debug message
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-03 14:22:46 +02:00
Kalle Valo a437b3d928 * add triggers for firmware dump collection
* remove support for -9.ucode
 * new statitics API
 * rate control improvements
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJU9AGsAAoJEC0Llv5uNjIBatAP/39ocqHYTungymXnMhjB7JfV
 7QgJMivYcxpbzjIFYO1UuBh7QxSPpU6lQAFFaKzig6PdedIjrO2hclHszjyB35Ap
 D/FdVbsOll2RGV9jzOhjfppzN7igxeSkZWUk2CCcTuhSr4eKyTHbyVo7a2WE1w/n
 pW4lHuBSpwCmo7GFhiFvYm87CGNFTsbBUYpCCr+PMRmW3nL23CBApmswLqlEaGRN
 MPPhiE5y83V6X+u7yrO9sdgMUS3aYs/m+sOCgUXESlNsnWTYXQCpNAoNQb1P8gGA
 WxSqCyHvqHtFURvm+7EWcjFy29f850rLxmlsD1pkpAsYO5jzwXMPvKp9CTT364QH
 oQol5EaW3k/LgVdyaHX84MUDu28xdyF+RlZRVBZ9ukbxAiRdzhxXja2BupviopQT
 UFoj4z/Xvl9Iy7x8h7irKwlM8nhR/9siluXCU01uRgb7bfCQYghthcAiCrp9Xt2I
 6/B16H02xlNpVi1h5y69PRNUbponVsM546TDXBL9XFn9sHRJ2HsHYlBn2SfNXEQt
 bJzIAr1RMfDNAW9fz/egusgJZPNMfmyGHns7cu03ikDcIeR/q45bRfoQ4XrRTIWc
 Y5apNPFqwqnOSeznui1EASx4NOKsXXp6WBxWxA9SxajMO3l97GgczgkJ6o6BI5JE
 jdzQtUoIWfL+hu++tVFz
 =uonl
 -----END PGP SIGNATURE-----

Merge tag 'iwlwifi-next-for-kalle-2015-03-01' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

* add triggers for firmware dump collection
* remove support for -9.ucode
* new statitics API
* rate control improvements
2015-03-03 13:49:36 +02:00
Sravanthi Tangeda ce458fcfcb i40e/i40evf: Bump versions
Bump i40e to 1.2.10 and i40evf to 1.2.4

Change-ID: I48aa64df05fcc8356e7026f3a9e69ecf78d0c785
Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:31 -08:00
Neerav Parikh fc51de96ed i40e: Only enable TC0 for NIC partition type
In case of MFP mode the driver was returning incorrect number of TCs
for partitions that are not enabled for iSCSI. Though the driver does
not configure these TCs in the Tx scheduler for the NIC partitions;
it does use this map to setup the queue mappings.

This patch fixes this and keeps all the NIC partitions to the default
PF TC i.e. TC0.

Change-ID: Iede214c907e7bac1356e999049b9f642759512b3
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:30 -08:00
Neerav Parikh 15d504b946 i40e: Register DCBNL ops in MFP mode
Allow DCBNL operations in MFP mode to allow query of port DCB settings
via all the PFs and register iSCSI APP on iSCSI enabled PF.

Change-ID: I34cc39b4665d0a631847d4079350d3814f02381e
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:30 -08:00
Mitch Williams ed250ecc55 i40evf: ethtool RSS fixes
Add an extra check to make sure that the indirection table pointer is
valid before dereferencing it.

Change-ID: I698adbf3daff03081d01f489dc95a9f1ad8b12f1
Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:29 -08:00
Anjali Singhai Jain 66ddcffb1a i40e: Fix RSS size at init since default num queue calculation has changed
With changes to default number of queue pairs that the interface comes up with
from 1 per online CPU to 1 per lan_msix, we need to make sure we recalculate
rss_size. We will now recalculate rss_size based on number of queues enabled in
the VSI.

Without this fix if the max_lan_msix < num_online_cpu we will be coming up
with fewer queues but will be populating rss_size based on num_online_cpus.
This will result in packets getting silently dropped because RSS LUT has queues
that are not enabled.

Change-ID: Ifac8796ce1be1758bb0c34f38dbf4a3a76621e76
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:29 -08:00
Anjali Singhai Jain 5db4cb59cd i40e: Move RSS table size for VSIs to the VSI struct
Since all VSIs don't have the same RSS table size,
have one for each VSI instead of having a single define
for RSS table size

Change-ID: Ic2c7c66e4a389d4b6c8841a707510a9735041f02
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:28 -08:00
Anjali Singhai Jain f8faaa40b4 i40e/i40evf: Add missing packet types for VXLAN encapsulated packet types
We were missing a few packet types for VXLAN offload. This patch fixes
that.

Change-ID: I4b23aa0b08e40ed49d0df6c49a5ed9f2009b44ce
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:27 -08:00
Neerav Parikh 750fcbcf18 i40e: Fix issue with removal of apps from DBCNL app table
This patch fixes an issue where the driver is not flushing out the
DCBNL app table for applications that are not present in the local
DCBX application configuration TLVs.

Change-ID: I1f1ee04c81c145071b2ab15657546eb10b81fadb
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:27 -08:00
Anjali Singhai Jain 025b4a545f i40e: Add FW check to disable DCB and wrap autoneg workaround with FW check
For FW < 4.33 DCB should be disabled.
Also Autoneg workaround to avoid Rx stall is still needed for FW < 4.33.

Change-ID: Iff36ad86be2f597e7701096014d6d094332a9a21
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:26 -08:00
Anjali Singhai Jain 9a3bd2f1e3 i40e: Enable more than 64 qps for the Main VSI
When running in a single TC mode the HW can be configured to enable more
than max RSS qps for the Main VSI. This  patch makes it possible to
enable as many as num_online_cpus().

ethtool -L can still be used to reconfigure number of qps
to a smaller value.

Change-ID: I3e2df085276982603d86dfd79477c0ada8d30b8f
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:25 -08:00
Mitch Williams 8f40082434 i40e: don't disable PF LB when disabling VFs
Since we now have functionality to enable and disable PF loopback at
runtime, don't try to do it automatically. Removing this call also gets
rid of a bogus error message when removing the PF module with VFs
enabled.

Change-ID: Ic38652d8a3b9498d96113bfaa5ea7bad050862e9
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:25 -08:00
Akeem G Abodunrin 579b23d8dc i40e: Add safety net for switch calling
This patch adds default case to handle unmatched switch calls.

Change-ID: Icd203570a1dc5322c1038f68b98a83195e8ad28c
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:24 -08:00
Shannon Nelson 7edf810c61 i40e/i40evf: print FW build number in version string
Include the FW build number in the formatted FW version string.  In order
to fit within ethtool's 32 character limit, the etrack's unused high order
bits are trimmed as is the leading 0 for the NVM version.  This leaves
us with 2 character left for if/when the etrack id goes to 5 hex chars
and the NVM major number goes to 2 chars.

Change-ID: Icb004c4b9b14a2f54dd200b467fcc1d7b9297308
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:24 -08:00
Neerav Parikh d40d00b1c2 i40e: Skip the priority tagging if DCB is not enabled
If DCB is not enabled priority tagging is not needed
so skip over that section.

Change-ID: Ia3f3fa07945b421259a9ca38329d6d1cbd6c6bcc
Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:23 -08:00
Matthew Vick eca3204765 fm10k: Resolve various spelling errors and checkpatch warnings
Fix a few silly typos in the code and checkpatch warnings in support of
general code cleanliness.

Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:23 -08:00
Matthew Vick 5bf33dc687 fm10k: Implement ndo_features_check
The introduction of ndo_features_check allows drivers to report their
offload capabilities per-skb. Implement this in fm10k to take advantage
of this new functionality.

Reported-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:22 -08:00
Matthew Vick 8c1a90aa49 fm10k: Modify tunnel length header check when offloading
The FM10000 host interface can only support up to 184 bytes when
performing tunnel offloads. Because of this, a check was added to
prevent the driver from attempting to feed a header to the hardware too
big for it to parse. Make this check a little more robust by calculating
the inner L4 header length based on whether it is TCP or UDP.

Cc: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-03 01:07:21 -08:00
Michal Kubeček acf8dd0a9d udp: only allow UFO for packets from SOCK_DGRAM sockets
If an over-MTU UDP datagram is sent through a SOCK_RAW socket to a
UFO-capable device, ip_ufo_append_data() sets skb->ip_summed to
CHECKSUM_PARTIAL unconditionally as all GSO code assumes transport layer
checksum is to be computed on segmentation. However, in this case,
skb->csum_start and skb->csum_offset are never set as raw socket
transmit path bypasses udp_send_skb() where they are usually set. As a
result, driver may access invalid memory when trying to calculate the
checksum and store the result (as observed in virtio_net driver).

Moreover, the very idea of modifying the userspace provided UDP header
is IMHO against raw socket semantics (I wasn't able to find a document
clearly stating this or the opposite, though). And while allowing
CHECKSUM_NONE in the UFO case would be more efficient, it would be a bit
too intrusive change just to handle a corner case like this. Therefore
disallowing UFO for packets from SOCK_DGRAM seems to be the best option.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-02 22:19:29 -05:00
David S. Miller 096b1c1728 Merge branch 'sh_eth'
Ben Hutchings says:

====================
Fixes for sh_eth #4 v2

I'm continuing review and testing of Ethernet support on the R-Car H2
chip, with help from a colleague.  This series fixes a few more issues.

These are not tested on any of the other supported chips.

v2: Add note that the revert is not a pure revert.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-02 21:31:00 -05:00