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
nexedi
linux
Commits
35c49f89
Commit
35c49f89
authored
Aug 29, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Aug 29, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr] netdev_priv for ewrk3, xircom_tulip_cb, wavelan_cs
parent
0f65172c
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
84 deletions
+82
-84
drivers/net/ewrk3.c
drivers/net/ewrk3.c
+14
-14
drivers/net/tulip/xircom_tulip_cb.c
drivers/net/tulip/xircom_tulip_cb.c
+20
-20
drivers/net/wireless/wavelan_cs.c
drivers/net/wireless/wavelan_cs.c
+48
-50
No files found.
drivers/net/ewrk3.c
View file @
35c49f89
...
...
@@ -532,7 +532,7 @@ ewrk3_hw_init(struct net_device *dev, u_long iobase)
printk
(
" is in I/O only mode"
);
}
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
lp
->
shmem_base
=
mem_start
;
lp
->
shmem_length
=
shmem_length
;
lp
->
lemac
=
lemac
;
...
...
@@ -621,7 +621,7 @@ ewrk3_hw_init(struct net_device *dev, u_long iobase)
static
int
ewrk3_open
(
struct
net_device
*
dev
)
{
struct
ewrk3_private
*
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
struct
ewrk3_private
*
lp
=
netdev_priv
(
dev
)
;
u_long
iobase
=
dev
->
base_addr
;
int
i
,
status
=
0
;
u_char
icr
,
csr
;
...
...
@@ -684,7 +684,7 @@ static int ewrk3_open(struct net_device *dev)
*/
static
void
ewrk3_init
(
struct
net_device
*
dev
)
{
struct
ewrk3_private
*
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
struct
ewrk3_private
*
lp
=
netdev_priv
(
dev
)
;
u_char
csr
,
page
;
u_long
iobase
=
dev
->
base_addr
;
int
i
;
...
...
@@ -725,7 +725,7 @@ static void ewrk3_init(struct net_device *dev)
static
void
ewrk3_timeout
(
struct
net_device
*
dev
)
{
struct
ewrk3_private
*
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
struct
ewrk3_private
*
lp
=
netdev_priv
(
dev
)
;
u_char
icr
,
csr
;
u_long
iobase
=
dev
->
base_addr
;
...
...
@@ -761,7 +761,7 @@ static void ewrk3_timeout(struct net_device *dev)
*/
static
int
ewrk3_queue_pkt
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
struct
ewrk3_private
*
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
struct
ewrk3_private
*
lp
=
netdev_priv
(
dev
)
;
u_long
iobase
=
dev
->
base_addr
;
u_long
buf
=
0
;
u_char
icr
;
...
...
@@ -883,7 +883,7 @@ static irqreturn_t ewrk3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
u_long
iobase
;
u_char
icr
,
cr
,
csr
;
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
lp
=
netdev_priv
(
dev
)
;
iobase
=
dev
->
base_addr
;
/* get the interrupt information */
...
...
@@ -931,7 +931,7 @@ static irqreturn_t ewrk3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
/* Called with lp->hw_lock held */
static
int
ewrk3_rx
(
struct
net_device
*
dev
)
{
struct
ewrk3_private
*
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
struct
ewrk3_private
*
lp
=
netdev_priv
(
dev
)
;
u_long
iobase
=
dev
->
base_addr
;
int
i
,
status
=
0
;
u_char
page
;
...
...
@@ -1059,7 +1059,7 @@ static int ewrk3_rx(struct net_device *dev)
*/
static
int
ewrk3_tx
(
struct
net_device
*
dev
)
{
struct
ewrk3_private
*
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
struct
ewrk3_private
*
lp
=
netdev_priv
(
dev
)
;
u_long
iobase
=
dev
->
base_addr
;
u_char
tx_status
;
...
...
@@ -1095,7 +1095,7 @@ static int ewrk3_tx(struct net_device *dev)
static
int
ewrk3_close
(
struct
net_device
*
dev
)
{
struct
ewrk3_private
*
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
struct
ewrk3_private
*
lp
=
netdev_priv
(
dev
)
;
u_long
iobase
=
dev
->
base_addr
;
u_char
icr
,
csr
;
...
...
@@ -1130,7 +1130,7 @@ static int ewrk3_close(struct net_device *dev)
static
struct
net_device_stats
*
ewrk3_get_stats
(
struct
net_device
*
dev
)
{
struct
ewrk3_private
*
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
struct
ewrk3_private
*
lp
=
netdev_priv
(
dev
)
;
/* Null body since there is no framing error counter */
return
&
lp
->
stats
;
...
...
@@ -1141,7 +1141,7 @@ static struct net_device_stats *ewrk3_get_stats(struct net_device *dev)
*/
static
void
set_multicast_list
(
struct
net_device
*
dev
)
{
struct
ewrk3_private
*
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
struct
ewrk3_private
*
lp
=
netdev_priv
(
dev
)
;
u_long
iobase
=
dev
->
base_addr
;
u_char
csr
;
...
...
@@ -1174,7 +1174,7 @@ static void set_multicast_list(struct net_device *dev)
*/
static
void
SetMulticastFilter
(
struct
net_device
*
dev
)
{
struct
ewrk3_private
*
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
struct
ewrk3_private
*
lp
=
netdev_priv
(
dev
)
;
struct
dev_mc_list
*
dmi
=
dev
->
mc_list
;
u_long
iobase
=
dev
->
base_addr
;
int
i
;
...
...
@@ -1522,7 +1522,7 @@ static int __init EISA_signature(char *name, s32 eisa_id)
static
int
ewrk3_ethtool_ioctl
(
struct
net_device
*
dev
,
void
__user
*
useraddr
)
{
struct
ewrk3_private
*
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
struct
ewrk3_private
*
lp
=
netdev_priv
(
dev
)
;
u_long
iobase
=
dev
->
base_addr
;
u32
ethcmd
;
...
...
@@ -1708,7 +1708,7 @@ static int ewrk3_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
*/
static
int
ewrk3_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
{
struct
ewrk3_private
*
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
struct
ewrk3_private
*
lp
=
netdev_priv
(
dev
)
;
struct
ewrk3_ioctl
*
ioc
=
(
struct
ewrk3_ioctl
*
)
&
rq
->
ifr_ifru
;
u_long
iobase
=
dev
->
base_addr
;
int
i
,
j
,
status
=
0
;
...
...
drivers/net/tulip/xircom_tulip_cb.c
View file @
35c49f89
...
...
@@ -450,7 +450,7 @@ static void __devinit read_mac_address(struct net_device *dev)
*/
static
void
find_mii_transceivers
(
struct
net_device
*
dev
)
{
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
int
phy
,
phy_idx
;
if
(
media_cap
[
tp
->
default_port
]
&
MediaIsMII
)
{
...
...
@@ -505,7 +505,7 @@ static void find_mii_transceivers(struct net_device *dev)
*/
static
void
transceiver_voodoo
(
struct
net_device
*
dev
)
{
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
/* Reset the chip, holding bit 0 set at least 50 PCI cycles. */
...
...
@@ -584,7 +584,7 @@ static int __devinit xircom_init_one(struct pci_dev *pdev, const struct pci_devi
/* Clear the missed-packet counter. */
(
volatile
int
)
inl
(
ioaddr
+
CSR8
);
tp
=
dev
->
priv
;
tp
=
netdev_priv
(
dev
)
;
tp
->
lock
=
SPIN_LOCK_UNLOCKED
;
tp
->
pdev
=
pdev
;
...
...
@@ -749,7 +749,7 @@ static void mdio_write(struct net_device *dev, int phy_id, int location, int val
static
void
xircom_up
(
struct
net_device
*
dev
)
{
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
int
i
;
...
...
@@ -804,7 +804,7 @@ xircom_up(struct net_device *dev)
static
int
xircom_open
(
struct
net_device
*
dev
)
{
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
if
(
request_irq
(
dev
->
irq
,
&
xircom_interrupt
,
SA_SHIRQ
,
dev
->
name
,
dev
))
return
-
EAGAIN
;
...
...
@@ -818,7 +818,7 @@ xircom_open(struct net_device *dev)
static
void
xircom_tx_timeout
(
struct
net_device
*
dev
)
{
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
if
(
media_cap
[
dev
->
if_port
]
&
MediaIsMII
)
{
...
...
@@ -870,7 +870,7 @@ static void xircom_tx_timeout(struct net_device *dev)
/* Initialize the Rx and Tx rings, along with various 'dev' bits. */
static
void
xircom_init_ring
(
struct
net_device
*
dev
)
{
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
int
i
;
tp
->
tx_full
=
0
;
...
...
@@ -919,7 +919,7 @@ static void xircom_init_ring(struct net_device *dev)
static
int
xircom_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
int
entry
;
u32
flag
;
...
...
@@ -971,7 +971,7 @@ xircom_start_xmit(struct sk_buff *skb, struct net_device *dev)
static
void
xircom_media_change
(
struct
net_device
*
dev
)
{
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
u16
reg0
,
reg1
,
reg4
,
reg5
;
u32
csr6
=
inl
(
ioaddr
+
CSR6
),
newcsr6
;
...
...
@@ -1032,7 +1032,7 @@ static void xircom_media_change(struct net_device *dev)
static
void
check_duplex
(
struct
net_device
*
dev
)
{
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
u16
reg0
;
mdio_write
(
dev
,
tp
->
phys
[
0
],
MII_BMCR
,
BMCR_RESET
);
...
...
@@ -1065,7 +1065,7 @@ static void check_duplex(struct net_device *dev)
static
irqreturn_t
xircom_interrupt
(
int
irq
,
void
*
dev_instance
,
struct
pt_regs
*
regs
)
{
struct
net_device
*
dev
=
dev_instance
;
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
int
csr5
,
work_budget
=
max_interrupt_work
;
int
handled
=
0
;
...
...
@@ -1203,7 +1203,7 @@ static irqreturn_t xircom_interrupt(int irq, void *dev_instance, struct pt_regs
static
int
xircom_rx
(
struct
net_device
*
dev
)
{
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
int
entry
=
tp
->
cur_rx
%
RX_RING_SIZE
;
int
rx_work_limit
=
tp
->
dirty_rx
+
RX_RING_SIZE
-
tp
->
cur_rx
;
int
work_done
=
0
;
...
...
@@ -1303,7 +1303,7 @@ static void
xircom_down
(
struct
net_device
*
dev
)
{
long
ioaddr
=
dev
->
base_addr
;
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
/* Disable interrupts by clearing the interrupt mask. */
outl
(
0
,
ioaddr
+
CSR7
);
...
...
@@ -1321,7 +1321,7 @@ static int
xircom_close
(
struct
net_device
*
dev
)
{
long
ioaddr
=
dev
->
base_addr
;
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
int
i
;
if
(
xircom_debug
>
1
)
...
...
@@ -1359,7 +1359,7 @@ xircom_close(struct net_device *dev)
static
struct
net_device_stats
*
xircom_get_stats
(
struct
net_device
*
dev
)
{
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
long
ioaddr
=
dev
->
base_addr
;
if
(
netif_device_present
(
dev
))
...
...
@@ -1372,7 +1372,7 @@ static struct net_device_stats *xircom_get_stats(struct net_device *dev)
static
int
xircom_ethtool_ioctl
(
struct
net_device
*
dev
,
void
__user
*
useraddr
)
{
struct
ethtool_cmd
ecmd
;
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
if
(
copy_from_user
(
&
ecmd
,
useraddr
,
sizeof
(
ecmd
)))
return
-
EFAULT
;
...
...
@@ -1470,7 +1470,7 @@ static int xircom_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
/* Provide ioctl() calls to examine the MII xcvr state. */
static
int
xircom_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
)
{
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
u16
*
data
=
(
u16
*
)
&
rq
->
ifr_ifru
;
int
phy
=
tp
->
phys
[
0
]
&
0x1f
;
unsigned
long
flags
;
...
...
@@ -1531,7 +1531,7 @@ static int xircom_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
when re-entered but still correct. */
static
void
set_rx_mode
(
struct
net_device
*
dev
)
{
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
struct
dev_mc_list
*
mclist
;
long
ioaddr
=
dev
->
base_addr
;
int
csr6
=
inl
(
ioaddr
+
CSR6
);
...
...
@@ -1672,7 +1672,7 @@ MODULE_DEVICE_TABLE(pci, xircom_pci_table);
static
int
xircom_suspend
(
struct
pci_dev
*
pdev
,
u32
state
)
{
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
printk
(
KERN_INFO
"xircom_suspend(%s)
\n
"
,
dev
->
name
);
if
(
tp
->
open
)
xircom_down
(
dev
);
...
...
@@ -1688,7 +1688,7 @@ static int xircom_suspend(struct pci_dev *pdev, u32 state)
static
int
xircom_resume
(
struct
pci_dev
*
pdev
)
{
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
struct
xircom_private
*
tp
=
dev
->
priv
;
struct
xircom_private
*
tp
=
netdev_priv
(
dev
)
;
printk
(
KERN_INFO
"xircom_resume(%s)
\n
"
,
dev
->
name
);
pci_set_power_state
(
pdev
,
0
);
...
...
drivers/net/wireless/wavelan_cs.c
View file @
35c49f89
This diff is collapsed.
Click to expand it.
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