Search Linux Wireless

[PATCH 13/20] staging: wfx: align semantic of probe request filter with other filters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx>

Filters provided by HIF API are sometime inclusive, sometime exclusive.

This patch align the behavior and name of the probe request filter with
the other filters.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx>
---
 drivers/staging/wfx/hif_tx_mib.c | 4 ++--
 drivers/staging/wfx/sta.c        | 8 ++++----
 drivers/staging/wfx/wfx.h        | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c
index 41f3090d29be..1d26d740bd0b 100644
--- a/drivers/staging/wfx/hif_tx_mib.c
+++ b/drivers/staging/wfx/hif_tx_mib.c
@@ -90,13 +90,13 @@ int hif_set_macaddr(struct wfx_vif *wvif, u8 *mac)
 }
 
 int hif_set_rx_filter(struct wfx_vif *wvif,
-		      bool filter_bssid, bool fwd_probe_req)
+		      bool filter_bssid, bool filter_prbreq)
 {
 	struct hif_mib_rx_filter val = { };
 
 	if (filter_bssid)
 		val.bssid_filter = 1;
-	if (fwd_probe_req)
+	if (!filter_prbreq)
 		val.fwd_probe_req = 1;
 	return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_RX_FILTER,
 			     &val, sizeof(val));
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 963cac83b6a8..3a105d485237 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -136,7 +136,7 @@ void wfx_update_filtering(struct wfx_vif *wvif)
 		}
 	};
 
-	hif_set_rx_filter(wvif, wvif->filter_bssid, wvif->fwd_probe_req);
+	hif_set_rx_filter(wvif, wvif->filter_bssid, wvif->filter_prbreq);
 	if (!wvif->filter_beacon) {
 		hif_set_beacon_filter_table(wvif, 0, NULL);
 		hif_beacon_filter_control(wvif, 0, 1);
@@ -242,11 +242,11 @@ void wfx_configure_filter(struct ieee80211_hw *hw,
 		}
 
 		if (*total_flags & FIF_PROBE_REQ)
-			wvif->fwd_probe_req = true;
+			wvif->filter_prbreq = false;
 		else
-			wvif->fwd_probe_req = false;
+			wvif->filter_prbreq = true;
 		hif_set_rx_filter(wvif, wvif->filter_bssid,
-				  wvif->fwd_probe_req);
+				  wvif->filter_prbreq);
 
 		mutex_unlock(&wvif->scan_lock);
 	}
diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h
index 53ed4c137b19..3941462097a4 100644
--- a/drivers/staging/wfx/wfx.h
+++ b/drivers/staging/wfx/wfx.h
@@ -89,7 +89,7 @@ struct wfx_vif {
 	struct work_struct	update_tim_work;
 
 	bool			filter_bssid;
-	bool			fwd_probe_req;
+	bool			filter_prbreq;
 	bool			filter_beacon;
 
 	unsigned long		uapsd_mask;
-- 
2.25.1





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux