mbox series

[v2,net-next,0/3] add VLAN support to DSA MT7530

Message ID cover.1513136754.git.sean.wang@mediatek.com
Headers show
Series add VLAN support to DSA MT7530 | expand

Message

Sean Wang Dec. 13, 2017, 4:01 a.m. UTC
From: Sean Wang <sean.wang@mediatek.com>

Changes since v1:
- fix up the typo
- prefer ordering declarations longest to shortest
- update that vlan_prepare callback should not change any state
- use lower case letter for function naming

The patchset extends DSA MT7530 to VLAN support through filling required
callbacks in patch 1 and merging the special tag with VLAN tag in patch 2
for allowing that the hardware can handle these packets with VID from the
CPU port.

Sean Wang (3):
  net: dsa: mediatek: add VLAN support for MT7530
  net: dsa: mediatek: combine MediaTek tag with VLAN tag
  net: dsa: mediatek: update MAINTAINERS entry with MediaTek switch
    driver

 MAINTAINERS              |   7 ++
 drivers/net/dsa/mt7530.c | 291 ++++++++++++++++++++++++++++++++++++++++++++++-
 drivers/net/dsa/mt7530.h |  83 +++++++++++++-
 net/dsa/tag_mtk.c        |  38 +++++--
 4 files changed, 403 insertions(+), 16 deletions(-)

Comments

Andrew Lunn Dec. 13, 2017, 4:50 p.m. UTC | #1
On Wed, Dec 13, 2017 at 12:01:10PM +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
David Miller Dec. 14, 2017, 6:30 p.m. UTC | #2
From: <sean.wang@mediatek.com>

Date: Wed, 13 Dec 2017 12:01:10 +0800

> From: Sean Wang <sean.wang@mediatek.com>

> 

> Changes since v1:

> - fix up the typo

> - prefer ordering declarations longest to shortest

> - update that vlan_prepare callback should not change any state

> - use lower case letter for function naming

> 

> The patchset extends DSA MT7530 to VLAN support through filling required

> callbacks in patch 1 and merging the special tag with VLAN tag in patch 2

> for allowing that the hardware can handle these packets with VID from the

> CPU port.


This doesn't even compile:

drivers/net/dsa/mt7530.c: In function ‘mt7530_port_vlan_add’:
drivers/net/dsa/mt7530.c:1131:6: warning: unused variable ‘ret’ [-Wunused-variable]
  int ret;
      ^~~
drivers/net/dsa/mt7530.c: At top level:
drivers/net/dsa/mt7530.c:1324:23: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .port_vlan_prepare = mt7530_port_vlan_prepare,
                       ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/mt7530.c:1324:23: note: (near initialization for ‘mt7530_switch_ops.port_vlan_prepare’)
drivers/net/dsa/mt7530.c:1325:20: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .port_vlan_add  = mt7530_port_vlan_add,
                    ^~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/mt7530.c:1325:20: note: (near initialization for ‘mt7530_switch_ops.port_vlan_add’)
cc1: some warnings being treated as errors