From: Jes Sorensen <jes.soren...@redhat.com> Signed-off-by: Jes Sorensen <jes.soren...@redhat.com> --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 4 ++-- drivers/staging/rtl8723au/core/rtw_recv.c | 12 ++++++------ drivers/staging/rtl8723au/core/rtw_xmit.c | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index b78e453..b0f218b 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 3275287..24fa288 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 3869386..0c66d35 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: -- 1.9.3 _______________________________________________ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel