Commit Graph

504552 Commits

Author SHA1 Message Date
Rafał Miłecki
9b6cc9a807 bcma: enable support for PCIe Gen 2 host devices
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-02 16:59:45 +02:00
Rafał Miłecki
804e27dee4 bcma: support bringing up bus hosted on PCIe Gen 2
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-02 16:59:45 +02:00
Rafał Miłecki
5b6ff664c8 bcma: change IRQ control function to accept bus as an argument
It doesn't operate on PCI core, but PCI host device, so there is no
point of passing core related struct.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-02 16:59:45 +02:00
Rafał Miłecki
4186721d02 bcma: add helpers bringing PCIe hosted bus up / down
Bringing PCIe hosted bus up requires operating on host-related core.
Since we plan to support PCIe Gen 2 devices we should provide a helper
picking the correct one (PCIE or PCIE2).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-02 16:59:45 +02:00
Rafał Miłecki
ba8b6ae6e9 brcmfmac: respect reason when deleting (deauthenticating) STA
Starting with kernel 3.19 reason is provided by cfg80211.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-02 16:57:28 +02:00
Vladimir Kondratiev
344a7024e0 wil6210: track privacy connection attribute
For the STA interface, track 'privacy'.
Refactor safety checks to:
- always print connection params
- always check IE size validity
- require RSN IE for secure connection

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:15:26 +02:00
Vladimir Kondratiev
774974e504 wil6210: rename 'secure_pcp' to 'privacy'
Make this field to track privacy attribute for all interface types

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:15:22 +02:00
Boris Sorochkin
8f55cbec7f wil6210: Fix division by zero in wil_vring_debugfs_show
On some platforms get_cycles() implemented to allways return 0.
On such platforms "Division by zero" bug was triggered.

Signed-off-by: Boris Sorochkin <boriss@codeaurora.org>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:15:20 +02:00
Vladimir Shulman
0436fd9a2d wil6210: Change of threshold for tx vring idleness measurement
Change threshold to be variable debugfs entry from hard-coded 0.
Default threshold value is 16 descriptors because HW is capable
of fetching up to 16 descriptors at once.

Signed-off-by: Vladimir Shulman <qca_shulmanv@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:15:19 +02:00
Vladimir Kondratiev
33c477fdab wil6210: branch prediction hints
Mark expected branches using likely()/unlikely().
Do it on high performance route - data path and interrupts

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:15:18 +02:00
Vladimir Kondratiev
e3351277ac wil6210: enable fix for HW bug in 802.11->803.3 transform
In the old hardware, bug existed that caused DA and SA for every
Rx packet to be swapped in the AP mode.
New hardware has fix for this bug. Enable this fix in the
hardware.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:15:17 +02:00
Vladimir Kondratiev
9a5511b58b wil6210: remove support for old hardware
Hardware older than Sparrow B0 obsolete.
There is no WiFi product that uses this hardware.
Recent firmware does not support it either.

Remove driver support.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:15:14 +02:00
Vladimir Kondratiev
2cd0f021b8 wil6210: boot loader
Introduce boot loader. Instead of the operational firmware,
very small boot loader is burned to the on-board flash. Boot loader
initializes hardware upon reset, and prepares for low power mode.
Boot loader reports MAC address and detects radio chip connected.

Driver loads firmware only when bringing up interface. All information
required to set up network interface, most important is MAC address,
reported by the boot loader

The firmware composed of 2 files:
- wil6210.fw - firmware itself (compiled code + data)
- wil6210.board - board file (various board and radio dependent
  calibrations and parameters)

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:15:13 +02:00
Zhaoyang Liu
4ce7bc0a4e mwifiex: fix usb tx data payload offset issue
Commit 84b313b35f ("mwifiex: make tx packet 64 byte DMA aligned")
induced payload offset issue for USB interface.

There is no USB interface header for tx packets, so there's no need to
pull interface length while processing tx skb.

This patch fixes this issue.

Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:14:02 +02:00
Avinash Patil
31def91b3a mwifiex: DMA alignment for RX packets
This patch adds support for DMA alignment of sk_buffs
allocated for RX.
Patch also adds support to modify skb allocation flags.

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Qingshui Gao <gaoqs@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:12:44 +02:00
Avinash Patil
1c4c24eb7e mwifiex: modify TX buff size for SD8887
FW crash has been observed while running iperf TX with SD8887
devices. This is because of invalid TX buffer setting. SD8887
supports 2K buffer sizes. This patch fixes this issue.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:08:47 +02:00
Avinash Patil
b4e8aebbc7 mwifiex: change datatype to bool for device capability flags
This patch changes datatypes for device capability flags to bool.
Patch also aggregates these variables at single place.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:08:46 +02:00
Avinash Patil
7521ce6eb2 mwifiex: do not process mgmt rx on uninitialized interface
This patch fixes a crash which was happening because of RX of
management frames on uninitialzed interface. Now we drop management
frames for interfaces where cfg80211 has not registered any management
subtype reception or interface has no NL80211 iftype set.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:08:44 +02:00
Shengzhen Li
04c7b363c9 mwifiex: more_task flag for main_process
This patch handles a corner case where TX packet would remain in
driver queue till next packet comes in.
Here is sequence:
1. TX packet is queued via hard_start_xmit and main_work is queued
2. SDIO interrupt comes in which directly call mwifiex_main_process.
This starts executing main superloop.
3. Now work from step1 is scheduled but at first check itself it sees
mwifiex_processing is set and exits.
4. Now if superloop from step2 has passed TX processing part of superloop
this packet would remain in queue until next packet/command/SDIO interrupt
arrives and queues main_work.

This patch fixes this corner case by defining more_task flag which is set when
mwifiex_processing is found to be true. At end of superloop we again check if
more_task flag is set and if set, execute superloop again.

Signed-off-by: Shengzhen Li <szli@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:08:40 +02:00
Bas Peters
8a1959beca libertas: remove unnecessary check before calling debugfs_remove
Debugfs_remove will check for error or NULL for us, so it is not
necessary to do this here.

Signed-off-by: Bas Peters <baspeters93@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:06:51 +02:00
Taehee Yoo
851639fdae rtlwifi: Modify some USB de-initialize code.
Delete SET_USB_STOP macro and rtl_usb_deinit because
those are called twice in USB de-initialize routine.
Add some de-initialize workqueue function in USB disconnect routine.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-27 10:05:26 +02:00
Leon Nardella
0088d27b78 ath9k_htc: Add new USB ID
This device is a dongle made by Philips to enhance their TVs with wireless capabilities,
but works flawlessly on any upstream kernel, provided that the ath9k_htc module is attached to it.
It's correctly recognized by lsusb as "0471:209e Philips (or NXP) PTA01 Wireless Adapter" and the
patch has been tested on real hardware.

Signed-off-by: Leon Nardella <leon.nardella@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 15:20:38 +02:00
Jes Sorensen
52f5780494 rtlwifi: Clear ACM_CTRL AC3_VO bit correctly
All hw driver components in the rtlwifi driver, except for the
rtl8192de component has this bug. They would clear BE bit in the
ACM_CTRL register instead of the VO bit when processing the VO queue.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 15:16:45 +02:00
Hante Meuleman
661fa95ddb brcmfmac: Fix escan timer causing oops.
In some rare circumstances the escan protection timer can expire
before the setup completed (due to long timeouts on IOCTL). This
patch avoids this situation by setting the timer after the setup
completed correctly.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 15:14:23 +02:00
Hante Meuleman
a7b134a767 brcmfmac: Dont sleep when ctrl frames to transmit.
The SDIO watchdog will put the device in sleep mode when there is
no activity for some time and nothing to do anymore. This check
is incomplete and should also check if there is a control frame
to transmit.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 15:14:21 +02:00
Arend van Spriel
9982464379 brcmfmac: make sdio suspend wait for threads to freeze
Borrowed the idea of the PM freezer to make sdio suspend wait for
watchdog and DPC thread to freeze at a safe point in their thread
routine. The suspend takes 20-25 msec.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 15:14:19 +02:00
Arend van Spriel
c7cd5d27d8 brcmfmac: add debugfs file containing revision info
Make the revision info visible in debugfs. The new debugfs
file is named 'revinfo'.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 15:14:18 +02:00
Hante Meuleman
ad5a52518a brcmfmac: Remove error print for invalid key index.
When a key is set or cleared with an unsupported key index then
brcmfmac will print an error. With most wpa_supplicants this is
happening a lot. The error print is confusing and not needed.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 15:14:16 +02:00
Arend van Spriel
a1ce7a0d6a brcmfmac: use helper function for changing SDIO state
Changing the SDIO state of the driver involves changing the bus
interface state. Adding a helper function makes sure that knowledge
is in one place.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 15:14:14 +02:00
Avinash Patil
ffdcad0596 mwifiex: use alloc_workqueue's format strings capabilities for WQ names
alloc_workqueue() has string format formation ability e.g. wqname%ifname
will be treated as wqnameifname. Use this and remove string operations
while defining strings for workqueue names.

Reported-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 15:05:30 +02:00
Nicholas Mc Guire
01317c2641 brcm80211: drop unreachable else case
the if/elseif/else is exhaustive - there is no 4th case given the
  rssi_ctrl_mask = RADIO_2055_NBRSSI_SEL | RADIO_2055_WBRSSI_G1_SEL |
  RADIO_2055_WBRSSI_G2_SEL;
so this unreachable else case (dead code) can be dropped.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 15:03:12 +02:00
Nicholas Mc Guire
187d3c3386 brcmfmac: use msecs_to_jiffies for time conversion
This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 15:01:30 +02:00
Sujith Manoharan
aa96af82b8 ath9k: Restart TSF2 timers on wakeup
When coming out of WoW sleep, check and restart
timers based on TSF2.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 14:58:46 +02:00
Sujith Manoharan
3277b20270 ath9k: Clear additional WoW events
The events for patterns 8..15 need to be
cleared on wakeup.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 14:58:43 +02:00
Sujith Manoharan
6aaefab6cf ath9k: Handle additional patterns on wakeup
Handle the user-configured patterns in the range 8..15
when waking up and update wow_status correctly.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 14:58:41 +02:00
Sujith Manoharan
b39adc63bf ath9k: Check MCI PowerSave state
The power save state of MCI has to be disabled
when enabling WoW sleep, check this properly.
ar9003_mci_state() doesn't handle MCI_STATE_GET_WLAN_PS_STATE
right now, but this will be done later when proper
support for MCI/PS is added.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 14:58:39 +02:00
Sujith Manoharan
ff6f0c036b ath9k: Add new MCI states
Several new MCI states have to handled,
add them to the list.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 14:58:38 +02:00
Sujith Manoharan
0d35024cad ath9k: Set keep awake timer
When MCI is enabled and WoW sleep is enabled,
make sure that the RTC keep awake timer is set
with the required value. This is also required
when the AR_WA is programmed.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 14:58:35 +02:00
Sujith Manoharan
2a0eef1ac6 ath9k: Fix descriptors for keep-alive frame
Along with AR9462, AR9565 also has an extra field
in the TX descriptor which needs to be zeroed out
for the keep alive frame. This makes the earlier
REG_WRITE redundant, so it can be removed.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-26 14:58:34 +02:00
David S. Miller
009f33ed6f Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2015-02-24

This series contains updates to i40e and i40evf only, which bumps their
versions to i40e 1.2.9 and i40evf 1.2.3.

Paul fixes i40e_debug_aq() for big endian machines by adding the
appropriate LExx_TO_CPU wrappers.

Catherine adds a requested speed variable to the link_status to store the
last speeds we requested from the firmware and use the advertised speed
settings in get_settings in ethtool now that we have it.  Due to the
new code addition, she also refactors get_settings to improve readability
and to accommodate some of the longer lines of code by adding two
functions i40e_get_settings_link_up() and i40e_get_settings_link_down().

Carolyn adds a struct to the VSI struct to keep track of RXNFC settings
done via ethtool.  Adds more information to the interrupt vector
names, specifically to the VF misc vector name so that we can distinguish
between all the interrupts.

Ashish enables the i40evf driver to enable debug prints via ethtool.

Mitch updates i40e to enable packet split only when IOMMU is in use,
since it shows a distinct advantage over the single-buffer path
because it minimizes DMA mapping and unmapping.  Also adds the receive
routine in use to the features log message to be able to print the
receive packet split status.

Greg adds the ability to get, set and commit permanently the NPAR
partition BW configuration through configfs.  Enables an application
to query the i40e driver's private flags to get the status of NPAR
enablement via ethtool.

Neerav adds support for bridge offload ndo_ops getlink and setlink
to enable bridge hardware mode as per the mode set via IFLA_BRIDGE_MODE.
The support is only enabled in the case of a PF VSI and not available for
any other VSI type.

Kevin fixes i40e by ensuring the BUF and FLAG_RD flags are set for
indirect admin queue command.

Vasu updates the driver to setup FCoE netdev device type as "fcoe", so that
it shows up in sysfs as FCoE device.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-25 18:13:07 -05:00
Guenter Roeck
d79d210736 net: dsa: Introduce dsa_is_port_initialized
To avoid race conditions when using the ds->ports[] array,
we need to check if the accessed port has been initialized.
Introduce and use helper function dsa_is_port_initialized
for that purpose and use it where needed.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-25 17:57:48 -05:00
David S. Miller
bb66be1c54 Merge branch 'sf2_hwbridge'
Florian Fainelli says:

====================
net: dsa: integration with SWITCHDEV for HW bridging

This patch set provides the DSA and SWITCHDEV integration bits together and
modifies the bcm_sf2 driver accordingly such that it works properly with HW
bridging.

Changes in v3:

- add back the null pointer check in dsa_slave_br_port_mask from Guenter
- slightly rework patch 1 commit message not to mention the function name
  we add in patch 2

Changes in v2:

- avoid a race condition in how DSA network devices are created, patch from
  Guenter Roeck
- provide a consistent and work STP state once a port leaves the bridge
- retain a bridge device pointer to properly flag port/bridge membership
- properly flush the ARL (Address Resolution Logic) in bcm_sf2.c
- properly retain port membership when individually bringing devices up/down
  while they are members of a bridge

We discussed on the mailing-list the possibility of standardizing a "fdb_flush"
operation for DSA switch drivers, looking at the Marvell and Broadcom switches,
I am not convinced this is practical or diserable as the terminologies vary
here, but there is nothing preventing us from doing it later.

Many thanks to Guenter and Andrew for both testing and providing feedback.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-25 17:04:15 -05:00
Florian Fainelli
12f460f234 net: dsa: bcm_sf2: add HW bridging support
Implement the bridge join, leave and set_stp callbacks by making that
we do the following:

- when a port joins the bridge, all existing ports in the bridge get
  their VLAN control register updated with that joining port
- the joining port is including all existing bridge ports in its own
  VLAN control register

The leave operation is fairly similar, special care must be taken to
make sure that port leaving the bridging is not removing itself from its
own VLAN control register.

Since the various BR_* states apply directly to our HW semantics, we
just need to translate these constants into their corresponding HW
settings, and voila!

We make sure to trigger a fast-ageing process for ports that are
joining/leaving the bridge and transition from incompatible states, this
is equivalent to triggering an ARL flush for that port.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-25 17:03:38 -05:00
Florian Fainelli
b73adef677 net: dsa: integrate with SWITCHDEV for HW bridging
In order to support bridging offloads in DSA switch drivers, select
NET_SWITCHDEV to get access to the port_stp_update and parent_get_id
NDOs that we are required to implement.

To facilitate the integratation at the DSA driver level, we implement 3
types of operations:

- port_join_bridge
- port_leave_bridge
- port_stp_update

DSA will resolve which switch ports that are currently bridge port
members as some Switch hardware/drivers need to know about that to limit
the register programming to just the relevant registers (especially for
slow MDIO buses).

We also take care of setting the correct STP state when slave network
devices are brought up/down while being bridge members.

Finally, when a port is leaving the bridge, we make sure we set in
BR_STATE_FORWARDING state, otherwise the bridge layer would leave it
disabled as a result of having left the bridge.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-25 17:03:38 -05:00
Guenter Roeck
d87d6f44d7 net: dsa: Ensure that port array elements are initialized before being used
A network device notifier can be called for one or more of the created
slave devices before all slave devices have been registered. This can
result in a mismatch between ds->phys_port_mask and the registered devices
by the time the call is made, and it can result in a slave device being
added to a bridge before its entry in ds->ports[] has been initialized.

Rework the initialization code to initialize entries in ds->ports[] in
dsa_slave_create. With this change, dsa_slave_create no longer needs
to return slave_dev but can return an error code instead.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-25 17:03:38 -05:00
Sravanthi Tangeda
5b8eb1766f i40e/i40evf: Update driver versions
Bump i40e to 1.2.9 and i40evf 1.2.3

Also update the copyright year.

Change-ID: I345d777e94abd0acffe6a28793f675d251a86299
Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24 23:38:40 -08:00
Carolyn Wyborny
9a21a007b6 i40evf: Add more info to interrupt vector names
This patch adds the netdev name to the VF misc vector name.  Without
this patch, all the interrupts show the same info, so it difficult to
distinguish them.

Change-ID: I247828697e1373ecfb5f8dc1bc9618e98a7f4942
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24 23:24:12 -08:00
Greg Rose
7e45ab4408 i40e: Use ethtool private flags to display NPAR status
Allow an application to query the i40e driver's private flags to get the
status of NPAR enablement.  This will be used by applications to determine
if there are NPAR specific features available.

Change-ID: Ia6d9477a48f9c4cb41ca022bd433f77da3f2146c
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24 23:09:32 -08:00
Kevin Scott
3b38cd17f8 i40e: Set FLAG_RD when sending buffer FW must read
Set FLAG_RD for send_driver_version AQ command.

Change-ID: I8253051eff85a1d4b5a4e12ce0395b65ceb91e62
Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24 22:55:02 -08:00
Mitch Williams
aba237d124 i40e: print Rx packet split status
Add the RX routine in use to the features log message.

Change-ID: Ifbbf28fb7f42b9a3d2828586488e9e6331107dd5
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-02-24 22:40:24 -08:00