|
@@ -13123,6 +13123,71 @@ error:
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * send_per_roam_config_cmd_tlv() - set per roaming config to FW
|
|
|
+ * @wmi_handle: wmi handle
|
|
|
+ * @req_buf: per roam config buffer
|
|
|
+ *
|
|
|
+ * Return: QDF status
|
|
|
+ */
|
|
|
+static QDF_STATUS send_per_roam_config_cmd_tlv(wmi_unified_t wmi_handle,
|
|
|
+ struct wmi_per_roam_config_req *req_buf)
|
|
|
+{
|
|
|
+ wmi_buf_t buf = NULL;
|
|
|
+ QDF_STATUS status;
|
|
|
+ int len;
|
|
|
+ uint8_t *buf_ptr;
|
|
|
+ wmi_roam_per_config_fixed_param *wmi_per_config;
|
|
|
+
|
|
|
+ len = sizeof(wmi_roam_per_config_fixed_param);
|
|
|
+ buf = wmi_buf_alloc(wmi_handle, len);
|
|
|
+ if (!buf) {
|
|
|
+ WMI_LOGE("%s : wmi_buf_alloc failed", __func__);
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
+ }
|
|
|
+
|
|
|
+ buf_ptr = (uint8_t *) wmi_buf_data(buf);
|
|
|
+ wmi_per_config =
|
|
|
+ (wmi_roam_per_config_fixed_param *) buf_ptr;
|
|
|
+ WMITLV_SET_HDR(&wmi_per_config->tlv_header,
|
|
|
+ WMITLV_TAG_STRUC_wmi_roam_per_config_fixed_param,
|
|
|
+ WMITLV_GET_STRUCT_TLVLEN
|
|
|
+ (wmi_roam_per_config_fixed_param));
|
|
|
+
|
|
|
+ /* fill in per roam config values */
|
|
|
+ wmi_per_config->vdev_id = req_buf->vdev_id;
|
|
|
+ if (req_buf->per_config.enable) {
|
|
|
+ /* Enable for both Tx and Rx*/
|
|
|
+ req_buf->per_config.enable = 3;
|
|
|
+ }
|
|
|
+
|
|
|
+ wmi_per_config->enable = req_buf->per_config.enable;
|
|
|
+ wmi_per_config->high_rate_thresh =
|
|
|
+ (req_buf->per_config.tx_high_rate_thresh << 16) |
|
|
|
+ (req_buf->per_config.rx_high_rate_thresh & 0x0000ffff);
|
|
|
+ wmi_per_config->low_rate_thresh =
|
|
|
+ (req_buf->per_config.tx_low_rate_thresh << 16) |
|
|
|
+ (req_buf->per_config.rx_low_rate_thresh & 0x0000ffff);
|
|
|
+ wmi_per_config->pkt_err_rate_thresh_pct =
|
|
|
+ (req_buf->per_config.tx_rate_thresh_percnt << 16) |
|
|
|
+ (req_buf->per_config.rx_rate_thresh_percnt & 0x0000ffff);
|
|
|
+ wmi_per_config->per_rest_time = req_buf->per_config.per_rest_time;
|
|
|
+
|
|
|
+ /* Send per roam config parameters */
|
|
|
+ status = wmi_unified_cmd_send(wmi_handle, buf,
|
|
|
+ len, WMI_ROAM_PER_CONFIG_CMDID);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ WMI_LOGE("WMI_ROAM_PER_CONFIG_CMDID failed, Error %d",
|
|
|
+ status);
|
|
|
+ wmi_buf_free(buf);
|
|
|
+ return status;
|
|
|
+ }
|
|
|
+
|
|
|
+ WMI_LOGI(FL("per roam enable=%d, vdev=%d"),
|
|
|
+ req_buf->per_config.enable, req_buf->vdev_id);
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* send_roam_scan_offload_rssi_change_cmd_tlv() - set roam offload RSSI th
|
|
|
* @wmi_handle: wmi handle
|
|
@@ -15919,6 +15984,7 @@ struct wmi_ops tlv_ops = {
|
|
|
.extract_peer_sta_ps_statechange_ev =
|
|
|
extract_peer_sta_ps_statechange_ev_tlv,
|
|
|
.extract_inst_rssi_stats_event = extract_inst_rssi_stats_event_tlv,
|
|
|
+ .send_per_roam_config_cmd = send_per_roam_config_cmd_tlv,
|
|
|
};
|
|
|
|
|
|
#ifndef CONFIG_MCL
|