diff options
author | Lior David <liord@codeaurora.org> | 2016-08-18 22:23:31 +0300 |
---|---|---|
committer | Lior David <liord@codeaurora.org> | 2016-10-07 09:30:23 +0300 |
commit | 33a8b1b0182842ee5eaaa2022e2d686fc90c5aaf (patch) | |
tree | 2450735178621fb4a0faeb8c7ecc618a527b480c /drivers/net/wireless/ath/wil6210/wmi.c | |
parent | e9a7b4841897c06e8fe78c70869d81874687a29b (diff) |
wil6210: initial support for FTM and AOA
Added initial support for fine timing measurement(FTM)
and angle of arrival (AOA). These features allow a station
to get an accurate indoor location by measuring
distance (FTM) and azimuth/elevation (AOA) to one or more
stations/APs with a known location.
The following APIs are supported:
1. Get FTM/AOA capabilities, currently hard-coded for a
single-shot measurement to an associated AP
2. Start FTM session
3. Receive FTM results
4. Start standalone AOA measurement
5. Receive AOA results
Change-Id: I54ebc1bdff6ed7d91644165b16eb0a4240069321
CRs-Fixed: 1057307
Signed-off-by: Lior David <liord@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/wmi.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wmi.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 6ec3ddc5b6f1..daa7a33d12d8 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c @@ -22,6 +22,7 @@ #include "txrx.h" #include "wmi.h" #include "trace.h" +#include "ftm.h" static uint max_assoc_sta = WIL6210_MAX_CID; module_param(max_assoc_sta, uint, S_IRUGO | S_IWUSR); @@ -772,6 +773,30 @@ __acquires(&sta->tid_rx_lock) __releases(&sta->tid_rx_lock) spin_unlock_bh(&sta->tid_rx_lock); } +static void wmi_evt_aoa_meas(struct wil6210_priv *wil, int id, + void *d, int len) +{ + struct wmi_aoa_meas_event *evt = d; + + wil_aoa_evt_meas(wil, evt, len); +} + +static void wmi_evt_ftm_session_ended(struct wil6210_priv *wil, int id, + void *d, int len) +{ + struct wmi_tof_session_end_event *evt = d; + + wil_ftm_evt_session_ended(wil, evt); +} + +static void wmi_evt_per_dest_res(struct wil6210_priv *wil, int id, + void *d, int len) +{ + struct wmi_tof_ftm_per_dest_res_event *evt = d; + + wil_ftm_evt_per_dest_res(wil, evt); +} + /** * Some events are ignored for purpose; and need not be interpreted as * "unhandled events" @@ -799,6 +824,13 @@ static const struct { {WMI_DELBA_EVENTID, wmi_evt_delba}, {WMI_VRING_EN_EVENTID, wmi_evt_vring_en}, {WMI_DATA_PORT_OPEN_EVENTID, wmi_evt_ignore}, + {WMI_AOA_MEAS_EVENTID, wmi_evt_aoa_meas}, + {WMI_TOF_SESSION_END_EVENTID, wmi_evt_ftm_session_ended}, + {WMI_TOF_GET_CAPABILITIES_EVENTID, wmi_evt_ignore}, + {WMI_TOF_SET_LCR_EVENTID, wmi_evt_ignore}, + {WMI_TOF_SET_LCI_EVENTID, wmi_evt_ignore}, + {WMI_TOF_FTM_PER_DEST_RES_EVENTID, wmi_evt_per_dest_res}, + {WMI_TOF_CHANNEL_INFO_EVENTID, wmi_evt_ignore}, }; /* |