|
@@ -4477,6 +4477,52 @@ hdd_send_roam_full_scan_period_to_sme(struct hdd_context *hdd_ctx,
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * wlan_hdd_convert_control_roam_trigger_reason_bitmap - Convert the
|
|
|
+ * vendor specific reason code to internal reason code.
|
|
|
+ * @trigger_reason_bitmap: Vendor specific roam trigger bitmap
|
|
|
+ *
|
|
|
+ * Return: Internal roam trigger bitmap
|
|
|
+ */
|
|
|
+static uint32_t
|
|
|
+wlan_hdd_convert_control_roam_trigger_bitmap(uint32_t trigger_reason_bitmap)
|
|
|
+{
|
|
|
+ uint32_t drv_trigger_bitmap = 0, all_bitmap;
|
|
|
+
|
|
|
+ /* Enable the complete trigger bitmap when all bits are set in
|
|
|
+ * the control config bitmap
|
|
|
+ */
|
|
|
+ all_bitmap = (QCA_ROAM_TRIGGER_REASON_BSS_LOAD << 1) - 1;
|
|
|
+ if (trigger_reason_bitmap == all_bitmap)
|
|
|
+ return BIT(ROAM_TRIGGER_REASON_MAX) - 1;
|
|
|
+
|
|
|
+ if (trigger_reason_bitmap & QCA_ROAM_TRIGGER_REASON_PER)
|
|
|
+ drv_trigger_bitmap |= BIT(ROAM_TRIGGER_REASON_PER);
|
|
|
+
|
|
|
+ if (trigger_reason_bitmap & QCA_ROAM_TRIGGER_REASON_BEACON_MISS)
|
|
|
+ drv_trigger_bitmap |= BIT(ROAM_TRIGGER_REASON_BMISS);
|
|
|
+
|
|
|
+ if (trigger_reason_bitmap & QCA_ROAM_TRIGGER_REASON_POOR_RSSI)
|
|
|
+ drv_trigger_bitmap |= BIT(ROAM_TRIGGER_REASON_LOW_RSSI);
|
|
|
+
|
|
|
+ if (trigger_reason_bitmap & QCA_ROAM_TRIGGER_REASON_BETTER_RSSI)
|
|
|
+ drv_trigger_bitmap |= BIT(ROAM_TRIGGER_REASON_HIGH_RSSI);
|
|
|
+
|
|
|
+ if (trigger_reason_bitmap & QCA_ROAM_TRIGGER_REASON_PERIODIC)
|
|
|
+ drv_trigger_bitmap |= BIT(ROAM_TRIGGER_REASON_PERIODIC);
|
|
|
+
|
|
|
+ if (trigger_reason_bitmap & QCA_ROAM_TRIGGER_REASON_DENSE)
|
|
|
+ drv_trigger_bitmap |= BIT(ROAM_TRIGGER_REASON_DENSE);
|
|
|
+
|
|
|
+ if (trigger_reason_bitmap & QCA_ROAM_TRIGGER_REASON_BTM)
|
|
|
+ drv_trigger_bitmap |= BIT(ROAM_TRIGGER_REASON_BTM);
|
|
|
+
|
|
|
+ if (trigger_reason_bitmap & QCA_ROAM_TRIGGER_REASON_BSS_LOAD)
|
|
|
+ drv_trigger_bitmap |= BIT(ROAM_TRIGGER_REASON_BSS_LOAD);
|
|
|
+
|
|
|
+ return drv_trigger_bitmap;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* hdd_send_roam_triggers_to_sme() - Send roam trigger bitmap to SME
|
|
|
* @hdd_ctx: HDD context
|
|
@@ -4525,7 +4571,8 @@ hdd_send_roam_triggers_to_sme(struct hdd_context *hdd_ctx,
|
|
|
}
|
|
|
|
|
|
triggers.vdev_id = vdev_id;
|
|
|
- triggers.trigger_bitmap = roam_trigger_bitmap;
|
|
|
+ triggers.trigger_bitmap =
|
|
|
+ wlan_hdd_convert_control_roam_trigger_bitmap(roam_trigger_bitmap);
|
|
|
|
|
|
status = sme_set_roam_triggers(hdd_ctx->mac_handle, &triggers);
|
|
|
if (QDF_IS_STATUS_ERROR(status))
|