Merge branch 'ttm-prot-fix' of git://people.freedesktop.org/~thomash/linux into drm...
[platform/kernel/linux-starfive.git] / net / mac80211 / mesh_hwmp.c
index 68af623..d699833 100644 (file)
@@ -328,6 +328,9 @@ u32 airtime_link_metric_get(struct ieee80211_local *local,
        unsigned long fail_avg =
                ewma_mesh_fail_avg_read(&sta->mesh->fail_avg);
 
+       if (sta->mesh->plink_state != NL80211_PLINK_ESTAB)
+               return MAX_METRIC;
+
        /* Try to get rate based on HW/SW RC algorithm.
         * Rate is returned in units of Kbps, correct this
         * to comply with airtime calculation units