qcacmn: Add roam set param command for roam params
This change introduces the new roam set param WMI command to set the roam params from host to FW. Also added a fail_bssid param in wmi_roam_result TLV to know the roam failed AP BSSID from the FW. Added a new vendor command event for sending roam events stats attributes to userspace. Change-Id: I7a08635a7912cbd940d90a2d62433296740ad913 CRs-Fixed: 3050799
此提交包含在:
@@ -245,6 +245,9 @@ enum qca_nl80211_vendor_subcmds_index {
|
|||||||
#ifdef WLAN_FEATURE_CONNECTIVITY_LOGGING
|
#ifdef WLAN_FEATURE_CONNECTIVITY_LOGGING
|
||||||
QCA_NL80211_VENDOR_SUBCMD_DIAG_EVENT_INDEX,
|
QCA_NL80211_VENDOR_SUBCMD_DIAG_EVENT_INDEX,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||||
|
QCA_NL80211_VENDOR_SUBCMD_ROAM_EVENTS_INDEX,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(SUPPORT_WDEV_CFG80211_VENDOR_EVENT_ALLOC) && \
|
#if !defined(SUPPORT_WDEV_CFG80211_VENDOR_EVENT_ALLOC) && \
|
||||||
|
@@ -863,6 +863,26 @@ QDF_STATUS
|
|||||||
wmi_unified_vdev_set_param_send(wmi_unified_t wmi_handle,
|
wmi_unified_vdev_set_param_send(wmi_unified_t wmi_handle,
|
||||||
struct vdev_set_params *param);
|
struct vdev_set_params *param);
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||||
|
/**
|
||||||
|
* wmi_unified_roam_set_param_send() - WMI roam set parameter function
|
||||||
|
* @wmi_handle: handle to WMI.
|
||||||
|
* @roam_param: pointer to hold roam set parameter
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
wmi_unified_roam_set_param_send(wmi_unified_t wmi_handle,
|
||||||
|
struct vdev_set_params *roam_param);
|
||||||
|
#else
|
||||||
|
static inline QDF_STATUS
|
||||||
|
wmi_unified_roam_set_param_send(wmi_unified_t wmi_handle,
|
||||||
|
struct vdev_set_params *roam_param)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wmi_unified_sifs_trigger_send() - WMI vdev sifs trigger parameter function
|
* wmi_unified_sifs_trigger_send() - WMI vdev sifs trigger parameter function
|
||||||
* @wmi_handle: handle to WMI.
|
* @wmi_handle: handle to WMI.
|
||||||
|
@@ -7665,12 +7665,14 @@ struct wmi_roam_scan_data {
|
|||||||
* @status: 0 - Roaming is success ; 1 - Roaming failed ;
|
* @status: 0 - Roaming is success ; 1 - Roaming failed ;
|
||||||
* 2 - No roam
|
* 2 - No roam
|
||||||
* @fail_reason: One of WMI_ROAM_FAIL_REASON_ID
|
* @fail_reason: One of WMI_ROAM_FAIL_REASON_ID
|
||||||
|
* @fail_bssid: BSSID of the last attempted roam failed AP
|
||||||
*/
|
*/
|
||||||
struct wmi_roam_result {
|
struct wmi_roam_result {
|
||||||
bool present;
|
bool present;
|
||||||
uint32_t timestamp;
|
uint32_t timestamp;
|
||||||
uint32_t status;
|
uint32_t status;
|
||||||
uint32_t fail_reason;
|
uint32_t fail_reason;
|
||||||
|
struct qdf_mac_addr fail_bssid;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define WLAN_11KV_TYPE_BTM_REQ 1
|
#define WLAN_11KV_TYPE_BTM_REQ 1
|
||||||
|
@@ -1092,6 +1092,9 @@ QDF_STATUS (*send_pdev_set_pcl_cmd)(wmi_unified_t wmi_handle,
|
|||||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||||
QDF_STATUS (*send_vdev_set_pcl_cmd)(wmi_unified_t wmi_handle,
|
QDF_STATUS (*send_vdev_set_pcl_cmd)(wmi_unified_t wmi_handle,
|
||||||
struct set_pcl_cmd_params *params);
|
struct set_pcl_cmd_params *params);
|
||||||
|
|
||||||
|
QDF_STATUS (*send_roam_set_param_cmd)(wmi_unified_t wmi_handle,
|
||||||
|
struct vdev_set_params *roam_param);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WLAN_POLICY_MGR_ENABLE
|
#ifdef WLAN_POLICY_MGR_ENABLE
|
||||||
|
@@ -408,6 +408,19 @@ wmi_unified_vdev_set_param_send(wmi_unified_t wmi_handle,
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||||
|
QDF_STATUS
|
||||||
|
wmi_unified_roam_set_param_send(wmi_unified_t wmi_handle,
|
||||||
|
struct vdev_set_params *roam_param)
|
||||||
|
{
|
||||||
|
if (wmi_handle->ops->send_roam_set_param_cmd)
|
||||||
|
return wmi_handle->ops->send_roam_set_param_cmd(wmi_handle,
|
||||||
|
roam_param);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS wmi_unified_sifs_trigger_send(wmi_unified_t wmi_handle,
|
QDF_STATUS wmi_unified_sifs_trigger_send(wmi_unified_t wmi_handle,
|
||||||
struct sifs_trigger_param *param)
|
struct sifs_trigger_param *param)
|
||||||
{
|
{
|
||||||
|
@@ -15490,6 +15490,7 @@ extract_roam_result_stats_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
|||||||
dst->status = src_data->roam_status;
|
dst->status = src_data->roam_status;
|
||||||
dst->timestamp = src_data->timestamp;
|
dst->timestamp = src_data->timestamp;
|
||||||
dst->fail_reason = src_data->roam_fail_reason;
|
dst->fail_reason = src_data->roam_fail_reason;
|
||||||
|
WMI_MAC_ADDR_TO_CHAR_ARRAY(&src_data->bssid, dst->fail_bssid.bytes);
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -15557,6 +15558,47 @@ extract_roam_11kv_stats_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
|||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* send_roam_set_param_cmd_tlv() - WMI roam set parameter function
|
||||||
|
* @wmi_handle : handle to WMI.
|
||||||
|
* @roam_param : pointer to hold roam set parameter
|
||||||
|
*
|
||||||
|
* Return: 0 on success and -ve on failure.
|
||||||
|
*/
|
||||||
|
static QDF_STATUS
|
||||||
|
send_roam_set_param_cmd_tlv(wmi_unified_t wmi_handle,
|
||||||
|
struct vdev_set_params *roam_param)
|
||||||
|
{
|
||||||
|
QDF_STATUS ret;
|
||||||
|
wmi_roam_set_param_cmd_fixed_param *cmd;
|
||||||
|
wmi_buf_t buf;
|
||||||
|
uint16_t len = sizeof(*cmd);
|
||||||
|
|
||||||
|
buf = wmi_buf_alloc(wmi_handle, len);
|
||||||
|
if (!buf)
|
||||||
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
|
||||||
|
cmd = (wmi_roam_set_param_cmd_fixed_param *)wmi_buf_data(buf);
|
||||||
|
WMITLV_SET_HDR(&cmd->tlv_header,
|
||||||
|
WMITLV_TAG_STRUC_wmi_roam_set_param_cmd_fixed_param,
|
||||||
|
WMITLV_GET_STRUCT_TLVLEN
|
||||||
|
(wmi_roam_set_param_cmd_fixed_param));
|
||||||
|
cmd->vdev_id = roam_param->vdev_id;
|
||||||
|
cmd->param_id = roam_param->param_id;
|
||||||
|
cmd->param_value = roam_param->param_value;
|
||||||
|
wmi_debug("Setting vdev %d roam_param = %x, value = %u",
|
||||||
|
cmd->vdev_id, cmd->param_id, cmd->param_value);
|
||||||
|
wmi_mtrace(WMI_ROAM_SET_PARAM_CMDID, cmd->vdev_id, 0);
|
||||||
|
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
||||||
|
WMI_ROAM_SET_PARAM_CMDID);
|
||||||
|
if (QDF_IS_STATUS_ERROR(ret)) {
|
||||||
|
wmi_err("Failed to send roam set param command, ret = %d", ret);
|
||||||
|
wmi_buf_free(buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
static inline QDF_STATUS
|
static inline QDF_STATUS
|
||||||
extract_roam_trigger_stats_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
extract_roam_trigger_stats_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
||||||
@@ -16634,6 +16676,9 @@ struct wmi_ops tlv_ops = {
|
|||||||
.send_mgmt_rx_reo_filter_config_cmd =
|
.send_mgmt_rx_reo_filter_config_cmd =
|
||||||
send_mgmt_rx_reo_filter_config_cmd_tlv,
|
send_mgmt_rx_reo_filter_config_cmd_tlv,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||||
|
.send_roam_set_param_cmd = send_roam_set_param_cmd_tlv,
|
||||||
|
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
新增問題並參考
封鎖使用者