diff options
Diffstat (limited to 'drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c')
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c index b8cc6a537c36..51552d42d66c 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c @@ -87,7 +87,7 @@ static u8 RxTsDeleteBA(struct ieee80211_device *ieee, PRX_TS_RECORD pRxTs) * PBA_RECORD pBA //entry to be reset * output: none ********************************************************************************************************************/ -void ResetBaEntry( PBA_RECORD pBA) +void ResetBaEntry(PBA_RECORD pBA) { pBA->bValid = false; pBA->BaParamSet.shortData = 0; @@ -165,7 +165,7 @@ static struct sk_buff *ieee80211_ADDBA(struct ieee80211_device *ieee, u8 *Dst, P if (ACT_ADDBAREQ == type) { // BA Start SeqCtrl - memcpy(tag,(u8 *)&(pBA->BaStartSeqCtrl), 2); + memcpy(tag, (u8 *)&(pBA->BaStartSeqCtrl), 2); tag += 2; } @@ -331,7 +331,7 @@ static void ieee80211_send_DELBA(struct ieee80211_device *ieee, u8 *dst, * return: 0(pass), other(fail) * notice: As this function need support of QOS, I comment some code out. And when qos is ready, this code need to be support. ********************************************************************************************************************/ -int ieee80211_rx_ADDBAReq( struct ieee80211_device *ieee, struct sk_buff *skb) +int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb) { struct ieee80211_hdr_3addr *req = NULL; u16 rc = 0; @@ -344,16 +344,19 @@ int ieee80211_rx_ADDBAReq( struct ieee80211_device *ieee, struct sk_buff *skb) if (skb->len < sizeof( struct ieee80211_hdr_3addr) + 9) { - IEEE80211_DEBUG(IEEE80211_DL_ERR, " Invalid skb len in BAREQ(%d / %zu)\n", skb->len, (sizeof( struct ieee80211_hdr_3addr) + 9)); + IEEE80211_DEBUG(IEEE80211_DL_ERR, + " Invalid skb len in BAREQ(%d / %zu)\n", + skb->len, + (sizeof(struct ieee80211_hdr_3addr) + 9)); return -1; } IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA|IEEE80211_DL_BA, skb->data, skb->len); - req = ( struct ieee80211_hdr_3addr *) skb->data; + req = (struct ieee80211_hdr_3addr *) skb->data; tag = (u8 *)req; dst = (u8 *)(&req->addr2[0]); - tag += sizeof( struct ieee80211_hdr_3addr); + tag += sizeof(struct ieee80211_hdr_3addr); pDialogToken = tag + 2; //category+action pBaParamSet = (PBA_PARAM_SET)(tag + 3); //+DialogToken pBaTimeoutVal = (u16 *)(tag + 5); @@ -431,7 +434,7 @@ OnADDBAReq_Fail: * return: 0(pass), other(fail) * notice: As this function need support of QOS, I comment some code out. And when qos is ready, this code need to be support. ********************************************************************************************************************/ -int ieee80211_rx_ADDBARsp( struct ieee80211_device *ieee, struct sk_buff *skb) +int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb) { struct ieee80211_hdr_3addr *rsp = NULL; PBA_RECORD pPendingBA, pAdmittedBA; @@ -443,13 +446,16 @@ int ieee80211_rx_ADDBARsp( struct ieee80211_device *ieee, struct sk_buff *skb) if (skb->len < sizeof( struct ieee80211_hdr_3addr) + 9) { - IEEE80211_DEBUG(IEEE80211_DL_ERR, " Invalid skb len in BARSP(%d / %zu)\n", skb->len, (sizeof( struct ieee80211_hdr_3addr) + 9)); + IEEE80211_DEBUG(IEEE80211_DL_ERR, + " Invalid skb len in BARSP(%d / %zu)\n", + skb->len, + (sizeof(struct ieee80211_hdr_3addr) + 9)); return -1; } - rsp = ( struct ieee80211_hdr_3addr *)skb->data; + rsp = (struct ieee80211_hdr_3addr *)skb->data; tag = (u8 *)rsp; dst = (u8 *)(&rsp->addr2[0]); - tag += sizeof( struct ieee80211_hdr_3addr); + tag += sizeof(struct ieee80211_hdr_3addr); pDialogToken = tag + 2; pStatusCode = (u16 *)(tag + 3); pBaParamSet = (PBA_PARAM_SET)(tag + 5); @@ -564,7 +570,7 @@ OnADDBARsp_Reject: * return: 0(pass), other(fail) * notice: As this function need support of QOS, I comment some code out. And when qos is ready, this code need to be support. ********************************************************************************************************************/ -int ieee80211_rx_DELBA(struct ieee80211_device *ieee,struct sk_buff *skb) +int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb) { struct ieee80211_hdr_3addr *delba = NULL; PDELBA_PARAM_SET pDelBaParamSet = NULL; @@ -573,7 +579,10 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee,struct sk_buff *skb) if (skb->len < sizeof( struct ieee80211_hdr_3addr) + 6) { - IEEE80211_DEBUG(IEEE80211_DL_ERR, " Invalid skb len in DELBA(%d / %zu)\n", skb->len, (sizeof( struct ieee80211_hdr_3addr) + 6)); + IEEE80211_DEBUG(IEEE80211_DL_ERR, + " Invalid skb len in DELBA(%d / %zu)\n", + skb->len, + (sizeof(struct ieee80211_hdr_3addr) + 6)); return -1; } @@ -585,9 +594,9 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee,struct sk_buff *skb) } IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA|IEEE80211_DL_BA, skb->data, skb->len); - delba = ( struct ieee80211_hdr_3addr *)skb->data; + delba = (struct ieee80211_hdr_3addr *)skb->data; dst = (u8 *)(&delba->addr2[0]); - delba += sizeof( struct ieee80211_hdr_3addr); + delba += sizeof(struct ieee80211_hdr_3addr); pDelBaParamSet = (PDELBA_PARAM_SET)(delba+2); pReasonCode = (u16 *)(delba+4); |