|
@@ -4124,6 +4124,7 @@ roam_control_policy[QCA_ATTR_ROAM_CONTROL_MAX + 1] = {
|
|
|
[QCA_ATTR_ROAM_CONTROL_CLEAR_ALL] = {.type = NLA_FLAG},
|
|
|
[QCA_ATTR_ROAM_CONTROL_TRIGGERS] = {.type = NLA_U32},
|
|
|
[QCA_ATTR_ROAM_CONTROL_SELECTION_CRITERIA] = {.type = NLA_NESTED},
|
|
|
+ [QCA_ATTR_ROAM_CONTROL_SCAN_PERIOD] = {.type = NLA_U32},
|
|
|
};
|
|
|
|
|
|
/**
|
|
@@ -4288,6 +4289,38 @@ hdd_send_roam_cand_sel_criteria_to_sme(struct hdd_context *hdd_ctx,
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * hdd_send_roam_scan_period_to_sme() - Send roam scan period to SME
|
|
|
+ * @hdd_ctx: HDD context
|
|
|
+ * @vdev_id: vdev id
|
|
|
+ * @roam_scan_period: Roam scan period in seconds
|
|
|
+ *
|
|
|
+ * Validate the roam scan period and send it to firmware if valid.
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS
|
|
|
+ */
|
|
|
+static QDF_STATUS
|
|
|
+hdd_send_roam_scan_period_to_sme(struct hdd_context *hdd_ctx,
|
|
|
+ uint8_t vdev_id,
|
|
|
+ uint32_t roam_scan_period)
|
|
|
+{
|
|
|
+ QDF_STATUS status;
|
|
|
+
|
|
|
+ if (!ucfg_mlme_validate_scan_period(roam_scan_period * 1000))
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+
|
|
|
+ hdd_debug("Received Command to Set roam scan period (Empty Scan refresh period) = %d",
|
|
|
+ roam_scan_period);
|
|
|
+
|
|
|
+ status = sme_update_empty_scan_refresh_period(hdd_ctx->mac_handle,
|
|
|
+ vdev_id,
|
|
|
+ roam_scan_period * 1000);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status))
|
|
|
+ hdd_err("Failed to set scan period");
|
|
|
+
|
|
|
+ return status;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* hdd_set_roam_with_control_config() - Set roam control configuration
|
|
|
* @hdd_ctx: HDD context
|
|
@@ -4373,6 +4406,15 @@ hdd_set_roam_with_control_config(struct hdd_context *hdd_ctx,
|
|
|
hdd_err("failed to set candidate selection criteria");
|
|
|
}
|
|
|
|
|
|
+ attr = tb2[QCA_ATTR_ROAM_CONTROL_SCAN_PERIOD];
|
|
|
+ if (attr) {
|
|
|
+ hdd_debug("Parse and send scan period to firmware");
|
|
|
+ status = hdd_send_roam_scan_period_to_sme(hdd_ctx, vdev_id,
|
|
|
+ nla_get_u32(attr));
|
|
|
+ if (QDF_IS_STATUS_ERROR(status))
|
|
|
+ hdd_err("failed to send scan period to firmware");
|
|
|
+ }
|
|
|
+
|
|
|
return qdf_status_to_os_return(status);
|
|
|
}
|
|
|
|