diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index e296813203aab35a1cc69bc76d7f509fd4e6344c..4e8bcc25ad2cdcdbe8412e4097efe6bb1fa6687c 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -626,7 +626,7 @@ TsInitAddBA( pBA->DialogToken++; // DialogToken: Only keep the latest dialog token pBA->BaParamSet.field.AMSDU_Support = 0; // Do not support A-MSDU with A-MPDU now!! pBA->BaParamSet.field.BAPolicy = Policy; // Policy: Delayed or Immediate - pBA->BaParamSet.field.TID = pTS->ts_common_info.t_spec.f.TSInfo.field.ucTSID; // TID + pBA->BaParamSet.field.TID = pTS->ts_common_info.t_spec.f.TSInfo.ucTSID; // TID // BufferSize: This need to be set according to A-MPDU vector pBA->BaParamSet.field.BufferSize = 32; // BufferSize: This need to be set according to A-MPDU vector pBA->BaTimeoutValue = 0; // Timeout value: Set 0 to disable Timer diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h index 1f16d1692c03853560ca8b50ac7446346042e6f4..4faa89db8355e2cd4fb1f077c576a80bea1744bd 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_Qos.h @@ -26,26 +26,24 @@ enum direction_value { }; -// -// TS Info field in WMM TSPEC Element. -// Ref: -// 1. WMM spec 2.2.11: WME TSPEC Element, p.18. -// 2. 8185 QoS code: QOS_TSINFO [def. in QoS_mp.h] -// -union qos_tsinfo { - u8 charData[3]; - struct { - u8 ucTrafficType:1; //WMM is reserved - u8 ucTSID:4; - u8 ucDirection:2; - u8 ucAccessPolicy:2; //WMM: bit8=0, bit7=1 - u8 ucAggregation:1; //WMM is reserved - u8 ucPSB:1; //WMMSA is APSD - u8 ucUP:3; - u8 ucTSInfoAckPolicy:2; //WMM is reserved - u8 ucSchedule:1; //WMM is reserved - u8 ucReserved:7; - } field; +/* + * TS Info field in WMM TSPEC Element. + * Ref: + * 1. WMM spec 2.2.11: WME TSPEC Element, p.18. + * 2. 8185 QoS code: QOS_TSINFO [def. in QoS_mp.h] + * Note: sizeof 3 Bytes + */ +struct qos_tsinfo { + u16 ucTrafficType:1; //WMM is reserved + u16 ucTSID:4; + u16 ucDirection:2; + u16 ucAccessPolicy:2; //WMM: bit8=0, bit7=1 + u16 ucAggregation:1; //WMM is reserved + u16 ucPSB:1; //WMMSA is APSD + u16 ucUP:3; + u16 ucTSInfoAckPolicy:2; //WMM is reserved + u8 ucSchedule:1; //WMM is reserved + u8 ucReserved:7; }; // @@ -56,7 +54,7 @@ typedef union _TSPEC_BODY { u8 charData[55]; struct { - union qos_tsinfo TSInfo; //u8 TSInfo[3]; + struct qos_tsinfo TSInfo; //u8 TSInfo[3]; u16 NominalMSDUsize; u16 MaxMSDUsize; u32 MinServiceItv; diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c index c21bf3d3b242509d7068f3c45fd16342ce45d9d8..39a074621b3babd92b7768160e25333e085040ca 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c @@ -246,10 +246,10 @@ static struct ts_common_info *SearchAdmitTRStream(struct ieee80211_device *ieee, if (!search_dir[dir]) continue; list_for_each_entry(pRet, psearch_list, list){ - // IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection); + // IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.ucTSID, pRet->TSpec.f.TSInfo.ucDirection); if (memcmp(pRet->addr, Addr, 6) == 0) - if (pRet->t_spec.f.TSInfo.field.ucTSID == TID) - if(pRet->t_spec.f.TSInfo.field.ucDirection == dir) { + if (pRet->t_spec.f.TSInfo.ucTSID == TID) + if(pRet->t_spec.f.TSInfo.ucDirection == dir) { // printk("Bingo! got it\n"); break; } @@ -355,7 +355,7 @@ bool GetTs( // For HCCA or WMMSA, TS cannot be addmit without negotiation. // TSPEC_BODY TSpec; - union qos_tsinfo *pTSInfo = &TSpec.f.TSInfo; + struct qos_tsinfo *pTSInfo = &TSpec.f.TSInfo; struct list_head *pUnusedList = (TxRxSelect == TX_DIR)? (&ieee->Tx_TS_Unused_List): @@ -383,15 +383,15 @@ bool GetTs( IEEE80211_DEBUG(IEEE80211_DL_TS, "to init current TS, UP:%d, Dir:%d, addr:%pM\n", UP, Dir, Addr); // Prepare TS Info releated field - pTSInfo->field.ucTrafficType = 0; // Traffic type: WMM is reserved in this field - pTSInfo->field.ucTSID = UP; // TSID - pTSInfo->field.ucDirection = Dir; // Direction: if there is DirectLink, this need additional consideration. - pTSInfo->field.ucAccessPolicy = 1; // Access policy - pTSInfo->field.ucAggregation = 0; // Aggregation - pTSInfo->field.ucPSB = 0; // Aggregation - pTSInfo->field.ucUP = UP; // User priority - pTSInfo->field.ucTSInfoAckPolicy = 0; // Ack policy - pTSInfo->field.ucSchedule = 0; // Schedule + pTSInfo->ucTrafficType = 0; // Traffic type: WMM is reserved in this field + pTSInfo->ucTSID = UP; // TSID + pTSInfo->ucDirection = Dir; // Direction: if there is DirectLink, this need additional consideration. + pTSInfo->ucAccessPolicy = 1; // Access policy + pTSInfo->ucAggregation = 0; // Aggregation + pTSInfo->ucPSB = 0; // Aggregation + pTSInfo->ucUP = UP; // User priority + pTSInfo->ucTSInfoAckPolicy = 0; // Ack policy + pTSInfo->ucSchedule = 0; // Schedule MakeTSEntry(*ppTS, Addr, &TSpec, NULL, 0, 0); AdmitTS(ieee, *ppTS, 0);