qcacld-3.0: Converge on struct rssi_monitor_param

The driver currently defines two different data structures to hold
Gateway Update parameters:
- legacy struct rssi_monitor_req
- unified WMI struct rssi_monitor_req

To align with the converged software architecture remove the legacy
definition and exclusively use the unified WMI definition.

Change-Id: Ia3336b68dac84ce8aeb53ea6d5be8b9f2e0f1736
CRs-Fixed: 2404088
Этот коммит содержится в:
Jeff Johnson
2019-02-22 20:49:56 -08:00
коммит произвёл nshrivas
родитель c71a922a10
Коммит 4c6d40f67d
7 изменённых файлов: 22 добавлений и 48 удалений

Просмотреть файл

@@ -60,7 +60,7 @@ __wlan_hdd_cfg80211_monitor_rssi(struct wiphy *wiphy,
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
struct nlattr *tb[PARAM_MAX + 1];
struct rssi_monitor_req req;
struct rssi_monitor_param req;
QDF_STATUS status;
int ret;
uint32_t control;
@@ -104,7 +104,7 @@ __wlan_hdd_cfg80211_monitor_rssi(struct wiphy *wiphy,
}
req.request_id = nla_get_u32(tb[PARAM_REQUEST_ID]);
req.session_id = adapter->vdev_id;
req.vdev_id = adapter->vdev_id;
control = nla_get_u32(tb[PARAM_CONTROL]);
if (control == QCA_WLAN_RSSI_MONITORING_START) {
@@ -136,8 +136,8 @@ __wlan_hdd_cfg80211_monitor_rssi(struct wiphy *wiphy,
hdd_err("Invalid control cmd: %d", control);
return -EINVAL;
}
hdd_debug("Request Id: %u Session_id: %d Control: %d",
req.request_id, req.session_id, req.control);
hdd_debug("Request Id: %u vdev id: %d Control: %d",
req.request_id, req.vdev_id, req.control);
mac_handle = hdd_ctx->mac_handle;
status = sme_set_rssi_monitoring(mac_handle, &req);

Просмотреть файл

@@ -4380,22 +4380,6 @@ struct sir_guard_time_request {
/* Max number of rates allowed in Supported Rates IE */
#define MAX_NUM_SUPPORTED_RATES (8)
/*
* struct rssi_monitor_req - rssi monitoring
* @request_id: request id
* @session_id: session id
* @min_rssi: minimum rssi
* @max_rssi: maximum rssi
* @control: flag to indicate start or stop
*/
struct rssi_monitor_req {
uint32_t request_id;
uint32_t session_id;
int8_t min_rssi;
int8_t max_rssi;
bool control;
};
/**
* struct rssi_breach_event - rssi breached event structure
* @request_id: request id

Просмотреть файл

@@ -1399,7 +1399,7 @@ QDF_STATUS sme_disable_uapsd_for_ac(uint8_t sta_id,
#ifdef FEATURE_RSSI_MONITOR
QDF_STATUS sme_set_rssi_monitoring(mac_handle_t mac_handle,
struct rssi_monitor_req *input);
struct rssi_monitor_param *input);
/**
* sme_set_rssi_threshold_breached_cb() - Set RSSI threshold breached callback

Просмотреть файл

@@ -11692,12 +11692,12 @@ QDF_STATUS sme_set_chip_pwr_save_fail_cb(mac_handle_t mac_handle,
* Return: QDF_STATUS enumeration
*/
QDF_STATUS sme_set_rssi_monitoring(mac_handle_t mac_handle,
struct rssi_monitor_req *input)
struct rssi_monitor_param *input)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
struct mac_context *mac = MAC_CONTEXT(mac_handle);
struct scheduler_msg message = {0};
struct rssi_monitor_req *req_msg;
struct rssi_monitor_param *req_msg;
SME_ENTER();
req_msg = qdf_mem_malloc(sizeof(*req_msg));

Просмотреть файл

@@ -1704,12 +1704,22 @@ void wma_send_flush_logs_to_fw(tp_wma_handle wma_handle);
void wma_log_completion_timeout(void *data);
#ifdef FEATURE_RSSI_MONITOR
/**
* wma_set_rssi_monitoring() - set rssi monitoring
* @handle: WMA handle
* @req: rssi monitoring request structure
*
* This function takes the incoming @req and sends it down to the
* firmware
*
* Return: QDF_STATUS
*/
QDF_STATUS wma_set_rssi_monitoring(tp_wma_handle wma,
struct rssi_monitor_req *req);
struct rssi_monitor_param *req);
#else /* FEATURE_RSSI_MONITOR */
static inline
QDF_STATUS wma_set_rssi_monitoring(tp_wma_handle wma,
struct rssi_monitor_req *req)
struct rssi_monitor_param *req)
{
return QDF_STATUS_SUCCESS;
}

Просмотреть файл

@@ -8739,8 +8739,7 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
/* Body ptr is NULL here */
break;
case WMA_SET_RSSI_MONITOR_REQ:
wma_set_rssi_monitoring(wma_handle,
(struct rssi_monitor_req *)msg->bodyptr);
wma_set_rssi_monitoring(wma_handle, msg->bodyptr);
qdf_mem_free(msg->bodyptr);
break;
case SIR_HAL_PDEV_SET_PCL_TO_FW:

Просмотреть файл

@@ -2932,34 +2932,15 @@ void wma_set_ric_req(tp_wma_handle wma, void *msg, uint8_t is_add_ts)
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
#ifdef FEATURE_RSSI_MONITOR
/**
* wma_set_rssi_monitoring() - set rssi monitoring
* @handle: WMA handle
* @req: rssi monitoring request structure
*
* This function reads the incoming @req and fill in the destination
* WMI structure and send down the rssi monitoring configs down to the firmware
*
* Return: 0 on success; error number otherwise
*/
QDF_STATUS wma_set_rssi_monitoring(tp_wma_handle wma,
struct rssi_monitor_req *req)
struct rssi_monitor_param *req)
{
struct rssi_monitor_param params = {0};
if (!wma) {
WMA_LOGE("%s: wma handle is NULL", __func__);
return QDF_STATUS_E_INVAL;
}
params.request_id = req->request_id;
params.vdev_id = req->session_id;
params.min_rssi = req->min_rssi;
params.max_rssi = req->max_rssi;
params.control = req->control;
return wmi_unified_set_rssi_monitoring_cmd(wma->wmi_handle,
&params);
return wmi_unified_set_rssi_monitoring_cmd(wma->wmi_handle, req);
}
/**