]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blobdiff - net/mac80211/tkip.c
mac80211: allow driver access to TKIP RX P1K
[mirror_ubuntu-eoan-kernel.git] / net / mac80211 / tkip.c
index cc79e697cdb2eecfedc5e6d5c6d7a5d0a6ef2804..f49d00a4c7fdc42287c32068f267c050ab8e02d0 100644 (file)
@@ -185,6 +185,17 @@ void ieee80211_get_tkip_p1k_iv(struct ieee80211_key_conf *keyconf,
 }
 EXPORT_SYMBOL(ieee80211_get_tkip_p1k_iv);
 
+void ieee80211_get_tkip_rx_p1k(struct ieee80211_key_conf *keyconf,
+                               const u8 *ta, u32 iv32, u16 *p1k)
+{
+       const u8 *tk = &keyconf->key[NL80211_TKIP_DATA_OFFSET_ENCR_KEY];
+       struct tkip_ctx ctx;
+
+       tkip_mixing_phase1(tk, &ctx, ta, iv32);
+       memcpy(p1k, ctx.p1k, sizeof(ctx.p1k));
+}
+EXPORT_SYMBOL(ieee80211_get_tkip_rx_p1k);
+
 void ieee80211_get_tkip_p2k(struct ieee80211_key_conf *keyconf,
                            struct sk_buff *skb, u8 *p2k)
 {