rtl8188eu: Rework handling of BA_para_set

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2014-12-12 22:32:07 -06:00
parent 26930b0f9f
commit 4e305e82d0

View file

@ -6065,18 +6065,25 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
case 1: /* ADDBA rsp */ case 1: /* ADDBA rsp */
pframe = rtw_set_fixed_ie(pframe, 1, &(pmlmeinfo->ADDBA_req.dialog_token), &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, 1, &(pmlmeinfo->ADDBA_req.dialog_token), &(pattrib->pktlen));
pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&status), &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&status), &(pattrib->pktlen));
rtw_hal_get_def_var(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor);
BA_para_set = le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f; BA_para_set = le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f;
if (MAX_AMPDU_FACTOR_64K == max_rx_ampdu_factor) rtw_hal_get_def_var(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor);
switch (max_rx_ampdu_factor) {
case MAX_AMPDU_FACTOR_64K:
BA_para_set |= 0x1000; /* 64 buffer size */ BA_para_set |= 0x1000; /* 64 buffer size */
else if (MAX_AMPDU_FACTOR_32K == max_rx_ampdu_factor) break;
case MAX_AMPDU_FACTOR_32K:
BA_para_set |= 0x0800; /* 32 buffer size */ BA_para_set |= 0x0800; /* 32 buffer size */
else if (MAX_AMPDU_FACTOR_16K == max_rx_ampdu_factor) break;
case MAX_AMPDU_FACTOR_16K:
BA_para_set |= 0x0400; /* 16 buffer size */ BA_para_set |= 0x0400; /* 16 buffer size */
else if (MAX_AMPDU_FACTOR_8K == max_rx_ampdu_factor) break;
case MAX_AMPDU_FACTOR_8K:
BA_para_set |= 0x0200; /* 8 buffer size */ BA_para_set |= 0x0200; /* 8 buffer size */
else break;
default:
BA_para_set |= 0x1000; /* 64 buffer size */ BA_para_set |= 0x1000; /* 64 buffer size */
break;
}
if (pregpriv->ampdu_amsdu == 0)/* disabled */ if (pregpriv->ampdu_amsdu == 0)/* disabled */
BA_para_set = BA_para_set & ~BIT(0); BA_para_set = BA_para_set & ~BIT(0);