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
fbe0d04d
Commit
fbe0d04d
authored
Oct 28, 2003
by
Arnaldo Carvalho de Melo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Introduce dev_getbyfirsthwtype.
parent
217e86f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
include/linux/netdevice.h
include/linux/netdevice.h
+2
-0
net/core/dev.c
net/core/dev.c
+26
-0
No files found.
include/linux/netdevice.h
View file @
fbe0d04d
...
@@ -498,6 +498,8 @@ extern void probe_old_netdevs(void);
...
@@ -498,6 +498,8 @@ extern void probe_old_netdevs(void);
extern
int
netdev_boot_setup_add
(
char
*
name
,
struct
ifmap
*
map
);
extern
int
netdev_boot_setup_add
(
char
*
name
,
struct
ifmap
*
map
);
extern
int
netdev_boot_setup_check
(
struct
net_device
*
dev
);
extern
int
netdev_boot_setup_check
(
struct
net_device
*
dev
);
extern
struct
net_device
*
dev_getbyhwaddr
(
unsigned
short
type
,
char
*
hwaddr
);
extern
struct
net_device
*
dev_getbyhwaddr
(
unsigned
short
type
,
char
*
hwaddr
);
extern
struct
net_device
*
__dev_getfirstbyhwtype
(
unsigned
short
type
);
extern
struct
net_device
*
dev_getfirstbyhwtype
(
unsigned
short
type
);
extern
void
dev_add_pack
(
struct
packet_type
*
pt
);
extern
void
dev_add_pack
(
struct
packet_type
*
pt
);
extern
void
dev_remove_pack
(
struct
packet_type
*
pt
);
extern
void
dev_remove_pack
(
struct
packet_type
*
pt
);
extern
void
__dev_remove_pack
(
struct
packet_type
*
pt
);
extern
void
__dev_remove_pack
(
struct
packet_type
*
pt
);
...
...
net/core/dev.c
View file @
fbe0d04d
...
@@ -550,6 +550,32 @@ struct net_device *dev_getbyhwaddr(unsigned short type, char *ha)
...
@@ -550,6 +550,32 @@ struct net_device *dev_getbyhwaddr(unsigned short type, char *ha)
return
dev
;
return
dev
;
}
}
struct
net_device
*
__dev_getfirstbyhwtype
(
unsigned
short
type
)
{
struct
net_device
*
dev
;
for
(
dev
=
dev_base
;
dev
;
dev
=
dev
->
next
)
if
(
dev
->
type
==
type
)
break
;
return
dev
;
}
EXPORT_SYMBOL
(
__dev_getfirstbyhwtype
);
struct
net_device
*
dev_getfirstbyhwtype
(
unsigned
short
type
)
{
struct
net_device
*
dev
;
rtnl_lock
();
dev
=
__dev_getfirstbyhwtype
(
type
);
if
(
dev
)
dev_hold
(
dev
);
rtnl_unlock
();
return
dev
;
}
EXPORT_SYMBOL
(
dev_getfirstbyhwtype
);
/**
/**
* dev_get_by_flags - find any device with given flags
* dev_get_by_flags - find any device with given flags
* @if_flags: IFF_* values
* @if_flags: IFF_* values
...
...
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