Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
mii.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/ethtool.h>
#include <linux/mii.h>

Go to the source code of this file.

Functions

int mii_ethtool_gset (struct mii_if_info *mii, struct ethtool_cmd *ecmd)
 
int mii_ethtool_sset (struct mii_if_info *mii, struct ethtool_cmd *ecmd)
 
int mii_check_gmii_support (struct mii_if_info *mii)
 
int mii_link_ok (struct mii_if_info *mii)
 
int mii_nway_restart (struct mii_if_info *mii)
 
void mii_check_link (struct mii_if_info *mii)
 
unsigned int mii_check_media (struct mii_if_info *mii, unsigned int ok_to_print, unsigned int init_media)
 
int generic_mii_ioctl (struct mii_if_info *mii_if, struct mii_ioctl_data *mii_data, int cmd, unsigned int *duplex_chg_out)
 
 MODULE_AUTHOR ("Jeff Garzik <[email protected]>")
 
 MODULE_DESCRIPTION ("MII hardware support library")
 
 MODULE_LICENSE ("GPL")
 
 EXPORT_SYMBOL (mii_link_ok)
 
 EXPORT_SYMBOL (mii_nway_restart)
 
 EXPORT_SYMBOL (mii_ethtool_gset)
 
 EXPORT_SYMBOL (mii_ethtool_sset)
 
 EXPORT_SYMBOL (mii_check_link)
 
 EXPORT_SYMBOL (mii_check_media)
 
 EXPORT_SYMBOL (mii_check_gmii_support)
 
 EXPORT_SYMBOL (generic_mii_ioctl)
 

Function Documentation

EXPORT_SYMBOL ( mii_link_ok  )
EXPORT_SYMBOL ( mii_nway_restart  )
EXPORT_SYMBOL ( mii_ethtool_gset  )
EXPORT_SYMBOL ( mii_ethtool_sset  )
EXPORT_SYMBOL ( mii_check_link  )
EXPORT_SYMBOL ( mii_check_media  )
EXPORT_SYMBOL ( mii_check_gmii_support  )
EXPORT_SYMBOL ( generic_mii_ioctl  )
int generic_mii_ioctl ( struct mii_if_info mii_if,
struct mii_ioctl_data mii_data,
int  cmd,
unsigned int duplex_chg_out 
)

generic_mii_ioctl - main MII ioctl interface : the MII interface : MII ioctl data structure : MII ioctl command : pointer to status if there was no ioctl error

Returns 0 on success, negative on error.

Definition at line 391 of file mii.c.

int mii_check_gmii_support ( struct mii_if_info mii)

mii_check_gmii_support - check if the MII supports Gb interfaces : the MII interface

Definition at line 233 of file mii.c.

void mii_check_link ( struct mii_if_info mii)

mii_check_link - check MII link status : MII interface

If the link status changed (previous != current), call netif_carrier_on() if current link status is Up or call netif_carrier_off() if current link status is Down.

Definition at line 293 of file mii.c.

unsigned int mii_check_media ( struct mii_if_info mii,
unsigned int  ok_to_print,
unsigned int  init_media 
)

mii_check_media - check the MII interface for a duplex change : the MII interface : OK to print link up/down messages : OK to save duplex mode in

Returns 1 if the duplex mode changed, 0 if not. If the media type is forced, always returns 0.

Definition at line 313 of file mii.c.

int mii_ethtool_gset ( struct mii_if_info mii,
struct ethtool_cmd ecmd 
)

mii_ethtool_gset - get settings that are specified in : MII interface : requested ethtool_cmd

The parameter is expected to have been cleared before calling mii_ethtool_gset().

Returns 0 for success, negative on error.

Definition at line 55 of file mii.c.

int mii_ethtool_sset ( struct mii_if_info mii,
struct ethtool_cmd ecmd 
)

mii_ethtool_sset - set settings that are specified in : MII interface : requested ethtool_cmd

Returns 0 for success, negative on error.

Definition at line 144 of file mii.c.

int mii_link_ok ( struct mii_if_info mii)

mii_link_ok - is link status up/ok : the MII interface

Returns 1 if the MII reports link status up/ok, 0 otherwise.

Definition at line 253 of file mii.c.

int mii_nway_restart ( struct mii_if_info mii)

mii_nway_restart - restart NWay (autonegotiation) for this interface : the MII interface

Returns 0 on success, negative on error.

Definition at line 268 of file mii.c.

MODULE_AUTHOR ( "Jeff Garzik <[email protected]>"  )
MODULE_DESCRIPTION ( "MII hardware support library"  )
MODULE_LICENSE ( "GPL"  )