|
@@ -302,7 +302,7 @@ int wl1271_rx_filter_enable(struct wl1271 *wl,
|
|
|
{
|
|
|
int ret;
|
|
|
|
|
|
- if (wl->rx_filter_enabled[index] == enable) {
|
|
|
+ if (!!test_bit(index, wl->rx_filter_enabled) == enable) {
|
|
|
wl1271_warning("Request to enable an already "
|
|
|
"enabled rx filter %d", index);
|
|
|
return 0;
|
|
@@ -316,7 +316,10 @@ int wl1271_rx_filter_enable(struct wl1271 *wl,
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
- wl->rx_filter_enabled[index] = enable;
|
|
|
+ if (enable)
|
|
|
+ __set_bit(index, wl->rx_filter_enabled);
|
|
|
+ else
|
|
|
+ __clear_bit(index, wl->rx_filter_enabled);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
@@ -326,7 +329,7 @@ int wl1271_rx_filter_clear_all(struct wl1271 *wl)
|
|
|
int i, ret = 0;
|
|
|
|
|
|
for (i = 0; i < WL1271_MAX_RX_FILTERS; i++) {
|
|
|
- if (!wl->rx_filter_enabled[i])
|
|
|
+ if (!test_bit(i, wl->rx_filter_enabled))
|
|
|
continue;
|
|
|
ret = wl1271_rx_filter_enable(wl, i, 0, NULL);
|
|
|
if (ret)
|