RALINK AP SDK 3.3.0.0 User's Manual
Page 31 of 93
b.
set: mii_mgr -s -p [phy number] -r [register number] -v [0xvalue]
Example:
a.
get: mii_mgr -g -p 3 -r 4
b.
set: mii_mgr -s -p 4 -r 1 -v 0xff11
Kernel Module:
$SDK/source/$LINUX/drivers/net/raeth/mii_mgr.c
$SDK/source/$LINUX/drivers/net/raeth/ra_ioctl.h
IOCTL Commands
o
RAETH_MII_READ
Get phy register via the mdc/mdio interface.
o
RAETH_MII_WRITE
Set phy register via the mdc/mdio interface.
IOCTL interface
typedef struct ralink_mii_ioctl_data {
__u32 phy_id;
__u32 reg_num;;
__u32 val_in;
__u32 val_out;
};
o
phy_id: Address of PHY device
o
reg_num: Register addresses within PHY device
o
val_ine:
GET: the phy register data that is read from phy
SET: the current register data after MDIO setting
o
Val_out: the phy register data that wants to be set
o
User applications run mii_mgr commands through the ioctl interface to the raeth driver.
8.1.6
MTD