summaryrefslogtreecommitdiff
path: root/drivers/staging/wfx/data_tx.c
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-05-26 19:18:13 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-27 10:18:08 +0200
commit5998b72a9f6172c29e7a11bd86d0d4cefd0fc4b2 (patch)
tree07ce1a8132fc7fce5b7e67ff644c147d94185a26 /drivers/staging/wfx/data_tx.c
parent100c06f5dfc300ee67d08786c1a646c0fe327a86 (diff)
staging: wfx: do not declare variables inside loops
The local variables should be declared at beginning of the functions. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200526171821.934581-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/data_tx.c')
-rw-r--r--drivers/staging/wfx/data_tx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c
index a9eddd6db2b5..f042ef36b408 100644
--- a/drivers/staging/wfx/data_tx.c
+++ b/drivers/staging/wfx/data_tx.c
@@ -42,15 +42,13 @@ static int wfx_get_hw_rate(struct wfx_dev *wdev,
static void wfx_tx_policy_build(struct wfx_vif *wvif, struct tx_policy *policy,
struct ieee80211_tx_rate *rates)
{
- int i;
struct wfx_dev *wdev = wvif->wdev;
+ int i, rateid;
+ u8 count;
WARN(rates[0].idx < 0, "invalid rate policy");
memset(policy, 0, sizeof(*policy));
for (i = 0; i < IEEE80211_TX_MAX_RATES; ++i) {
- int rateid;
- u8 count;
-
if (rates[i].idx < 0)
break;
WARN_ON(rates[i].count > 15);