mac80211: fix-up build breakage in 2.6.33
[safe/jmp/linux-2.6] / net / mac80211 / wep.c
index 4fafb2d..247123f 100644 (file)
@@ -144,9 +144,9 @@ void ieee80211_wep_encrypt_data(struct crypto_blkcipher *tfm, u8 *rc4key,
  *
  * WEP frame payload: IV + TX key idx, RC4(data), ICV = RC4(CRC32(data))
  */
-static int ieee80211_wep_encrypt(struct ieee80211_local *local,
-                                struct sk_buff *skb,
-                                const u8 *key, int keylen, int keyidx)
+int ieee80211_wep_encrypt(struct ieee80211_local *local,
+                         struct sk_buff *skb,
+                         const u8 *key, int keylen, int keyidx)
 {
        u8 *iv;
        size_t len;
@@ -281,16 +281,18 @@ bool ieee80211_wep_is_weak_iv(struct sk_buff *skb, struct ieee80211_key *key)
 ieee80211_rx_result
 ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx)
 {
-       struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
+       struct sk_buff *skb = rx->skb;
+       struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
+       struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 
        if (!ieee80211_is_data(hdr->frame_control) &&
            !ieee80211_is_auth(hdr->frame_control))
                return RX_CONTINUE;
 
-       if (!(rx->status->flag & RX_FLAG_DECRYPTED)) {
+       if (!(status->flag & RX_FLAG_DECRYPTED)) {
                if (ieee80211_wep_decrypt(rx->local, rx->skb, rx->key))
                        return RX_DROP_UNUSABLE;
-       } else if (!(rx->status->flag & RX_FLAG_IV_STRIPPED)) {
+       } else if (!(status->flag & RX_FLAG_IV_STRIPPED)) {
                ieee80211_wep_remove_iv(rx->local, rx->skb, rx->key);
                /* remove ICV */
                skb_trim(rx->skb, rx->skb->len - WEP_ICV_LEN);