(unsigned char *)&val32,
&pattrib->pktlen);
- pattrib->iv_len = 4;
+ pattrib->iv_len = IEEE80211_WEP_IV_LEN;
}
pframe = rtw_set_fixed_ie23a(pframe, _AUTH_ALGM_NUM_,
pattrib->encrypt = WLAN_CIPHER_SUITE_WEP40;
- pattrib->icv_len = 4;
+ pattrib->icv_len = IEEE80211_WEP_ICV_LEN;
pattrib->pktlen += pattrib->icv_len;
}
{
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
- pattrib->iv_len = 4;
- pattrib->icv_len = 4;
+ pattrib->iv_len = IEEE80211_WEP_IV_LEN;
+ pattrib->icv_len = IEEE80211_WEP_ICV_LEN;
break;
case WLAN_CIPHER_SUITE_TKIP:
- pattrib->iv_len = 8;
- pattrib->icv_len = 4;
+ pattrib->iv_len = IEEE80211_TKIP_IV_LEN;
+ pattrib->icv_len = IEEE80211_TKIP_ICV_LEN;
break;
case WLAN_CIPHER_SUITE_CCMP:
- pattrib->iv_len = 8;
- pattrib->icv_len = 8;
+ pattrib->iv_len = IEEE80211_CCMP_HDR_LEN;
+ pattrib->icv_len = IEEE80211_CCMP_MIC_LEN;
break;
default:
pattrib->iv_len = 0;
switch (pattrib->encrypt) {
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
- pattrib->iv_len = 4;
- pattrib->icv_len = 4;
+ pattrib->iv_len = IEEE80211_WEP_IV_LEN;
+ pattrib->icv_len = IEEE80211_WEP_ICV_LEN;
break;
case WLAN_CIPHER_SUITE_TKIP:
- pattrib->iv_len = 8;
- pattrib->icv_len = 4;
+ pattrib->iv_len = IEEE80211_TKIP_IV_LEN;
+ pattrib->icv_len = IEEE80211_TKIP_ICV_LEN;
if (!padapter->securitypriv.busetkipkey) {
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_,
RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_,
("pattrib->encrypt =%d (WLAN_CIPHER_SUITE_CCMP)\n",
pattrib->encrypt));
- pattrib->iv_len = 8;
- pattrib->icv_len = 8;
+ pattrib->iv_len = IEEE80211_CCMP_HDR_LEN;
+ pattrib->icv_len = IEEE80211_CCMP_MIC_LEN;
break;
default: