mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacld-3.0: Set copy_to_user flag on ftm rsp command
If command type is FTM_IOCTL_UNIFIED_UTF_RSP set copy_to_user flag to return proper data to userspace. Change-Id: I5f4a1e147f3d1dc162001ceb69fa6823b3158787 CRs-Fixed: 2191046
This commit is contained in:
parent
1dd309b9b8
commit
55aaaad921
1 changed files with 6 additions and 6 deletions
|
|
@ -54,12 +54,12 @@
|
|||
#include "wlan_hdd_cfg80211.h"
|
||||
#include "hif.h"
|
||||
#include <wlan_ioctl_ftm.h>
|
||||
#include <wlan_cfg80211_ftm.h>
|
||||
|
||||
#define MAX_UTF_LENGTH 1024
|
||||
struct qcmbr_data {
|
||||
unsigned int cmd;
|
||||
unsigned int length;
|
||||
unsigned char buf[MAX_UTF_LENGTH + 4];
|
||||
unsigned char buf[WLAN_FTM_DATA_MAX_LEN + 4];
|
||||
unsigned int copy_to_user;
|
||||
};
|
||||
|
||||
|
|
@ -144,9 +144,9 @@ static int wlan_hdd_qcmbr_compat_ioctl(struct hdd_adapter *adapter,
|
|||
}
|
||||
|
||||
ret = wlan_hdd_qcmbr_command(adapter, qcmbr_data);
|
||||
if ((ret == 0) && qcmbr_data->copy_to_user) {
|
||||
if ((ret == 0) && (qcmbr_data->cmd == 0x1001)) {
|
||||
ret = copy_to_user(ifr->ifr_data, qcmbr_data->buf,
|
||||
(MAX_UTF_LENGTH + 4));
|
||||
(WLAN_FTM_DATA_MAX_LEN + 4));
|
||||
}
|
||||
|
||||
exit:
|
||||
|
|
@ -183,9 +183,9 @@ static int wlan_hdd_qcmbr_ioctl(struct hdd_adapter *adapter, struct ifreq *ifr)
|
|||
}
|
||||
|
||||
ret = wlan_hdd_qcmbr_command(adapter, qcmbr_data);
|
||||
if ((ret == 0) && qcmbr_data->copy_to_user) {
|
||||
if ((ret == 0) && (qcmbr_data->cmd == 0x1001)) {
|
||||
ret = copy_to_user(ifr->ifr_data, qcmbr_data->buf,
|
||||
(MAX_UTF_LENGTH + 4));
|
||||
(WLAN_FTM_DATA_MAX_LEN + 4));
|
||||
}
|
||||
|
||||
exit:
|
||||
|
|
|
|||
Loading…
Reference in a new issue