Blob Blame History Raw
From: Takashi Iwai <tiwai@suse.de>
Subject: kABI compatibility for ath_key_delete() changes
Patch-mainline: Never, kABI compatibility
References: CVE-2020-3702 bsc#1191193

patches.suse/ath-Modify-ath_key_delete-to-not-need-full-key-entry.patch
broke kABI due to the exported ath_key_delete() function change.
This patch papers over it by re-defining the old function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/net/wireless/ath/ath.h |    4 +++-
 drivers/net/wireless/ath/key.c |   10 +++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -197,7 +197,9 @@ struct sk_buff *ath_rxbuf_alloc(struct a
 bool ath_is_mybeacon(struct ath_common *common, struct ieee80211_hdr *hdr);
 
 void ath_hw_setbssidmask(struct ath_common *common);
-void ath_key_delete(struct ath_common *common, u8 hw_key_idx);
+/* XXX renamed for kABI compatibility */
+void __ath_key_delete(struct ath_common *common, u8 hw_key_idx);
+#define ath_key_delete	__ath_key_delete
 int ath_key_config(struct ath_common *common,
 			  struct ieee80211_vif *vif,
 			  struct ieee80211_sta *sta,
--- a/drivers/net/wireless/ath/key.c
+++ b/drivers/net/wireless/ath/key.c
@@ -581,7 +581,7 @@ EXPORT_SYMBOL(ath_key_config);
 /*
  * Delete Key.
  */
-void ath_key_delete(struct ath_common *common, u8 hw_key_idx)
+void __ath_key_delete(struct ath_common *common, u8 hw_key_idx)
 {
 	/* Leave CCMP and TKIP (main key) configured to avoid disabling
 	 * encryption for potentially pending frames already in a TXQ with the
@@ -615,4 +615,12 @@ void ath_key_delete(struct ath_common *c
 		clear_bit(hw_key_idx + 64 + 32, common->tkip_keymap);
 	}
 }
+EXPORT_SYMBOL(__ath_key_delete);
+
+/* XXX kABI compatibility */
+#undef ath_key_delete
+void ath_key_delete(struct ath_common *common, struct ieee80211_key_conf *key)
+{
+	__ath_key_delete(common, key->hw_key_idx);
+}
 EXPORT_SYMBOL(ath_key_delete);