mac80211: refresh patches
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / subsys / 100-remove-cryptoapi-dependencies.patch
index 1a13fdc56ff4cd0a23ad9fbef62da54283db41b2..ac78e62ccce3dfc5102dcbadb4cce412c0339a16 100644 (file)
@@ -8,7 +8,7 @@
        wpa.o \
        scan.o offchannel.o \
        ht.o agg-tx.o agg-rx.o \
-@@ -18,8 +17,8 @@ mac80211-y := \
+@@ -19,8 +18,8 @@ mac80211-y := \
        rate.o \
        michael.o \
        tkip.o \
@@ -64,7 +64,7 @@
 -      aead_request_set_ad(aead_req, sg[0].length);
 -
 -      crypto_aead_encrypt(aead_req);
--      kzfree(aead_req);
+-      kfree_sensitive(aead_req);
 -
 -      return 0;
 -}
@@ -99,7 +99,7 @@
 -      aead_request_set_ad(aead_req, sg[0].length);
 -
 -      err = crypto_aead_decrypt(aead_req);
--      kzfree(aead_req);
+-      kfree_sensitive(aead_req);
 -
 -      return err;
 -}
  #define AES_CCM_H
  
 -#include "aead_api.h"
-+#include <linux/crypto.h>
+-
 -#define CCM_AAD_LEN   32
 -
 -static inline struct crypto_aead *
 -                          be16_to_cpup((__be16 *)aad),
 -                          data, data_len, mic);
 -}
--
++#include <linux/crypto.h>
 -static inline void ieee80211_aes_key_free(struct crypto_aead *tfm)
 -{
 -      return aead_key_free(tfm);
  #define AES_GCM_H
  
 -#include "aead_api.h"
+-
+-#define GCM_AAD_LEN   32
 +#include <linux/crypto.h>
  
--#define GCM_AAD_LEN   32
--
 -static inline int ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm,
 -                                          u8 *j_0, u8 *aad,  u8 *data,
 -                                          size_t data_len, u8 *mic)
  }
  
  ieee80211_tx_result
-@@ -1124,9 +1125,9 @@ ieee80211_crypto_aes_gmac_encrypt(struct
+@@ -1128,9 +1129,9 @@ ieee80211_crypto_aes_gmac_encrypt(struct
        struct ieee80211_key *key = tx->key;
        struct ieee80211_mmie_16 *mmie;
        struct ieee80211_hdr *hdr;
  
        if (WARN_ON(skb_queue_len(&tx->skbs) != 1))
                return TX_DROP;
-@@ -1172,7 +1173,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct
+@@ -1176,7 +1177,7 @@ ieee80211_crypto_aes_gmac_decrypt(struct
        struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
        struct ieee80211_key *key = rx->key;
        struct ieee80211_mmie_16 *mmie;
 +++ b/net/mac80211/Kconfig
 @@ -6,8 +6,6 @@ config MAC80211
        depends on CRYPTO
-       depends on CRYPTO_ARC4
+       select BPAUTO_CRYPTO_LIB_ARC4
        depends on CRYPTO_AES
 -      depends on CRYPTO_CCM
 -      depends on CRYPTO_GCM
        depends on CRYPTO_CMAC
        depends on CRC32
-       ---help---
+       help
 --- a/net/mac80211/aes_gmac.h
 +++ b/net/mac80211/aes_gmac.h
 @@ -12,10 +12,22 @@
  #endif /* AES_GMAC_H */
 --- a/net/mac80211/key.h
 +++ b/net/mac80211/key.h
-@@ -86,7 +86,7 @@ struct ieee80211_key {
+@@ -89,7 +89,7 @@ struct ieee80211_key {
                         * Management frames.
                         */
                        u8 rx_pn[IEEE80211_NUM_TIDS + 1][IEEE80211_CCMP_PN_LEN];