aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-11-03dp83640: Prune rx timestamp list before reading from itStefan Sørensen1-0/+1
The list of rx timestamps are currently only pruned of old entries when a new entry is inserted. If no new entries are added, old timestamps may survive beyond their lifetime, possible causing them to be attached to packets with the same sequence number after a rollover. Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03dp83640: Delay scheduled work.Stefan Sørensen1-8/+12
Currently rx_timestamp_work reschedules itself as a regular workqueue item, effectively causing it run constantly as long as there are packets left in the queue. Fix by using delayed workqueue items, limiting it to run only every two jiffies. Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03dp83640: Include hash in timestamp/packet matchingStefan Sørensen1-3/+15
Only using the message type and sequence id for matching timestamps with packets is error prone, as multiple clients may very well be sending packets with the same messagetype and timestamp at the same time. Fix by extending the check to include the hash of bytes 20-29 (source id in PTPv2) that is provided with the timestamps. Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5e: Fix LSO vlan insertionAchiad Shochat1-2/+3
Consider vlan insertion impact on headers copy size also for LSO packets. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5e: Re-eanble client vlan TX accelerationAchiad Shochat2-2/+22
This reverts commit cd58c714acb9 "net/mlx5e: Disable client vlan TX acceleration". Bring back client vlan insertion offload, the original performance issue was found and fixed in the next patch. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5e: Return error in case mlx5e_set_features() failsAchiad Shochat1-1/+1
In case mlx5e_set_features() fails, return the failure status rather than 0. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5e: Don't allow more than max supported channelsAchiad Shochat3-5/+9
Consider MLX5E_MAX_NUM_CHANNELS @ethtool set/get_channels Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5_core: Use the the real irqn in eq->irqnAchiad Shochat1-4/+4
Instead of storing the msix array index in eq->irqn (vecidx), store the real irq number. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5e: Wait for RX buffers initialization in a more proper mannerAchiad Shochat1-2/+2
Use jiffies rather than wait loop with msleep(). The wait loop didn't take into consideration time when the process was not executing. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-03net/mlx5e: Avoid NULL pointer access in case of configuration failureAchiad Shochat1-0/+6
In case a configuration operation that involves closing and re-opening resources (e.g RX/TX queue size change) fails at the re-opening stage these resources will remain closed. So when executing (following) configuration operations (e.g ifconfig down) we cannot assume that these resources are available. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02sh_eth: fix typo in RX descriptor bit nameSergei Shtylyov2-3/+3
The correct name of the RX descriptor 0 bit 30 is RDLE (receive descriptor list end), not RDEL. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02bonding: simplify / unify event handling code for 3ad mode.Mahesh Bandewar2-44/+8
Old logic of updating state-machine is not required since ad_update_actor_keys() does it implicitly. The only loss is the notification differentiation between speed vs. duplex change. Now only one unified notification is printed. Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02bonding: unify all places where actor-oper key needs to be updated.Mahesh Bandewar1-35/+52
actor_admin, and actor_oper key is changed at multiple locations in the code. This patch brings all those updates into one location in an attempt to avoid possible inconsistent updates causing LACP state machine to go in weird state. The unified place is ad_update_actor_key() with simple state-machine logic - (a) If port is "duplex" then only it can participate in LACP (b) Speed change reinitializes the LACP state-machine. Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02bonding: Simplify __get_duplex function.Mahesh Bandewar1-4/+2
Eliminate 'else' clause by simply initializing variable Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02ravb: use pdev rather than ndev for error messagesSimon Horman1-2/+2
This corrects what appear to be typos, making the code consistent with itself, and allowing meaningful prefixes to be displayed with the errors in question. Before: (null): failed to initialize MDIO (null): Cannot allocate desc base address table (size 176 bytes) After: ravb e6800000.ethernet: failed to initialize MDIO ravb e6800000.ethernet: Cannot allocate desc base address table (size 176 bytes) Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02net: dsa: mv88e6xxx: lookup switch nameVivien Didelot6-112/+95
All the mv88e6xxx drivers use the exact same code in their probe function to lookup the switch name given its ID. Thus introduce a mv88e6xxx_switch_id structure and a mv88e6xxx_lookup_name function in the common mv88e6xxx code. In the meantime make __mv88e6xxx_reg_{read,write} static since we do not need to expose these low-level r/w routines anymore. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Acked-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02net: dsa: mv88e6xxx: assert SMI lockVivien Didelot1-11/+14
It's easy to forget to lock the smi_mutex before calling the low-level _mv88e6xxx_reg_{read,write}, so add a assert_smi_lock function in them. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Acked-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02net: encx24j600: Export missing SPI module alias informationJavier Martinez Canillas1-0/+1
The driver Kconfig symbol is tristate which means that it can be built as a module but the module alias information is not added to the module info so module autoload won't work since user-space won't have the information. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02net: encx24j600: Fix SPI id table definitionJavier Martinez Canillas1-3/+4
A driver's SPI id table is expected to be an array of struct spi_device_id that ends with a zero-initialized sentinel entry. But this driver defines the table as a single struct spi_device_id and sets .id_table to a pointer to this struct. But spi_match_id() has a loop that iterates while the struct spi_device_id .name[0] is not NULL, so not having a sentinel can cause a NULL pointer deference error. This patch defines the SPI id table correctly as all other SPI drivers do. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-02enic: assign affinity hint to interruptsGovindarajulu Varadarajan2-0/+99
The affinity hint is used by the user space daemon, irqbalancer, to indicate a preferred CPU mask for irqs. This patch sets the irq affinity hint to local numa core first, when exausted we try non-local numa cores. Also set tx xps cpus mask bassed on affinity hint. v2: remove the global affinity policy. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-01net: hisilicon: Remove .owner assignment from platform_driverhuangdaode1-1/+0
platform_driver doesn't need to set .owner, because platform_driver_register() will set it. Signed-off-by: huangdaode <huangdaode@hisilicon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-01net: dsa: use switchdev obj for VLAN add/del opsVivien Didelot4-27/+97
Simplify DSA by pushing the switchdev objects for VLAN add and delete operations down to its drivers. Currently only mv88e6xxx is affected. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-11-01Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller18-48/+82
2015-10-30Merge tag 'wireless-drivers-next-for-davem-2015-10-29' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-nextDavid S. Miller56-726/+1504
Kalle Valo says: ==================== iwlwifi * bug fix for TDLS * fixes and cleanups in scan * support of several scan plans * improvements in FTM * fixes in FW API * improvements in the failure paths when the bus is dead * other various small things here and there ath10k * add QCA9377 support * fw_stats support for 10.4 firmware ath6kl * report antenna configuration to user space * implement ethtool stats ssb * add Kconfig SSB_HOST_SOC for compiling SoC related code * move functions specific to SoC hosted bus to separated file * pick PCMCIA host code support from b43 driver ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30mlxsw: spectrum: Make mlxsw_sp_port_switchdev_ops staticJiri Pirko1-1/+1
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30mlxsw: Put braces on all arms of branch statementOr Gerlitz1-1/+2
Fix a place where checkpatch complains that braces should be used on all arms of this statement. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30mlxsw: Put constant on the right side of comparisonsOr Gerlitz2-3/+3
Fixes those places where checkpatch complains that comparisons should place the constant on the right side of the test. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30mlxsw: spectrum: Fix ageing time valueJiri Pirko1-1/+2
The value passed through switchdev attr set is not in jiffies, but in clock_t, so fix the convert. Reported-by: Sagi Rotem <sagir@mellanox.com> Fixes: 56ade8fe3f ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30mlxsw: reg: Avoid unnecessary line wrap for mlxsw_reg_sfd_uc_unpackJiri Pirko1-4/+3
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30mlxsw: reg: Fix desription typos of couple of SFN itemsJiri Pirko1-3/+3
Fix copy-paste errors. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30mlxsw: reg: Fix description for reg_sfd_uc_sub_portJiri Pirko1-2/+3
The original description was for LAG, so fix it. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30mlxsw: spectrum: Add support for flood controlIdo Schimmel3-37/+78
Add or remove a bridged port from the flooding domain of unknown unicast packets according to user configuration. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30mlxsw: spectrum: Add support for VLAN ranges in flooding configurationIdo Schimmel1-20/+20
When enabling a range of VLANs on a bridged port we can configure flooding for these VLANs by one register access instead of calling the same register for each VLAN. This is accomplished by using the 'range' field of the Switch Flooding Table Register (SFTR). Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30mlxsw: spectrum: move "bridged" bool to u8 flagsJiri Pirko2-5/+5
It is a flag anyway, so move it to existing u8 flag and don't waste mem. Fix the flags to be in single u8 on the way. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30drivers: net: xgene: Add support RGMII TX/RX delay configurationIyappan Subramanian4-1/+59
Add RGMII TX/RX delay configuration support. RGMII standard requires 2ns delay to help the RGMII bridge receiver to sample data correctly. If the default value does not provide proper centering of the data sample, the TX/RX delay parameters can be used to adjust accordingly. Signed-off-by: Iyappan Subramanian <isubramanian@apm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30geneve: add IPv6 bits to geneve_fill_metadata_dstJohn W. Linville1-7/+22
Signed-off-by: John W. Linville <linville@tuxdriver.com> Reviewed-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30geneve: handle ipv6 priority like ipv4 tosJohn W. Linville1-2/+17
Other callers of udp_tunnel6_xmit_skb just pass 0 for the prio argument. Jesse Gross <jesse@nicira.com> suggested that prio is really the same as IPv4's tos and should be handled the same, so this is my interpretation of that suggestion. Signed-off-by: John W. Linville <linville@tuxdriver.com> Reported-by: Jesse Gross <jesse@nicira.com> Reviewed-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-30geneve: implement support for IPv6-based tunnelsJohn W. Linville1-79/+394
NOTE: Link-local IPv6 addresses for remote endpoints are not supported, since the driver currently has no capacity for binding a geneve interface to a specific link. Signed-off-by: John W. Linville <linville@tuxdriver.com> Reviewed-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-29ath6kl: implement ethtool statsBen Greear1-0/+123
This supports a way to get target stats through normal ethtool stats API. For instance: # ethtool -S wlan1 NIC statistics: tx_pkts_nic: 353 tx_bytes_nic: 25142 rx_pkts_nic: 6 rx_bytes_nic: 996 d_tx_ucast_pkts: 89 d_tx_bcast_pkts: 264 d_tx_ucast_bytes: 3020 d_tx_bcast_bytes: 22122 ... Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-10-29ath6kl: break stats gathering code into separate methodBen Greear2-23/+34
This will allow us to call it from elsewhere when implementing ethtool stats. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-10-29ath6kl: fix firmware version assignmentBen Greear1-1/+1
Improper use of strlcpy caused garbage to be appended to the firmware version string. Fix this by paying attention to the ie_lenth. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-10-29ath6kl: add error message to explain lack of HTBen Greear1-0/+3
It can take a user a while to understand why their NIC that advertises 802.11n support cannot actually do 802.11n. Print out a warning in the logs to save the next poor person to use this NIC some trouble. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-10-29ath6kl: report antenna configurationBen Greear2-0/+19
This lets 'iw phy phy0 info' report antennas for the radio device: ... Available Antennas: TX 0x2 RX 0x2 Configured Antennas: TX 0x2 RX 0x2 ... Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-10-29wil6210: handle failure in Tx vring configVladimir Kondratiev1-1/+1
When configuring Tx vring for new connection, WMI call to the firmware may fail. In this case, need to clean up properly. In particular, need to call cfg80211_del_sta() in case of AP like interface. Perform full "disconnect" procedure for proper clean up Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-10-29wil6210: fix device ready detectionVladimir Kondratiev3-13/+7
Adjust driver behavior during FW boot. Proper sequence of events after reset and FW download, is as following: - FW prepares mailbox structure and reports IRQ "FW_READY" - driver caches mailbox registers, marks mailbox readiness - FW sends WMI_FW_READY event, ignore it - FW sends WMI_READY event with some data - driver stores relevant data marks FW is operational Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-10-29wil6210: Fix TSO overflow handlingHamad Kadmany1-15/+15
When Tx ring full is encountered with TSO, printout of "DMA error" was wrongly printed. In addition, in case of Tx ring full return proper error code so that NETDEV_TX_BUSY is returned to network stack in order not to drop the packets and retry transmission of the packets when ring is emptied. Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-10-29wil6210: ignore selected WMI eventsVladimir Kondratiev1-0/+10
Some events are ignored for purpose; such events should not be treated as "unhandled events". Replace info message saying "unhandled" with debug one saying "ignore", to reduce dmesg pollution Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-10-29ath10k: add QCA9377 chipset supportBartosz Markowski4-0/+48
Add the hardware name, revision and update the pci_id table. Currently there're two HW ref. designs available I'm aware of, with 1.0.2 and 1.1 chip revisions. I've access and been using the first one so far and this patch cover only it. QCA9377 inherits most of the stuff (e.g. fw interfaces) from QCA61x4 design, so the integration was pretty straightforward. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-10-29ath10k: reload HT/VHT capabilities on antenna changeRajkumar Manoharan1-11/+28
To reflect configured antenna settings in HT/VHT MCS map, reload the HT/VHT capabilities upon antenna change. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-10-29ath10k: move static HT/VHT capability setup functionsRajkumar Manoharan1-140/+140
Move HT and VHT capabiltity setup static functions to avoid forward declaration. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>