Commit 3f5264e7 authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman

staging: wfx: simplify hif_mib_set_data_filtering

The field "default_filter" was not obvious.

In add, explicitly declare that fields default_filter and enable are
booleans.
Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-34-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f5864a10
...@@ -206,9 +206,11 @@ struct hif_mib_config_data_filter { ...@@ -206,9 +206,11 @@ struct hif_mib_config_data_filter {
} __packed; } __packed;
struct hif_mib_set_data_filtering { struct hif_mib_set_data_filtering {
u8 default_filter; u8 invert_matching:1;
u8 enable; u8 reserved1:7;
u8 reserved[2]; u8 enable:1;
u8 reserved2:7;
u8 reserved3[2];
} __packed; } __packed;
enum hif_arp_ns_frame_treatment { enum hif_arp_ns_frame_treatment {
......
...@@ -154,9 +154,8 @@ static int wfx_set_mcast_filter(struct wfx_vif *wvif, ...@@ -154,9 +154,8 @@ static int wfx_set_mcast_filter(struct wfx_vif *wvif,
if (ret) if (ret)
return ret; return ret;
// discard all data frames except match filter
filter_data.enable = 1; 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); ret = hif_set_data_filtering(wvif, &filter_data);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment