aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2016-03-11macvtap: always pass ethernet header in linearWillem de Bruijn1-3/+6
The stack expects link layer headers in the skb linear section. Macvtap can create skbs with llheader in frags in edge cases: when (IFF_VNET_HDR is off or vnet_hdr.hdr_len < ETH_HLEN) and prepad + len > PAGE_SIZE and vnet_hdr.flags has no or bad csum. Add checks to ensure linear is always at least ETH_HLEN. At this point, len is already ensured to be >= ETH_HLEN. For backwards compatiblity, rounds up short vnet_hdr.hdr_len. This differs from tap and packet, which return an error. Fixes b9fb9ee07e67 ("macvtap: add GSO/csum offload support") Signed-off-by: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10net/mlx5e: Support offload cls_flower with skbedit mark actionAmir Vadai3-0/+6
Introduce offloading of skbedit mark action. For example, to mark with 0x1234, all TCP (ip_proto 6) packets arriving to interface ens9: # tc qdisc add dev ens9 ingress # tc filter add dev ens9 protocol ip parent ffff: \ flower ip_proto 6 \ indev ens9 \ action skbedit mark 0x1234 Signed-off-by: Amir Vadai <[email protected]> Signed-off-by: Or Gerlitz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10net/mlx5e: Support offload cls_flower with drop actionAmir Vadai3-0/+309
Parse tc_cls_flower_offload into device specific commands and program the hardware to classify and act accordingly. For example, to drop ICMP (ip_proto 1) packets from specific smac, dmac, src_ip, src_ip, arriving to interface ens9: # tc qdisc add dev ens9 ingress # tc filter add dev ens9 protocol ip parent ffff: \ flower ip_proto 1 \ dst_mac 7c:fe:90:69:81:62 src_mac 7c:fe:90:69:81:56 \ dst_ip 11.11.11.11 src_ip 11.11.11.12 indev ens9 \ action drop Signed-off-by: Amir Vadai <[email protected]> Signed-off-by: Or Gerlitz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10net/mlx5e: Introduce tc offload supportAmir Vadai5-2/+222
Extend ndo_setup_tc() to support ingress tc offloading. Will be used by later patches to offload tc flower filter. Feature is off by default and could be enabled by issuing: # ethtool -K eth0 hw-tc-offload on Offloads flow table is dynamically created when first filter is added. Rules are saved in a hash table that is maintained by the consumer (for example - the flower offload in the next patch). When last filter is removed and no filters exist in the hash table, the offload flow table is destroyed. Signed-off-by: Amir Vadai <[email protected]> Signed-off-by: Or Gerlitz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10net/mlx5e: Add a new priority for kernel flow tablesAmir Vadai2-4/+4
Move the vlan and main flow tables to use priority 1. This will allow the upcoming TC offload logic to use a higher priority (0) for the offload steering table. Signed-off-by: Amir Vadai <[email protected]> Signed-off-by: Or Gerlitz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10net/mlx5e: Relax ndo_setup_tc handle restrictionAmir Vadai1-1/+1
Restricting handle to TC_H_ROOT breaks the old instantiation of mqprio to setup a hardware qdisc. This patch relaxes the test, to only check the type. Fixes: 08fb1da ("net/mlx5e: Support DCBNL IEEE ETS") Signed-off-by: Amir Vadai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10net/mlx5_core: Set flow steering dest only for forward rulesAmir Vadai2-19/+28
We need to handle flow table entry destinations only if the action associated with the rule is forwarding (MLX5_FLOW_CONTEXT_ACTION_FWD_DEST). Fixes: 26a8145390b3 ('net/mlx5_core: Introduce flow steering firmware commands') Signed-off-by: Amir Vadai <[email protected]> Signed-off-by: Maor Gottlieb <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10net-next: mediatek: add Kconfig and MakefileJohn Crispin4-0/+24
This patch adds the Makefile and Kconfig required to make the driver build. Signed-off-by: John Crispin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10net-next: mediatek: add support for MT7623 ethernetJohn Crispin2-0/+2228
Add ethernet support for MediaTek SoCs from the MT7623 family. These have dual GMAC. Depending on the exact version, there might be a built-in Gigabit switch (MT7530). The core does not have the typical DMA ring setup. Instead there is a linked list that we add descriptors to. There is only one linked list that both MACs use together. There is a special field inside the TX descriptors called the VQID. This allows us to assign packets to different internal queues. By using a separate id for each MAC we are able to get deterministic results for BQL. Additionally we need to provide the core with a block of scratch memory that is the same size as the RX ring and data buffer. This is really needed to make the HW datapath work. Although the driver does not support this yet, we still need to assign the memory and tell the core about it for RX to work. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Michael Lee <[email protected]> Signed-off-by: John Crispin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10qede: Fix net-next "make ARCH=x86_64"Manish Chopra1-1/+4
'commit 55482edc25f0606851de42e73618f813f310d009 ("qede: Add slowpath/fastpath support and enable hardware GRO")' introduces below error when compiling net-next with "make ARCH=x86_64" drivers/built-in.o: In function `qede_rx_int': qede_main.c:(.text+0x6101a0): undefined reference to `tcp_gro_complete' Signed-off-by: Manish Chopra <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10qlcnic: Fix mailbox completion handling during spurious interruptRajesh Borundia3-5/+14
o While the driver is in the middle of a MB completion processing and it receives a spurious MB interrupt, it is mistaken as a good MB completion interrupt leading to premature completion of the next MB request. Fix the driver to guard against this by checking the current state of MB processing and ignore the spurious interrupt. Also added a stats counter to record this condition. Signed-off-by: Rajesh Borundia <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10qlcnic: Remove unnecessary usage of atomic_tRajesh Borundia2-6/+5
o atomic_t usage is incorrect as we are not implementing any atomicity. Signed-off-by: Rajesh Borundia <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10cxgb4vf: Set number of queues in pci probe onlyHariprasad Shenai1-4/+4
Signed-off-by: Hariprasad Shenai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10cxgb4vf: Add a couple more checks for invalid provisioning configurationsHariprasad Shenai1-0/+5
Signed-off-by: Hariprasad Shenai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10cxgb4vf: Configure queue based on resource and interrupt typeHariprasad Shenai1-71/+94
The Queue Set Configuration code was always reserving room for a Forwarded interrupt Queue even in the cases where we weren't using it. Figure out how many Ports and Queue Sets we can support. This depends on knowing our Virtual Function Resources and may be called a second time if we fall back from MSI-X to MSI Interrupt Mode. This change fixes that problem. Signed-off-by: Hariprasad Shenai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10cxgb4vf: Enable interrupts before we register our network devicesHariprasad Shenai1-25/+26
This avoids a race condition where a system that has network devices set up to be automatically configured and we get the first Port Link Status message from the firmware on the Asynchronous Firmware Event Queue before we've enabled interrupts. If that happens, we end up losing the interrupt and never realizing that the links has actually come up. Signed-off-by: Hariprasad Shenai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10net: dsa: mv88e6xxx: avoid writing the same modeVivien Didelot1-8/+13
There is no need to change the 802.1Q port mode for the same value. Thus avoid such message: [ 401.954836] dsa dsa@0 lan0: 802.1Q Mode: Disabled (was Disabled) Signed-off-by: Vivien Didelot <[email protected]> Tested-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10net: dsa: mv88e6xxx: read then write PVIDVivien Didelot1-4/+26
The port register 0x07 contains more options than just the default VID, even though they are not used yet. So prefer a read then write operation over a direct write. This also allows to keep track of the change through dynamic debug. Signed-off-by: Vivien Didelot <[email protected]> Tested-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10net: dsa: mv88e6xxx: rework port state setterVivien Didelot2-22/+34
Apply a few non-functional changes on the port state setter: * add a dynamic debug message with state names to track changes * explicit states checking instead of assuming their numeric values * lock mutex only once when changing several port states * use bitmap macros to declare and access port_state_update_mask Signed-off-by: Vivien Didelot <[email protected]> Tested-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10sh_eth: advance 'rxdesc' later in sh_eth_ring_format()Sergei Shtylyov1-3/+4
Iff dma_map_single() fails, 'rxdesc' should point to the last filled RX descriptor, so that it can be marked as the last one, however the driver would have already advanced it by that time. In order to fix that, only fill an RX descriptor once all the data for it is ready. Signed-off-by: Sergei Shtylyov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10sh_eth: fix NULL pointer dereference in sh_eth_ring_format()Sergei Shtylyov1-1/+2
In a low memory situation, if netdev_alloc_skb() fails on a first RX ring loop iteration in sh_eth_ring_format(), 'rxdesc' is still NULL. Avoid kernel oops by adding the 'rxdesc' check after the loop. Reported-by: Wolfram Sang <[email protected]> Signed-off-by: Sergei Shtylyov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-10net/mlx5_core: Introduce forward to next priority actionMaor Gottlieb2-12/+182
Add support to create flow rule that forward packets to the first flow table in the next priority (next priority could be the first priority in the next namespace or the next priority in the same namespace). This feature could be used for DONT_TRAP rules or rules that only want to mark the packet with flow tag. In order to do it optimally, each flow table has list of all rules that point to this flow table, when a flow table is destroyed/created, we update the list head correspondingly. This kind of rule is created when destination is NULL and action is MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO. Signed-off-by: Maor Gottlieb <[email protected]> Reviewed-by: Matan Barak <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10net/mlx5_core: Create anchor of last flow tableMaor Gottlieb2-1/+45
Create an empty flow table in the end of NIC rx namesapce. Adding this flow table simplify the implementation of "forward to next prio" rules. Signed-off-by: Maor Gottlieb <[email protected]> Reviewed-by: Matan Barak <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
2016-03-10rtl8xxxu: Temporarily disable 8192eu device initJes Sorensen1-0/+4
To reduce the patch volume, temporariliy disable 8192eu device init. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Use correct 8051 reset function for 8723b partsJes Sorensen2-2/+39
8723b needs more action, so implement support for device specific reset functions. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Print a warning if flushing the FIFO failsJes Sorensen1-1/+4
Only print a warning if the FIFO flush fails, as opposed to printing the status unconditionally. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Flush FIFO before powering down devicesJes Sorensen2-0/+36
This should help when reloading the driver for 8723bu devices Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Implement device specific power_off functionJes Sorensen3-2/+99
Implment 8723bu specific device power down, and make power_off() a fileops function. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Implement 8723bu specific disable_rf() functionJes Sorensen2-1/+17
Powering up the 8723bu RF should probably be matched by the ability to power it down again. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Use define for REG_PWR_DATA bitsJes Sorensen2-2/+2
Use the bit define rather than hard code the value for REG_PWR_DATA bits. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: convert rtl8723bu_init_bt() into rtl8723b_enable_rf()Jes Sorensen2-11/+1
rtl8723bu_init_bt() is effectively the function enabling RF, so name it appropriately. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Remove unncessary semicolonJes Sorensen1-1/+1
This removes an superfluous semicolon. Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Pass RX rate to rx_parse_phystats and enable phystats for rtl8723buJes Sorensen1-4/+9
rtl8xxxu_rx_parse_phystats() only needs the RX rate to determine whether to handle the stats as CCK or not. Parsing in the rate rather than the rx descriptor elimantes the need to handle multiple rx descriptor formats in the function. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Process C2H RA_REPORT events for 8723buJes Sorensen2-0/+17
Handle RA_REPORTS events for 8723bu to not have them show up as unhandled. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Dump contents of unhandled C2H eventsJes Sorensen1-1/+4
Dump the contents of unhandled C2H events. We should be handling all expected events, so this is debugging help in case an unexpected event happens. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Report media status using the correct H2C command for 8723buJes Sorensen2-7/+47
Implement support for nextgen devices reporting connectition to the firmware. The H2C API for reporting connection to the firmware is different between the two device generations. Use the fileops structure to determine which one to call. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Implement basic 8723b specific update_rate_mask() functionJes Sorensen2-4/+50
Support for setting bandwidth and VHT parameters is still missing Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Define 8723b H2C ramask command structureJes Sorensen1-1/+10
Define H2C command structure for setting the rate mask. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Do not parse RX descriptor info for C2H packetsJes Sorensen1-10/+7
C2H events are delivered as RX packets on 8723bu/8192eu. When receiving a C2H event, do not parse the rest of the RX descriptor as the info isn't valid. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Improve handling of txdesc32 vs txdesc40 handlingJes Sorensen2-38/+92
Further correct the handling of 40 byte TX descriptors. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: TX RTS rate is word 4 for 8723aJes Sorensen2-3/+4
Correct the setting of TX RTS for 8723a generation chips. In addition update documentation to match that this is part of data word 4, note data word 5. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8723au: Update TX descriptor words 4 and 5 definitionsJes Sorensen2-15/+28
TX data words 4 and 5 differ significantly between 32 byte and 40 byte descriptors. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Set sequence number correctly for 40 byte TX descriptorsJes Sorensen2-10/+22
SEQ changed location in the 40 byte TX descriptor. Set it correctly. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Set the correct TX descriptor bits for agg and break on 8723bJes Sorensen1-3/+16
Fixup victim of the relocated bits for AGG_ENABLE/AGG_BREAK in the 40 byte TX descriptor Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Add more 40 byte TX desc bit definitionsJes Sorensen2-6/+28
Add additional bit definitions for 40 byte TX descriptors, and rename bits for 32 byte descriptors that are located differently in the 40 byte descriptor format. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Add additional tx descriptor bits for data word 0Jes Sorensen1-0/+4
This adds documentation for some additional bits in TX descriptor word 0. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Do not unconditionally print debug info in rtl8723bu_handle_c2h()Jes Sorensen1-9/+9
Reduce the log level in rtl8723bu_handle_c2h() Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Handle 40 byte TX descriptors for rtl8723buJes Sorensen2-13/+25
Note the descriptor checksum is still only calculated over the initial 32 bytes of the descriptor, ignoring the last 8 bytes of the descriptor. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Add definition for 8723bu tx descriptorJes Sorensen1-0/+16
Newer generation chips use a 40 byte TX descriptor, compared to the 32 byte descriptor used on older chips. This adds the definition for the 40 byte descriptor. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-10rtl8xxxu: Set the correct thermal meter register for 8723buJes Sorensen1-1/+5
Older chips use RF register 0x24 to set the thermal meter. Newer chips use register 0x42. This change makes sure to set the correct thermal meter register depending on the chip. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>