wifi: cfg80211: annotate iftype_data pointer with sparse
[linux-2.6-block.git] / net / wireless / chan.c
index 2af3aaee749398684f971e7dd884ff8ab6ac4f7d..842190dfa100f880da16de4ec8e317dfd8688ea7 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright 2009      Johannes Berg <johannes@sipsolutions.net>
  * Copyright 2013-2014  Intel Mobile Communications GmbH
- * Copyright 2018-2022 Intel Corporation
+ * Copyright 2018-2023 Intel Corporation
  */
 
 #include <linux/export.h>
@@ -1162,8 +1162,7 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
                if (!sband)
                        return false;
 
-               for (i = 0; i < sband->n_iftype_data; i++) {
-                       iftd = &sband->iftype_data[i];
+               for_each_sband_iftype_data(sband, i, iftd) {
                        if (!iftd->eht_cap.has_eht)
                                continue;