From fb0b1fd2c6c8f671366a2fd458076cc422b4db84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20G=C3=B6rner?= <5477952+MaxG87@users.noreply.github.com> Date: Thu, 25 Aug 2022 21:31:55 +0200 Subject: [PATCH] Replace to noop calls with comment Two calls in a function that had to be touched anyways were effectively no-op on Linux. Thus, they are removed now. A comment explains why this function with empty body exists. Thanks at @CGarces for pointing this out. --- Makefile | 1 - core/rtw_sta_mgt.c | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 03025e4..db890fa 100755 --- a/Makefile +++ b/Makefile @@ -2457,4 +2457,3 @@ clean: rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~ rm -fr .tmp_versions *.ur-safe endif - diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index 8530a99..70a84f0 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -380,8 +380,13 @@ static void _rtw_free_sta_recv_priv_lock(struct sta_recv_priv *psta_recvpriv) void rtw_mfree_stainfo(struct sta_info *psta); void rtw_mfree_stainfo(struct sta_info *psta) { - _rtw_free_sta_xmit_priv_lock(&psta->sta_xmitpriv); - _rtw_free_sta_recv_priv_lock(&psta->sta_recvpriv); + // Here used to be some calls to helper functions that would call + // _rtw_spinlock_free several times. However, _rtw_spinlock_free does not + // do anything on Linux. Since this project is concerned only with Linux, + // it is safe to remove the calls entirely. + // This function is kept. Removing it would force us to remove it in the + // callers, which has the danger of becoming incompatible with possible + // future patches. } @@ -1337,4 +1342,3 @@ void dump_pre_link_sta_ctl(void *sel, struct sta_priv *stapriv) } } #endif /* CONFIG_RTW_PRE_LINK_STA */ -