qcacmn: Add ucfg_wifi_pos set/get apis for FTM value
Define ucfg_wifi_pos apis for set/get of fine_time_meas_initiator. Change-Id: Id33ba633c58e5b286211da9343797fc99ec364aa CRs-Fixed: 2124286
This commit is contained in:
@@ -77,15 +77,6 @@ void os_if_wifi_pos_send_peer_status(struct qdf_mac_addr *peer_mac,
|
||||
struct wifi_pos_ch_info *chan_info,
|
||||
enum tQDF_ADAPTER_MODE dev_mode);
|
||||
|
||||
/**
|
||||
* os_if_wifi_pos_set_ftm_cap() - set ftm capabilities
|
||||
* @psoc: psoc object
|
||||
* @val: value to set
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
void os_if_wifi_pos_set_ftm_cap(struct wlan_objmgr_psoc *psoc, uint32_t val);
|
||||
|
||||
/**
|
||||
* os_if_wifi_pos_populate_caps() - populate oem capabilities
|
||||
* @psoc: psoc object
|
||||
@@ -116,11 +107,6 @@ static inline void os_if_wifi_pos_send_peer_status(
|
||||
{
|
||||
}
|
||||
|
||||
static inline void os_if_wifi_pos_set_ftm_cap(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t val)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int os_if_wifi_pos_populate_caps(struct wlan_objmgr_psoc *psoc,
|
||||
struct wifi_pos_driver_caps *caps)
|
||||
{
|
||||
|
@@ -319,16 +319,6 @@ void os_if_wifi_pos_send_peer_status(struct qdf_mac_addr *peer_mac,
|
||||
qdf_mem_free(peer_info);
|
||||
}
|
||||
|
||||
void os_if_wifi_pos_set_ftm_cap(struct wlan_objmgr_psoc *psoc, uint32_t val)
|
||||
{
|
||||
if (!psoc) {
|
||||
cfg80211_err("psoc is null");
|
||||
return;
|
||||
}
|
||||
|
||||
wifi_pos_set_ftm_cap(psoc, val);
|
||||
}
|
||||
|
||||
int os_if_wifi_pos_populate_caps(struct wlan_objmgr_psoc *psoc,
|
||||
struct wifi_pos_driver_caps *caps)
|
||||
{
|
||||
|
@@ -292,13 +292,21 @@ QDF_STATUS wifi_pos_populate_caps(struct wlan_objmgr_psoc *psoc,
|
||||
struct wifi_pos_driver_caps *caps);
|
||||
|
||||
/**
|
||||
* wifi_pos_set_ftm_cap: API to set fine timing measurement caps
|
||||
* ucfg_wifi_pos_get_ftm_cap: API to get fine timing measurement caps
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* Return: FTM value
|
||||
*/
|
||||
uint32_t ucfg_wifi_pos_get_ftm_cap(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ucfg_wifi_pos_set_ftm_cap: API to set fine timing measurement caps
|
||||
* @psoc: psoc object
|
||||
* @val: value to set
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void wifi_pos_set_ftm_cap(struct wlan_objmgr_psoc *psoc, uint32_t val);
|
||||
void ucfg_wifi_pos_set_ftm_cap(struct wlan_objmgr_psoc *psoc, uint32_t val);
|
||||
|
||||
/**
|
||||
* wifi_pos_get_app_pid: returns oem app pid.
|
||||
|
@@ -205,21 +205,6 @@ void wifi_pos_set_current_dwell_time_min(struct wlan_objmgr_psoc *psoc,
|
||||
qdf_spin_unlock_bh(&wifi_pos_psoc->wifi_pos_lock);
|
||||
}
|
||||
|
||||
void wifi_pos_set_ftm_cap(struct wlan_objmgr_psoc *psoc, uint32_t val)
|
||||
{
|
||||
struct wifi_pos_psoc_priv_obj *wifi_pos_psoc =
|
||||
wifi_pos_get_psoc_priv_obj(psoc);
|
||||
|
||||
if (!wifi_pos_psoc) {
|
||||
wifi_pos_alert("unable to get wifi_pos psoc obj");
|
||||
return;
|
||||
}
|
||||
|
||||
qdf_spin_lock_bh(&wifi_pos_psoc->wifi_pos_lock);
|
||||
wifi_pos_psoc->fine_time_meas_cap = val;
|
||||
qdf_spin_unlock_bh(&wifi_pos_psoc->wifi_pos_lock);
|
||||
}
|
||||
|
||||
uint32_t wifi_pos_get_app_pid(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
uint32_t app_pid;
|
||||
|
@@ -71,3 +71,38 @@ unlock_and_exit:
|
||||
qdf_spin_unlock_bh(&wifi_pos_psoc_obj->wifi_pos_lock);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
uint32_t ucfg_wifi_pos_get_ftm_cap(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
uint32_t val = 0;
|
||||
struct wifi_pos_psoc_priv_obj *wifi_pos_psoc =
|
||||
wifi_pos_get_psoc_priv_obj(psoc);
|
||||
|
||||
if (!wifi_pos_psoc) {
|
||||
wifi_pos_alert("unable to get wifi_pos psoc obj");
|
||||
return val;
|
||||
}
|
||||
|
||||
qdf_spin_lock_bh(&wifi_pos_psoc->wifi_pos_lock);
|
||||
val = wifi_pos_psoc->fine_time_meas_cap;
|
||||
qdf_spin_unlock_bh(&wifi_pos_psoc->wifi_pos_lock);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
void ucfg_wifi_pos_set_ftm_cap(struct wlan_objmgr_psoc *psoc, uint32_t val)
|
||||
{
|
||||
struct wifi_pos_psoc_priv_obj *wifi_pos_psoc =
|
||||
wifi_pos_get_psoc_priv_obj(psoc);
|
||||
|
||||
if (!wifi_pos_psoc) {
|
||||
wifi_pos_alert("unable to get wifi_pos psoc obj");
|
||||
return;
|
||||
}
|
||||
|
||||
qdf_spin_lock_bh(&wifi_pos_psoc->wifi_pos_lock);
|
||||
wifi_pos_psoc->fine_time_meas_cap = val;
|
||||
qdf_spin_unlock_bh(&wifi_pos_psoc->wifi_pos_lock);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user