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