Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
1ef020bf
Commit
1ef020bf
authored
Mar 12, 2004
by
Randy Dunlap
Committed by
Jeff Garzik
Mar 12, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] use netdev_priv() in net/tulip drivers
parent
88f0a524
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
141 additions
and
141 deletions
+141
-141
drivers/net/tulip/21142.c
drivers/net/tulip/21142.c
+3
-3
drivers/net/tulip/de4x5.c
drivers/net/tulip/de4x5.c
+82
-82
drivers/net/tulip/dmfe.c
drivers/net/tulip/dmfe.c
+13
-13
drivers/net/tulip/eeprom.c
drivers/net/tulip/eeprom.c
+1
-1
drivers/net/tulip/interrupt.c
drivers/net/tulip/interrupt.c
+5
-5
drivers/net/tulip/media.c
drivers/net/tulip/media.c
+5
-5
drivers/net/tulip/pnic.c
drivers/net/tulip/pnic.c
+3
-3
drivers/net/tulip/pnic2.c
drivers/net/tulip/pnic2.c
+3
-3
drivers/net/tulip/timer.c
drivers/net/tulip/timer.c
+3
-3
drivers/net/tulip/tulip_core.c
drivers/net/tulip/tulip_core.c
+15
-15
drivers/net/tulip/xircom_cb.c
drivers/net/tulip/xircom_cb.c
+8
-8
No files found.
drivers/net/tulip/21142.c
View file @
1ef020bf
...
@@ -29,7 +29,7 @@ static u16 t21142_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, };
...
@@ -29,7 +29,7 @@ static u16 t21142_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, };
void
t21142_timer
(
unsigned
long
data
)
void
t21142_timer
(
unsigned
long
data
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
csr12
=
inl
(
ioaddr
+
CSR12
);
int
csr12
=
inl
(
ioaddr
+
CSR12
);
int
next_tick
=
60
*
HZ
;
int
next_tick
=
60
*
HZ
;
...
@@ -103,7 +103,7 @@ void t21142_timer(unsigned long data)
...
@@ -103,7 +103,7 @@ void t21142_timer(unsigned long data)
void
t21142_start_nway
(
struct
net_device
*
dev
)
void
t21142_start_nway
(
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
csr14
=
((
tp
->
sym_advertise
&
0x0780
)
<<
9
)
|
int
csr14
=
((
tp
->
sym_advertise
&
0x0780
)
<<
9
)
|
((
tp
->
sym_advertise
&
0x0020
)
<<
1
)
|
0xffbf
;
((
tp
->
sym_advertise
&
0x0020
)
<<
1
)
|
0xffbf
;
...
@@ -131,7 +131,7 @@ void t21142_start_nway(struct net_device *dev)
...
@@ -131,7 +131,7 @@ void t21142_start_nway(struct net_device *dev)
void
t21142_lnk_change
(
struct
net_device
*
dev
,
int
csr5
)
void
t21142_lnk_change
(
struct
net_device
*
dev
,
int
csr5
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
csr12
=
inl
(
ioaddr
+
CSR12
);
int
csr12
=
inl
(
ioaddr
+
CSR12
);
...
...
drivers/net/tulip/de4x5.c
View file @
1ef020bf
This diff is collapsed.
Click to expand it.
drivers/net/tulip/dmfe.c
View file @
1ef020bf
...
@@ -392,7 +392,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
...
@@ -392,7 +392,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
}
}
/* Init system & device */
/* Init system & device */
db
=
dev
->
priv
;
db
=
netdev_priv
(
dev
)
;
/* Allocate Tx/Rx descriptor memory */
/* Allocate Tx/Rx descriptor memory */
db
->
desc_pool_ptr
=
pci_alloc_consistent
(
pdev
,
sizeof
(
struct
tx_desc
)
*
DESC_ALL_CNT
+
0x20
,
&
db
->
desc_pool_dma_ptr
);
db
->
desc_pool_ptr
=
pci_alloc_consistent
(
pdev
,
sizeof
(
struct
tx_desc
)
*
DESC_ALL_CNT
+
0x20
,
&
db
->
desc_pool_dma_ptr
);
...
@@ -466,7 +466,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
...
@@ -466,7 +466,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
static
void
__devexit
dmfe_remove_one
(
struct
pci_dev
*
pdev
)
static
void
__devexit
dmfe_remove_one
(
struct
pci_dev
*
pdev
)
{
{
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
dmfe_board_info
*
db
=
dev
->
priv
;
struct
dmfe_board_info
*
db
=
netdev_priv
(
dev
)
;
DMFE_DBUG
(
0
,
"dmfe_remove_one()"
,
0
);
DMFE_DBUG
(
0
,
"dmfe_remove_one()"
,
0
);
...
@@ -494,7 +494,7 @@ static void __devexit dmfe_remove_one (struct pci_dev *pdev)
...
@@ -494,7 +494,7 @@ static void __devexit dmfe_remove_one (struct pci_dev *pdev)
static
int
dmfe_open
(
struct
DEVICE
*
dev
)
static
int
dmfe_open
(
struct
DEVICE
*
dev
)
{
{
int
ret
;
int
ret
;
struct
dmfe_board_info
*
db
=
dev
->
priv
;
struct
dmfe_board_info
*
db
=
netdev_priv
(
dev
)
;
DMFE_DBUG
(
0
,
"dmfe_open"
,
0
);
DMFE_DBUG
(
0
,
"dmfe_open"
,
0
);
...
@@ -552,7 +552,7 @@ static int dmfe_open(struct DEVICE *dev)
...
@@ -552,7 +552,7 @@ static int dmfe_open(struct DEVICE *dev)
static
void
dmfe_init_dm910x
(
struct
DEVICE
*
dev
)
static
void
dmfe_init_dm910x
(
struct
DEVICE
*
dev
)
{
{
struct
dmfe_board_info
*
db
=
dev
->
priv
;
struct
dmfe_board_info
*
db
=
netdev_priv
(
dev
)
;
unsigned
long
ioaddr
=
db
->
ioaddr
;
unsigned
long
ioaddr
=
db
->
ioaddr
;
DMFE_DBUG
(
0
,
"dmfe_init_dm910x()"
,
0
);
DMFE_DBUG
(
0
,
"dmfe_init_dm910x()"
,
0
);
...
@@ -618,7 +618,7 @@ static void dmfe_init_dm910x(struct DEVICE *dev)
...
@@ -618,7 +618,7 @@ static void dmfe_init_dm910x(struct DEVICE *dev)
static
int
dmfe_start_xmit
(
struct
sk_buff
*
skb
,
struct
DEVICE
*
dev
)
static
int
dmfe_start_xmit
(
struct
sk_buff
*
skb
,
struct
DEVICE
*
dev
)
{
{
struct
dmfe_board_info
*
db
=
dev
->
priv
;
struct
dmfe_board_info
*
db
=
netdev_priv
(
dev
)
;
struct
tx_desc
*
txptr
;
struct
tx_desc
*
txptr
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -687,7 +687,7 @@ static int dmfe_start_xmit(struct sk_buff *skb, struct DEVICE *dev)
...
@@ -687,7 +687,7 @@ static int dmfe_start_xmit(struct sk_buff *skb, struct DEVICE *dev)
static
int
dmfe_stop
(
struct
DEVICE
*
dev
)
static
int
dmfe_stop
(
struct
DEVICE
*
dev
)
{
{
struct
dmfe_board_info
*
db
=
dev
->
priv
;
struct
dmfe_board_info
*
db
=
netdev_priv
(
dev
)
;
unsigned
long
ioaddr
=
dev
->
base_addr
;
unsigned
long
ioaddr
=
dev
->
base_addr
;
DMFE_DBUG
(
0
,
"dmfe_stop"
,
0
);
DMFE_DBUG
(
0
,
"dmfe_stop"
,
0
);
...
@@ -730,7 +730,7 @@ static int dmfe_stop(struct DEVICE *dev)
...
@@ -730,7 +730,7 @@ static int dmfe_stop(struct DEVICE *dev)
static
irqreturn_t
dmfe_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
dmfe_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
{
struct
DEVICE
*
dev
=
dev_id
;
struct
DEVICE
*
dev
=
dev_id
;
struct
dmfe_board_info
*
db
=
(
struct
dmfe_board_info
*
)
dev
->
priv
;
struct
dmfe_board_info
*
db
=
netdev_priv
(
dev
)
;
unsigned
long
ioaddr
=
dev
->
base_addr
;
unsigned
long
ioaddr
=
dev
->
base_addr
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -957,7 +957,7 @@ static void dmfe_rx_packet(struct DEVICE *dev, struct dmfe_board_info * db)
...
@@ -957,7 +957,7 @@ static void dmfe_rx_packet(struct DEVICE *dev, struct dmfe_board_info * db)
static
struct
net_device_stats
*
dmfe_get_stats
(
struct
DEVICE
*
dev
)
static
struct
net_device_stats
*
dmfe_get_stats
(
struct
DEVICE
*
dev
)
{
{
struct
dmfe_board_info
*
db
=
(
struct
dmfe_board_info
*
)
dev
->
priv
;
struct
dmfe_board_info
*
db
=
netdev_priv
(
dev
)
;
DMFE_DBUG
(
0
,
"dmfe_get_stats"
,
0
);
DMFE_DBUG
(
0
,
"dmfe_get_stats"
,
0
);
return
&
db
->
stats
;
return
&
db
->
stats
;
...
@@ -970,7 +970,7 @@ static struct net_device_stats * dmfe_get_stats(struct DEVICE *dev)
...
@@ -970,7 +970,7 @@ static struct net_device_stats * dmfe_get_stats(struct DEVICE *dev)
static
void
dmfe_set_filter_mode
(
struct
DEVICE
*
dev
)
static
void
dmfe_set_filter_mode
(
struct
DEVICE
*
dev
)
{
{
struct
dmfe_board_info
*
db
=
dev
->
priv
;
struct
dmfe_board_info
*
db
=
netdev_priv
(
dev
)
;
unsigned
long
flags
;
unsigned
long
flags
;
DMFE_DBUG
(
0
,
"dmfe_set_filter_mode()"
,
0
);
DMFE_DBUG
(
0
,
"dmfe_set_filter_mode()"
,
0
);
...
@@ -1003,7 +1003,7 @@ static void dmfe_set_filter_mode(struct DEVICE * dev)
...
@@ -1003,7 +1003,7 @@ static void dmfe_set_filter_mode(struct DEVICE * dev)
static
void
netdev_get_drvinfo
(
struct
net_device
*
dev
,
static
void
netdev_get_drvinfo
(
struct
net_device
*
dev
,
struct
ethtool_drvinfo
*
info
)
struct
ethtool_drvinfo
*
info
)
{
{
struct
dmfe_board_info
*
np
=
dev
->
priv
;
struct
dmfe_board_info
*
np
=
netdev_priv
(
dev
)
;
strcpy
(
info
->
driver
,
DRV_NAME
);
strcpy
(
info
->
driver
,
DRV_NAME
);
strcpy
(
info
->
version
,
DRV_VERSION
);
strcpy
(
info
->
version
,
DRV_VERSION
);
...
@@ -1028,7 +1028,7 @@ static void dmfe_timer(unsigned long data)
...
@@ -1028,7 +1028,7 @@ static void dmfe_timer(unsigned long data)
u32
tmp_cr8
;
u32
tmp_cr8
;
unsigned
char
tmp_cr12
;
unsigned
char
tmp_cr12
;
struct
DEVICE
*
dev
=
(
struct
DEVICE
*
)
data
;
struct
DEVICE
*
dev
=
(
struct
DEVICE
*
)
data
;
struct
dmfe_board_info
*
db
=
(
struct
dmfe_board_info
*
)
dev
->
priv
;
struct
dmfe_board_info
*
db
=
netdev_priv
(
dev
)
;
unsigned
long
flags
;
unsigned
long
flags
;
DMFE_DBUG
(
0
,
"dmfe_timer()"
,
0
);
DMFE_DBUG
(
0
,
"dmfe_timer()"
,
0
);
...
@@ -1160,7 +1160,7 @@ static void dmfe_timer(unsigned long data)
...
@@ -1160,7 +1160,7 @@ static void dmfe_timer(unsigned long data)
static
void
dmfe_dynamic_reset
(
struct
DEVICE
*
dev
)
static
void
dmfe_dynamic_reset
(
struct
DEVICE
*
dev
)
{
{
struct
dmfe_board_info
*
db
=
dev
->
priv
;
struct
dmfe_board_info
*
db
=
netdev_priv
(
dev
)
;
DMFE_DBUG
(
0
,
"dmfe_dynamic_reset()"
,
0
);
DMFE_DBUG
(
0
,
"dmfe_dynamic_reset()"
,
0
);
...
@@ -1358,7 +1358,7 @@ static void dm9132_id_table(struct DEVICE *dev, int mc_cnt)
...
@@ -1358,7 +1358,7 @@ static void dm9132_id_table(struct DEVICE *dev, int mc_cnt)
static
void
send_filter_frame
(
struct
DEVICE
*
dev
,
int
mc_cnt
)
static
void
send_filter_frame
(
struct
DEVICE
*
dev
,
int
mc_cnt
)
{
{
struct
dmfe_board_info
*
db
=
dev
->
priv
;
struct
dmfe_board_info
*
db
=
netdev_priv
(
dev
)
;
struct
dev_mc_list
*
mcptr
;
struct
dev_mc_list
*
mcptr
;
struct
tx_desc
*
txptr
;
struct
tx_desc
*
txptr
;
u16
*
addrptr
;
u16
*
addrptr
;
...
...
drivers/net/tulip/eeprom.c
View file @
1ef020bf
...
@@ -136,7 +136,7 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
...
@@ -136,7 +136,7 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
static
struct
mediatable
*
last_mediatable
;
static
struct
mediatable
*
last_mediatable
;
static
unsigned
char
*
last_ee_data
;
static
unsigned
char
*
last_ee_data
;
static
int
controller_index
;
static
int
controller_index
;
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
unsigned
char
*
ee_data
=
tp
->
eeprom
;
unsigned
char
*
ee_data
=
tp
->
eeprom
;
int
i
;
int
i
;
...
...
drivers/net/tulip/interrupt.c
View file @
1ef020bf
...
@@ -63,7 +63,7 @@ unsigned int mit_table[MIT_SIZE+1] =
...
@@ -63,7 +63,7 @@ unsigned int mit_table[MIT_SIZE+1] =
int
tulip_refill_rx
(
struct
net_device
*
dev
)
int
tulip_refill_rx
(
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
int
entry
;
int
entry
;
int
refilled
=
0
;
int
refilled
=
0
;
...
@@ -109,7 +109,7 @@ void oom_timer(unsigned long data)
...
@@ -109,7 +109,7 @@ void oom_timer(unsigned long data)
int
tulip_poll
(
struct
net_device
*
dev
,
int
*
budget
)
int
tulip_poll
(
struct
net_device
*
dev
,
int
*
budget
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
int
entry
=
tp
->
cur_rx
%
RX_RING_SIZE
;
int
entry
=
tp
->
cur_rx
%
RX_RING_SIZE
;
int
rx_work_limit
=
*
budget
;
int
rx_work_limit
=
*
budget
;
int
received
=
0
;
int
received
=
0
;
...
@@ -354,7 +354,7 @@ int tulip_poll(struct net_device *dev, int *budget)
...
@@ -354,7 +354,7 @@ int tulip_poll(struct net_device *dev, int *budget)
static
int
tulip_rx
(
struct
net_device
*
dev
)
static
int
tulip_rx
(
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
int
entry
=
tp
->
cur_rx
%
RX_RING_SIZE
;
int
entry
=
tp
->
cur_rx
%
RX_RING_SIZE
;
int
rx_work_limit
=
tp
->
dirty_rx
+
RX_RING_SIZE
-
tp
->
cur_rx
;
int
rx_work_limit
=
tp
->
dirty_rx
+
RX_RING_SIZE
-
tp
->
cur_rx
;
int
received
=
0
;
int
received
=
0
;
...
@@ -465,7 +465,7 @@ static inline unsigned int phy_interrupt (struct net_device *dev)
...
@@ -465,7 +465,7 @@ static inline unsigned int phy_interrupt (struct net_device *dev)
{
{
#ifdef __hppa__
#ifdef __hppa__
int
csr12
=
inl
(
dev
->
base_addr
+
CSR12
)
&
0xff
;
int
csr12
=
inl
(
dev
->
base_addr
+
CSR12
)
&
0xff
;
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
if
(
csr12
!=
tp
->
csr12_shadow
)
{
if
(
csr12
!=
tp
->
csr12_shadow
)
{
/* ack interrupt */
/* ack interrupt */
...
@@ -490,7 +490,7 @@ static inline unsigned int phy_interrupt (struct net_device *dev)
...
@@ -490,7 +490,7 @@ static inline unsigned int phy_interrupt (struct net_device *dev)
irqreturn_t
tulip_interrupt
(
int
irq
,
void
*
dev_instance
,
struct
pt_regs
*
regs
)
irqreturn_t
tulip_interrupt
(
int
irq
,
void
*
dev_instance
,
struct
pt_regs
*
regs
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_instance
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_instance
;
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
csr5
;
int
csr5
;
int
missed
;
int
missed
;
...
...
drivers/net/tulip/media.c
View file @
1ef020bf
...
@@ -48,7 +48,7 @@ static const unsigned char comet_miireg2offset[32] = {
...
@@ -48,7 +48,7 @@ static const unsigned char comet_miireg2offset[32] = {
int
tulip_mdio_read
(
struct
net_device
*
dev
,
int
phy_id
,
int
location
)
int
tulip_mdio_read
(
struct
net_device
*
dev
,
int
phy_id
,
int
location
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
int
i
;
int
i
;
int
read_cmd
=
(
0xf6
<<
10
)
|
((
phy_id
&
0x1f
)
<<
5
)
|
location
;
int
read_cmd
=
(
0xf6
<<
10
)
|
((
phy_id
&
0x1f
)
<<
5
)
|
location
;
int
retval
=
0
;
int
retval
=
0
;
...
@@ -111,7 +111,7 @@ int tulip_mdio_read(struct net_device *dev, int phy_id, int location)
...
@@ -111,7 +111,7 @@ int tulip_mdio_read(struct net_device *dev, int phy_id, int location)
void
tulip_mdio_write
(
struct
net_device
*
dev
,
int
phy_id
,
int
location
,
int
val
)
void
tulip_mdio_write
(
struct
net_device
*
dev
,
int
phy_id
,
int
location
,
int
val
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
int
i
;
int
i
;
int
cmd
=
(
0x5002
<<
16
)
|
((
phy_id
&
0x1f
)
<<
23
)
|
(
location
<<
18
)
|
(
val
&
0xffff
);
int
cmd
=
(
0x5002
<<
16
)
|
((
phy_id
&
0x1f
)
<<
23
)
|
(
location
<<
18
)
|
(
val
&
0xffff
);
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
...
@@ -171,7 +171,7 @@ void tulip_mdio_write(struct net_device *dev, int phy_id, int location, int val)
...
@@ -171,7 +171,7 @@ void tulip_mdio_write(struct net_device *dev, int phy_id, int location, int val)
void
tulip_select_media
(
struct
net_device
*
dev
,
int
startup
)
void
tulip_select_media
(
struct
net_device
*
dev
,
int
startup
)
{
{
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
struct
mediatable
*
mtable
=
tp
->
mtable
;
struct
mediatable
*
mtable
=
tp
->
mtable
;
u32
new_csr6
;
u32
new_csr6
;
int
i
;
int
i
;
...
@@ -374,7 +374,7 @@ void tulip_select_media(struct net_device *dev, int startup)
...
@@ -374,7 +374,7 @@ void tulip_select_media(struct net_device *dev, int startup)
*/
*/
int
tulip_check_duplex
(
struct
net_device
*
dev
)
int
tulip_check_duplex
(
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
unsigned
int
bmsr
,
lpa
,
negotiated
,
new_csr6
;
unsigned
int
bmsr
,
lpa
,
negotiated
,
new_csr6
;
bmsr
=
tulip_mdio_read
(
dev
,
tp
->
phys
[
0
],
MII_BMSR
);
bmsr
=
tulip_mdio_read
(
dev
,
tp
->
phys
[
0
],
MII_BMSR
);
...
@@ -420,7 +420,7 @@ int tulip_check_duplex(struct net_device *dev)
...
@@ -420,7 +420,7 @@ int tulip_check_duplex(struct net_device *dev)
void
__devinit
tulip_find_mii
(
struct
net_device
*
dev
,
int
board_idx
)
void
__devinit
tulip_find_mii
(
struct
net_device
*
dev
,
int
board_idx
)
{
{
struct
tulip_private
*
tp
=
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
int
phyn
,
phy_idx
=
0
;
int
phyn
,
phy_idx
=
0
;
int
mii_reg0
;
int
mii_reg0
;
int
mii_advert
;
int
mii_advert
;
...
...
drivers/net/tulip/pnic.c
View file @
1ef020bf
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
void
pnic_do_nway
(
struct
net_device
*
dev
)
void
pnic_do_nway
(
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
u32
phy_reg
=
inl
(
ioaddr
+
0xB8
);
u32
phy_reg
=
inl
(
ioaddr
+
0xB8
);
u32
new_csr6
=
tp
->
csr6
&
~
0x40C40200
;
u32
new_csr6
=
tp
->
csr6
&
~
0x40C40200
;
...
@@ -53,7 +53,7 @@ void pnic_do_nway(struct net_device *dev)
...
@@ -53,7 +53,7 @@ void pnic_do_nway(struct net_device *dev)
void
pnic_lnk_change
(
struct
net_device
*
dev
,
int
csr5
)
void
pnic_lnk_change
(
struct
net_device
*
dev
,
int
csr5
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
phy_reg
=
inl
(
ioaddr
+
0xB8
);
int
phy_reg
=
inl
(
ioaddr
+
0xB8
);
...
@@ -89,7 +89,7 @@ void pnic_lnk_change(struct net_device *dev, int csr5)
...
@@ -89,7 +89,7 @@ void pnic_lnk_change(struct net_device *dev, int csr5)
void
pnic_timer
(
unsigned
long
data
)
void
pnic_timer
(
unsigned
long
data
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
next_tick
=
60
*
HZ
;
int
next_tick
=
60
*
HZ
;
...
...
drivers/net/tulip/pnic2.c
View file @
1ef020bf
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
void
pnic2_timer
(
unsigned
long
data
)
void
pnic2_timer
(
unsigned
long
data
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
next_tick
=
60
*
HZ
;
int
next_tick
=
60
*
HZ
;
...
@@ -100,7 +100,7 @@ void pnic2_timer(unsigned long data)
...
@@ -100,7 +100,7 @@ void pnic2_timer(unsigned long data)
void
pnic2_start_nway
(
struct
net_device
*
dev
)
void
pnic2_start_nway
(
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
csr14
;
int
csr14
;
int
csr12
;
int
csr12
;
...
@@ -175,7 +175,7 @@ void pnic2_start_nway(struct net_device *dev)
...
@@ -175,7 +175,7 @@ void pnic2_start_nway(struct net_device *dev)
void
pnic2_lnk_change
(
struct
net_device
*
dev
,
int
csr5
)
void
pnic2_lnk_change
(
struct
net_device
*
dev
,
int
csr5
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
csr14
;
int
csr14
;
...
...
drivers/net/tulip/timer.c
View file @
1ef020bf
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
void
tulip_timer
(
unsigned
long
data
)
void
tulip_timer
(
unsigned
long
data
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
u32
csr12
=
inl
(
ioaddr
+
CSR12
);
u32
csr12
=
inl
(
ioaddr
+
CSR12
);
int
next_tick
=
2
*
HZ
;
int
next_tick
=
2
*
HZ
;
...
@@ -135,7 +135,7 @@ void tulip_timer(unsigned long data)
...
@@ -135,7 +135,7 @@ void tulip_timer(unsigned long data)
void
mxic_timer
(
unsigned
long
data
)
void
mxic_timer
(
unsigned
long
data
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
next_tick
=
60
*
HZ
;
int
next_tick
=
60
*
HZ
;
...
@@ -152,7 +152,7 @@ void mxic_timer(unsigned long data)
...
@@ -152,7 +152,7 @@ void mxic_timer(unsigned long data)
void
comet_timer
(
unsigned
long
data
)
void
comet_timer
(
unsigned
long
data
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
data
;
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
next_tick
=
60
*
HZ
;
int
next_tick
=
60
*
HZ
;
...
...
drivers/net/tulip/tulip_core.c
View file @
1ef020bf
...
@@ -276,7 +276,7 @@ static void tulip_set_power_state (struct tulip_private *tp,
...
@@ -276,7 +276,7 @@ static void tulip_set_power_state (struct tulip_private *tp,
static
void
tulip_up
(
struct
net_device
*
dev
)
static
void
tulip_up
(
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
next_tick
=
3
*
HZ
;
int
next_tick
=
3
*
HZ
;
int
i
;
int
i
;
...
@@ -499,7 +499,7 @@ tulip_open(struct net_device *dev)
...
@@ -499,7 +499,7 @@ tulip_open(struct net_device *dev)
static
void
tulip_tx_timeout
(
struct
net_device
*
dev
)
static
void
tulip_tx_timeout
(
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -587,7 +587,7 @@ static void tulip_tx_timeout(struct net_device *dev)
...
@@ -587,7 +587,7 @@ static void tulip_tx_timeout(struct net_device *dev)
/* Initialize the Rx and Tx rings, along with various 'dev' bits. */
/* Initialize the Rx and Tx rings, along with various 'dev' bits. */
static
void
tulip_init_ring
(
struct
net_device
*
dev
)
static
void
tulip_init_ring
(
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
int
i
;
int
i
;
tp
->
susp_rx
=
0
;
tp
->
susp_rx
=
0
;
...
@@ -638,7 +638,7 @@ static void tulip_init_ring(struct net_device *dev)
...
@@ -638,7 +638,7 @@ static void tulip_init_ring(struct net_device *dev)
static
int
static
int
tulip_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
tulip_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
int
entry
;
int
entry
;
u32
flag
;
u32
flag
;
dma_addr_t
mapping
;
dma_addr_t
mapping
;
...
@@ -724,7 +724,7 @@ static void tulip_clean_tx_ring(struct tulip_private *tp)
...
@@ -724,7 +724,7 @@ static void tulip_clean_tx_ring(struct tulip_private *tp)
static
void
tulip_down
(
struct
net_device
*
dev
)
static
void
tulip_down
(
struct
net_device
*
dev
)
{
{
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
unsigned
long
flags
;
unsigned
long
flags
;
del_timer_sync
(
&
tp
->
timer
);
del_timer_sync
(
&
tp
->
timer
);
...
@@ -764,7 +764,7 @@ static void tulip_down (struct net_device *dev)
...
@@ -764,7 +764,7 @@ static void tulip_down (struct net_device *dev)
static
int
tulip_close
(
struct
net_device
*
dev
)
static
int
tulip_close
(
struct
net_device
*
dev
)
{
{
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
int
i
;
int
i
;
netif_stop_queue
(
dev
);
netif_stop_queue
(
dev
);
...
@@ -811,7 +811,7 @@ static int tulip_close (struct net_device *dev)
...
@@ -811,7 +811,7 @@ static int tulip_close (struct net_device *dev)
static
struct
net_device_stats
*
tulip_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
tulip_get_stats
(
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
if
(
netif_running
(
dev
))
{
if
(
netif_running
(
dev
))
{
...
@@ -830,7 +830,7 @@ static struct net_device_stats *tulip_get_stats(struct net_device *dev)
...
@@ -830,7 +830,7 @@ static struct net_device_stats *tulip_get_stats(struct net_device *dev)
static
int
netdev_ethtool_ioctl
(
struct
net_device
*
dev
,
void
*
useraddr
)
static
int
netdev_ethtool_ioctl
(
struct
net_device
*
dev
,
void
*
useraddr
)
{
{
struct
tulip_private
*
np
=
dev
->
priv
;
struct
tulip_private
*
np
=
netdev_priv
(
dev
)
;
u32
ethcmd
;
u32
ethcmd
;
if
(
copy_from_user
(
&
ethcmd
,
useraddr
,
sizeof
(
ethcmd
)))
if
(
copy_from_user
(
&
ethcmd
,
useraddr
,
sizeof
(
ethcmd
)))
...
@@ -855,7 +855,7 @@ static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
...
@@ -855,7 +855,7 @@ static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
/* Provide ioctl() calls to examine the MII xcvr state. */
/* Provide ioctl() calls to examine the MII xcvr state. */
static
int
private_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
static
int
private_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
{
{
struct
tulip_private
*
tp
=
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
struct
mii_ioctl_data
*
data
=
(
struct
mii_ioctl_data
*
)
&
rq
->
ifr_data
;
struct
mii_ioctl_data
*
data
=
(
struct
mii_ioctl_data
*
)
&
rq
->
ifr_data
;
const
unsigned
int
phy_idx
=
0
;
const
unsigned
int
phy_idx
=
0
;
...
@@ -964,7 +964,7 @@ static int private_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
...
@@ -964,7 +964,7 @@ static int private_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
static
void
build_setup_frame_hash
(
u16
*
setup_frm
,
struct
net_device
*
dev
)
static
void
build_setup_frame_hash
(
u16
*
setup_frm
,
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
u16
hash_table
[
32
];
u16
hash_table
[
32
];
struct
dev_mc_list
*
mclist
;
struct
dev_mc_list
*
mclist
;
int
i
;
int
i
;
...
@@ -995,7 +995,7 @@ static void build_setup_frame_hash(u16 *setup_frm, struct net_device *dev)
...
@@ -995,7 +995,7 @@ static void build_setup_frame_hash(u16 *setup_frm, struct net_device *dev)
static
void
build_setup_frame_perfect
(
u16
*
setup_frm
,
struct
net_device
*
dev
)
static
void
build_setup_frame_perfect
(
u16
*
setup_frm
,
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
struct
dev_mc_list
*
mclist
;
struct
dev_mc_list
*
mclist
;
int
i
;
int
i
;
u16
*
eaddrs
;
u16
*
eaddrs
;
...
@@ -1023,7 +1023,7 @@ static void build_setup_frame_perfect(u16 *setup_frm, struct net_device *dev)
...
@@ -1023,7 +1023,7 @@ static void build_setup_frame_perfect(u16 *setup_frm, struct net_device *dev)
static
void
set_rx_mode
(
struct
net_device
*
dev
)
static
void
set_rx_mode
(
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
(
struct
tulip_private
*
)
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
long
ioaddr
=
dev
->
base_addr
;
int
csr6
;
int
csr6
;
...
@@ -1150,7 +1150,7 @@ static void set_rx_mode(struct net_device *dev)
...
@@ -1150,7 +1150,7 @@ static void set_rx_mode(struct net_device *dev)
static
void
__devinit
tulip_mwi_config
(
struct
pci_dev
*
pdev
,
static
void
__devinit
tulip_mwi_config
(
struct
pci_dev
*
pdev
,
struct
net_device
*
dev
)
struct
net_device
*
dev
)
{
{
struct
tulip_private
*
tp
=
dev
->
priv
;
struct
tulip_private
*
tp
=
netdev_priv
(
dev
)
;
u8
cache
;
u8
cache
;
u16
pci_command
;
u16
pci_command
;
u32
csr0
;
u32
csr0
;
...
@@ -1373,7 +1373,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
...
@@ -1373,7 +1373,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
* initialize private data structure 'tp'
* initialize private data structure 'tp'
* it is zeroed and aligned in alloc_etherdev
* it is zeroed and aligned in alloc_etherdev
*/
*/
tp
=
dev
->
priv
;
tp
=
netdev_priv
(
dev
)
;
tp
->
rx_ring
=
pci_alloc_consistent
(
pdev
,
tp
->
rx_ring
=
pci_alloc_consistent
(
pdev
,
sizeof
(
struct
tulip_rx_desc
)
*
RX_RING_SIZE
+
sizeof
(
struct
tulip_rx_desc
)
*
RX_RING_SIZE
+
...
@@ -1756,7 +1756,7 @@ static void __devexit tulip_remove_one (struct pci_dev *pdev)
...
@@ -1756,7 +1756,7 @@ static void __devexit tulip_remove_one (struct pci_dev *pdev)
if
(
!
dev
)
if
(
!
dev
)
return
;
return
;
tp
=
dev
->
priv
;
tp
=
netdev_priv
(
dev
)
;
pci_free_consistent
(
pdev
,
pci_free_consistent
(
pdev
,
sizeof
(
struct
tulip_rx_desc
)
*
RX_RING_SIZE
+
sizeof
(
struct
tulip_rx_desc
)
*
RX_RING_SIZE
+
sizeof
(
struct
tulip_tx_desc
)
*
TX_RING_SIZE
,
sizeof
(
struct
tulip_tx_desc
)
*
TX_RING_SIZE
,
...
...
drivers/net/tulip/xircom_cb.c
View file @
1ef020bf
...
@@ -178,7 +178,7 @@ static void print_binary(unsigned int number)
...
@@ -178,7 +178,7 @@ static void print_binary(unsigned int number)
static
void
netdev_get_drvinfo
(
struct
net_device
*
dev
,
static
void
netdev_get_drvinfo
(
struct
net_device
*
dev
,
struct
ethtool_drvinfo
*
info
)
struct
ethtool_drvinfo
*
info
)
{
{
struct
xircom_private
*
private
=
dev
->
priv
;
struct
xircom_private
*
private
=
netdev_priv
(
dev
)
;
strcpy
(
info
->
driver
,
"xircom_cb"
);
strcpy
(
info
->
driver
,
"xircom_cb"
);
strcpy
(
info
->
bus_info
,
pci_name
(
private
->
pdev
));
strcpy
(
info
->
bus_info
,
pci_name
(
private
->
pdev
));
...
@@ -235,7 +235,7 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
...
@@ -235,7 +235,7 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
printk
(
KERN_ERR
"xircom_probe: failed to allocate etherdev
\n
"
);
printk
(
KERN_ERR
"xircom_probe: failed to allocate etherdev
\n
"
);
goto
device_fail
;
goto
device_fail
;
}
}
private
=
dev
->
priv
;
private
=
netdev_priv
(
dev
)
;
/* Allocate the send/receive buffers */
/* Allocate the send/receive buffers */
private
->
rx_buffer
=
pci_alloc_consistent
(
pdev
,
8192
,
&
private
->
rx_dma_handle
);
private
->
rx_buffer
=
pci_alloc_consistent
(
pdev
,
8192
,
&
private
->
rx_dma_handle
);
...
@@ -312,7 +312,7 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
...
@@ -312,7 +312,7 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
static
void
__devexit
xircom_remove
(
struct
pci_dev
*
pdev
)
static
void
__devexit
xircom_remove
(
struct
pci_dev
*
pdev
)
{
{
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
xircom_private
*
card
=
dev
->
priv
;
struct
xircom_private
*
card
=
netdev_priv
(
dev
)
;
enter
(
"xircom_remove"
);
enter
(
"xircom_remove"
);
pci_free_consistent
(
pdev
,
8192
,
card
->
rx_buffer
,
card
->
rx_dma_handle
);
pci_free_consistent
(
pdev
,
8192
,
card
->
rx_buffer
,
card
->
rx_dma_handle
);
...
@@ -328,7 +328,7 @@ static void __devexit xircom_remove(struct pci_dev *pdev)
...
@@ -328,7 +328,7 @@ static void __devexit xircom_remove(struct pci_dev *pdev)
static
irqreturn_t
xircom_interrupt
(
int
irq
,
void
*
dev_instance
,
struct
pt_regs
*
regs
)
static
irqreturn_t
xircom_interrupt
(
int
irq
,
void
*
dev_instance
,
struct
pt_regs
*
regs
)
{
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_instance
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_instance
;
struct
xircom_private
*
card
=
(
struct
xircom_private
*
)
dev
->
priv
;
struct
xircom_private
*
card
=
netdev_priv
(
dev
)
;
unsigned
int
status
;
unsigned
int
status
;
int
i
;
int
i
;
...
@@ -385,7 +385,7 @@ static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -385,7 +385,7 @@ static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev)
int
desc
;
int
desc
;
enter
(
"xircom_start_xmit"
);
enter
(
"xircom_start_xmit"
);
card
=
(
struct
xircom_private
*
)
dev
->
priv
;
card
=
netdev_priv
(
dev
)
;
spin_lock_irqsave
(
&
card
->
lock
,
flags
);
spin_lock_irqsave
(
&
card
->
lock
,
flags
);
/* First see if we can free some descriptors */
/* First see if we can free some descriptors */
...
@@ -444,7 +444,7 @@ static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -444,7 +444,7 @@ static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev)
static
int
xircom_open
(
struct
net_device
*
dev
)
static
int
xircom_open
(
struct
net_device
*
dev
)
{
{
struct
xircom_private
*
xp
=
(
struct
xircom_private
*
)
dev
->
priv
;
struct
xircom_private
*
xp
=
netdev_priv
(
dev
)
;
int
retval
;
int
retval
;
enter
(
"xircom_open"
);
enter
(
"xircom_open"
);
printk
(
KERN_INFO
"xircom cardbus adaptor found, registering as %s, using irq %i
\n
"
,
dev
->
name
,
dev
->
irq
);
printk
(
KERN_INFO
"xircom cardbus adaptor found, registering as %s, using irq %i
\n
"
,
dev
->
name
,
dev
->
irq
);
...
@@ -466,7 +466,7 @@ static int xircom_close(struct net_device *dev)
...
@@ -466,7 +466,7 @@ static int xircom_close(struct net_device *dev)
unsigned
long
flags
;
unsigned
long
flags
;
enter
(
"xircom_close"
);
enter
(
"xircom_close"
);
card
=
dev
->
priv
;
card
=
netdev_priv
(
dev
)
;
netif_stop_queue
(
dev
);
/* we don't want new packets */
netif_stop_queue
(
dev
);
/* we don't want new packets */
...
@@ -495,7 +495,7 @@ static int xircom_close(struct net_device *dev)
...
@@ -495,7 +495,7 @@ static int xircom_close(struct net_device *dev)
static
struct
net_device_stats
*
xircom_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
xircom_get_stats
(
struct
net_device
*
dev
)
{
{
struct
xircom_private
*
card
=
(
struct
xircom_private
*
)
dev
->
priv
;
struct
xircom_private
*
card
=
netdev_priv
(
dev
)
;
return
&
card
->
stats
;
return
&
card
->
stats
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment