staging: rtl8192e: rename local variables of function dot11d_update_country - style
Rename following local variables of function dot11d_update_country to fix checkpatch warning: Avoid CamelCase and make the variable names more readable, understandable. NumTriples -> number_of_triples MaxChnlNum -> max_channel_number pTriple -> triple Signed-off-by: Himadri Pandya <himadri18.07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c40cac3b76
commit
5441ab2ff5
|
@ -118,37 +118,37 @@ void dot11d_update_country(struct rtllib_device *dev, u8 *pTaddr,
|
||||||
u16 CoutryIeLen, u8 *pCoutryIe)
|
u16 CoutryIeLen, u8 *pCoutryIe)
|
||||||
{
|
{
|
||||||
struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(dev);
|
struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(dev);
|
||||||
u8 i, j, NumTriples, MaxChnlNum;
|
u8 i, j, number_of_triples, max_channel_number;
|
||||||
struct chnl_txpow_triple *pTriple;
|
struct chnl_txpow_triple *triple;
|
||||||
|
|
||||||
memset(dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
|
memset(dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
|
||||||
memset(dot11d_info->max_tx_power_list, 0xFF, MAX_CHANNEL_NUMBER + 1);
|
memset(dot11d_info->max_tx_power_list, 0xFF, MAX_CHANNEL_NUMBER + 1);
|
||||||
MaxChnlNum = 0;
|
max_channel_number = 0;
|
||||||
NumTriples = (CoutryIeLen - 3) / 3;
|
number_of_triples = (CoutryIeLen - 3) / 3;
|
||||||
pTriple = (struct chnl_txpow_triple *)(pCoutryIe + 3);
|
triple = (struct chnl_txpow_triple *)(pCoutryIe + 3);
|
||||||
for (i = 0; i < NumTriples; i++) {
|
for (i = 0; i < number_of_triples; i++) {
|
||||||
if (MaxChnlNum >= pTriple->first_channel) {
|
if (max_channel_number >= triple->first_channel) {
|
||||||
netdev_info(dev->dev,
|
netdev_info(dev->dev,
|
||||||
"%s: Invalid country IE, skip it......1\n",
|
"%s: Invalid country IE, skip it......1\n",
|
||||||
__func__);
|
__func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (MAX_CHANNEL_NUMBER < (pTriple->first_channel +
|
if (MAX_CHANNEL_NUMBER < (triple->first_channel +
|
||||||
pTriple->num_channels)) {
|
triple->num_channels)) {
|
||||||
netdev_info(dev->dev,
|
netdev_info(dev->dev,
|
||||||
"%s: Invalid country IE, skip it......2\n",
|
"%s: Invalid country IE, skip it......2\n",
|
||||||
__func__);
|
__func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (j = 0; j < pTriple->num_channels; j++) {
|
for (j = 0; j < triple->num_channels; j++) {
|
||||||
dot11d_info->channel_map[pTriple->first_channel + j] = 1;
|
dot11d_info->channel_map[triple->first_channel + j] = 1;
|
||||||
dot11d_info->max_tx_power_list[pTriple->first_channel + j] =
|
dot11d_info->max_tx_power_list[triple->first_channel + j] =
|
||||||
pTriple->max_tx_power;
|
triple->max_tx_power;
|
||||||
MaxChnlNum = pTriple->first_channel + j;
|
max_channel_number = triple->first_channel + j;
|
||||||
}
|
}
|
||||||
|
|
||||||
pTriple = (struct chnl_txpow_triple *)((u8 *)pTriple + 3);
|
triple = (struct chnl_txpow_triple *)((u8 *)triple + 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
UPDATE_CIE_SRC(dev, pTaddr);
|
UPDATE_CIE_SRC(dev, pTaddr);
|
||||||
|
|
Loading…
Reference in New Issue