Lines Matching refs:rx
95 ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx) in ieee80211_rx_h_michael_mic_verify() argument
101 struct sk_buff *skb = rx->skb; in ieee80211_rx_h_michael_mic_verify()
122 if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key && in ieee80211_rx_h_michael_mic_verify()
123 rx->key->conf.cipher == WLAN_CIPHER_SUITE_TKIP) in ieee80211_rx_h_michael_mic_verify()
134 if (!rx->key || rx->key->conf.cipher != WLAN_CIPHER_SUITE_TKIP || in ieee80211_rx_h_michael_mic_verify()
138 if (rx->sdata->vif.type == NL80211_IFTYPE_AP && rx->key->conf.keyidx) { in ieee80211_rx_h_michael_mic_verify()
155 if (skb_linearize(rx->skb)) in ieee80211_rx_h_michael_mic_verify()
161 key = &rx->key->conf.key[NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY]; in ieee80211_rx_h_michael_mic_verify()
171 rx->key->u.tkip.rx[rx->security_idx].iv32 = rx->tkip.iv32; in ieee80211_rx_h_michael_mic_verify()
172 rx->key->u.tkip.rx[rx->security_idx].iv16 = rx->tkip.iv16; in ieee80211_rx_h_michael_mic_verify()
177 rx->key->u.tkip.mic_failures++; in ieee80211_rx_h_michael_mic_verify()
185 cfg80211_michael_mic_failure(rx->sdata->dev, hdr->addr2, in ieee80211_rx_h_michael_mic_verify()
189 rx->key ? rx->key->conf.keyidx : -1, in ieee80211_rx_h_michael_mic_verify()
265 ieee80211_crypto_tkip_decrypt(struct ieee80211_rx_data *rx) in ieee80211_crypto_tkip_decrypt() argument
267 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) rx->skb->data; in ieee80211_crypto_tkip_decrypt()
269 struct ieee80211_key *key = rx->key; in ieee80211_crypto_tkip_decrypt()
270 struct sk_buff *skb = rx->skb; in ieee80211_crypto_tkip_decrypt()
278 if (!rx->sta || skb->len - hdrlen < 12) in ieee80211_crypto_tkip_decrypt()
282 if (skb_linearize(rx->skb)) in ieee80211_crypto_tkip_decrypt()
294 res = ieee80211_tkip_decrypt_data(&rx->local->wep_rx_ctx, in ieee80211_crypto_tkip_decrypt()
296 skb->len - hdrlen, rx->sta->sta.addr, in ieee80211_crypto_tkip_decrypt()
297 hdr->addr1, hwaccel, rx->security_idx, in ieee80211_crypto_tkip_decrypt()
298 &rx->tkip.iv32, in ieee80211_crypto_tkip_decrypt()
299 &rx->tkip.iv16); in ieee80211_crypto_tkip_decrypt()
495 ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx, in ieee80211_crypto_ccmp_decrypt() argument
498 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; in ieee80211_crypto_ccmp_decrypt()
500 struct ieee80211_key *key = rx->key; in ieee80211_crypto_ccmp_decrypt()
501 struct sk_buff *skb = rx->skb; in ieee80211_crypto_ccmp_decrypt()
514 if (!pskb_may_pull(rx->skb, hdrlen + IEEE80211_CCMP_HDR_LEN)) in ieee80211_crypto_ccmp_decrypt()
519 if (skb_linearize(rx->skb)) in ieee80211_crypto_ccmp_decrypt()
524 hdr = (void *)rx->skb->data; in ieee80211_crypto_ccmp_decrypt()
527 if (!rx->sta || data_len < 0) in ieee80211_crypto_ccmp_decrypt()
535 queue = rx->security_idx; in ieee80211_crypto_ccmp_decrypt()
561 memcpy(rx->ccm_gcm.pn, pn, IEEE80211_CCMP_PN_LEN); in ieee80211_crypto_ccmp_decrypt()
729 ieee80211_crypto_gcmp_decrypt(struct ieee80211_rx_data *rx) in ieee80211_crypto_gcmp_decrypt() argument
731 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; in ieee80211_crypto_gcmp_decrypt()
733 struct ieee80211_key *key = rx->key; in ieee80211_crypto_gcmp_decrypt()
734 struct sk_buff *skb = rx->skb; in ieee80211_crypto_gcmp_decrypt()
746 if (!pskb_may_pull(rx->skb, hdrlen + IEEE80211_GCMP_HDR_LEN)) in ieee80211_crypto_gcmp_decrypt()
751 if (skb_linearize(rx->skb)) in ieee80211_crypto_gcmp_decrypt()
756 hdr = (void *)rx->skb->data; in ieee80211_crypto_gcmp_decrypt()
759 if (!rx->sta || data_len < 0) in ieee80211_crypto_gcmp_decrypt()
767 queue = rx->security_idx; in ieee80211_crypto_gcmp_decrypt()
794 memcpy(rx->ccm_gcm.pn, pn, IEEE80211_CCMP_PN_LEN); in ieee80211_crypto_gcmp_decrypt()
850 ieee80211_crypto_cs_decrypt(struct ieee80211_rx_data *rx) in ieee80211_crypto_cs_decrypt() argument
852 struct ieee80211_key *key = rx->key; in ieee80211_crypto_cs_decrypt()
853 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; in ieee80211_crypto_cs_decrypt()
856 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb); in ieee80211_crypto_cs_decrypt()
862 if (!rx->sta || !rx->sta->cipher_scheme || in ieee80211_crypto_cs_decrypt()
869 cs = rx->sta->cipher_scheme; in ieee80211_crypto_cs_decrypt()
871 data_len = rx->skb->len - hdrlen - cs->hdr_len; in ieee80211_crypto_cs_decrypt()
881 if (skb_linearize(rx->skb)) in ieee80211_crypto_cs_decrypt()
884 hdr = (struct ieee80211_hdr *)rx->skb->data; in ieee80211_crypto_cs_decrypt()
887 skb_pn = rx->skb->data + hdrlen + cs->pn_off; in ieee80211_crypto_cs_decrypt()
895 if (pskb_trim(rx->skb, rx->skb->len - cs->mic_len)) in ieee80211_crypto_cs_decrypt()
898 memmove(rx->skb->data + cs->hdr_len, rx->skb->data, hdrlen); in ieee80211_crypto_cs_decrypt()
899 skb_pull(rx->skb, cs->hdr_len); in ieee80211_crypto_cs_decrypt()
1035 ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx) in ieee80211_crypto_aes_cmac_decrypt() argument
1037 struct sk_buff *skb = rx->skb; in ieee80211_crypto_aes_cmac_decrypt()
1039 struct ieee80211_key *key = rx->key; in ieee80211_crypto_aes_cmac_decrypt()
1085 ieee80211_crypto_aes_cmac_256_decrypt(struct ieee80211_rx_data *rx) in ieee80211_crypto_aes_cmac_256_decrypt() argument
1087 struct sk_buff *skb = rx->skb; in ieee80211_crypto_aes_cmac_256_decrypt()
1089 struct ieee80211_key *key = rx->key; in ieee80211_crypto_aes_cmac_256_decrypt()
1184 ieee80211_crypto_aes_gmac_decrypt(struct ieee80211_rx_data *rx) in ieee80211_crypto_aes_gmac_decrypt() argument
1186 struct sk_buff *skb = rx->skb; in ieee80211_crypto_aes_gmac_decrypt()
1188 struct ieee80211_key *key = rx->key; in ieee80211_crypto_aes_gmac_decrypt()
1270 ieee80211_crypto_hw_decrypt(struct ieee80211_rx_data *rx) in ieee80211_crypto_hw_decrypt() argument
1272 if (rx->sta && rx->sta->cipher_scheme) in ieee80211_crypto_hw_decrypt()
1273 return ieee80211_crypto_cs_decrypt(rx); in ieee80211_crypto_hw_decrypt()