diff options
author | Michael Straube <straube.linux@gmail.com> | 2018-07-08 12:38:50 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-08 17:41:15 +0200 |
commit | 058f285ed43c71565d19cc009c281e74a57fe75e (patch) | |
tree | e01db00b22f904179cdf9886d8968607db7f0fa1 /drivers | |
parent | 0bde13ed847923dfb55185c5280b7390f627dc80 (diff) |
staging: rtl8723bs: replace while with shorter for loop
Simplify rtw_get_rateset_len() by replacing the while loop
with a shorter for loop.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c index 8e0025e1ff14..9b60e0214bd8 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c @@ -298,17 +298,11 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode) uint rtw_get_rateset_len(u8 *rateset) { - uint i = 0; + uint i; - while (1) { - if ((rateset[i]) == 0) - break; - - if (i > 12) + for (i = 0; i < 13; i++) + if (rateset[i] == 0) break; - - i++; - } return i; } |