summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wfx/hif_tx_mib.h
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/hif_tx_mib.h
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/hif_tx_mib.h')
-rw-r--r--drivers/staging/wfx/hif_tx_mib.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h
index 6e8b050cbc25..ee22c7169fab 100644
--- a/drivers/staging/wfx/hif_tx_mib.h
+++ b/drivers/staging/wfx/hif_tx_mib.h
@@ -267,10 +267,15 @@ static inline int hif_set_config_data_filter(struct wfx_vif *wvif,
}
static inline int hif_set_data_filtering(struct wfx_vif *wvif,
- struct hif_mib_set_data_filtering *arg)
+ bool enable, bool invert)
{
+ struct hif_mib_set_data_filtering val = {
+ .enable = enable,
+ .invert_matching = invert,
+ };
+
return hif_write_mib(wvif->wdev, wvif->id,
- HIF_MIB_ID_SET_DATA_FILTERING, arg, sizeof(*arg));
+ HIF_MIB_ID_SET_DATA_FILTERING, &val, sizeof(val));
}
static inline int hif_keep_alive_period(struct wfx_vif *wvif, int period)