mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 21:24:00 +08:00
staging: rtl8192e: rename members of struct rtllib_device - style
Rename following members of struct rtllib_device to fix checkpatch warning: Avoid CamelCase pDot11dInfo -> dot11d_info bGlobalDomain -> global_domain IbssStartChnl -> bss_start_channel Signed-off-by: Himadri Pandya <himadri18.07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6841d9abec
commit
a180ef30da
@ -44,14 +44,14 @@ static struct channel_list channel_array[] = {
|
|||||||
|
|
||||||
void dot11d_init(struct rtllib_device *ieee)
|
void dot11d_init(struct rtllib_device *ieee)
|
||||||
{
|
{
|
||||||
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee);
|
struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(ieee);
|
||||||
|
|
||||||
pDot11dInfo->enabled = false;
|
dot11d_info->enabled = false;
|
||||||
|
|
||||||
pDot11dInfo->state = DOT11D_STATE_NONE;
|
dot11d_info->state = DOT11D_STATE_NONE;
|
||||||
pDot11dInfo->country_len = 0;
|
dot11d_info->country_len = 0;
|
||||||
memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
|
memset(dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
|
||||||
memset(pDot11dInfo->max_tx_power_list, 0xFF, MAX_CHANNEL_NUMBER + 1);
|
memset(dot11d_info->max_tx_power_list, 0xFF, MAX_CHANNEL_NUMBER + 1);
|
||||||
RESET_CIE_WATCHDOG(ieee);
|
RESET_CIE_WATCHDOG(ieee);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(dot11d_init);
|
EXPORT_SYMBOL(dot11d_init);
|
||||||
@ -60,7 +60,7 @@ void Dot11d_Channelmap(u8 channel_plan, struct rtllib_device *ieee)
|
|||||||
{
|
{
|
||||||
int i, max_chan = 14, min_chan = 1;
|
int i, max_chan = 14, min_chan = 1;
|
||||||
|
|
||||||
ieee->bGlobalDomain = false;
|
ieee->global_domain = false;
|
||||||
|
|
||||||
if (channel_array[channel_plan].len != 0) {
|
if (channel_array[channel_plan].len != 0) {
|
||||||
memset(GET_DOT11D_INFO(ieee)->channel_map, 0,
|
memset(GET_DOT11D_INFO(ieee)->channel_map, 0,
|
||||||
@ -76,22 +76,22 @@ void Dot11d_Channelmap(u8 channel_plan, struct rtllib_device *ieee)
|
|||||||
|
|
||||||
switch (channel_plan) {
|
switch (channel_plan) {
|
||||||
case COUNTRY_CODE_GLOBAL_DOMAIN:
|
case COUNTRY_CODE_GLOBAL_DOMAIN:
|
||||||
ieee->bGlobalDomain = true;
|
ieee->global_domain = true;
|
||||||
for (i = 12; i <= 14; i++)
|
for (i = 12; i <= 14; i++)
|
||||||
GET_DOT11D_INFO(ieee)->channel_map[i] = 2;
|
GET_DOT11D_INFO(ieee)->channel_map[i] = 2;
|
||||||
ieee->IbssStartChnl = 10;
|
ieee->bss_start_channel = 10;
|
||||||
ieee->ibss_maxjoin_chal = 11;
|
ieee->ibss_maxjoin_chal = 11;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COUNTRY_CODE_WORLD_WIDE_13:
|
case COUNTRY_CODE_WORLD_WIDE_13:
|
||||||
for (i = 12; i <= 13; i++)
|
for (i = 12; i <= 13; i++)
|
||||||
GET_DOT11D_INFO(ieee)->channel_map[i] = 2;
|
GET_DOT11D_INFO(ieee)->channel_map[i] = 2;
|
||||||
ieee->IbssStartChnl = 10;
|
ieee->bss_start_channel = 10;
|
||||||
ieee->ibss_maxjoin_chal = 11;
|
ieee->ibss_maxjoin_chal = 11;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ieee->IbssStartChnl = 1;
|
ieee->bss_start_channel = 1;
|
||||||
ieee->ibss_maxjoin_chal = 14;
|
ieee->ibss_maxjoin_chal = 14;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -100,29 +100,29 @@ EXPORT_SYMBOL(Dot11d_Channelmap);
|
|||||||
|
|
||||||
void Dot11d_Reset(struct rtllib_device *ieee)
|
void Dot11d_Reset(struct rtllib_device *ieee)
|
||||||
{
|
{
|
||||||
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee);
|
struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(ieee);
|
||||||
u32 i;
|
u32 i;
|
||||||
|
|
||||||
memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
|
memset(dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
|
||||||
memset(pDot11dInfo->max_tx_power_list, 0xFF, MAX_CHANNEL_NUMBER + 1);
|
memset(dot11d_info->max_tx_power_list, 0xFF, MAX_CHANNEL_NUMBER + 1);
|
||||||
for (i = 1; i <= 11; i++)
|
for (i = 1; i <= 11; i++)
|
||||||
(pDot11dInfo->channel_map)[i] = 1;
|
(dot11d_info->channel_map)[i] = 1;
|
||||||
for (i = 12; i <= 14; i++)
|
for (i = 12; i <= 14; i++)
|
||||||
(pDot11dInfo->channel_map)[i] = 2;
|
(dot11d_info->channel_map)[i] = 2;
|
||||||
pDot11dInfo->state = DOT11D_STATE_NONE;
|
dot11d_info->state = DOT11D_STATE_NONE;
|
||||||
pDot11dInfo->country_len = 0;
|
dot11d_info->country_len = 0;
|
||||||
RESET_CIE_WATCHDOG(ieee);
|
RESET_CIE_WATCHDOG(ieee);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr,
|
void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr,
|
||||||
u16 CoutryIeLen, u8 *pCoutryIe)
|
u16 CoutryIeLen, u8 *pCoutryIe)
|
||||||
{
|
{
|
||||||
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
|
struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(dev);
|
||||||
u8 i, j, NumTriples, MaxChnlNum;
|
u8 i, j, NumTriples, MaxChnlNum;
|
||||||
struct chnl_txpow_triple *pTriple;
|
struct chnl_txpow_triple *pTriple;
|
||||||
|
|
||||||
memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
|
memset(dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
|
||||||
memset(pDot11dInfo->max_tx_power_list, 0xFF, MAX_CHANNEL_NUMBER + 1);
|
memset(dot11d_info->max_tx_power_list, 0xFF, MAX_CHANNEL_NUMBER + 1);
|
||||||
MaxChnlNum = 0;
|
MaxChnlNum = 0;
|
||||||
NumTriples = (CoutryIeLen - 3) / 3;
|
NumTriples = (CoutryIeLen - 3) / 3;
|
||||||
pTriple = (struct chnl_txpow_triple *)(pCoutryIe + 3);
|
pTriple = (struct chnl_txpow_triple *)(pCoutryIe + 3);
|
||||||
@ -142,8 +142,8 @@ void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (j = 0; j < pTriple->num_channels; j++) {
|
for (j = 0; j < pTriple->num_channels; j++) {
|
||||||
pDot11dInfo->channel_map[pTriple->first_channel + j] = 1;
|
dot11d_info->channel_map[pTriple->first_channel + j] = 1;
|
||||||
pDot11dInfo->max_tx_power_list[pTriple->first_channel + j] =
|
dot11d_info->max_tx_power_list[pTriple->first_channel + j] =
|
||||||
pTriple->max_tx_power;
|
pTriple->max_tx_power;
|
||||||
MaxChnlNum = pTriple->first_channel + j;
|
MaxChnlNum = pTriple->first_channel + j;
|
||||||
}
|
}
|
||||||
@ -153,18 +153,18 @@ void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr,
|
|||||||
|
|
||||||
UPDATE_CIE_SRC(dev, pTaddr);
|
UPDATE_CIE_SRC(dev, pTaddr);
|
||||||
|
|
||||||
pDot11dInfo->country_len = CoutryIeLen;
|
dot11d_info->country_len = CoutryIeLen;
|
||||||
memcpy(pDot11dInfo->country_buffer, pCoutryIe, CoutryIeLen);
|
memcpy(dot11d_info->country_buffer, pCoutryIe, CoutryIeLen);
|
||||||
pDot11dInfo->state = DOT11D_STATE_LEARNED;
|
dot11d_info->state = DOT11D_STATE_LEARNED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DOT11D_ScanComplete(struct rtllib_device *dev)
|
void DOT11D_ScanComplete(struct rtllib_device *dev)
|
||||||
{
|
{
|
||||||
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
|
struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(dev);
|
||||||
|
|
||||||
switch (pDot11dInfo->state) {
|
switch (dot11d_info->state) {
|
||||||
case DOT11D_STATE_LEARNED:
|
case DOT11D_STATE_LEARNED:
|
||||||
pDot11dInfo->state = DOT11D_STATE_DONE;
|
dot11d_info->state = DOT11D_STATE_DONE;
|
||||||
break;
|
break;
|
||||||
case DOT11D_STATE_DONE:
|
case DOT11D_STATE_DONE:
|
||||||
Dot11d_Reset(dev);
|
Dot11d_Reset(dev);
|
||||||
|
@ -59,7 +59,7 @@ static inline void cpMacAddr(unsigned char *des, unsigned char *src)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define GET_DOT11D_INFO(__pIeeeDev) \
|
#define GET_DOT11D_INFO(__pIeeeDev) \
|
||||||
((struct rt_dot11d_info *)((__pIeeeDev)->pDot11dInfo))
|
((struct rt_dot11d_info *)((__pIeeeDev)->dot11d_info))
|
||||||
|
|
||||||
#define IS_DOT11D_ENABLE(__pIeeeDev) \
|
#define IS_DOT11D_ENABLE(__pIeeeDev) \
|
||||||
(GET_DOT11D_INFO(__pIeeeDev)->enabled)
|
(GET_DOT11D_INFO(__pIeeeDev)->enabled)
|
||||||
|
@ -1560,11 +1560,11 @@ struct rtllib_device {
|
|||||||
u16 scan_watch_dog;
|
u16 scan_watch_dog;
|
||||||
|
|
||||||
/* map of allowed channels. 0 is dummy */
|
/* map of allowed channels. 0 is dummy */
|
||||||
void *pDot11dInfo;
|
void *dot11d_info;
|
||||||
bool bGlobalDomain;
|
bool global_domain;
|
||||||
u8 active_channel_map[MAX_CHANNEL_NUMBER+1];
|
u8 active_channel_map[MAX_CHANNEL_NUMBER+1];
|
||||||
|
|
||||||
u8 IbssStartChnl;
|
u8 bss_start_channel;
|
||||||
u8 ibss_maxjoin_chal;
|
u8 ibss_maxjoin_chal;
|
||||||
|
|
||||||
int rate; /* current rate */
|
int rate; /* current rate */
|
||||||
|
@ -2627,7 +2627,7 @@ static void rtllib_start_ibss_wq(void *data)
|
|||||||
/* the network definitively is not here.. create a new cell */
|
/* the network definitively is not here.. create a new cell */
|
||||||
if (ieee->state == RTLLIB_NOLINK) {
|
if (ieee->state == RTLLIB_NOLINK) {
|
||||||
netdev_info(ieee->dev, "creating new IBSS cell\n");
|
netdev_info(ieee->dev, "creating new IBSS cell\n");
|
||||||
ieee->current_network.channel = ieee->IbssStartChnl;
|
ieee->current_network.channel = ieee->bss_start_channel;
|
||||||
if (!ieee->wap_set)
|
if (!ieee->wap_set)
|
||||||
eth_random_addr(ieee->current_network.bssid);
|
eth_random_addr(ieee->current_network.bssid);
|
||||||
|
|
||||||
@ -2719,7 +2719,7 @@ static void rtllib_start_bss(struct rtllib_device *ieee)
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if (IS_DOT11D_ENABLE(ieee) && !IS_COUNTRY_IE_VALID(ieee)) {
|
if (IS_DOT11D_ENABLE(ieee) && !IS_COUNTRY_IE_VALID(ieee)) {
|
||||||
if (!ieee->bGlobalDomain)
|
if (!ieee->global_domain)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* check if we have already found the net we
|
/* check if we have already found the net we
|
||||||
@ -2974,8 +2974,8 @@ void rtllib_softmac_init(struct rtllib_device *ieee)
|
|||||||
ieee->state = RTLLIB_NOLINK;
|
ieee->state = RTLLIB_NOLINK;
|
||||||
for (i = 0; i < 5; i++)
|
for (i = 0; i < 5; i++)
|
||||||
ieee->seq_ctrl[i] = 0;
|
ieee->seq_ctrl[i] = 0;
|
||||||
ieee->pDot11dInfo = kzalloc(sizeof(struct rt_dot11d_info), GFP_ATOMIC);
|
ieee->dot11d_info = kzalloc(sizeof(struct rt_dot11d_info), GFP_ATOMIC);
|
||||||
if (!ieee->pDot11dInfo)
|
if (!ieee->dot11d_info)
|
||||||
netdev_err(ieee->dev, "Can't alloc memory for DOT11D\n");
|
netdev_err(ieee->dev, "Can't alloc memory for DOT11D\n");
|
||||||
ieee->LinkDetectInfo.SlotIndex = 0;
|
ieee->LinkDetectInfo.SlotIndex = 0;
|
||||||
ieee->LinkDetectInfo.SlotNum = 2;
|
ieee->LinkDetectInfo.SlotNum = 2;
|
||||||
@ -3049,8 +3049,8 @@ void rtllib_softmac_init(struct rtllib_device *ieee)
|
|||||||
void rtllib_softmac_free(struct rtllib_device *ieee)
|
void rtllib_softmac_free(struct rtllib_device *ieee)
|
||||||
{
|
{
|
||||||
mutex_lock(&ieee->wx_mutex);
|
mutex_lock(&ieee->wx_mutex);
|
||||||
kfree(ieee->pDot11dInfo);
|
kfree(ieee->dot11d_info);
|
||||||
ieee->pDot11dInfo = NULL;
|
ieee->dot11d_info = NULL;
|
||||||
del_timer_sync(&ieee->associate_timer);
|
del_timer_sync(&ieee->associate_timer);
|
||||||
|
|
||||||
cancel_delayed_work_sync(&ieee->associate_retry_wq);
|
cancel_delayed_work_sync(&ieee->associate_retry_wq);
|
||||||
|
Loading…
Reference in New Issue
Block a user