mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
qcacmn: Add FTM build flags
Add FTM flags to enable/disable FTM and enable NL80211 only, enable TX99 only or both. Change-Id: I18bbbadd65d23221dc4d739e05235f4d81c12043 CRs-Fixed: 2240572
This commit is contained in:
parent
e5b5636856
commit
0987f2dcf7
5 changed files with 70 additions and 34 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#include <qdf_status.h>
|
||||
#include <wlan_objmgr_cmn.h>
|
||||
|
||||
#ifdef QCA_WIFI_FTM
|
||||
/**
|
||||
* dispatcher_ftm_init() - FTM testmode initialization API
|
||||
*
|
||||
|
|
@ -56,4 +57,28 @@ QDF_STATUS dispatcher_ftm_psoc_open(struct wlan_objmgr_psoc *psoc);
|
|||
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
|
||||
*/
|
||||
QDF_STATUS dispatcher_ftm_psoc_close(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
#else
|
||||
static inline QDF_STATUS dispatcher_ftm_init(void)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS dispatcher_ftm_deinit(void)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
dispatcher_ftm_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
dispatcher_ftm_psoc_close(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
#endif /* _WLAN_FTM_UCFG_API_H_ */
|
||||
|
|
|
|||
|
|
@ -46,32 +46,6 @@ QDF_STATUS ucfg_wlan_ftm_testmode_cmd(struct wlan_objmgr_pdev *pdev,
|
|||
return wlan_ftm_cmd_send(pdev, data, len, pdev_id);
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_wlan_ftm_testmode_rsp(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t *data)
|
||||
{
|
||||
struct wifi_ftm_pdev_priv_obj *ftm_pdev_obj;
|
||||
uint32_t *len;
|
||||
|
||||
ftm_pdev_obj = wlan_objmgr_pdev_get_comp_private_obj(pdev,
|
||||
WLAN_UMAC_COMP_FTM);
|
||||
if (!ftm_pdev_obj) {
|
||||
ftm_err("Failed to get ftm pdev component");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (ftm_pdev_obj->length) {
|
||||
len = (uint32_t *)data;
|
||||
*len = ftm_pdev_obj->length;
|
||||
qdf_mem_copy((data + 4), ftm_pdev_obj->data,
|
||||
ftm_pdev_obj->length);
|
||||
|
||||
ftm_pdev_obj->length = 0;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_ftm_process_utf_event(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t *event_buf, uint32_t len)
|
||||
|
|
@ -137,3 +111,32 @@ wlan_ftm_process_utf_event(struct wlan_objmgr_pdev *pdev,
|
|||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef QCA_WIFI_FTM_IOCTL
|
||||
QDF_STATUS ucfg_wlan_ftm_testmode_rsp(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t *data)
|
||||
{
|
||||
struct wifi_ftm_pdev_priv_obj *ftm_pdev_obj;
|
||||
uint32_t *len;
|
||||
|
||||
ftm_pdev_obj =
|
||||
wlan_objmgr_pdev_get_comp_private_obj(pdev,
|
||||
WLAN_UMAC_COMP_FTM);
|
||||
if (!ftm_pdev_obj) {
|
||||
ftm_err("Failed to get ftm pdev component");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (ftm_pdev_obj->length) {
|
||||
len = (uint32_t *)data;
|
||||
*len = ftm_pdev_obj->length;
|
||||
qdf_mem_copy((data + 4), ftm_pdev_obj->data,
|
||||
ftm_pdev_obj->length);
|
||||
|
||||
ftm_pdev_obj->length = 0;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -130,12 +130,8 @@ wlan_cfg80211_ftm_rx_event(struct wlan_objmgr_pdev *pdev,
|
|||
}
|
||||
|
||||
ftm_debug("Testmode response event generated");
|
||||
#ifdef CONFIG_NL80211_TESTMODE
|
||||
skb = cfg80211_testmode_alloc_event_skb(pdev_ospriv->wiphy,
|
||||
len, GFP_ATOMIC);
|
||||
#else
|
||||
return QDF_STATUS_E_INVAL;
|
||||
#endif
|
||||
if (!skb)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
|
|
@ -144,9 +140,8 @@ wlan_cfg80211_ftm_rx_event(struct wlan_objmgr_pdev *pdev,
|
|||
nla_put(skb, WLAN_CFG80211_FTM_ATTR_DATA, len, data)) {
|
||||
goto nla_put_failure;
|
||||
}
|
||||
#ifdef CONFIG_NL80211_TESTMODE
|
||||
cfg80211_testmode_event(skb, GFP_ATOMIC);
|
||||
#endif
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
nla_put_failure:
|
||||
|
|
|
|||
|
|
@ -369,12 +369,18 @@ target_if_cp_stats_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops)
|
|||
return target_if_cp_stats_register_tx_ops(tx_ops);
|
||||
}
|
||||
|
||||
#ifdef QCA_WIFI_FTM
|
||||
static
|
||||
void target_if_ftm_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
target_if_ftm_register_tx_ops(tx_ops);
|
||||
}
|
||||
|
||||
#else
|
||||
static
|
||||
void target_if_ftm_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
static
|
||||
QDF_STATUS target_if_register_umac_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -415,6 +415,7 @@ wlan_lmac_if_umac_green_ap_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef QCA_WIFI_FTM
|
||||
static QDF_STATUS
|
||||
wlan_lmac_if_umac_ftm_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
|
||||
{
|
||||
|
|
@ -426,7 +427,13 @@ wlan_lmac_if_umac_ftm_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
|
|||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#else
|
||||
static QDF_STATUS
|
||||
wlan_lmac_if_umac_ftm_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* wlan_lmac_if_umac_rx_ops_register() - UMAC rx handler register
|
||||
* @rx_ops: Pointer to rx_ops structure to be populated
|
||||
|
|
|
|||
Loading…
Reference in a new issue