[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200115121041.10863-34-Jerome.Pouiller@silabs.com>
Date: Wed, 15 Jan 2020 12:12:53 +0000
From: Jérôme Pouiller <Jerome.Pouiller@...abs.com>
To: "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...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 33/65] staging: wfx: simplify hif_mib_set_data_filtering
From: Jérôme Pouiller <jerome.pouiller@...abs.com>
The field "default_filter" was not obvious.
In add, explicitly declare that fields default_filter and enable are
booleans.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@...abs.com>
---
drivers/staging/wfx/hif_api_mib.h | 8 +++++---
drivers/staging/wfx/sta.c | 3 +--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h
index e0ef0337e01c..0c67cd4c1593 100644
--- a/drivers/staging/wfx/hif_api_mib.h
+++ b/drivers/staging/wfx/hif_api_mib.h
@@ -206,9 +206,11 @@ struct hif_mib_config_data_filter {
} __packed;
struct hif_mib_set_data_filtering {
- u8 default_filter;
- u8 enable;
- u8 reserved[2];
+ u8 invert_matching:1;
+ u8 reserved1:7;
+ u8 enable:1;
+ u8 reserved2:7;
+ u8 reserved3[2];
} __packed;
enum hif_arp_ns_frame_treatment {
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 1c1b5a6c2474..27248ea62aea 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -154,9 +154,8 @@ static int wfx_set_mcast_filter(struct wfx_vif *wvif,
if (ret)
return ret;
- // discard all data frames except match filter
filter_data.enable = 1;
- filter_data.default_filter = 1; // discard all
+ filter_data.invert_matching = 1; // discard all but matching frames
ret = hif_set_data_filtering(wvif, &filter_data);
return ret;
--
2.25.0
Powered by blists - more mailing lists