mirror of https://gitee.com/openkylin/linux.git
staging:rtl8192u: Remove typedef and rename struct RT_DOT11D_INFO - Style
Removed the typedef from structure RT_DOT11D_INFO. This change clears the checkpatch issue with declaring new types. Rename the structure from RT_DOT11D_INFO to rt_dot11d_info. Coding style changes which should not impact runtime execution of code. Signed-off-by: John Whitmore <johnfwhitmore@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
32cb4d731a
commit
3c22fbaf3b
|
@ -5,7 +5,7 @@
|
|||
|
||||
void Dot11d_Init(struct ieee80211_device *ieee)
|
||||
{
|
||||
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);
|
||||
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee);
|
||||
|
||||
pDot11dInfo->bEnabled = false;
|
||||
|
||||
|
@ -23,7 +23,7 @@ EXPORT_SYMBOL(Dot11d_Init);
|
|||
void Dot11d_Reset(struct ieee80211_device *ieee)
|
||||
{
|
||||
u32 i;
|
||||
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(ieee);
|
||||
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee);
|
||||
/* Clear old channel map */
|
||||
memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER+1);
|
||||
memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
|
||||
|
@ -52,7 +52,7 @@ EXPORT_SYMBOL(Dot11d_Reset);
|
|||
void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
|
||||
u16 CoutryIeLen, u8 *pCoutryIe)
|
||||
{
|
||||
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
|
||||
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
|
||||
u8 i, j, NumTriples, MaxChnlNum;
|
||||
struct chnl_txpower_triple *pTriple;
|
||||
|
||||
|
@ -101,7 +101,7 @@ EXPORT_SYMBOL(Dot11d_UpdateCountryIe);
|
|||
|
||||
u8 DOT11D_GetMaxTxPwrInDbm(struct ieee80211_device *dev, u8 Channel)
|
||||
{
|
||||
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
|
||||
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
|
||||
u8 MaxTxPwrInDbm = 255;
|
||||
|
||||
if (Channel > MAX_CHANNEL_NUMBER) {
|
||||
|
@ -117,7 +117,7 @@ EXPORT_SYMBOL(DOT11D_GetMaxTxPwrInDbm);
|
|||
|
||||
void DOT11D_ScanComplete(struct ieee80211_device *dev)
|
||||
{
|
||||
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
|
||||
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
|
||||
|
||||
switch (pDot11dInfo->State) {
|
||||
case DOT11D_STATE_LEARNED:
|
||||
|
@ -138,7 +138,7 @@ EXPORT_SYMBOL(DOT11D_ScanComplete);
|
|||
|
||||
int IsLegalChannel(struct ieee80211_device *dev, u8 channel)
|
||||
{
|
||||
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
|
||||
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
|
||||
|
||||
if (channel > MAX_CHANNEL_NUMBER) {
|
||||
netdev_err(dev->dev, "IsLegalChannel(): Invalid Channel\n");
|
||||
|
@ -152,7 +152,7 @@ EXPORT_SYMBOL(IsLegalChannel);
|
|||
|
||||
int ToLegalChannel(struct ieee80211_device *dev, u8 channel)
|
||||
{
|
||||
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
|
||||
struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
|
||||
u8 default_chn = 0;
|
||||
u32 i = 0;
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@ enum dot11d_state {
|
|||
DOT11D_STATE_DONE,
|
||||
};
|
||||
|
||||
typedef struct _RT_DOT11D_INFO {
|
||||
/* DECLARE_RT_OBJECT(RT_DOT11D_INFO); */
|
||||
struct rt_dot11d_info {
|
||||
/* DECLARE_RT_OBJECT(rt_dot11d_info); */
|
||||
|
||||
bool bEnabled; /* dot11MultiDomainCapabilityEnabled */
|
||||
|
||||
|
@ -30,7 +30,8 @@ typedef struct _RT_DOT11D_INFO {
|
|||
u8 MaxTxPwrDbmList[MAX_CHANNEL_NUMBER+1];
|
||||
|
||||
enum dot11d_state State;
|
||||
} RT_DOT11D_INFO, *PRT_DOT11D_INFO;
|
||||
};
|
||||
|
||||
#define eqMacAddr(a, b) (((a)[0] == (b)[0] && \
|
||||
(a)[1] == (b)[1] && (a)[2] == (b)[2] && (a)[3] == (b)[3] && \
|
||||
(a)[4] == (b)[4] && (a)[5] == (b)[5]) ? 1 : 0)
|
||||
|
@ -38,7 +39,7 @@ typedef struct _RT_DOT11D_INFO {
|
|||
(des)[1] = (src)[1], (des)[2] = (src)[2], \
|
||||
(des)[3] = (src)[3], (des)[4] = (src)[4], \
|
||||
(des)[5] = (src)[5])
|
||||
#define GET_DOT11D_INFO(__pIeeeDev) ((PRT_DOT11D_INFO)((__pIeeeDev)->pDot11dInfo))
|
||||
#define GET_DOT11D_INFO(__pIeeeDev) ((struct rt_dot11d_info *)((__pIeeeDev)->pDot11dInfo))
|
||||
|
||||
#define IS_DOT11D_ENABLE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->bEnabled)
|
||||
#define IS_COUNTRY_IE_VALID(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeLen > 0)
|
||||
|
|
|
@ -2542,7 +2542,7 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
|
|||
for (i = 0; i < 5; i++)
|
||||
ieee->seq_ctrl[i] = 0;
|
||||
|
||||
ieee->pDot11dInfo = kzalloc(sizeof(RT_DOT11D_INFO), GFP_KERNEL);
|
||||
ieee->pDot11dInfo = kzalloc(sizeof(struct rt_dot11d_info), GFP_KERNEL);
|
||||
if (!ieee->pDot11dInfo)
|
||||
IEEE80211_DEBUG(IEEE80211_DL_ERR, "can't alloc memory for DOT11D\n");
|
||||
//added for AP roaming
|
||||
|
|
Loading…
Reference in New Issue