From: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx> HIF functions return only serious errors (OOM or device freeze). The current handling of errors in wfx_set_mcast_filter() does not bring anything. Finally it may disturb the developer more than it helps. Signed-off-by: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx> --- drivers/staging/wfx/sta.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index e71b99aa1f63..a934f66f3a4c 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -116,7 +116,7 @@ int wfx_fwd_probe_req(struct wfx_vif *wvif, bool enable) static int wfx_set_mcast_filter(struct wfx_vif *wvif, struct wfx_grp_addr_table *fp) { - int i, ret; + int i; // Temporary workaround for filters return hif_set_data_filtering(wvif, false, true); @@ -124,25 +124,15 @@ static int wfx_set_mcast_filter(struct wfx_vif *wvif, if (!fp->enable) return hif_set_data_filtering(wvif, false, true); - for (i = 0; i < fp->num_addresses; i++) { - ret = hif_set_mac_addr_condition(wvif, i, fp->address_list[i]); - if (ret) - return ret; - } - - ret = hif_set_uc_mc_bc_condition(wvif, 0, HIF_FILTER_UNICAST | - HIF_FILTER_BROADCAST); - if (ret) - return ret; - - ret = hif_set_config_data_filter(wvif, true, 0, BIT(1), - BIT(fp->num_addresses) - 1); - if (ret) - return ret; - - ret = hif_set_data_filtering(wvif, true, true); - - return ret; + for (i = 0; i < fp->num_addresses; i++) + hif_set_mac_addr_condition(wvif, i, fp->address_list[i]); + hif_set_uc_mc_bc_condition(wvif, 0, + HIF_FILTER_UNICAST | HIF_FILTER_BROADCAST); + hif_set_config_data_filter(wvif, true, 0, BIT(1), + BIT(fp->num_addresses) - 1); + hif_set_data_filtering(wvif, true, true); + + return 0; } void wfx_update_filtering(struct wfx_vif *wvif) -- 2.25.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel