summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/src/wlan_hdd_main.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 584d1c19287b..0c9d38a7ed03 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -12250,7 +12250,8 @@ static void __exit hdd_module_exit(void)
}
#endif
-static int fwpath_changed_handler(const char *kmessage, struct kernel_param *kp)
+static int fwpath_changed_handler(const char *kmessage,
+ const struct kernel_param *kp)
{
return param_set_copystring(kmessage, kp);
}
@@ -12422,7 +12423,8 @@ static int hdd_register_req_mode(hdd_context_t *hdd_ctx,
*
* Return - 0 on success and failure code on failure
*/
-static int __con_mode_handler(const char *kmessage, struct kernel_param *kp,
+static int __con_mode_handler(const char *kmessage,
+ const struct kernel_param *kp,
hdd_context_t *hdd_ctx)
{
int ret;
@@ -12521,7 +12523,7 @@ reset_flags:
}
-static int con_mode_handler(const char *kmessage, struct kernel_param *kp)
+static int con_mode_handler(const char *kmessage, const struct kernel_param *kp)
{
int ret;
hdd_context_t *hdd_ctx;
@@ -13032,11 +13034,20 @@ MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("Qualcomm Atheros, Inc.");
MODULE_DESCRIPTION("WLAN HOST DEVICE DRIVER");
-module_param_call(con_mode, con_mode_handler, param_get_int, &con_mode,
- S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+static const struct kernel_param_ops con_mode_ops = {
+ .set = con_mode_handler,
+ .get = param_get_int,
+};
+
+static const struct kernel_param_ops fwpath_ops = {
+ .set = fwpath_changed_handler,
+ .get = param_get_string,
+};
-module_param_call(fwpath, fwpath_changed_handler, param_get_string, &fwpath,
- S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param_cb(con_mode, &con_mode_ops, &con_mode,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+module_param_cb(fwpath, &fwpath_ops, &fwpath,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
module_param(enable_dfs_chan_scan, int, S_IRUSR | S_IRGRP | S_IROTH);