Commit dadfab23 authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: rtl8192e: rename rateIndex to rate_index

Rename the variable rateIndex in the function
_rtl92e_update_received_rate_histogram_stats() to avoid camel case.

rateIndex -> rate_index
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Tested-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240222112723.18428-2-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8017f5ac
...@@ -1527,7 +1527,7 @@ static void _rtl92e_update_received_rate_histogram_stats( ...@@ -1527,7 +1527,7 @@ static void _rtl92e_update_received_rate_histogram_stats(
{ {
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
u32 rcvType = 1; u32 rcvType = 1;
u32 rateIndex; u32 rate_index;
if (pstats->bCRC) if (pstats->bCRC)
rcvType = 2; rcvType = 2;
...@@ -1536,95 +1536,95 @@ static void _rtl92e_update_received_rate_histogram_stats( ...@@ -1536,95 +1536,95 @@ static void _rtl92e_update_received_rate_histogram_stats(
switch (pstats->rate) { switch (pstats->rate) {
case MGN_1M: case MGN_1M:
rateIndex = 0; rate_index = 0;
break; break;
case MGN_2M: case MGN_2M:
rateIndex = 1; rate_index = 1;
break; break;
case MGN_5_5M: case MGN_5_5M:
rateIndex = 2; rate_index = 2;
break; break;
case MGN_11M: case MGN_11M:
rateIndex = 3; rate_index = 3;
break; break;
case MGN_6M: case MGN_6M:
rateIndex = 4; rate_index = 4;
break; break;
case MGN_9M: case MGN_9M:
rateIndex = 5; rate_index = 5;
break; break;
case MGN_12M: case MGN_12M:
rateIndex = 6; rate_index = 6;
break; break;
case MGN_18M: case MGN_18M:
rateIndex = 7; rate_index = 7;
break; break;
case MGN_24M: case MGN_24M:
rateIndex = 8; rate_index = 8;
break; break;
case MGN_36M: case MGN_36M:
rateIndex = 9; rate_index = 9;
break; break;
case MGN_48M: case MGN_48M:
rateIndex = 10; rate_index = 10;
break; break;
case MGN_54M: case MGN_54M:
rateIndex = 11; rate_index = 11;
break; break;
case MGN_MCS0: case MGN_MCS0:
rateIndex = 12; rate_index = 12;
break; break;
case MGN_MCS1: case MGN_MCS1:
rateIndex = 13; rate_index = 13;
break; break;
case MGN_MCS2: case MGN_MCS2:
rateIndex = 14; rate_index = 14;
break; break;
case MGN_MCS3: case MGN_MCS3:
rateIndex = 15; rate_index = 15;
break; break;
case MGN_MCS4: case MGN_MCS4:
rateIndex = 16; rate_index = 16;
break; break;
case MGN_MCS5: case MGN_MCS5:
rateIndex = 17; rate_index = 17;
break; break;
case MGN_MCS6: case MGN_MCS6:
rateIndex = 18; rate_index = 18;
break; break;
case MGN_MCS7: case MGN_MCS7:
rateIndex = 19; rate_index = 19;
break; break;
case MGN_MCS8: case MGN_MCS8:
rateIndex = 20; rate_index = 20;
break; break;
case MGN_MCS9: case MGN_MCS9:
rateIndex = 21; rate_index = 21;
break; break;
case MGN_MCS10: case MGN_MCS10:
rateIndex = 22; rate_index = 22;
break; break;
case MGN_MCS11: case MGN_MCS11:
rateIndex = 23; rate_index = 23;
break; break;
case MGN_MCS12: case MGN_MCS12:
rateIndex = 24; rate_index = 24;
break; break;
case MGN_MCS13: case MGN_MCS13:
rateIndex = 25; rate_index = 25;
break; break;
case MGN_MCS14: case MGN_MCS14:
rateIndex = 26; rate_index = 26;
break; break;
case MGN_MCS15: case MGN_MCS15:
rateIndex = 27; rate_index = 27;
break; break;
default: default:
rateIndex = 28; rate_index = 28;
break; break;
} }
priv->stats.received_rate_histogram[0][rateIndex]++; priv->stats.received_rate_histogram[0][rate_index]++;
priv->stats.received_rate_histogram[rcvType][rateIndex]++; priv->stats.received_rate_histogram[rcvType][rate_index]++;
} }
bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats, bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment