summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wfx/sta.c
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-01-15 13:54:52 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-16 20:59:50 +0100
commitc47b70e2c5918fab8d100915b68ada8828563a62 (patch)
tree2b783d5b8a7bc5bf578589066ca7f5922846d8c6 /drivers/staging/wfx/sta.c
parent3f5264e75c7bd332f38c8bc0f903771336fba44d (diff)
staging: wfx: simplify hif_set_data_filtering()
The structure hif_mib_set_data_filtering come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_set_data_filtering() is too dumb. It should pack data with hardware representation instead of leaving all work to the caller. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200115135338.14374-35-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/sta.c')
-rw-r--r--drivers/staging/wfx/sta.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 27248ea62aea..588094486a7a 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -118,16 +118,13 @@ static int wfx_set_mcast_filter(struct wfx_vif *wvif,
{
int i, ret;
struct hif_mib_config_data_filter config = { };
- struct hif_mib_set_data_filtering filter_data = { };
struct hif_mib_mac_addr_data_frame_condition filter_addr_val = { };
// Temporary workaround for filters
- return hif_set_data_filtering(wvif, &filter_data);
+ return hif_set_data_filtering(wvif, false, true);
- if (!fp->enable) {
- filter_data.enable = 0;
- return hif_set_data_filtering(wvif, &filter_data);
- }
+ if (!fp->enable)
+ return hif_set_data_filtering(wvif, false, true);
// A1 Address match on list
for (i = 0; i < fp->num_addresses; i++) {
@@ -154,9 +151,7 @@ static int wfx_set_mcast_filter(struct wfx_vif *wvif,
if (ret)
return ret;
- filter_data.enable = 1;
- filter_data.invert_matching = 1; // discard all but matching frames
- ret = hif_set_data_filtering(wvif, &filter_data);
+ ret = hif_set_data_filtering(wvif, true, true);
return ret;
}