diff options
Diffstat (limited to 'drivers/staging/rtl8192e/rtl819x_HTProc.c')
-rw-r--r-- | drivers/staging/rtl8192e/rtl819x_HTProc.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c index 8b7412980ebb..c7f45080061f 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -211,7 +211,6 @@ void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString) "[%x]\n", pHTInfoEle->BasicMSC[0], pHTInfoEle->BasicMSC[1], pHTInfoEle->BasicMSC[2], pHTInfoEle->BasicMSC[3], pHTInfoEle->BasicMSC[4]); - return; } static bool IsHTHalfNmode40Bandwidth(struct rtllib_device *ieee) @@ -340,6 +339,7 @@ static void HTIOTPeerDetermine(struct rtllib_device *ieee) { struct rt_hi_throughput *pHTInfo = ieee->pHTInfo; struct rtllib_network *net = &ieee->current_network; + if (net->bssht.bdRT2RTAggregation) { pHTInfo->IOTPeer = HT_IOT_PEER_REALTEK; if (net->bssht.RT2RT_HT_Mode & RT_HT_CAP_USE_92SE) @@ -425,6 +425,7 @@ static u8 HTIOTActIsCCDFsync(struct rtllib_device *ieee) static void HTIOTActDetermineRaFunc(struct rtllib_device *ieee, bool bPeerRx2ss) { struct rt_hi_throughput *pHTInfo = ieee->pHTInfo; + pHTInfo->IOTRaFunc &= HT_IOT_RAFUNC_DISABLE_ALL; if (pHTInfo->IOTPeer == HT_IOT_PEER_RALINK && !bPeerRx2ss) @@ -457,6 +458,7 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap, if ((bAssoc) && (pHT->ePeerHTSpecVer == HT_SPEC_VER_EWC)) { u8 EWC11NHTCap[] = {0x00, 0x90, 0x4c, 0x33}; + memcpy(posHTCap, EWC11NHTCap, sizeof(EWC11NHTCap)); pCapELE = (struct ht_capab_ele *)&(posHTCap[4]); *len = 30 + 2; @@ -521,7 +523,6 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap, pCapELE->MCS[1] = 0; } } - return; } void HTConstructInfoElement(struct rtllib_device *ieee, u8 *posHTInfo, @@ -529,6 +530,7 @@ void HTConstructInfoElement(struct rtllib_device *ieee, u8 *posHTInfo, { struct rt_hi_throughput *pHT = ieee->pHTInfo; struct ht_info_ele *pHTInfoEle = (struct ht_info_ele *)posHTInfo; + if ((posHTInfo == NULL) || (pHTInfoEle == NULL)) { RTLLIB_DEBUG(RTLLIB_DL_ERR, "posHTInfo or pHTInfoEle can't be " "null in HTConstructInfoElement()\n"); @@ -564,7 +566,6 @@ void HTConstructInfoElement(struct rtllib_device *ieee, u8 *posHTInfo, } else { *len = 0; } - return; } void HTConstructRT2RTAggElement(struct rtllib_device *ieee, u8 *posRT2RTAgg, @@ -588,13 +589,12 @@ void HTConstructRT2RTAggElement(struct rtllib_device *ieee, u8 *posRT2RTAgg, *posRT2RTAgg |= RT_HT_CAP_USE_WOW; *len = 6 + 2; - - return; } static u8 HT_PickMCSRate(struct rtllib_device *ieee, u8 *pOperateMCS) { u8 i; + if (pOperateMCS == NULL) { RTLLIB_DEBUG(RTLLIB_DL_ERR, "pOperateMCS can't be null" " in HT_PickMCSRate()\n"); @@ -629,6 +629,7 @@ u8 HTGetHighestMCSRate(struct rtllib_device *ieee, u8 *pMCSRateSet, u8 bitMap; u8 mcsRate = 0; u8 availableMcsRate[16]; + if (pMCSRateSet == NULL || pMCSFilter == NULL) { RTLLIB_DEBUG(RTLLIB_DL_ERR, "pMCSRateSet or pMCSFilter can't " "be null in HTGetHighestMCSRate()\n"); @@ -846,6 +847,7 @@ void HTInitializeHTInfo(struct rtllib_device *ieee) { u8 *RegHTSuppRateSets = &(ieee->RegHTSuppRateSet[0]); + RegHTSuppRateSets[0] = 0xFF; RegHTSuppRateSets[1] = 0xFF; RegHTSuppRateSets[4] = 0x01; @@ -991,7 +993,6 @@ void HTUseDefaultSetting(struct rtllib_device *ieee) } else { pHTInfo->bCurrentHTSupport = false; } - return; } u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame) @@ -1047,7 +1048,7 @@ void HTSetConnectBwMode(struct rtllib_device *ieee, Bandwidth = HT_CHANNEL_WIDTH_20; if (pHTInfo->bSwBwInProgress) { - printk(KERN_INFO "%s: bSwBwInProgress!!\n", __func__); + pr_info("%s: bSwBwInProgress!!\n", __func__); return; } if (Bandwidth == HT_CHANNEL_WIDTH_20_40) { @@ -1067,7 +1068,7 @@ void HTSetConnectBwMode(struct rtllib_device *ieee, pHTInfo->CurSTAExtChnlOffset = HT_EXTCHNL_OFFSET_NO_EXT; } - printk(KERN_INFO "%s():pHTInfo->bCurBW40MHz:%x\n", __func__, + pr_info("%s():pHTInfo->bCurBW40MHz:%x\n", __func__, pHTInfo->bCurBW40MHz); pHTInfo->bSwBwInProgress = true; |