diff --git a/core/rtw_ieee80211.c b/core/rtw_ieee80211.c index 12e230e..2134a34 100644 --- a/core/rtw_ieee80211.c +++ b/core/rtw_ieee80211.c @@ -482,18 +482,13 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode) } } -uint rtw_get_rateset_len(u8 *rateset) +uint rtw_get_rateset_len(u8 *rateset) { - uint i = 0; - while (1) { - if ((rateset[i]) == 0) - break; + uint i; - if (i > 12) + for (i = 0; i < 13; i++) + if (rateset[i] == 0) break; - - i++; - } return i; }