All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: remove redundant IEEE80211_STA_CSA_RECEIVED flag
@ 2014-07-05  8:43 Luca Coelho
  2014-07-21 10:21 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Luca Coelho @ 2014-07-05  8:43 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, emmanuel.grumbach

From: Luciano Coelho <luciano.coelho@intel.com>

The csa_active flag was added in sdata a while ago and made
IEEE80211_STA_CSA_RECEIVED redundant.  The new flag is also used to
mark when CSA is ongoing on other iftypes and took over the old one as
the preferred method for checking whether we're in the middle of a
channel switch.  Remove the old, redundant flag.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
---
 net/mac80211/ieee80211_i.h | 1 -
 net/mac80211/mlme.c        | 8 +-------
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 9e025e1..97f6b57 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -345,7 +345,6 @@ enum ieee80211_sta_flags {
 	IEEE80211_STA_CONNECTION_POLL	= BIT(1),
 	IEEE80211_STA_CONTROL_PORT	= BIT(2),
 	IEEE80211_STA_DISABLE_HT	= BIT(4),
-	IEEE80211_STA_CSA_RECEIVED	= BIT(5),
 	IEEE80211_STA_MFP_ENABLED	= BIT(6),
 	IEEE80211_STA_UAPSD_ENABLED	= BIT(7),
 	IEEE80211_STA_NULLFUNC_ACKED	= BIT(8),
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 931330b..93ea991 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1005,8 +1005,6 @@ static void ieee80211_chswitch_work(struct work_struct *work)
 		sdata->csa_block_tx = false;
 	}
 
-	ifmgd->flags &= ~IEEE80211_STA_CSA_RECEIVED;
-
 	ieee80211_sta_reset_beacon_monitor(sdata);
 	ieee80211_sta_reset_conn_monitor(sdata);
 
@@ -1064,7 +1062,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
 		return;
 
 	/* disregard subsequent announcements if we are already processing */
-	if (ifmgd->flags & IEEE80211_STA_CSA_RECEIVED)
+	if (sdata->vif.csa_active)
 		return;
 
 	current_band = cbss->channel->band;
@@ -1091,8 +1089,6 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
 		return;
 	}
 
-	ifmgd->flags |= IEEE80211_STA_CSA_RECEIVED;
-
 	mutex_lock(&local->mtx);
 	mutex_lock(&local->chanctx_mtx);
 	conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
@@ -2108,8 +2104,6 @@ static void __ieee80211_disconnect(struct ieee80211_sub_if_data *sdata)
 	ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH,
 			       WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY,
 			       true, frame_buf);
-	ifmgd->flags &= ~IEEE80211_STA_CSA_RECEIVED;
-
 	mutex_lock(&local->mtx);
 	sdata->vif.csa_active = false;
 	if (sdata->csa_block_tx) {
-- 
2.0.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: remove redundant IEEE80211_STA_CSA_RECEIVED flag
  2014-07-05  8:43 [PATCH] mac80211: remove redundant IEEE80211_STA_CSA_RECEIVED flag Luca Coelho
@ 2014-07-21 10:21 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2014-07-21 10:21 UTC (permalink / raw)
  To: Luca Coelho; +Cc: linux-wireless, emmanuel.grumbach

On Sat, 2014-07-05 at 11:43 +0300, Luca Coelho wrote:
> From: Luciano Coelho <luciano.coelho@intel.com>
> 
> The csa_active flag was added in sdata a while ago and made
> IEEE80211_STA_CSA_RECEIVED redundant.  The new flag is also used to
> mark when CSA is ongoing on other iftypes and took over the old one as
> the preferred method for checking whether we're in the middle of a
> channel switch.  Remove the old, redundant flag.

Applied.

johannes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-21 10:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-05  8:43 [PATCH] mac80211: remove redundant IEEE80211_STA_CSA_RECEIVED flag Luca Coelho
2014-07-21 10:21 ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.