lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200415161147.69738-20-Jerome.Pouiller@silabs.com>
Date:   Wed, 15 Apr 2020 18:11:46 +0200
From:   Jerome Pouiller <Jerome.Pouiller@...abs.com>
To:     devel@...verdev.osuosl.org, linux-wireless@...r.kernel.org
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Kalle Valo <kvalo@...eaurora.org>,
        "David S . Miller" <davem@...emloft.net>,
        Jérôme Pouiller 
        <jerome.pouiller@...abs.com>
Subject: [PATCH 19/20] staging: wfx: drop useless attribute 'filter_mcast'

From: Jérôme Pouiller <jerome.pouiller@...abs.com>

Currently, wfx_update_filtering() apply the value of wvif->filter_mcast
to the hardware. But an attentive reader will note that
wfx_update_filtering() is always called after set wvif->filter_mcast.
Thus, it not necessary to store filter_mcast in the struct wfx_vif. We
can just pass it as parameter.

Also rename wfx_update_filtering() in wfx_filter_mcast() to reflect this
change.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@...abs.com>
---
 drivers/staging/wfx/sta.c | 14 +++++++-------
 drivers/staging/wfx/wfx.h |  1 -
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 69a5823af284..c73dbb3a0de8 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -144,7 +144,7 @@ static void wfx_filter_beacon(struct wfx_vif *wvif, bool filter_beacon)
 	}
 }
 
-void wfx_update_filtering(struct wfx_vif *wvif)
+static void wfx_filter_mcast(struct wfx_vif *wvif, bool filter_mcast)
 {
 	int i;
 
@@ -152,7 +152,7 @@ void wfx_update_filtering(struct wfx_vif *wvif)
 	hif_set_data_filtering(wvif, false, true);
 	return;
 
-	if (!wvif->filter_mcast) {
+	if (!filter_mcast) {
 		hif_set_data_filtering(wvif, false, true);
 		return;
 	}
@@ -198,7 +198,7 @@ void wfx_configure_filter(struct ieee80211_hw *hw,
 {
 	struct wfx_vif *wvif = NULL;
 	struct wfx_dev *wdev = hw->priv;
-	bool filter_bssid, filter_prbreq, filter_beacon;
+	bool filter_bssid, filter_prbreq, filter_beacon, filter_mcast;
 
 	// Notes:
 	//   - Probe responses (FIF_BCN_PRBRESP_PROMISC) are never filtered
@@ -223,14 +223,14 @@ void wfx_configure_filter(struct ieee80211_hw *hw,
 		wfx_filter_beacon(wvif, filter_beacon);
 
 		if (*total_flags & FIF_ALLMULTI) {
-			wvif->filter_mcast = false;
+			filter_mcast = false;
 		} else if (!wvif->filter_mcast_count) {
 			dev_dbg(wdev->dev, "disabling unconfigured multicast filter");
-			wvif->filter_mcast = false;
+			filter_mcast = false;
 		} else {
-			wvif->filter_mcast = true;
+			filter_mcast = true;
 		}
-		wfx_update_filtering(wvif);
+		wfx_filter_mcast(wvif, filter_mcast);
 
 		if (*total_flags & FIF_OTHER_BSS)
 			filter_bssid = false;
diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h
index c30e6984aec1..b5d2d0f07740 100644
--- a/drivers/staging/wfx/wfx.h
+++ b/drivers/staging/wfx/wfx.h
@@ -89,7 +89,6 @@ struct wfx_vif {
 
 	int			filter_mcast_count;
 	u8			filter_mcast_addr[8][ETH_ALEN];
-	bool			filter_mcast;
 
 	unsigned long		uapsd_mask;
 	struct hif_req_set_bss_params bss_params;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ