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
3036d077
Commit
3036d077
authored
Jun 29, 2003
by
Arnaldo Carvalho de Melo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
o wl3501: more wireless extensions: {get,set}_nick and get_freq
parent
30fcffaa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
3 deletions
+39
-3
drivers/net/wireless/wl3501.h
drivers/net/wireless/wl3501.h
+1
-0
drivers/net/wireless/wl3501_cs.c
drivers/net/wireless/wl3501_cs.c
+38
-3
No files found.
drivers/net/wireless/wl3501.h
View file @
3036d077
...
...
@@ -427,6 +427,7 @@ struct wl3501_card {
int
ether_type
;
int
net_type
;
u8
keep_essid
[
34
];
unsigned
char
nick
[
32
];
u8
chan
;
u8
def_chan
;
u8
cap_info
;
...
...
drivers/net/wireless/wl3501_cs.c
View file @
3036d077
...
...
@@ -699,6 +699,7 @@ static int wl3501_mgmt_join(struct wl3501_card *this, u16 stas)
signal
.
timeout
=
10
;
memcpy
((
char
*
)
&
(
signal
.
beacon_period
),
(
char
*
)
&
(
this
->
bss_set
[
stas
].
beacon_period
),
72
);
/* FIXME: next two stmts should be reverted or deleted, study */
this
->
cap_info
=
signal
.
cap_info
;
this
->
chan
=
signal
.
phy_pset
[
2
];
...
...
@@ -1823,6 +1824,18 @@ static int wl3501_get_name(struct net_device *dev, struct iw_request_info *info,
return
0
;
}
static
int
wl3501_get_freq
(
struct
net_device
*
dev
,
struct
iw_request_info
*
info
,
union
iwreq_data
*
wrqu
,
char
*
extra
)
{
struct
wl3501_card
*
this
=
(
struct
wl3501_card
*
)
dev
->
priv
;
int
f
=
this
->
chan
;
wrqu
->
freq
.
m
=
f
;
printk
(
KERN_INFO
"%s: bss_basic_rate_set=%-10.10s
\n
"
,
__FUNCTION__
,
this
->
bss_set
[
f
].
bss_basic_rate_set
);
wrqu
->
freq
.
e
=
0
;
return
0
;
}
static
int
wl3501_set_mode
(
struct
net_device
*
dev
,
struct
iw_request_info
*
info
,
union
iwreq_data
*
wrqu
,
char
*
extra
)
{
...
...
@@ -1944,10 +1957,31 @@ static int wl3501_get_essid(struct net_device *dev,
return
0
;
}
static
int
wl3501_set_nick
(
struct
net_device
*
dev
,
struct
iw_request_info
*
info
,
union
iwreq_data
*
wrqu
,
char
*
extra
)
{
struct
wl3501_card
*
this
=
(
struct
wl3501_card
*
)
dev
->
priv
;
if
(
wrqu
->
data
.
length
>
sizeof
(
this
->
nick
))
return
-
E2BIG
;
strlcpy
(
this
->
nick
,
extra
,
wrqu
->
data
.
length
);
return
0
;
}
static
int
wl3501_get_nick
(
struct
net_device
*
dev
,
struct
iw_request_info
*
info
,
union
iwreq_data
*
wrqu
,
char
*
extra
)
{
struct
wl3501_card
*
this
=
(
struct
wl3501_card
*
)
dev
->
priv
;
strlcpy
(
extra
,
this
->
nick
,
32
);
wrqu
->
data
.
length
=
strlen
(
extra
);
return
0
;
}
static
const
iw_handler
wl3501_handler
[]
=
{
[
SIOCGIWNAME
-
SIOCSIWCOMMIT
]
=
wl3501_get_name
,
//[SIOCSIWFREQ - SIOCSIWCOMMIT] = wl3501_set_freq,
//
[SIOCGIWFREQ - SIOCSIWCOMMIT] = wl3501_get_freq,
[
SIOCGIWFREQ
-
SIOCSIWCOMMIT
]
=
wl3501_get_freq
,
[
SIOCSIWMODE
-
SIOCSIWCOMMIT
]
=
wl3501_set_mode
,
[
SIOCGIWMODE
-
SIOCSIWCOMMIT
]
=
wl3501_get_mode
,
[
SIOCGIWSENS
-
SIOCSIWCOMMIT
]
=
wl3501_get_sens
,
...
...
@@ -1960,8 +1994,8 @@ static const iw_handler wl3501_handler[] = {
[
SIOCGIWAP
-
SIOCSIWCOMMIT
]
=
wl3501_get_wap
,
[
SIOCSIWESSID
-
SIOCSIWCOMMIT
]
=
wl3501_set_essid
,
[
SIOCGIWESSID
-
SIOCSIWCOMMIT
]
=
wl3501_get_essid
,
//[SIOCSIWENCODE - SIOCSIWCOMMIT] = wl3501_set_encode
,
//[SIOCGIWENCODE - SIOCSIWCOMMIT] = wl3501_get_encode
,
[
SIOCSIWNICKN
-
SIOCSIWCOMMIT
]
=
wl3501_set_nick
,
[
SIOCGIWNICKN
-
SIOCSIWCOMMIT
]
=
wl3501_get_nick
,
};
static
const
struct
iw_handler_def
wl3501_handler_def
=
{
...
...
@@ -2176,6 +2210,7 @@ static void wl3501_config(dev_link_t *link)
this
->
essid
[
2
]
=
'A'
;
this
->
essid
[
3
]
=
'N'
;
this
->
essid
[
4
]
=
'Y'
;
strlcpy
(
this
->
nick
,
"Planet WL3501"
,
sizeof
(
this
->
nick
));
spin_lock_init
(
&
this
->
lock
);
switch
(
this
->
freq_domain
)
{
...
...
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