From: Jes Sorensen Date: Sun, 25 May 2014 20:43:02 +0000 (+0200) Subject: staging: rtl8723au: Use ieee80211.h defines for IV/ICV len values X-Git-Tag: firefly_0821_release~176^2~3465^2~39^2~240 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=06e17e361eadc3897bcd58370a6e5dbf94722d21;p=firefly-linux-kernel-4.4.55.git staging: rtl8723au: Use ieee80211.h defines for IV/ICV len values Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index b78e453b7a0f..b0f218b4ca2f 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -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; } diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c b/drivers/staging/rtl8723au/core/rtw_recv.c index 3275287ca25a..24fa28848769 100644 --- a/drivers/staging/rtl8723au/core/rtw_recv.c +++ b/drivers/staging/rtl8723au/core/rtw_recv.c @@ -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; diff --git a/drivers/staging/rtl8723au/core/rtw_xmit.c b/drivers/staging/rtl8723au/core/rtw_xmit.c index 3869386f441a..0c66d3541665 100644 --- a/drivers/staging/rtl8723au/core/rtw_xmit.c +++ b/drivers/staging/rtl8723au/core/rtw_xmit.c @@ -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: