From 76698ea35fd3a66b01a1fbaaca96e3c59e0e9923 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 3 Nov 2021 10:28:52 +0100 Subject: [PATCH] ANDROID: GKI: fix up abi breakage from "cfg80211: fix management registrations locking" Commit 4c22227e39c7 ("cfg80211: fix management registrations locking") in 5.10.77, which is commit 09b1d5dc6ce1 ("cfg80211: fix management registrations locking") upstream, moved the mgmt_registrations_lock out of struct wireless_dev. This did not change the structure size, but caused a CRC change in the structure pointer, which tripped the abi checker. So restore the variable, and comment that this is not used anymore. No driver should ever be touching this so it is safe. Note, using a __GENKSYMS__ hack would work, as the overall structure size remains the same when this variable is removed, BUT the warning that the field is gone is reported by libabigail correctly, which would require a .xml update, so it's not worth it. Bug: 161946584 Signed-off-by: Greg Kroah-Hartman Change-Id: Ibcfe743833860e6f75611d7ebed1036a77be0a69 --- include/net/cfg80211.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index bb86217d853e..7abdf1aaf650 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -5305,6 +5305,13 @@ struct wireless_dev { u32 identifier; struct list_head mgmt_registrations; + /* + * ANDROID: mgmt_registrations_lock was restored to preserve ABI in + * 5.10.77 due to backport of 09b1d5dc6ce1 ("cfg80211: fix management + * registrations locking") but it is not used for anything so do not + * touch this variable! + */ + spinlock_t mgmt_registrations_lock; u8 mgmt_registrations_need_update:1; struct mutex mtx;