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

Commit b998e8bb authored by Johannes Berg's avatar Johannes Berg
Browse files

mac80211: remove final sta_info_flush()



When all interfaces have been removed, there can't
be any stations left over, so there's no need to
flush again. Remove this, and all code associated
with it, which also simplifies the function.

Tested-by: default avatarBen Greear <greearb@candelatech.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 0f6dfcee
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -1010,8 +1010,8 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
		kfree_rcu(old_probe_resp, rcu_head);

	list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list)
		sta_info_flush(local, vlan);
	sta_info_flush(local, sdata);
		sta_info_flush(vlan);
	sta_info_flush(sdata);
	ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);

	drv_stop_ap(sdata->local, sdata);
@@ -1301,7 +1301,6 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
static int ieee80211_del_station(struct wiphy *wiphy, struct net_device *dev,
				 u8 *mac)
{
	struct ieee80211_local *local = wiphy_priv(wiphy);
	struct ieee80211_sub_if_data *sdata;

	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -1309,7 +1308,7 @@ static int ieee80211_del_station(struct wiphy *wiphy, struct net_device *dev,
	if (mac)
		return sta_info_destroy_addr_bss(sdata, mac);

	sta_info_flush(local, sdata);
	sta_info_flush(sdata);
	return 0;
}

+2 −2
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
	skb_reserve(skb, sdata->local->hw.extra_tx_headroom);

	if (!ether_addr_equal(ifibss->bssid, bssid))
		sta_info_flush(sdata->local, sdata);
		sta_info_flush(sdata);

	/* if merging, indicate to driver that we leave the old IBSS */
	if (sdata->vif.bss_conf.ibss_joined) {
@@ -1182,7 +1182,7 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
	memset(ifibss->bssid, 0, ETH_ALEN);
	ifibss->ssid_len = 0;

	sta_info_flush(sdata->local, sdata);
	sta_info_flush(sdata);

	spin_lock_bh(&ifibss->incomplete_lock);
	while (!list_empty(&ifibss->incomplete_stations)) {
+2 −3
Original line number Diff line number Diff line
@@ -776,7 +776,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
	 * all other modes we've already removed all stations when
	 * disconnecting etc.
	 */
	sta_info_flush(local, sdata);
	sta_info_flush(sdata);

	/*
	 * Don't count this interface for promisc/allmulti while it
@@ -961,7 +961,6 @@ static void ieee80211_set_multicast_list(struct net_device *dev)
 */
static void ieee80211_teardown_sdata(struct ieee80211_sub_if_data *sdata)
{
	struct ieee80211_local *local = sdata->local;
	int flushed;
	int i;

@@ -977,7 +976,7 @@ static void ieee80211_teardown_sdata(struct ieee80211_sub_if_data *sdata)
	if (ieee80211_vif_is_mesh(&sdata->vif))
		mesh_rmc_free(sdata);

	flushed = sta_info_flush(local, sdata);
	flushed = sta_info_flush(sdata);
	WARN_ON(flushed);
}

+1 −1
Original line number Diff line number Diff line
@@ -656,7 +656,7 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
	ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);

	/* flush STAs and mpaths on this iface */
	sta_info_flush(sdata->local, sdata);
	sta_info_flush(sdata);
	mesh_path_flush_by_iface(sdata);

	del_timer_sync(&sdata->u.mesh.housekeeping_timer);
+1 −1
Original line number Diff line number Diff line
@@ -1521,7 +1521,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
	memset(ifmgd->bssid, 0, ETH_ALEN);

	/* remove AP and TDLS peers */
	sta_info_flush(local, sdata);
	sta_info_flush(sdata);

	/* finally reset all BSS / config parameters */
	changed |= ieee80211_reset_erp_info(sdata);
Loading