summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/media/platform/msm/ais/ispif/msm_ispif.c45
-rw-r--r--include/net/cfg80211.h3
2 files changed, 27 insertions, 21 deletions
diff --git a/drivers/media/platform/msm/ais/ispif/msm_ispif.c b/drivers/media/platform/msm/ais/ispif/msm_ispif.c
index 5ddf554d6ef3..ed220c82c11c 100644
--- a/drivers/media/platform/msm/ais/ispif/msm_ispif.c
+++ b/drivers/media/platform/msm/ais/ispif/msm_ispif.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -215,32 +215,35 @@ static long msm_ispif_cmd_ext(struct v4l2_subdev *sd,
long rc = 0;
struct ispif_device *ispif =
(struct ispif_device *)v4l2_get_subdevdata(sd);
- struct ispif_cfg_data_ext pcdata;
+ struct ispif_cfg_data_ext pcdata = {0};
struct msm_ispif_param_data_ext *params = NULL;
+
+ if (is_compat_task()) {
#ifdef CONFIG_COMPAT
- struct ispif_cfg_data_ext_32 *pcdata32 =
- (struct ispif_cfg_data_ext_32 *)arg;
+ struct ispif_cfg_data_ext_32 *pcdata32 =
+ (struct ispif_cfg_data_ext_32 *)arg;
- if (pcdata32 == NULL) {
- pr_err("Invalid params passed from user\n");
- return -EINVAL;
- }
- pcdata.cfg_type = pcdata32->cfg_type;
- pcdata.size = pcdata32->size;
- pcdata.data = compat_ptr(pcdata32->data);
+ if (pcdata32 == NULL) {
+ pr_err("Invalid params passed from user\n");
+ return -EINVAL;
+ }
+ pcdata.cfg_type = pcdata32->cfg_type;
+ pcdata.size = pcdata32->size;
+ pcdata.data = compat_ptr(pcdata32->data);
-#else
- struct ispif_cfg_data_ext *pcdata64 =
- (struct ispif_cfg_data_ext *)arg;
+#endif
+ } else {
+ struct ispif_cfg_data_ext *pcdata64 =
+ (struct ispif_cfg_data_ext *)arg;
- if (pcdata64 == NULL) {
- pr_err("Invalid params passed from user\n");
- return -EINVAL;
+ if (pcdata64 == NULL) {
+ pr_err("Invalid params passed from user\n");
+ return -EINVAL;
+ }
+ pcdata.cfg_type = pcdata64->cfg_type;
+ pcdata.size = pcdata64->size;
+ pcdata.data = pcdata64->data;
}
- pcdata.cfg_type = pcdata64->cfg_type;
- pcdata.size = pcdata64->size;
- pcdata.data = pcdata64->data;
-#endif
if (pcdata.size != sizeof(struct msm_ispif_param_data_ext)) {
pr_err("%s: payload size mismatch\n", __func__);
return -EINVAL;
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 8f968375ac46..bac128ded4f0 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -24,6 +24,9 @@
#include <linux/net.h>
#include <net/regulatory.h>
+/* Indicate backport support for external authentication*/
+#define CFG80211_EXTERNAL_AUTH_SUPPORT 1
+
/**
* DOC: Introduction
*