staging: rtl8192e: Convert typedef HT_CAPABILITY_ELE to struct ht_capab_ele
Remove typedef from struct. Rename struct. Rename uses. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
407e998e59
commit
e92b71d571
|
@ -135,7 +135,7 @@ typedef enum _HT_Bandwidth_40MHZ_Sub_Carrier{
|
||||||
SC_MODE_FULL40MHZ = 3,
|
SC_MODE_FULL40MHZ = 3,
|
||||||
}HT_BW40_SC_E;
|
}HT_BW40_SC_E;
|
||||||
|
|
||||||
typedef struct _HT_CAPABILITY_ELE{
|
struct ht_capab_ele {
|
||||||
|
|
||||||
u8 AdvCoding:1;
|
u8 AdvCoding:1;
|
||||||
u8 ChlWidth:1;
|
u8 ChlWidth:1;
|
||||||
|
@ -165,7 +165,7 @@ typedef struct _HT_CAPABILITY_ELE{
|
||||||
|
|
||||||
u8 ASCap;
|
u8 ASCap;
|
||||||
|
|
||||||
} __attribute__ ((packed)) HT_CAPABILITY_ELE, *PHT_CAPABILITY_ELE;
|
} __packed;
|
||||||
|
|
||||||
|
|
||||||
struct ht_info_ele {
|
struct ht_info_ele {
|
||||||
|
@ -232,7 +232,7 @@ struct rt_hi_throughput {
|
||||||
HT_SPEC_VER ePeerHTSpecVer;
|
HT_SPEC_VER ePeerHTSpecVer;
|
||||||
|
|
||||||
|
|
||||||
HT_CAPABILITY_ELE SelfHTCap;
|
struct ht_capab_ele SelfHTCap;
|
||||||
struct ht_info_ele SelfHTInfo;
|
struct ht_info_ele SelfHTInfo;
|
||||||
|
|
||||||
u8 PeerHTCapBuf[32];
|
u8 PeerHTCapBuf[32];
|
||||||
|
|
|
@ -98,14 +98,14 @@ void HTDebugHTCapability(u8* CapIE, u8* TitleString )
|
||||||
{
|
{
|
||||||
|
|
||||||
static u8 EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
|
static u8 EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
|
||||||
PHT_CAPABILITY_ELE pCapELE;
|
struct ht_capab_ele *pCapELE;
|
||||||
|
|
||||||
if (!memcmp(CapIE, EWC11NHTCap, sizeof(EWC11NHTCap)))
|
if (!memcmp(CapIE, EWC11NHTCap, sizeof(EWC11NHTCap)))
|
||||||
{
|
{
|
||||||
RTLLIB_DEBUG(RTLLIB_DL_HT, "EWC IE in %s()\n", __func__);
|
RTLLIB_DEBUG(RTLLIB_DL_HT, "EWC IE in %s()\n", __func__);
|
||||||
pCapELE = (PHT_CAPABILITY_ELE)(&CapIE[4]);
|
pCapELE = (struct ht_capab_ele *)(&CapIE[4]);
|
||||||
}else
|
}else
|
||||||
pCapELE = (PHT_CAPABILITY_ELE)(&CapIE[0]);
|
pCapELE = (struct ht_capab_ele *)(&CapIE[0]);
|
||||||
|
|
||||||
RTLLIB_DEBUG(RTLLIB_DL_HT, "<Log HT Capability>. Called by %s\n", TitleString );
|
RTLLIB_DEBUG(RTLLIB_DL_HT, "<Log HT Capability>. Called by %s\n", TitleString );
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ bool IsHTHalfNmode40Bandwidth(struct rtllib_device* ieee)
|
||||||
retValue = false;
|
retValue = false;
|
||||||
else if (!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
|
else if (!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
|
||||||
retValue = false;
|
retValue = false;
|
||||||
else if (((PHT_CAPABILITY_ELE)(pHTInfo->PeerHTCapBuf))->ChlWidth)
|
else if (((struct ht_capab_ele *)(pHTInfo->PeerHTCapBuf))->ChlWidth)
|
||||||
retValue = true;
|
retValue = true;
|
||||||
else
|
else
|
||||||
retValue = false;
|
retValue = false;
|
||||||
|
@ -209,14 +209,14 @@ bool IsHTHalfNmodeSGI(struct rtllib_device* ieee, bool is40MHz)
|
||||||
retValue = false;
|
retValue = false;
|
||||||
else if (is40MHz)
|
else if (is40MHz)
|
||||||
{
|
{
|
||||||
if (((PHT_CAPABILITY_ELE)(pHTInfo->PeerHTCapBuf))->ShortGI40Mhz)
|
if (((struct ht_capab_ele *)(pHTInfo->PeerHTCapBuf))->ShortGI40Mhz)
|
||||||
retValue = true;
|
retValue = true;
|
||||||
else
|
else
|
||||||
retValue = false;
|
retValue = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (((PHT_CAPABILITY_ELE)(pHTInfo->PeerHTCapBuf))->ShortGI20Mhz)
|
if (((struct ht_capab_ele *)(pHTInfo->PeerHTCapBuf))->ShortGI20Mhz)
|
||||||
retValue = true;
|
retValue = true;
|
||||||
else
|
else
|
||||||
retValue = false;
|
retValue = false;
|
||||||
|
@ -585,7 +585,7 @@ void HTResetIOTSetting(
|
||||||
void HTConstructCapabilityElement(struct rtllib_device* ieee, u8* posHTCap, u8* len, u8 IsEncrypt, bool bAssoc)
|
void HTConstructCapabilityElement(struct rtllib_device* ieee, u8* posHTCap, u8* len, u8 IsEncrypt, bool bAssoc)
|
||||||
{
|
{
|
||||||
struct rt_hi_throughput *pHT = ieee->pHTInfo;
|
struct rt_hi_throughput *pHT = ieee->pHTInfo;
|
||||||
PHT_CAPABILITY_ELE pCapELE = NULL;
|
struct ht_capab_ele *pCapELE = NULL;
|
||||||
|
|
||||||
if ((posHTCap == NULL) || (pHT == NULL))
|
if ((posHTCap == NULL) || (pHT == NULL))
|
||||||
{
|
{
|
||||||
|
@ -598,11 +598,11 @@ void HTConstructCapabilityElement(struct rtllib_device* ieee, u8* posHTCap, u8*
|
||||||
{
|
{
|
||||||
u8 EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
|
u8 EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33};
|
||||||
memcpy(posHTCap, EWC11NHTCap, sizeof(EWC11NHTCap));
|
memcpy(posHTCap, EWC11NHTCap, sizeof(EWC11NHTCap));
|
||||||
pCapELE = (PHT_CAPABILITY_ELE)&(posHTCap[4]);
|
pCapELE = (struct ht_capab_ele *)&(posHTCap[4]);
|
||||||
*len = 30 + 2;
|
*len = 30 + 2;
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
pCapELE = (PHT_CAPABILITY_ELE)posHTCap;
|
pCapELE = (struct ht_capab_ele *)posHTCap;
|
||||||
*len = 26 + 2;
|
*len = 26 + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -835,7 +835,7 @@ void HTSetConnectBwMode(struct rtllib_device* ieee, HT_CHANNEL_WIDTH Bandwidth,
|
||||||
void HTOnAssocRsp(struct rtllib_device *ieee)
|
void HTOnAssocRsp(struct rtllib_device *ieee)
|
||||||
{
|
{
|
||||||
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
|
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
|
||||||
PHT_CAPABILITY_ELE pPeerHTCap = NULL;
|
struct ht_capab_ele *pPeerHTCap = NULL;
|
||||||
struct ht_info_ele *pPeerHTInfo = NULL;
|
struct ht_info_ele *pPeerHTInfo = NULL;
|
||||||
u16 nMaxAMSDUSize = 0;
|
u16 nMaxAMSDUSize = 0;
|
||||||
u8* pMcsFilter = NULL;
|
u8* pMcsFilter = NULL;
|
||||||
|
@ -851,16 +851,16 @@ void HTOnAssocRsp(struct rtllib_device *ieee)
|
||||||
RTLLIB_DEBUG(RTLLIB_DL_HT, "===> HTOnAssocRsp_wq(): HT_ENABLE\n");
|
RTLLIB_DEBUG(RTLLIB_DL_HT, "===> HTOnAssocRsp_wq(): HT_ENABLE\n");
|
||||||
|
|
||||||
if (!memcmp(pHTInfo->PeerHTCapBuf,EWC11NHTCap, sizeof(EWC11NHTCap)))
|
if (!memcmp(pHTInfo->PeerHTCapBuf,EWC11NHTCap, sizeof(EWC11NHTCap)))
|
||||||
pPeerHTCap = (PHT_CAPABILITY_ELE)(&pHTInfo->PeerHTCapBuf[4]);
|
pPeerHTCap = (struct ht_capab_ele *)(&pHTInfo->PeerHTCapBuf[4]);
|
||||||
else
|
else
|
||||||
pPeerHTCap = (PHT_CAPABILITY_ELE)(pHTInfo->PeerHTCapBuf);
|
pPeerHTCap = (struct ht_capab_ele *)(pHTInfo->PeerHTCapBuf);
|
||||||
|
|
||||||
if (!memcmp(pHTInfo->PeerHTInfoBuf, EWC11NHTInfo, sizeof(EWC11NHTInfo)))
|
if (!memcmp(pHTInfo->PeerHTInfoBuf, EWC11NHTInfo, sizeof(EWC11NHTInfo)))
|
||||||
pPeerHTInfo = (struct ht_info_ele *)(&pHTInfo->PeerHTInfoBuf[4]);
|
pPeerHTInfo = (struct ht_info_ele *)(&pHTInfo->PeerHTInfoBuf[4]);
|
||||||
else
|
else
|
||||||
pPeerHTInfo = (struct ht_info_ele *)(pHTInfo->PeerHTInfoBuf);
|
pPeerHTInfo = (struct ht_info_ele *)(pHTInfo->PeerHTInfoBuf);
|
||||||
|
|
||||||
RTLLIB_DEBUG_DATA(RTLLIB_DL_DATA|RTLLIB_DL_HT, pPeerHTCap, sizeof(HT_CAPABILITY_ELE));
|
RTLLIB_DEBUG_DATA(RTLLIB_DL_DATA|RTLLIB_DL_HT, pPeerHTCap, sizeof(struct ht_capab_ele));
|
||||||
HTSetConnectBwMode(ieee, (HT_CHANNEL_WIDTH)(pPeerHTCap->ChlWidth), (HT_EXTCHNL_OFFSET)(pPeerHTInfo->ExtChlOffset));
|
HTSetConnectBwMode(ieee, (HT_CHANNEL_WIDTH)(pPeerHTCap->ChlWidth), (HT_EXTCHNL_OFFSET)(pPeerHTInfo->ExtChlOffset));
|
||||||
pHTInfo->bCurTxBW40MHz = ((pPeerHTInfo->RecommemdedTxWidth == 1)?true:false);
|
pHTInfo->bCurTxBW40MHz = ((pPeerHTInfo->RecommemdedTxWidth == 1)?true:false);
|
||||||
|
|
||||||
|
|
|
@ -1949,7 +1949,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
|
||||||
}
|
}
|
||||||
if (tmp_htcap_len != 0){
|
if (tmp_htcap_len != 0){
|
||||||
network->bssht.bdSupportHT = true;
|
network->bssht.bdSupportHT = true;
|
||||||
network->bssht.bdHT1R = ((((PHT_CAPABILITY_ELE)(network->bssht.bdHTCapBuf))->MCS[1]) == 0);
|
network->bssht.bdHT1R = ((((struct ht_capab_ele *)(network->bssht.bdHTCapBuf))->MCS[1]) == 0);
|
||||||
}else{
|
}else{
|
||||||
network->bssht.bdSupportHT = false;
|
network->bssht.bdSupportHT = false;
|
||||||
network->bssht.bdHT1R = false;
|
network->bssht.bdHT1R = false;
|
||||||
|
@ -2155,9 +2155,9 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
|
||||||
memcpy(network->bssht.bdHTCapBuf,info_element->data,network->bssht.bdHTCapLen);
|
memcpy(network->bssht.bdHTCapBuf,info_element->data,network->bssht.bdHTCapLen);
|
||||||
|
|
||||||
network->bssht.bdSupportHT = true;
|
network->bssht.bdSupportHT = true;
|
||||||
network->bssht.bdHT1R = ((((PHT_CAPABILITY_ELE)(network->bssht.bdHTCapBuf))->MCS[1]) == 0);
|
network->bssht.bdHT1R = ((((struct ht_capab_ele *)(network->bssht.bdHTCapBuf))->MCS[1]) == 0);
|
||||||
|
|
||||||
network->bssht.bdBandWidth = (HT_CHANNEL_WIDTH)(((PHT_CAPABILITY_ELE)(network->bssht.bdHTCapBuf))->ChlWidth);
|
network->bssht.bdBandWidth = (HT_CHANNEL_WIDTH)(((struct ht_capab_ele *)(network->bssht.bdHTCapBuf))->ChlWidth);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
network->bssht.bdSupportHT = false;
|
network->bssht.bdSupportHT = false;
|
||||||
|
|
|
@ -148,13 +148,13 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee,
|
||||||
|
|
||||||
if (network->mode >= IEEE_N_24G)
|
if (network->mode >= IEEE_N_24G)
|
||||||
{
|
{
|
||||||
PHT_CAPABILITY_ELE ht_cap = NULL;
|
struct ht_capab_ele *ht_cap = NULL;
|
||||||
bool is40M = false, isShortGI = false;
|
bool is40M = false, isShortGI = false;
|
||||||
u8 max_mcs = 0;
|
u8 max_mcs = 0;
|
||||||
if (!memcmp(network->bssht.bdHTCapBuf, EWC11NHTCap, 4))
|
if (!memcmp(network->bssht.bdHTCapBuf, EWC11NHTCap, 4))
|
||||||
ht_cap = (PHT_CAPABILITY_ELE)&network->bssht.bdHTCapBuf[4];
|
ht_cap = (struct ht_capab_ele *)&network->bssht.bdHTCapBuf[4];
|
||||||
else
|
else
|
||||||
ht_cap = (PHT_CAPABILITY_ELE)&network->bssht.bdHTCapBuf[0];
|
ht_cap = (struct ht_capab_ele *)&network->bssht.bdHTCapBuf[0];
|
||||||
is40M = (ht_cap->ChlWidth)?1:0;
|
is40M = (ht_cap->ChlWidth)?1:0;
|
||||||
isShortGI = (ht_cap->ChlWidth)?
|
isShortGI = (ht_cap->ChlWidth)?
|
||||||
((ht_cap->ShortGI40Mhz)?1:0):
|
((ht_cap->ShortGI40Mhz)?1:0):
|
||||||
|
|
Loading…
Reference in a new issue