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:55 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-16 20:59:50 +0100
commitdb94907110eae5977015e3f12e71d3c07f0f3dcc (patch)
tree95275fd136cc7141270dddcb94c4deb9fece63af /drivers/staging/wfx/sta.c
parenta077126a20a49117903596ceccf0f21ed16b5841 (diff)
staging: wfx: simplify hif_set_config_data_filter()
The structure hif_mib_config_data_filter come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_set_config_data_filter() 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-37-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.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index b74e0ce41069..e71b99aa1f63 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -117,7 +117,6 @@ static int wfx_set_mcast_filter(struct wfx_vif *wvif,
struct wfx_grp_addr_table *fp)
{
int i, ret;
- struct hif_mib_config_data_filter config = { };
// Temporary workaround for filters
return hif_set_data_filtering(wvif, false, true);
@@ -129,7 +128,6 @@ static int wfx_set_mcast_filter(struct wfx_vif *wvif,
ret = hif_set_mac_addr_condition(wvif, i, fp->address_list[i]);
if (ret)
return ret;
- config.mac_cond |= 1 << i;
}
ret = hif_set_uc_mc_bc_condition(wvif, 0, HIF_FILTER_UNICAST |
@@ -137,10 +135,8 @@ static int wfx_set_mcast_filter(struct wfx_vif *wvif,
if (ret)
return ret;
- config.uc_mc_bc_cond = 1;
- config.filter_idx = 0; // TODO #define MULTICAST_FILTERING 0
- config.enable = 1;
- ret = hif_set_config_data_filter(wvif, &config);
+ ret = hif_set_config_data_filter(wvif, true, 0, BIT(1),
+ BIT(fp->num_addresses) - 1);
if (ret)
return ret;