net: systemport: Add support for WAKE_FILTER
The SYSTEMPORT MAC allows up to 8 filters to be programmed to wake-up from LAN. Verify that we have up to 8 filters and program them to the appropriate RXCHK entries to be matched (along with their masks). We need to update the entry and exit to Wake-on-LAN mode to keep the RXCHK engine running to match during suspend, but this is otherwise fairly similar to Magic Packet detection. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
8a75f4f2ac
commit
bb9051a2b2
@@ -11,6 +11,7 @@
|
||||
#ifndef __BCM_SYSPORT_H
|
||||
#define __BCM_SYSPORT_H
|
||||
|
||||
#include <linux/bitmap.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/net_dim.h>
|
||||
|
||||
@@ -155,14 +156,18 @@ struct bcm_rsb {
|
||||
#define RXCHK_PARSE_AUTH (1 << 22)
|
||||
|
||||
#define RXCHK_BRCM_TAG0 0x04
|
||||
#define RXCHK_BRCM_TAG(i) ((i) * RXCHK_BRCM_TAG0)
|
||||
#define RXCHK_BRCM_TAG(i) ((i) * 0x4 + RXCHK_BRCM_TAG0)
|
||||
#define RXCHK_BRCM_TAG0_MASK 0x24
|
||||
#define RXCHK_BRCM_TAG_MASK(i) ((i) * RXCHK_BRCM_TAG0_MASK)
|
||||
#define RXCHK_BRCM_TAG_MASK(i) ((i) * 0x4 + RXCHK_BRCM_TAG0_MASK)
|
||||
#define RXCHK_BRCM_TAG_MATCH_STATUS 0x44
|
||||
#define RXCHK_ETHERTYPE 0x48
|
||||
#define RXCHK_BAD_CSUM_CNTR 0x4C
|
||||
#define RXCHK_OTHER_DISC_CNTR 0x50
|
||||
|
||||
#define RXCHK_BRCM_TAG_MAX 8
|
||||
#define RXCHK_BRCM_TAG_CID_SHIFT 16
|
||||
#define RXCHK_BRCM_TAG_CID_MASK 0xff
|
||||
|
||||
/* TXCHCK offsets and defines */
|
||||
#define SYS_PORT_TXCHK_OFFSET 0x380
|
||||
#define TXCHK_PKT_RDY_THRESH 0x00
|
||||
@@ -185,6 +190,7 @@ struct bcm_rsb {
|
||||
#define RBUF_RSB_SWAP0 (1 << 22)
|
||||
#define RBUF_RSB_SWAP1 (1 << 23)
|
||||
#define RBUF_ACPI_EN (1 << 23)
|
||||
#define RBUF_ACPI_EN_LITE (1 << 24)
|
||||
|
||||
#define RBUF_PKT_RDY_THRESH 0x04
|
||||
|
||||
@@ -777,6 +783,7 @@ struct bcm_sysport_priv {
|
||||
|
||||
/* Ethtool */
|
||||
u32 msg_enable;
|
||||
DECLARE_BITMAP(filters, RXCHK_BRCM_TAG_MAX);
|
||||
|
||||
struct bcm_sysport_stats64 stats64;
|
||||
|
||||
|
Reference in New Issue
Block a user