diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2020-01-15 13:54:49 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-16 20:59:49 +0100 |
commit | f5864a1076d1a5f3c7d297ab79bfabaa69af3e41 (patch) | |
tree | 7e559ada37ed3ddd2a57794d1eee6870504d2fdc /drivers/staging/wfx/hif_tx_mib.h | |
parent | 46f044b965e62f07a9c1411328487bf8346dbc79 (diff) |
staging: wfx: simplify hif_mib_uc_mc_bc_data_frame_condition
The current API defines bitfields. It is not very convenient. Prefer to
use bitmasks.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-33-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.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index 4d171e6cfc9a..6e8b050cbc25 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -246,15 +246,12 @@ static inline int hif_set_mac_addr_condition(struct wfx_vif *wvif, arg, sizeof(*arg)); } -// FIXME: use a bitfield instead of 3 boolean values -static inline int hif_set_uc_mc_bc_condition(struct wfx_vif *wvif, int idx, - bool unic, bool multic, bool broadc) +static inline int hif_set_uc_mc_bc_condition(struct wfx_vif *wvif, + int idx, u8 allowed_frames) { struct hif_mib_uc_mc_bc_data_frame_condition val = { .condition_idx = idx, - .param.bits.type_unicast = unic, - .param.bits.type_multicast = multic, - .param.bits.type_broadcast = broadc, + .allowed_frames = allowed_frames, }; return hif_write_mib(wvif->wdev, wvif->id, |