|
@@ -6647,50 +6647,46 @@ QDF_STATUS sme_set_roam_bmiss_final_bcnt(mac_handle_t mac_handle,
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
-/*
|
|
|
- * sme_set_neighbor_lookup_rssi_threshold() - update neighbor lookup
|
|
|
- * rssi threshold
|
|
|
- * This is a synchronous call
|
|
|
- *
|
|
|
- * mac_handle - The handle returned by mac_open.
|
|
|
- * sessionId - Session Identifier
|
|
|
- * Return QDF_STATUS_SUCCESS - SME update config successful.
|
|
|
- * Other status means SME is failed to update
|
|
|
- */
|
|
|
-QDF_STATUS sme_set_neighbor_lookup_rssi_threshold(mac_handle_t mac_handle,
|
|
|
- uint8_t sessionId, uint8_t neighborLookupRssiThreshold)
|
|
|
+QDF_STATUS
|
|
|
+sme_set_neighbor_lookup_rssi_threshold(mac_handle_t mac_handle,
|
|
|
+ uint8_t vdev_id,
|
|
|
+ uint8_t neighbor_lookup_rssi_threshold)
|
|
|
{
|
|
|
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
|
|
- QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
+ QDF_STATUS status;
|
|
|
|
|
|
- status = sme_acquire_global_lock(&mac->sme);
|
|
|
- if (QDF_IS_STATUS_SUCCESS(status)) {
|
|
|
- status = csr_neighbor_roam_update_config(mac,
|
|
|
- sessionId, neighborLookupRssiThreshold,
|
|
|
- REASON_LOOKUP_THRESH_CHANGED);
|
|
|
- if (QDF_IS_STATUS_SUCCESS(status)) {
|
|
|
- mac->mlme_cfg->lfr.neighbor_lookup_rssi_threshold =
|
|
|
- neighborLookupRssiThreshold;
|
|
|
- }
|
|
|
- sme_release_global_lock(&mac->sme);
|
|
|
+ if (vdev_id >= WLAN_MAX_VDEVS) {
|
|
|
+ sme_err("Invalid vdev_id: %u", vdev_id);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
}
|
|
|
+
|
|
|
+ status = sme_acquire_global_lock(&mac->sme);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status))
|
|
|
+ return status;
|
|
|
+ csr_neighbor_roam_update_config(mac, vdev_id,
|
|
|
+ neighbor_lookup_rssi_threshold,
|
|
|
+ REASON_LOOKUP_THRESH_CHANGED);
|
|
|
+ sme_release_global_lock(&mac->sme);
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
-/*
|
|
|
- * sme_get_neighbor_lookup_rssi_threshold() - get neighbor lookup
|
|
|
- * rssi threshold
|
|
|
- * This is a synchronous call
|
|
|
- *
|
|
|
- * mac_handle - The handle returned by mac_open.
|
|
|
- * Return QDF_STATUS_SUCCESS - SME update config successful.
|
|
|
- * Other status means SME is failed to update
|
|
|
- */
|
|
|
-uint8_t sme_get_neighbor_lookup_rssi_threshold(mac_handle_t mac_handle)
|
|
|
+QDF_STATUS sme_get_neighbor_lookup_rssi_threshold(mac_handle_t mac_handle,
|
|
|
+ uint8_t vdev_id,
|
|
|
+ uint8_t *lookup_threshold)
|
|
|
{
|
|
|
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
|
|
+ tCsrNeighborRoamControlInfo *neighbor_roam_info;
|
|
|
+
|
|
|
+ if (vdev_id >= WLAN_MAX_VDEVS) {
|
|
|
+ sme_err("Invalid vdev_id: %d", vdev_id);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+ neighbor_roam_info = &mac->roam.neighborRoamInfo[vdev_id];
|
|
|
|
|
|
- return mac->mlme_cfg->lfr.neighbor_lookup_rssi_threshold;
|
|
|
+ *lookup_threshold =
|
|
|
+ neighbor_roam_info->cfgParams.neighborLookupThreshold;
|
|
|
+
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
/*
|