NET: Cosmetic changes

Signed-off-by: Larry Johnson <lrj@acm.org>
Signed-off-by: Ben Warren <bwarren@qstreams.com>
This commit is contained in:
Larry Johnson 2007-10-31 11:21:29 -05:00 committed by Ben Warren
parent 881cf02f47
commit 298035df49
2 changed files with 108 additions and 121 deletions

View file

@ -87,15 +87,16 @@ void miiphy_register(char *name,
list_for_each (entry, &mii_devs) {
miidev = list_entry (entry, struct mii_dev, link);
if (strcmp (miidev->name, name) == 0) {
printf("miiphy_register: non unique device name '%s'\n",
name);
printf ("miiphy_register: non unique device name "
"'%s'\n", name);
return;
}
}
/* allocate memory */
name_len = strlen (name);
new_dev = (struct mii_dev *)malloc(sizeof(struct mii_dev) + name_len + 1);
new_dev =
(struct mii_dev *)malloc (sizeof (struct mii_dev) + name_len + 1);
if (new_dev == NULL) {
printf ("miiphy_register: cannot allocate memory for '%s'\n",
@ -242,7 +243,6 @@ void miiphy_listdev(void)
printf ("Current device: '%s'\n", current_mii->name);
}
/*****************************************************************************
*
* Read the OUI, manufacture's model number, and revision number.
@ -254,9 +254,7 @@ void miiphy_listdev(void)
* Returns:
* 0 on success
*/
int miiphy_info (char *devname,
unsigned char addr,
unsigned int *oui,
int miiphy_info (char *devname, unsigned char addr, unsigned int *oui,
unsigned char *model, unsigned char *rev)
{
unsigned int reg = 0;
@ -294,7 +292,6 @@ int miiphy_info (char *devname,
return (0);
}
/*****************************************************************************
*
* Reset the PHY.
@ -345,7 +342,6 @@ int miiphy_reset (char *devname, unsigned char addr)
return (0);
}
/*****************************************************************************
*
* Determine the ethernet speed (10/100).
@ -359,7 +355,8 @@ int miiphy_speed (char *devname, unsigned char addr)
printf ("PHY 1000BT Status read failed\n");
} else {
if (reg != 0xFFFF) {
if ((reg & (PHY_1000BTSR_1000FD | PHY_1000BTSR_1000HD)) !=0) {
if ((reg & (PHY_1000BTSR_1000FD | PHY_1000BTSR_1000HD))
!= 0) {
return (_1000BASET);
}
}
@ -393,7 +390,6 @@ int miiphy_speed (char *devname, unsigned char addr)
}
/*****************************************************************************
*
* Determine full/half duplex.
@ -469,5 +465,4 @@ int miiphy_link (char *devname, unsigned char addr)
}
}
#endif
#endif /* CONFIG_MII */

View file

@ -26,14 +26,6 @@
|
| Author: Mark Wisner
|
| Change Activity-
|
| Date Description of Change BY
| --------- --------------------- ---
| 04-May-99 Created MKW
| 07-Jul-99 Added full duplex support MKW
| 08-Sep-01 Tweaks gvb
|
+----------------------------------------------------------------------------*/
#ifndef _miiphy_h_
#define _miiphy_h_
@ -149,7 +141,7 @@ int bb_miiphy_write (char *devname, unsigned char addr,
#define PHY_ANLPAR_PSB_802_3 0x0001
#define PHY_ANLPAR_PSB_802_9 0x0002
/* PHY_1000BTSR */
/* phy 1000BTSR */
#define PHY_1000BTSR_MSCF 0x8000
#define PHY_1000BTSR_MSCR 0x4000
#define PHY_1000BTSR_LRS 0x2000