Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1288b12 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

mac80211: make beacon filtering per virtual interface



Due to firmware limitations, we may not be able to
support beacon filtering on all virtual interfaces.
To allow this in mac80211, introduce per-interface
driver capability flags that the driver sets when
an interface is added.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Acked-by: default avatarLuciano Coelho <coelho@ti.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 47d505cc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -228,6 +228,8 @@ static int p54_add_interface(struct ieee80211_hw *dev,
{
	struct p54_common *priv = dev->priv;

	vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER;

	mutex_lock(&priv->conf_mutex);
	if (priv->mode != NL80211_IFTYPE_MONITOR) {
		mutex_unlock(&priv->conf_mutex);
@@ -734,7 +736,6 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len)
		     IEEE80211_HW_SIGNAL_DBM |
		     IEEE80211_HW_SUPPORTS_PS |
		     IEEE80211_HW_PS_NULLFUNC_STACK |
		     IEEE80211_HW_BEACON_FILTER |
		     IEEE80211_HW_REPORTS_TX_ACK_STATUS;

	dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
+0 −1
Original line number Diff line number Diff line
@@ -309,7 +309,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
	/* <5> set hw caps */
	hw->flags = IEEE80211_HW_SIGNAL_DBM |
	    IEEE80211_HW_RX_INCLUDES_FCS |
	    IEEE80211_HW_BEACON_FILTER |
	    IEEE80211_HW_AMPDU_AGGREGATION |
	    IEEE80211_HW_CONNECTION_MONITOR |
	    /* IEEE80211_HW_SUPPORTS_CQM_RSSI | */
+2 −0
Original line number Diff line number Diff line
@@ -112,6 +112,8 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw,
	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
	int err = 0;

	vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER;

	if (mac->vif) {
		RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
			 "vif has been set!! mac->vif = 0x%p\n", mac->vif);
+2 −1
Original line number Diff line number Diff line
@@ -514,6 +514,8 @@ static int wl1251_op_add_interface(struct ieee80211_hw *hw,
	struct wl1251 *wl = hw->priv;
	int ret = 0;

	vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER;

	wl1251_debug(DEBUG_MAC80211, "mac80211 add interface type %d mac %pM",
		     vif->type, vif->addr);

@@ -1338,7 +1340,6 @@ int wl1251_init_ieee80211(struct wl1251 *wl)

	wl->hw->flags = IEEE80211_HW_SIGNAL_DBM |
		IEEE80211_HW_SUPPORTS_PS |
		IEEE80211_HW_BEACON_FILTER |
		IEEE80211_HW_SUPPORTS_UAPSD |
		IEEE80211_HW_SUPPORTS_CQM_RSSI;

+2 −1
Original line number Diff line number Diff line
@@ -2060,6 +2060,8 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
	u8 role_type;
	bool booted = false;

	vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER;

	wl1271_debug(DEBUG_MAC80211, "mac80211 add interface type %d mac %pM",
		     ieee80211_vif_type_p2p(vif), vif->addr);

@@ -4898,7 +4900,6 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
	wl->hw->max_listen_interval = wl->conf.conn.max_listen_interval;

	wl->hw->flags = IEEE80211_HW_SIGNAL_DBM |
		IEEE80211_HW_BEACON_FILTER |
		IEEE80211_HW_SUPPORTS_PS |
		IEEE80211_HW_SUPPORTS_UAPSD |
		IEEE80211_HW_HAS_RATE_CONTROL |
Loading