qcacmn: Redefine FTM processing APIs
The passing parameter length isn't used in FTM processing APIs, It's preferred to define as local variable insteading of passing parameter. Change-Id: Ia767643b51ffc780258e1d2fd0cd6a8a9e222ae2 CRs-fixed: 2464759
此提交包含在:
5
os_if/linux/ftm/inc/wlan_ioctl_ftm.h
一般檔案 → 可執行檔
5
os_if/linux/ftm/inc/wlan_ioctl_ftm.h
一般檔案 → 可執行檔
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -28,11 +28,10 @@
|
||||
* @pdev: pdev object
|
||||
* @cmd: ftm command
|
||||
* @userdata: the content of the command
|
||||
* @length: the length of the userdata
|
||||
*
|
||||
* Return: 0 on success, otherwise the error code.
|
||||
*/
|
||||
int wlan_ioctl_ftm_testmode_cmd(struct wlan_objmgr_pdev *pdev, int cmd,
|
||||
uint8_t *userdata, uint32_t length);
|
||||
uint8_t *userdata);
|
||||
|
||||
#endif
|
||||
|
18
os_if/linux/ftm/src/wlan_ioctl_ftm.c
一般檔案 → 可執行檔
18
os_if/linux/ftm/src/wlan_ioctl_ftm.c
一般檔案 → 可執行檔
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -29,11 +29,11 @@
|
||||
#include <wlan_ioctl_ftm.h>
|
||||
|
||||
static QDF_STATUS
|
||||
wlan_process_ftm_ioctl_cmd(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t *userdata, uint32_t length)
|
||||
wlan_process_ftm_ioctl_cmd(struct wlan_objmgr_pdev *pdev, uint8_t *userdata)
|
||||
{
|
||||
uint8_t *buffer;
|
||||
QDF_STATUS error;
|
||||
int length;
|
||||
|
||||
if (get_user(length, (uint32_t *)userdata) != 0)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -56,11 +56,11 @@ wlan_process_ftm_ioctl_cmd(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
|
||||
static QDF_STATUS
|
||||
wlan_process_ftm_ioctl_rsp(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t *userdata, uint32_t length)
|
||||
wlan_process_ftm_ioctl_rsp(struct wlan_objmgr_pdev *pdev, uint8_t *userdata)
|
||||
{
|
||||
uint8_t *buffer;
|
||||
QDF_STATUS error;
|
||||
int length;
|
||||
|
||||
length = WLAN_FTM_DATA_MAX_LEN + sizeof(u_int32_t);
|
||||
|
||||
@@ -81,7 +81,7 @@ wlan_process_ftm_ioctl_rsp(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
int
|
||||
wlan_ioctl_ftm_testmode_cmd(struct wlan_objmgr_pdev *pdev, int cmd,
|
||||
uint8_t *userdata, uint32_t length)
|
||||
uint8_t *userdata)
|
||||
{
|
||||
QDF_STATUS error;
|
||||
struct wifi_ftm_pdev_priv_obj *ftm_pdev_obj;
|
||||
@@ -97,12 +97,10 @@ wlan_ioctl_ftm_testmode_cmd(struct wlan_objmgr_pdev *pdev, int cmd,
|
||||
|
||||
switch (cmd) {
|
||||
case FTM_IOCTL_UNIFIED_UTF_CMD:
|
||||
error = wlan_process_ftm_ioctl_cmd(pdev,
|
||||
userdata, length);
|
||||
error = wlan_process_ftm_ioctl_cmd(pdev, userdata);
|
||||
break;
|
||||
case FTM_IOCTL_UNIFIED_UTF_RSP:
|
||||
error = wlan_process_ftm_ioctl_rsp(pdev,
|
||||
userdata, length);
|
||||
error = wlan_process_ftm_ioctl_rsp(pdev, userdata);
|
||||
break;
|
||||
default:
|
||||
ftm_err("FTM Unknown cmd - not supported");
|
||||
|
新增問題並參考
封鎖使用者