wep decrypt statistics.

This commit is contained in:
solomon 2002-09-30 02:34:37 +00:00
parent bd8c2ed235
commit 44e5da58d4
2 changed files with 5 additions and 1 deletions

View File

@ -129,6 +129,8 @@ typedef struct p80211_frmrx_t
UINT32 cfpoll;
UINT32 cfack_cfpoll;
UINT32 data_unknown;
UINT32 decrypt;
UINT32 decrypt_err;
} p80211_frmrx_t;

View File

@ -319,6 +319,7 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, UINT32 ethconv, struct sk_buff *
if ((foo = wep_decrypt(wlandev, skb->data + WLAN_HDR_A3_LEN +4, payload_length-8, -1, skb->data+WLAN_HDR_A3_LEN, skb->data + WLAN_HDR_A3_LEN + payload_length - 4))) {
/* de-wep failed, drop skb. */
WLAN_LOG_WARNING1("Host de-WEP failed, dropping frame (%d).\n", foo);
wlandev->rx.decrypt_err++;
return 2;
}
@ -328,7 +329,8 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, UINT32 ethconv, struct sk_buff *
skb_pull(skb, 4);
/* chop off the ICV. */
skb_trim(skb, skb->len - 4);
wlandev->rx.decrypt++;
}
e_hdr = (wlan_ethhdr_t *) (skb->data + WLAN_HDR_A3_LEN);