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
d419be1f
Commit
d419be1f
authored
Dec 10, 2011
by
Marek Lindner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
batman-adv: allowing changing the routing algorithm via module parameter
Signed-off-by:
Marek Lindner
<
lindner_marek@yahoo.de
>
parent
01c4224b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
net/batman-adv/main.c
net/batman-adv/main.c
+24
-0
No files found.
net/batman-adv/main.c
View file @
d419be1f
...
...
@@ -256,6 +256,30 @@ int bat_algo_seq_print_text(struct seq_file *seq, void *offset)
return
0
;
}
static
int
param_set_ra
(
const
char
*
val
,
const
struct
kernel_param
*
kp
)
{
struct
bat_algo_ops
*
bat_algo_ops
;
bat_algo_ops
=
bat_algo_get
((
char
*
)
val
);
if
(
!
bat_algo_ops
)
{
pr_err
(
"Routing algorithm '%s' is not supported
\n
"
,
val
);
return
-
EINVAL
;
}
return
param_set_copystring
(
val
,
kp
);
}
static
const
struct
kernel_param_ops
param_ops_ra
=
{
.
set
=
param_set_ra
,
.
get
=
param_get_string
,
};
static
struct
kparam_string
__param_string_ra
=
{
.
maxlen
=
sizeof
(
bat_routing_algo
),
.
string
=
bat_routing_algo
,
};
module_param_cb
(
routing_algo
,
&
param_ops_ra
,
&
__param_string_ra
,
0644
);
module_init
(
batman_init
);
module_exit
(
batman_exit
);
...
...
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