The "ap_info->tbtt_info_len" and "length" variables are the same value
but it is confusing how the names are mixed up.  Let's use "length"
everywhere for consistency.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YJaMNzZENkYFAYQX@mwanda
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
 
                freq = ieee80211_channel_to_frequency(ap_info->channel, band);
 
-               if (end - pos < count * ap_info->tbtt_info_len)
+               if (end - pos < count * length)
                        break;
 
                /*
                if (band != NL80211_BAND_6GHZ ||
                    (length != IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM &&
                     length < IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM)) {
-                       pos += count * ap_info->tbtt_info_len;
+                       pos += count * length;
                        continue;
                }
 
                                kfree(entry);
                        }
 
-                       pos += ap_info->tbtt_info_len;
+                       pos += length;
                }
        }