diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 4536a122c4bc..5595c2a94939 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -510,7 +510,7 @@ ieee80211_get_sband_iftype_data(const struct ieee80211_supported_band *sband, { int i; - if (WARN_ON(iftype >= NL80211_IFTYPE_MAX)) + if (WARN_ON(iftype >= NUM_NL80211_IFTYPES)) return NULL; if (iftype == NL80211_IFTYPE_AP_VLAN)