Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
2610c733
Commit
2610c733
authored
Jan 17, 2006
by
Javier Achirica
Committed by
Jeff Garzik
Jan 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
airo: Off-by-one channel fix
parent
38bd3b26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
drivers/net/wireless/airo.c
drivers/net/wireless/airo.c
+9
-10
No files found.
drivers/net/wireless/airo.c
View file @
2610c733
...
...
@@ -5668,13 +5668,13 @@ static int airo_set_freq(struct net_device *dev,
int
channel
=
fwrq
->
m
;
/* We should do a better check than that,
* based on the card capability !!! */
if
((
channel
<
1
)
||
(
channel
>
1
6
))
{
if
((
channel
<
1
)
||
(
channel
>
1
4
))
{
printk
(
KERN_DEBUG
"%s: New channel value of %d is invalid!
\n
"
,
dev
->
name
,
fwrq
->
m
);
rc
=
-
EINVAL
;
}
else
{
readConfigRid
(
local
,
1
);
/* Yes ! We can set it !!! */
local
->
config
.
channelSet
=
(
u16
)
(
channel
-
1
)
;
local
->
config
.
channelSet
=
(
u16
)
channel
;
set_bit
(
FLAG_COMMIT
,
&
local
->
flags
);
}
}
...
...
@@ -5692,6 +5692,7 @@ static int airo_get_freq(struct net_device *dev,
{
struct
airo_info
*
local
=
dev
->
priv
;
StatusRid
status_rid
;
/* Card status info */
int
ch
;
readConfigRid
(
local
,
1
);
if
((
local
->
config
.
opmode
&
0xFF
)
==
MODE_STA_ESS
)
...
...
@@ -5699,16 +5700,14 @@ static int airo_get_freq(struct net_device *dev,
else
readStatusRid
(
local
,
&
status_rid
,
1
);
#ifdef WEXT_USECHANNELS
fwrq
->
m
=
((
int
)
status_rid
.
channel
)
+
1
;
fwrq
->
e
=
0
;
#else
{
int
f
=
(
int
)
status_rid
.
channel
;
fwrq
->
m
=
frequency_list
[
f
]
*
100000
;
ch
=
(
int
)
status_rid
.
channel
;
if
((
ch
>
0
)
&&
(
ch
<
15
))
{
fwrq
->
m
=
frequency_list
[
ch
-
1
]
*
100000
;
fwrq
->
e
=
1
;
}
else
{
fwrq
->
m
=
ch
;
fwrq
->
e
=
0
;
}
#endif
return
0
;
}
...
...
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