Commit e269060e authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman
Browse files

staging: wfx: simplify handling of beacon filter during join process



When the device joins an AP, beacon are forwarded to the host. Once has
retrieved all necessary parameters, we can start to filter the beacon
(and only beacon with changed/new data will be forwarded).

Currently, the driver detect beacons in data Rx process. It is far more
easier to just wait for the BSS_CHANGED_BEACON_INFO event.

Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200415161147.69738-5-Jerome.Pouiller@silabs.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b460713a
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -118,18 +118,6 @@ void wfx_rx_cb(struct wfx_vif *wvif,
	    arg->rx_flags.match_uc_addr &&
	    mgmt->u.action.category == WLAN_CATEGORY_BACK)
		goto drop;
	if (ieee80211_is_beacon(frame->frame_control) &&
	    !arg->status && wvif->vif &&
	    ether_addr_equal(ieee80211_get_SA(frame),
			     wvif->vif->bss_conf.bssid)) {
		/* Disable beacon filter once we're associated... */
		if (wvif->disable_beacon_filter &&
		    (wvif->vif->bss_conf.assoc ||
		     wvif->vif->bss_conf.ibss_joined)) {
			wvif->disable_beacon_filter = false;
			schedule_work(&wvif->update_filtering_work);
		}
	}
	ieee80211_rx_irqsafe(wvif->wdev->hw, skb);

	return;
+9 −1
Original line number Diff line number Diff line
@@ -712,9 +712,17 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw,
	if (changed & BSS_CHANGED_BEACON_ENABLED)
		wfx_enable_beacon(wvif, info->enable_beacon);

	if (changed & BSS_CHANGED_BEACON_INFO)
	if (changed & BSS_CHANGED_BEACON_INFO) {
		if (vif->type != NL80211_IFTYPE_STATION)
			dev_warn(wdev->dev, "%s: misunderstood change: BEACON_INFO\n",
				 __func__);
		hif_set_beacon_wakeup_period(wvif, info->dtim_period,
					     info->dtim_period);
		// We temporary forwarded beacon for join process. It is now no
		// more necessary.
		wvif->disable_beacon_filter = false;
		wfx_update_filtering(wvif);
	}

	/* assoc/disassoc, or maybe AID changed */
	if (changed & BSS_CHANGED_ASSOC) {