Commit b972c798 authored by John Whitmore's avatar John Whitmore Committed by Greg Kroah-Hartman

staging:rtl8192u: Rename member pDot11dInfo - Style

Rename 'pDot11dInfo', this member variable of the structure
ieee80211_device causes a checkpatch issue, CamelCase naming. The
member has been renamed 'dot11d_info' to clear this issue.

This is a coding style change which should have no impact on runtime
code execution.
Signed-off-by: default avatarJohn Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d0679000
No related merge requests found
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
void rtl8192u_dot11d_init(struct ieee80211_device *ieee) void rtl8192u_dot11d_init(struct ieee80211_device *ieee)
{ {
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee); struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(ieee);
pDot11dInfo->dot11d_enabled = false; dot11d_info->dot11d_enabled = false;
pDot11dInfo->state = DOT11D_STATE_NONE; dot11d_info->state = DOT11D_STATE_NONE;
pDot11dInfo->country_ie_len = 0; dot11d_info->country_ie_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_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1); memset(dot11d_info->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1);
RESET_CIE_WATCHDOG(ieee); RESET_CIE_WATCHDOG(ieee);
netdev_info(ieee->dev, "rtl8192u_dot11d_init()\n"); netdev_info(ieee->dev, "rtl8192u_dot11d_init()\n");
...@@ -23,19 +23,19 @@ EXPORT_SYMBOL(rtl8192u_dot11d_init); ...@@ -23,19 +23,19 @@ EXPORT_SYMBOL(rtl8192u_dot11d_init);
void dot11d_reset(struct ieee80211_device *ieee) void dot11d_reset(struct ieee80211_device *ieee)
{ {
u32 i; u32 i;
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee); struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(ieee);
/* Clear old channel map */ /* Clear old channel map */
memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1); memset(dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER+1);
memset(pDot11dInfo->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1); memset(dot11d_info->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1);
/* Set new channel map */ /* Set new channel map */
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_ie_len = 0; dot11d_info->country_ie_len = 0;
RESET_CIE_WATCHDOG(ieee); RESET_CIE_WATCHDOG(ieee);
} }
EXPORT_SYMBOL(dot11d_reset); EXPORT_SYMBOL(dot11d_reset);
...@@ -52,12 +52,12 @@ EXPORT_SYMBOL(dot11d_reset); ...@@ -52,12 +52,12 @@ EXPORT_SYMBOL(dot11d_reset);
void dot11d_update_country_ie(struct ieee80211_device *dev, u8 *pTaddr, void dot11d_update_country_ie(struct ieee80211_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_txpower_triple *pTriple; struct chnl_txpower_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_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1); memset(dot11d_info->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER+1);
MaxChnlNum = 0; MaxChnlNum = 0;
NumTriples = (CoutryIeLen - 3) / 3; /* skip 3-byte country string. */ NumTriples = (CoutryIeLen - 3) / 3; /* skip 3-byte country string. */
pTriple = (struct chnl_txpower_triple *)(pCoutryIe + 3); pTriple = (struct chnl_txpower_triple *)(pCoutryIe + 3);
...@@ -78,8 +78,8 @@ void dot11d_update_country_ie(struct ieee80211_device *dev, u8 *pTaddr, ...@@ -78,8 +78,8 @@ void dot11d_update_country_ie(struct ieee80211_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_pwr_dbm_list[pTriple->first_channel + j] = pTriple->max_tx_pwr_dbm; dot11d_info->max_tx_pwr_dbm_list[pTriple->first_channel + j] = pTriple->max_tx_pwr_dbm;
MaxChnlNum = pTriple->first_channel + j; MaxChnlNum = pTriple->first_channel + j;
} }
...@@ -87,29 +87,29 @@ void dot11d_update_country_ie(struct ieee80211_device *dev, u8 *pTaddr, ...@@ -87,29 +87,29 @@ void dot11d_update_country_ie(struct ieee80211_device *dev, u8 *pTaddr,
} }
netdev_info(dev->dev, "Channel List:"); netdev_info(dev->dev, "Channel List:");
for (i = 1; i <= MAX_CHANNEL_NUMBER; i++) for (i = 1; i <= MAX_CHANNEL_NUMBER; i++)
if (pDot11dInfo->channel_map[i] > 0) if (dot11d_info->channel_map[i] > 0)
netdev_info(dev->dev, " %d", i); netdev_info(dev->dev, " %d", i);
netdev_info(dev->dev, "\n"); netdev_info(dev->dev, "\n");
UPDATE_CIE_SRC(dev, pTaddr); UPDATE_CIE_SRC(dev, pTaddr);
pDot11dInfo->country_ie_len = CoutryIeLen; dot11d_info->country_ie_len = CoutryIeLen;
memcpy(pDot11dInfo->country_ie_buf, pCoutryIe, CoutryIeLen); memcpy(dot11d_info->country_ie_buf, pCoutryIe, CoutryIeLen);
pDot11dInfo->state = DOT11D_STATE_LEARNED; dot11d_info->state = DOT11D_STATE_LEARNED;
} }
EXPORT_SYMBOL(dot11d_update_country_ie); EXPORT_SYMBOL(dot11d_update_country_ie);
u8 dot11d_get_max_tx_pwr_in_dbm(struct ieee80211_device *dev, u8 Channel) u8 dot11d_get_max_tx_pwr_in_dbm(struct ieee80211_device *dev, u8 Channel)
{ {
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev); struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(dev);
u8 MaxTxPwrInDbm = 255; u8 MaxTxPwrInDbm = 255;
if (Channel > MAX_CHANNEL_NUMBER) { if (Channel > MAX_CHANNEL_NUMBER) {
netdev_err(dev->dev, "dot11d_get_max_tx_pwr_in_dbm(): Invalid Channel\n"); netdev_err(dev->dev, "dot11d_get_max_tx_pwr_in_dbm(): Invalid Channel\n");
return MaxTxPwrInDbm; return MaxTxPwrInDbm;
} }
if (pDot11dInfo->channel_map[Channel]) if (dot11d_info->channel_map[Channel])
MaxTxPwrInDbm = pDot11dInfo->max_tx_pwr_dbm_list[Channel]; MaxTxPwrInDbm = dot11d_info->max_tx_pwr_dbm_list[Channel];
return MaxTxPwrInDbm; return MaxTxPwrInDbm;
} }
...@@ -117,11 +117,11 @@ EXPORT_SYMBOL(dot11d_get_max_tx_pwr_in_dbm); ...@@ -117,11 +117,11 @@ EXPORT_SYMBOL(dot11d_get_max_tx_pwr_in_dbm);
void dot11d_scan_complete(struct ieee80211_device *dev) void dot11d_scan_complete(struct ieee80211_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:
...@@ -138,13 +138,13 @@ EXPORT_SYMBOL(dot11d_scan_complete); ...@@ -138,13 +138,13 @@ EXPORT_SYMBOL(dot11d_scan_complete);
int is_legal_channel(struct ieee80211_device *dev, u8 channel) int is_legal_channel(struct ieee80211_device *dev, u8 channel)
{ {
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev); struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(dev);
if (channel > MAX_CHANNEL_NUMBER) { if (channel > MAX_CHANNEL_NUMBER) {
netdev_err(dev->dev, "is_legal_channel(): Invalid Channel\n"); netdev_err(dev->dev, "is_legal_channel(): Invalid Channel\n");
return 0; return 0;
} }
if (pDot11dInfo->channel_map[channel] > 0) if (dot11d_info->channel_map[channel] > 0)
return 1; return 1;
return 0; return 0;
} }
...@@ -152,12 +152,12 @@ EXPORT_SYMBOL(is_legal_channel); ...@@ -152,12 +152,12 @@ EXPORT_SYMBOL(is_legal_channel);
int to_legal_channel(struct ieee80211_device *dev, u8 channel) int to_legal_channel(struct ieee80211_device *dev, u8 channel)
{ {
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev); struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(dev);
u8 default_chn = 0; u8 default_chn = 0;
u32 i = 0; u32 i = 0;
for (i = 1; i <= MAX_CHANNEL_NUMBER; i++) { for (i = 1; i <= MAX_CHANNEL_NUMBER; i++) {
if (pDot11dInfo->channel_map[i] > 0) { if (dot11d_info->channel_map[i] > 0) {
default_chn = i; default_chn = i;
break; break;
} }
...@@ -168,7 +168,7 @@ int to_legal_channel(struct ieee80211_device *dev, u8 channel) ...@@ -168,7 +168,7 @@ int to_legal_channel(struct ieee80211_device *dev, u8 channel)
return default_chn; return default_chn;
} }
if (pDot11dInfo->channel_map[channel] > 0) if (dot11d_info->channel_map[channel] > 0)
return channel; return channel;
return default_chn; return default_chn;
......
...@@ -31,7 +31,7 @@ struct rt_dot11d_info { ...@@ -31,7 +31,7 @@ struct rt_dot11d_info {
u8 dot11d_enabled; /* dot11MultiDomainCapabilityEnabled */ u8 dot11d_enabled; /* dot11MultiDomainCapabilityEnabled */
}; };
#define GET_DOT11D_INFO(ieee_dev) ((struct rt_dot11d_info *)((ieee_dev)->pDot11dInfo)) #define GET_DOT11D_INFO(ieee_dev) ((struct rt_dot11d_info *)((ieee_dev)->dot11d_info))
#define IS_DOT11D_ENABLE(ieee_dev) (GET_DOT11D_INFO(ieee_dev)->dot11d_enabled) #define IS_DOT11D_ENABLE(ieee_dev) (GET_DOT11D_INFO(ieee_dev)->dot11d_enabled)
#define IS_COUNTRY_IE_VALID(ieee_dev) (GET_DOT11D_INFO(ieee_dev)->country_ie_len > 0) #define IS_COUNTRY_IE_VALID(ieee_dev) (GET_DOT11D_INFO(ieee_dev)->country_ie_len > 0)
......
...@@ -1772,7 +1772,7 @@ struct ieee80211_device { ...@@ -1772,7 +1772,7 @@ struct ieee80211_device {
/* map of allowed channels. 0 is dummy */ /* map of allowed channels. 0 is dummy */
// FIXME: remember to default to a basic channel plan depending of the PHY type // FIXME: remember to default to a basic channel plan depending of the PHY type
void *pDot11dInfo; void *dot11d_info;
bool bGlobalDomain; bool bGlobalDomain;
int rate; /* current rate */ int rate; /* current rate */
int basic_rate; int basic_rate;
......
...@@ -2542,8 +2542,8 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee) ...@@ -2542,8 +2542,8 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
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_KERNEL); ieee->dot11d_info = kzalloc(sizeof(struct rt_dot11d_info), GFP_KERNEL);
if (!ieee->pDot11dInfo) if (!ieee->dot11d_info)
IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't alloc memory for DOT11D\n"); IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't alloc memory for DOT11D\n");
//added for AP roaming //added for AP roaming
ieee->LinkDetectInfo.SlotNum = 2; ieee->LinkDetectInfo.SlotNum = 2;
...@@ -2603,8 +2603,8 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee) ...@@ -2603,8 +2603,8 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
void ieee80211_softmac_free(struct ieee80211_device *ieee) void ieee80211_softmac_free(struct ieee80211_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(&ieee->associate_retry_wq); cancel_delayed_work(&ieee->associate_retry_wq);
......
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