* @MPATH_INFO_DISCOVERY_TIMEOUT: @discovery_timeout filled
  * @MPATH_INFO_DISCOVERY_RETRIES: @discovery_retries filled
  * @MPATH_INFO_FLAGS: @flags filled
+ * @MPATH_INFO_HOP_COUNT: @hop_count filled
  */
 enum mpath_info_flags {
        MPATH_INFO_FRAME_QLEN           = BIT(0),
        MPATH_INFO_DISCOVERY_TIMEOUT    = BIT(4),
        MPATH_INFO_DISCOVERY_RETRIES    = BIT(5),
        MPATH_INFO_FLAGS                = BIT(6),
+       MPATH_INFO_HOP_COUNT            = BIT(7)
 };
 
 /**
  *     This number should increase every time the list of mesh paths
  *     changes, i.e. when a station is added or removed, so that
  *     userspace can tell whether it got a consistent snapshot.
+ * @hop_count: hops to destination
  */
 struct mpath_info {
        u32 filled;
        u32 discovery_timeout;
        u8 discovery_retries;
        u8 flags;
+       u8 hop_count;
 
        int generation;
 };
 
  *     &enum nl80211_mpath_flags;
  * @NL80211_MPATH_INFO_DISCOVERY_TIMEOUT: total path discovery timeout, in msec
  * @NL80211_MPATH_INFO_DISCOVERY_RETRIES: mesh path discovery retries
+ * @NL80211_MPATH_INFO_HOP_COUNT: hop count to destination
  * @NL80211_MPATH_INFO_MAX: highest mesh path information attribute number
  *     currently defind
  * @__NL80211_MPATH_INFO_AFTER_LAST: internal use
        NL80211_MPATH_INFO_FLAGS,
        NL80211_MPATH_INFO_DISCOVERY_TIMEOUT,
        NL80211_MPATH_INFO_DISCOVERY_RETRIES,
+       NL80211_MPATH_INFO_HOP_COUNT,
 
        /* keep last */
        __NL80211_MPATH_INFO_AFTER_LAST,
 
                        MPATH_INFO_EXPTIME |
                        MPATH_INFO_DISCOVERY_TIMEOUT |
                        MPATH_INFO_DISCOVERY_RETRIES |
-                       MPATH_INFO_FLAGS;
+                       MPATH_INFO_FLAGS |
+                       MPATH_INFO_HOP_COUNT;
 
        pinfo->frame_qlen = mpath->frame_queue.qlen;
        pinfo->sn = mpath->sn;
                pinfo->flags |= NL80211_MPATH_FLAG_FIXED;
        if (mpath->flags & MESH_PATH_RESOLVED)
                pinfo->flags |= NL80211_MPATH_FLAG_RESOLVED;
+       pinfo->hop_count = mpath->hop_count;
 }
 
 static int ieee80211_get_mpath(struct wiphy *wiphy, struct net_device *dev,
 
        unsigned long orig_lifetime, exp_time;
        u32 last_hop_metric, new_metric;
        bool process = true;
+       u8 hopcount;
 
        rcu_read_lock();
        sta = sta_info_get(sdata, mgmt->sa);
                orig_sn = PREQ_IE_ORIG_SN(hwmp_ie);
                orig_lifetime = PREQ_IE_LIFETIME(hwmp_ie);
                orig_metric = PREQ_IE_METRIC(hwmp_ie);
+               hopcount = PREQ_IE_HOPCOUNT(hwmp_ie) + 1;
                break;
        case MPATH_PREP:
                /* Originator here refers to the MP that was the target in the
                orig_sn = PREP_IE_TARGET_SN(hwmp_ie);
                orig_lifetime = PREP_IE_LIFETIME(hwmp_ie);
                orig_metric = PREP_IE_METRIC(hwmp_ie);
+               hopcount = PREP_IE_HOPCOUNT(hwmp_ie) + 1;
                break;
        default:
                rcu_read_unlock();
                        mpath->sn = orig_sn;
                        mpath->exp_time = time_after(mpath->exp_time, exp_time)
                                          ?  mpath->exp_time : exp_time;
+                       mpath->hop_count = hopcount;
                        mesh_path_activate(mpath);
                        spin_unlock_bh(&mpath->state_lock);
                        ewma_mesh_fail_avg_init(&sta->mesh->fail_avg);
                        mpath->metric = last_hop_metric;
                        mpath->exp_time = time_after(mpath->exp_time, exp_time)
                                          ?  mpath->exp_time : exp_time;
+                       mpath->hop_count = 1;
                        mesh_path_activate(mpath);
                        spin_unlock_bh(&mpath->state_lock);
                        ewma_mesh_fail_avg_init(&sta->mesh->fail_avg);
 
                         pinfo->discovery_timeout)) ||
            ((pinfo->filled & MPATH_INFO_DISCOVERY_RETRIES) &&
             nla_put_u8(msg, NL80211_MPATH_INFO_DISCOVERY_RETRIES,
-                       pinfo->discovery_retries)))
+                       pinfo->discovery_retries)) ||
+           ((pinfo->filled & MPATH_INFO_HOP_COUNT) &&
+            nla_put_u8(msg, NL80211_MPATH_INFO_HOP_COUNT,
+                       pinfo->hop_count)))
                goto nla_put_failure;
 
        nla_nest_end(msg, pinfoattr);