net: usb: aqc111: Add support for wake on LAN by MAGIC packet

Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Dmitry Bezrukov
2018-11-26 09:33:45 +00:00
committed by David S. Miller
parent abbd8e7d6d
commit e58ba4544c
2 changed files with 192 additions and 0 deletions

View File

@@ -18,6 +18,7 @@
#define AQ_ACCESS_MAC 0x01
#define AQ_FLASH_PARAMETERS 0x20
#define AQ_PHY_POWER 0x31
#define AQ_WOL_CFG 0x60
#define AQ_PHY_OPS 0x61
#define AQ_USB_PHY_SET_TIMEOUT 10000
@@ -145,8 +146,18 @@
#define AQ_DSH_RETRIES_SHIFT 0x18
#define AQ_DSH_RETRIES_MASK 0xF000000
#define AQ_WOL_FLAG_MP 0x2
/******************************************************************************/
struct aqc111_wol_cfg {
u8 hw_addr[6];
u8 flags;
u8 rsvd[283];
} __packed;
#define WOL_CFG_SIZE sizeof(struct aqc111_wol_cfg)
struct aqc111_data {
u16 rxctl;
u8 rx_checksum;
@@ -160,6 +171,7 @@ struct aqc111_data {
u8 rev;
} fw_ver;
u32 phy_cfg;
u8 wol_flags;
};
#define AQ_LS_MASK 0x8000