Commit 06e17e36 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Use ieee80211.h defines for IV/ICV len values

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c1caefbb
......@@ -3085,7 +3085,7 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta,
(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_,
......@@ -3121,7 +3121,7 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta,
pattrib->encrypt = WLAN_CIPHER_SUITE_WEP40;
pattrib->icv_len = 4;
pattrib->icv_len = IEEE80211_WEP_ICV_LEN;
pattrib->pktlen += pattrib->icv_len;
}
......
......@@ -1410,16 +1410,16 @@ static int validate_recv_data_frame(struct rtw_adapter *adapter,
{
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;
......
......@@ -597,13 +597,13 @@ static int update_attrib(struct rtw_adapter *padapter,
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_,
......@@ -619,8 +619,8 @@ static int update_attrib(struct rtw_adapter *padapter,
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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment