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
1682bb12
Commit
1682bb12
authored
Aug 26, 2003
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[wireless ray_cs] ethtool_ops support
parent
ca7ee5f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
21 deletions
+11
-21
drivers/net/wireless/ray_cs.c
drivers/net/wireless/ray_cs.c
+11
-21
No files found.
drivers/net/wireless/ray_cs.c
View file @
1682bb12
...
@@ -105,6 +105,9 @@ static int ray_dev_config(struct net_device *dev, struct ifmap *map);
...
@@ -105,6 +105,9 @@ static int ray_dev_config(struct net_device *dev, struct ifmap *map);
static
struct
net_device_stats
*
ray_get_stats
(
struct
net_device
*
dev
);
static
struct
net_device_stats
*
ray_get_stats
(
struct
net_device
*
dev
);
static
int
ray_dev_init
(
struct
net_device
*
dev
);
static
int
ray_dev_init
(
struct
net_device
*
dev
);
static
int
ray_dev_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
,
int
cmd
);
static
int
ray_dev_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
,
int
cmd
);
static
struct
ethtool_ops
netdev_ethtool_ops
;
static
int
ray_open
(
struct
net_device
*
dev
);
static
int
ray_open
(
struct
net_device
*
dev
);
static
int
ray_dev_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
);
static
int
ray_dev_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
);
static
void
set_multicast_list
(
struct
net_device
*
dev
);
static
void
set_multicast_list
(
struct
net_device
*
dev
);
...
@@ -408,6 +411,7 @@ static dev_link_t *ray_attach(void)
...
@@ -408,6 +411,7 @@ static dev_link_t *ray_attach(void)
dev
->
set_config
=
&
ray_dev_config
;
dev
->
set_config
=
&
ray_dev_config
;
dev
->
get_stats
=
&
ray_get_stats
;
dev
->
get_stats
=
&
ray_get_stats
;
dev
->
do_ioctl
=
&
ray_dev_ioctl
;
dev
->
do_ioctl
=
&
ray_dev_ioctl
;
SET_ETHTOOL_OPS
(
dev
,
&
netdev_ethtool_ops
);
#if WIRELESS_EXT > 7
/* If wireless extension exist in the kernel */
#if WIRELESS_EXT > 7
/* If wireless extension exist in the kernel */
dev
->
get_wireless_stats
=
ray_get_wireless_stats
;
dev
->
get_wireless_stats
=
ray_get_wireless_stats
;
#endif
#endif
...
@@ -1226,26 +1230,16 @@ AP to AP 1 1 dest AP src AP dest source
...
@@ -1226,26 +1230,16 @@ AP to AP 1 1 dest AP src AP dest source
/*===========================================================================*/
/*===========================================================================*/
static
int
netdev_ethtool_ioctl
(
struct
net_device
*
dev
,
void
*
useraddr
)
static
void
netdev_get_drvinfo
(
struct
net_device
*
dev
,
struct
ethtool_drvinfo
*
info
)
{
{
u32
ethcmd
;
strcpy
(
info
->
driver
,
"ray_cs"
);
if
(
copy_from_user
(
&
ethcmd
,
useraddr
,
sizeof
(
ethcmd
)))
return
-
EFAULT
;
switch
(
ethcmd
)
{
case
ETHTOOL_GDRVINFO
:
{
struct
ethtool_drvinfo
info
=
{
ETHTOOL_GDRVINFO
};
strncpy
(
info
.
driver
,
"ray_cs"
,
sizeof
(
info
.
driver
)
-
1
);
if
(
copy_to_user
(
useraddr
,
&
info
,
sizeof
(
info
)))
return
-
EFAULT
;
return
0
;
}
}
return
-
EOPNOTSUPP
;
}
}
static
struct
ethtool_ops
netdev_ethtool_ops
=
{
.
get_drvinfo
=
netdev_get_drvinfo
,
};
/*====================================================================*/
/*====================================================================*/
static
int
ray_dev_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
,
int
cmd
)
static
int
ray_dev_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
ifr
,
int
cmd
)
...
@@ -1265,10 +1259,6 @@ static int ray_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
...
@@ -1265,10 +1259,6 @@ static int ray_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
/* Validate the command */
/* Validate the command */
switch
(
cmd
)
switch
(
cmd
)
{
{
case
SIOCETHTOOL
:
err
=
netdev_ethtool_ioctl
(
dev
,
(
void
*
)
ifr
->
ifr_data
);
break
;
#if WIRELESS_EXT > 7
#if WIRELESS_EXT > 7
/* --------------- WIRELESS EXTENSIONS --------------- */
/* --------------- WIRELESS EXTENSIONS --------------- */
/* Get name */
/* Get name */
...
...
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