|
@@ -71,7 +71,8 @@
|
|
|
|
|
|
#define MEDIUM_ASSESS_TIMER_INTERVAL 1000 /* 1000ms */
|
|
#define MEDIUM_ASSESS_TIMER_INTERVAL 1000 /* 1000ms */
|
|
static qdf_mc_timer_t hdd_medium_assess_timer;
|
|
static qdf_mc_timer_t hdd_medium_assess_timer;
|
|
-static uint8_t timer_enable, ssr_flag;
|
|
|
|
|
|
+static bool ssr_flag;
|
|
|
|
+static bool timer_enable;
|
|
struct hdd_medium_assess_info medium_assess_info[WLAN_UMAC_MAX_RP_PID];
|
|
struct hdd_medium_assess_info medium_assess_info[WLAN_UMAC_MAX_RP_PID];
|
|
unsigned long stime;
|
|
unsigned long stime;
|
|
|
|
|
|
@@ -377,9 +378,12 @@ void hdd_medium_assess_ssr_enable_flag(void)
|
|
{
|
|
{
|
|
uint8_t i;
|
|
uint8_t i;
|
|
|
|
|
|
- ssr_flag = 1;
|
|
|
|
|
|
+ ssr_flag = true;
|
|
for (i = 0; i < WLAN_UMAC_MAX_RP_PID; i++)
|
|
for (i = 0; i < WLAN_UMAC_MAX_RP_PID; i++)
|
|
hdd_congestion_reset_data(i);
|
|
hdd_congestion_reset_data(i);
|
|
|
|
+
|
|
|
|
+ if (timer_enable)
|
|
|
|
+ qdf_mc_timer_destroy(&hdd_medium_assess_timer);
|
|
}
|
|
}
|
|
|
|
|
|
void hdd_medium_assess_stop_timer(uint8_t pdev_id, struct hdd_context *hdd_ctx)
|
|
void hdd_medium_assess_stop_timer(uint8_t pdev_id, struct hdd_context *hdd_ctx)
|
|
@@ -409,6 +413,167 @@ void hdd_medium_assess_stop_timer(uint8_t pdev_id, struct hdd_context *hdd_ctx)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * hdd_congestion_notification_calculation() - medium assess congestion
|
|
|
|
+ * calculation.
|
|
|
|
+ * @info: structure hdd_medium_assess_info
|
|
|
|
+ *
|
|
|
|
+ * Return: None
|
|
|
|
+ */
|
|
|
|
+static void
|
|
|
|
+hdd_congestion_notification_calculation(struct hdd_medium_assess_info *info)
|
|
|
|
+{
|
|
|
|
+ struct medium_assess_data *h_data, *t_data;
|
|
|
|
+ int32_t h_index, t_index;
|
|
|
|
+ uint32_t rx_clear_count_delta, tx_frame_count_delta;
|
|
|
|
+ uint32_t cycle_count_delta, my_rx_count_delta;
|
|
|
|
+ uint32_t congestion = 0;
|
|
|
|
+ uint64_t diff;
|
|
|
|
+
|
|
|
|
+ h_index = info->index - 1;
|
|
|
|
+ if (h_index < 0)
|
|
|
|
+ h_index = MEDIUM_ASSESS_NUM - 1;
|
|
|
|
+
|
|
|
|
+ if (h_index >= info->config.interval)
|
|
|
|
+ t_index = h_index - info->config.interval;
|
|
|
|
+ else
|
|
|
|
+ t_index = MEDIUM_ASSESS_NUM - info->config.interval - h_index;
|
|
|
|
+
|
|
|
|
+ if (h_index < 0 || h_index >= MEDIUM_ASSESS_NUM ||
|
|
|
|
+ t_index < 0 || t_index >= MEDIUM_ASSESS_NUM) {
|
|
|
|
+ hdd_err("medium assess index is not valid.");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ h_data = &info->data[h_index];
|
|
|
|
+ t_data = &info->data[t_index];
|
|
|
|
+
|
|
|
|
+ if (!(h_data->part1_valid || h_data->part2_valid ||
|
|
|
|
+ t_data->part1_valid || t_data->part2_valid)) {
|
|
|
|
+ hdd_err("medium assess data is not valid.");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (h_data->rx_clear_count >= t_data->rx_clear_count) {
|
|
|
|
+ rx_clear_count_delta = h_data->rx_clear_count -
|
|
|
|
+ t_data->rx_clear_count;
|
|
|
|
+ } else {
|
|
|
|
+ rx_clear_count_delta = U32_MAX - t_data->rx_clear_count;
|
|
|
|
+ rx_clear_count_delta += h_data->rx_clear_count;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (h_data->tx_frame_count >= t_data->tx_frame_count) {
|
|
|
|
+ tx_frame_count_delta = h_data->tx_frame_count -
|
|
|
|
+ t_data->tx_frame_count;
|
|
|
|
+ } else {
|
|
|
|
+ tx_frame_count_delta = U32_MAX - t_data->tx_frame_count;
|
|
|
|
+ tx_frame_count_delta += h_data->tx_frame_count;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (h_data->my_rx_count >= t_data->my_rx_count) {
|
|
|
|
+ my_rx_count_delta = h_data->my_rx_count - t_data->my_rx_count;
|
|
|
|
+ } else {
|
|
|
|
+ my_rx_count_delta = U32_MAX - t_data->my_rx_count;
|
|
|
|
+ my_rx_count_delta += h_data->my_rx_count;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (h_data->cycle_count >= t_data->cycle_count) {
|
|
|
|
+ cycle_count_delta = h_data->cycle_count - t_data->cycle_count;
|
|
|
|
+ } else {
|
|
|
|
+ cycle_count_delta = U32_MAX - t_data->cycle_count;
|
|
|
|
+ cycle_count_delta += h_data->cycle_count;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (rx_clear_count_delta > tx_frame_count_delta &&
|
|
|
|
+ rx_clear_count_delta - tx_frame_count_delta > my_rx_count_delta) {
|
|
|
|
+ diff = rx_clear_count_delta - tx_frame_count_delta
|
|
|
|
+ - my_rx_count_delta;
|
|
|
|
+ if (cycle_count_delta)
|
|
|
|
+ congestion = qdf_do_div(diff * 100, cycle_count_delta);
|
|
|
|
+
|
|
|
|
+ if (congestion > 100)
|
|
|
|
+ congestion = 100;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ hdd_debug("pdev: %d, rx_c %u, tx %u myrx %u cycle %u congestion: %u",
|
|
|
|
+ info->pdev_id, rx_clear_count_delta, tx_frame_count_delta,
|
|
|
|
+ my_rx_count_delta, cycle_count_delta, congestion);
|
|
|
|
+ if (congestion >= info->config.threshold)
|
|
|
|
+ hdd_congestion_notification_report(info->vdev_id, congestion);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * hdd_congestion_notification_report_multi() - medium assess report
|
|
|
|
+ * multi interface.
|
|
|
|
+ * @pdev_id: pdev id
|
|
|
|
+ *
|
|
|
|
+ * Return: None
|
|
|
|
+ */
|
|
|
|
+static void hdd_congestion_notification_report_multi(uint8_t pdev_id)
|
|
|
|
+{
|
|
|
|
+ struct hdd_medium_assess_info *info;
|
|
|
|
+
|
|
|
|
+ info = &medium_assess_info[pdev_id];
|
|
|
|
+ info->count++;
|
|
|
|
+ if (info->count % info->config.interval == 0)
|
|
|
|
+ hdd_congestion_notification_calculation(info);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * hdd_medium_assess_expire_handler() - timer callback
|
|
|
|
+ * @arg: argument
|
|
|
|
+ *
|
|
|
|
+ * Return: None
|
|
|
|
+ */
|
|
|
|
+static void hdd_medium_assess_expire_handler(void *arg)
|
|
|
|
+{
|
|
|
|
+ struct wlan_objmgr_vdev *vdev;
|
|
|
|
+ struct request_info info = {0};
|
|
|
|
+ struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
|
|
|
+ struct wlan_hdd_link_info *link_info;
|
|
|
|
+ uint8_t vdev_id = INVALID_VDEV_ID, pdev_id;
|
|
|
|
+ uint8_t index, i;
|
|
|
|
+
|
|
|
|
+ if (wlan_hdd_validate_context(hdd_ctx))
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ for (i = 0; i < WLAN_UMAC_MAX_RP_PID; i++)
|
|
|
|
+ if (medium_assess_info[i].config.interval != 0) {
|
|
|
|
+ vdev_id = medium_assess_info[i].vdev_id;
|
|
|
|
+ pdev_id = medium_assess_info[i].pdev_id;
|
|
|
|
+ hdd_congestion_notification_report_multi(pdev_id);
|
|
|
|
+
|
|
|
|
+ /* ensure events are reveived at the 'same' time */
|
|
|
|
+ index = medium_assess_info[i].index;
|
|
|
|
+ medium_assess_info[i].data[index].part1_valid = false;
|
|
|
|
+ medium_assess_info[i].data[index].part2_valid = false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (vdev_id == INVALID_VDEV_ID)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ link_info = hdd_get_link_info_by_vdev(hdd_ctx, vdev_id);
|
|
|
|
+ if (!link_info) {
|
|
|
|
+ hdd_err("Failed to find adapter of vdev %d", vdev_id);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ vdev = hdd_objmgr_get_vdev_by_user(link_info, WLAN_CP_STATS_ID);
|
|
|
|
+ if (!vdev)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ info.vdev_id = vdev_id;
|
|
|
|
+ info.pdev_id = WMI_HOST_PDEV_ID_SOC;
|
|
|
|
+ info.u.congestion_notif_cb = hdd_congestion_notification_cb;
|
|
|
|
+ stime = jiffies + msecs_to_jiffies(40);
|
|
|
|
+ ucfg_mc_cp_stats_send_stats_request(vdev,
|
|
|
|
+ TYPE_CONGESTION_STATS,
|
|
|
|
+ &info);
|
|
|
|
+ hdd_objmgr_put_vdev_by_user(vdev, WLAN_CP_STATS_ID);
|
|
|
|
+ qdf_mc_timer_start(&hdd_medium_assess_timer,
|
|
|
|
+ MEDIUM_ASSESS_TIMER_INTERVAL);
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* hdd_medium_assess_congestion_report() - congestion report
|
|
* hdd_medium_assess_congestion_report() - congestion report
|
|
* @hdd_ctx: pointer to HDD context
|
|
* @hdd_ctx: pointer to HDD context
|
|
@@ -453,6 +618,12 @@ static int hdd_medium_assess_congestion_report(struct hdd_context *hdd_ctx,
|
|
hdd_debug("medium assess disable: pdev_id %d, vdev_id: %d",
|
|
hdd_debug("medium assess disable: pdev_id %d, vdev_id: %d",
|
|
pdev_id, vdev_id);
|
|
pdev_id, vdev_id);
|
|
hdd_medium_assess_stop_timer(pdev_id, hdd_ctx);
|
|
hdd_medium_assess_stop_timer(pdev_id, hdd_ctx);
|
|
|
|
+ if (timer_enable &&
|
|
|
|
+ (qdf_mc_timer_get_current_state(&hdd_medium_assess_timer) ==
|
|
|
|
+ QDF_TIMER_STATE_STOPPED)) {
|
|
|
|
+ qdf_mc_timer_destroy(&hdd_medium_assess_timer);
|
|
|
|
+ timer_enable = false;
|
|
|
|
+ }
|
|
break;
|
|
break;
|
|
case REPORT_ENABLE:
|
|
case REPORT_ENABLE:
|
|
if (!tb[CONGESTION_REPORT_THRESHOLD]) {
|
|
if (!tb[CONGESTION_REPORT_THRESHOLD]) {
|
|
@@ -482,8 +653,22 @@ static int hdd_medium_assess_congestion_report(struct hdd_context *hdd_ctx,
|
|
hdd_debug("medium assess enable: pdev_id %d, vdev_id: %d",
|
|
hdd_debug("medium assess enable: pdev_id %d, vdev_id: %d",
|
|
pdev_id, vdev_id);
|
|
pdev_id, vdev_id);
|
|
|
|
|
|
- if (qdf_mc_timer_get_current_state(&hdd_medium_assess_timer) ==
|
|
|
|
- QDF_TIMER_STATE_STOPPED) {
|
|
|
|
|
|
+ if (!timer_enable) {
|
|
|
|
+ status =
|
|
|
|
+ qdf_mc_timer_init(&hdd_medium_assess_timer,
|
|
|
|
+ QDF_TIMER_TYPE_SW,
|
|
|
|
+ hdd_medium_assess_expire_handler,
|
|
|
|
+ NULL);
|
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
|
+ hdd_debug("medium assess init timer failed");
|
|
|
|
+ errno = -EINVAL;
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
|
|
+ timer_enable = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (qdf_mc_timer_get_current_state(&hdd_medium_assess_timer) !=
|
|
|
|
+ QDF_TIMER_STATE_RUNNING) {
|
|
hdd_debug("medium assess atimer start");
|
|
hdd_debug("medium assess atimer start");
|
|
qdf_mc_timer_start(&hdd_medium_assess_timer,
|
|
qdf_mc_timer_start(&hdd_medium_assess_timer,
|
|
MEDIUM_ASSESS_TIMER_INTERVAL);
|
|
MEDIUM_ASSESS_TIMER_INTERVAL);
|
|
@@ -584,200 +769,23 @@ int hdd_cfg80211_medium_assess(struct wiphy *wiphy,
|
|
return errno;
|
|
return errno;
|
|
}
|
|
}
|
|
|
|
|
|
-/**
|
|
|
|
- * hdd_congestion_notification_calculation() - medium assess congestion
|
|
|
|
- * calculation.
|
|
|
|
- * @info: structure hdd_medium_assess_info
|
|
|
|
- *
|
|
|
|
- * Return: None
|
|
|
|
- */
|
|
|
|
-static void
|
|
|
|
-hdd_congestion_notification_calculation(struct hdd_medium_assess_info *info)
|
|
|
|
-{
|
|
|
|
- struct medium_assess_data *h_data, *t_data;
|
|
|
|
- int32_t h_index, t_index;
|
|
|
|
- uint32_t rx_clear_count_delta, tx_frame_count_delta;
|
|
|
|
- uint32_t cycle_count_delta, my_rx_count_delta;
|
|
|
|
- uint32_t congestion = 0;
|
|
|
|
- uint64_t diff;
|
|
|
|
-
|
|
|
|
- h_index = info->index - 1;
|
|
|
|
- if (h_index < 0)
|
|
|
|
- h_index = MEDIUM_ASSESS_NUM - 1;
|
|
|
|
-
|
|
|
|
- if (h_index >= info->config.interval)
|
|
|
|
- t_index = h_index - info->config.interval;
|
|
|
|
- else
|
|
|
|
- t_index = MEDIUM_ASSESS_NUM - info->config.interval - h_index;
|
|
|
|
-
|
|
|
|
- if (h_index < 0 || h_index >= MEDIUM_ASSESS_NUM ||
|
|
|
|
- t_index < 0 || t_index >= MEDIUM_ASSESS_NUM) {
|
|
|
|
- hdd_err("medium assess index is not valid.");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- h_data = &info->data[h_index];
|
|
|
|
- t_data = &info->data[t_index];
|
|
|
|
-
|
|
|
|
- if (!(h_data->part1_valid || h_data->part2_valid ||
|
|
|
|
- t_data->part1_valid || t_data->part2_valid)) {
|
|
|
|
- hdd_err("medium assess data is not valid.");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (h_data->rx_clear_count >= t_data->rx_clear_count) {
|
|
|
|
- rx_clear_count_delta = h_data->rx_clear_count -
|
|
|
|
- t_data->rx_clear_count;
|
|
|
|
- } else {
|
|
|
|
- rx_clear_count_delta = U32_MAX - t_data->rx_clear_count;
|
|
|
|
- rx_clear_count_delta += h_data->rx_clear_count;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (h_data->tx_frame_count >= t_data->tx_frame_count) {
|
|
|
|
- tx_frame_count_delta = h_data->tx_frame_count -
|
|
|
|
- t_data->tx_frame_count;
|
|
|
|
- } else {
|
|
|
|
- tx_frame_count_delta = U32_MAX - t_data->tx_frame_count;
|
|
|
|
- tx_frame_count_delta += h_data->tx_frame_count;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (h_data->my_rx_count >= t_data->my_rx_count) {
|
|
|
|
- my_rx_count_delta = h_data->my_rx_count - t_data->my_rx_count;
|
|
|
|
- } else {
|
|
|
|
- my_rx_count_delta = U32_MAX - t_data->my_rx_count;
|
|
|
|
- my_rx_count_delta += h_data->my_rx_count;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (h_data->cycle_count >= t_data->cycle_count) {
|
|
|
|
- cycle_count_delta = h_data->cycle_count - t_data->cycle_count;
|
|
|
|
- } else {
|
|
|
|
- cycle_count_delta = U32_MAX - t_data->cycle_count;
|
|
|
|
- cycle_count_delta += h_data->cycle_count;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (rx_clear_count_delta > tx_frame_count_delta &&
|
|
|
|
- rx_clear_count_delta - tx_frame_count_delta > my_rx_count_delta) {
|
|
|
|
- diff = rx_clear_count_delta - tx_frame_count_delta
|
|
|
|
- - my_rx_count_delta;
|
|
|
|
- if (cycle_count_delta)
|
|
|
|
- congestion = qdf_do_div(diff * 100, cycle_count_delta);
|
|
|
|
-
|
|
|
|
- if (congestion > 100)
|
|
|
|
- congestion = 100;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- hdd_debug("pdev: %d, rx_c %u, tx %u myrx %u cycle %u congestion: %u",
|
|
|
|
- info->pdev_id, rx_clear_count_delta, tx_frame_count_delta,
|
|
|
|
- my_rx_count_delta, cycle_count_delta, congestion);
|
|
|
|
- if (congestion >= info->config.threshold)
|
|
|
|
- hdd_congestion_notification_report(info->vdev_id, congestion);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * hdd_congestion_notification_report_multi() - medium assess report
|
|
|
|
- * multi interface.
|
|
|
|
- * @pdev_id: pdev id
|
|
|
|
- *
|
|
|
|
- * Return: None
|
|
|
|
- */
|
|
|
|
-static void hdd_congestion_notification_report_multi(uint8_t pdev_id)
|
|
|
|
-{
|
|
|
|
- struct hdd_medium_assess_info *info;
|
|
|
|
-
|
|
|
|
- info = &medium_assess_info[pdev_id];
|
|
|
|
- info->count++;
|
|
|
|
- if (info->count % info->config.interval == 0)
|
|
|
|
- hdd_congestion_notification_calculation(info);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * hdd_medium_assess_expire_handler() - timer callback
|
|
|
|
- * @arg: argument
|
|
|
|
- *
|
|
|
|
- * Return: None
|
|
|
|
- */
|
|
|
|
-static void hdd_medium_assess_expire_handler(void *arg)
|
|
|
|
-{
|
|
|
|
- struct wlan_objmgr_vdev *vdev;
|
|
|
|
- struct request_info info = {0};
|
|
|
|
- struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
|
|
|
- struct wlan_hdd_link_info *link_info;
|
|
|
|
- uint8_t vdev_id = INVALID_VDEV_ID, pdev_id;
|
|
|
|
- uint8_t index, i;
|
|
|
|
-
|
|
|
|
- if (wlan_hdd_validate_context(hdd_ctx))
|
|
|
|
- return;
|
|
|
|
-
|
|
|
|
- for (i = 0; i < WLAN_UMAC_MAX_RP_PID; i++)
|
|
|
|
- if (medium_assess_info[i].config.interval != 0) {
|
|
|
|
- vdev_id = medium_assess_info[i].vdev_id;
|
|
|
|
- pdev_id = medium_assess_info[i].pdev_id;
|
|
|
|
- hdd_congestion_notification_report_multi(pdev_id);
|
|
|
|
-
|
|
|
|
- /* ensure events are reveived at the 'same' time */
|
|
|
|
- index = medium_assess_info[i].index;
|
|
|
|
- medium_assess_info[i].data[index].part1_valid = false;
|
|
|
|
- medium_assess_info[i].data[index].part2_valid = false;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (vdev_id == INVALID_VDEV_ID)
|
|
|
|
- return;
|
|
|
|
-
|
|
|
|
- link_info = hdd_get_link_info_by_vdev(hdd_ctx, vdev_id);
|
|
|
|
- if (!link_info) {
|
|
|
|
- hdd_err("Failed to find adapter of vdev %d", vdev_id);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- vdev = hdd_objmgr_get_vdev_by_user(link_info, WLAN_CP_STATS_ID);
|
|
|
|
- if (!vdev)
|
|
|
|
- return;
|
|
|
|
-
|
|
|
|
- info.vdev_id = vdev_id;
|
|
|
|
- info.pdev_id = WMI_HOST_PDEV_ID_SOC;
|
|
|
|
- info.u.congestion_notif_cb = hdd_congestion_notification_cb;
|
|
|
|
- stime = jiffies + msecs_to_jiffies(40);
|
|
|
|
- ucfg_mc_cp_stats_send_stats_request(vdev,
|
|
|
|
- TYPE_CONGESTION_STATS,
|
|
|
|
- &info);
|
|
|
|
- hdd_objmgr_put_vdev_by_user(vdev, WLAN_CP_STATS_ID);
|
|
|
|
- qdf_mc_timer_start(&hdd_medium_assess_timer,
|
|
|
|
- MEDIUM_ASSESS_TIMER_INTERVAL);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-void hdd_medium_assess_init(void)
|
|
|
|
|
|
+void hdd_medium_assess_ssr_reinit(void)
|
|
{
|
|
{
|
|
QDF_STATUS status;
|
|
QDF_STATUS status;
|
|
|
|
|
|
- if (!timer_enable) {
|
|
|
|
- hdd_debug("medium assess init timer");
|
|
|
|
|
|
+ if (timer_enable && ssr_flag) {
|
|
|
|
+ hdd_debug("medium assess init timer in ssr");
|
|
status = qdf_mc_timer_init(&hdd_medium_assess_timer,
|
|
status = qdf_mc_timer_init(&hdd_medium_assess_timer,
|
|
QDF_TIMER_TYPE_SW,
|
|
QDF_TIMER_TYPE_SW,
|
|
hdd_medium_assess_expire_handler,
|
|
hdd_medium_assess_expire_handler,
|
|
NULL);
|
|
NULL);
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
- hdd_debug("medium assess init timer failed");
|
|
|
|
|
|
+ hdd_debug("medium assess init timer failed in ssr");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if (ssr_flag) {
|
|
|
|
- ssr_flag = 0;
|
|
|
|
- qdf_mc_timer_start(&hdd_medium_assess_timer,
|
|
|
|
- MEDIUM_ASSESS_TIMER_INTERVAL);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- timer_enable += 1;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-void hdd_medium_assess_deinit(void)
|
|
|
|
-{
|
|
|
|
- timer_enable -= 1;
|
|
|
|
- if (!timer_enable) {
|
|
|
|
- hdd_debug("medium assess deinit timer");
|
|
|
|
- if (qdf_mc_timer_get_current_state(&hdd_medium_assess_timer) ==
|
|
|
|
- QDF_TIMER_STATE_RUNNING)
|
|
|
|
- qdf_mc_timer_stop(&hdd_medium_assess_timer);
|
|
|
|
-
|
|
|
|
- qdf_mc_timer_destroy(&hdd_medium_assess_timer);
|
|
|
|
|
|
+ ssr_flag = false;
|
|
|
|
+ qdf_mc_timer_start(&hdd_medium_assess_timer,
|
|
|
|
+ MEDIUM_ASSESS_TIMER_INTERVAL);
|
|
}
|
|
}
|
|
}
|
|
}
|