|
@@ -4117,6 +4117,7 @@ roam_control_policy[QCA_ATTR_ROAM_CONTROL_MAX + 1] = {
|
|
|
[QCA_ATTR_ROAM_CONTROL_ENABLE] = {.type = NLA_U8},
|
|
|
[PARAM_FREQ_LIST_SCHEME] = {.type = NLA_NESTED},
|
|
|
[QCA_ATTR_ROAM_CONTROL_FULL_SCAN_PERIOD] = {.type = NLA_U32},
|
|
|
+ [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},
|
|
|
};
|
|
@@ -4370,6 +4371,68 @@ hdd_set_roam_with_control_config(struct hdd_context *hdd_ctx,
|
|
|
return qdf_status_to_os_return(status);
|
|
|
}
|
|
|
|
|
|
+#define ENABLE_ROAM_TRIGGERS_ALL (QCA_ROAM_TRIGGER_REASON_PER | \
|
|
|
+ QCA_ROAM_TRIGGER_REASON_BEACON_MISS | \
|
|
|
+ QCA_ROAM_TRIGGER_REASON_POOR_RSSI | \
|
|
|
+ QCA_ROAM_TRIGGER_REASON_BETTER_RSSI | \
|
|
|
+ QCA_ROAM_TRIGGER_REASON_PERIODIC | \
|
|
|
+ QCA_ROAM_TRIGGER_REASON_DENSE | \
|
|
|
+ QCA_ROAM_TRIGGER_REASON_BTM | \
|
|
|
+ QCA_ROAM_TRIGGER_REASON_BSS_LOAD)
|
|
|
+
|
|
|
+static int
|
|
|
+hdd_clear_roam_control_config(struct hdd_context *hdd_ctx,
|
|
|
+ struct nlattr **tb,
|
|
|
+ uint8_t vdev_id)
|
|
|
+{
|
|
|
+ QDF_STATUS status;
|
|
|
+ struct nlattr *tb2[QCA_ATTR_ROAM_CONTROL_MAX + 1];
|
|
|
+ mac_handle_t mac_handle = hdd_ctx->mac_handle;
|
|
|
+
|
|
|
+ /* The command must carry PARAM_ROAM_CONTROL_CONFIG */
|
|
|
+ if (!tb[PARAM_ROAM_CONTROL_CONFIG]) {
|
|
|
+ hdd_err("Attribute CONTROL_CONFIG is not present");
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (wlan_cfg80211_nla_parse_nested(tb2, QCA_ATTR_ROAM_CONTROL_MAX,
|
|
|
+ tb[PARAM_ROAM_CONTROL_CONFIG],
|
|
|
+ roam_control_policy)) {
|
|
|
+ hdd_err("nla_parse failed");
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ hdd_debug("Clear the control config done through SET");
|
|
|
+ if (tb2[QCA_ATTR_ROAM_CONTROL_CLEAR_ALL]) {
|
|
|
+ hdd_debug("Disable roam control config done through SET");
|
|
|
+ status = sme_set_roam_config_enable(hdd_ctx->mac_handle,
|
|
|
+ vdev_id, 0);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ hdd_err("failed to enable/disable roam control config");
|
|
|
+ return qdf_status_to_os_return(status);
|
|
|
+ }
|
|
|
+
|
|
|
+ hdd_debug("Reset roam trigger bitmap to 0x%x",
|
|
|
+ ENABLE_ROAM_TRIGGERS_ALL);
|
|
|
+ status = hdd_send_roam_triggers_to_sme(hdd_ctx,
|
|
|
+ ENABLE_ROAM_TRIGGERS_ALL,
|
|
|
+ vdev_id);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ hdd_err("failed to restore roam trigger bitmap");
|
|
|
+ return qdf_status_to_os_return(status);
|
|
|
+ }
|
|
|
+
|
|
|
+ status = sme_roam_control_restore_default_config(mac_handle,
|
|
|
+ vdev_id);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ hdd_err("failed to config roam control");
|
|
|
+ return qdf_status_to_os_return(status);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
#undef PARAM_ROAM_CONTROL_CONFIG
|
|
|
#undef PARAM_FREQ_LIST_SCHEME_MAX
|
|
|
#undef PARAM_FREQ_LIST_SCHEME
|
|
@@ -4522,6 +4585,11 @@ static int hdd_set_ext_roam_params(struct hdd_context *hdd_ctx,
|
|
|
if (ret)
|
|
|
goto fail;
|
|
|
break;
|
|
|
+ case QCA_WLAN_VENDOR_ROAMING_SUBCMD_CONTROL_CLEAR:
|
|
|
+ ret = hdd_clear_roam_control_config(hdd_ctx, tb, vdev_id);
|
|
|
+ if (ret)
|
|
|
+ goto fail;
|
|
|
+ break;
|
|
|
}
|
|
|
|
|
|
return 0;
|