blob: 04ba70d49fb8a99c17b966d7171428c020d59361 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#ifndef __PHY_FIXED_H
#define __PHY_FIXED_H
#define MII_REGS_NUM 29
/* max number of virtual phy stuff */
#define MAX_PHY_AMNT 10
/*
The idea is to emulate normal phy behavior by responding with
pre-defined values to mii BMCR read, so that read_status hook could
take all the needed info.
*/
struct fixed_phy_status {
u8 link;
u16 speed;
u8 duplex;
};
/*-----------------------------------------------------------------------------
* Private information hoder for mii_bus
*-----------------------------------------------------------------------------*/
struct fixed_info {
u16 *regs;
u8 regs_num;
struct fixed_phy_status phy_status;
struct phy_device *phydev; /* pointer to the container */
/* link & speed cb */
int (*link_update) (struct net_device *, struct fixed_phy_status *);
};
int fixed_mdio_set_link_update(struct phy_device *,
int (*link_update) (struct net_device *, struct fixed_phy_status *));
struct fixed_info *fixed_mdio_get_phydev (int phydev_ind);
#endif /* __PHY_FIXED_H */
|