All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Pouiller <Jerome.Pouiller@silabs.com>
To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Kalle Valo" <kvalo@codeaurora.org>,
	"David S . Miller" <davem@davemloft.net>,
	"Jérôme Pouiller" <jerome.pouiller@silabs.com>
Subject: [PATCH 15/16] staging: wfx: drop unused enum wfx_state
Date: Mon, 20 Apr 2020 18:03:10 +0200	[thread overview]
Message-ID: <20200420160311.57323-16-Jerome.Pouiller@silabs.com> (raw)
In-Reply-To: <20200420160311.57323-1-Jerome.Pouiller@silabs.com>

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

In former code, the field wvif->state was more or less redundant with
vif->type. With the lasts change it has become unused. It is now time to
drop it.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
 drivers/staging/wfx/sta.c | 13 -------------
 drivers/staging/wfx/sta.h |  8 --------
 drivers/staging/wfx/wfx.h |  1 -
 3 files changed, 22 deletions(-)

diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 1732f3d0a1e5..1e43e3b65953 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -286,8 +286,6 @@ void wfx_set_default_unicast_key(struct ieee80211_hw *hw,
 // Call it with wdev->conf_mutex locked
 static void wfx_do_unjoin(struct wfx_vif *wvif)
 {
-	wvif->state = WFX_STATE_PASSIVE;
-
 	/* Unjoin is a reset. */
 	wfx_tx_lock_flush(wvif->wdev);
 	hif_reset(wvif, false);
@@ -367,11 +365,6 @@ static void wfx_do_join(struct wfx_vif *wvif)
 		wfx_do_unjoin(wvif);
 	} else {
 		wvif->join_complete_status = 0;
-		if (wvif->vif->type == NL80211_IFTYPE_ADHOC)
-			wvif->state = WFX_STATE_IBSS;
-		else
-			wvif->state = WFX_STATE_PRE_STA;
-
 		/* Due to beacon filtering it is possible that the
 		 * AP's beacon is not known for the mac80211 stack.
 		 * Disable filtering temporary to make sure the stack
@@ -448,7 +441,6 @@ int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 {
 	struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
 
-	wvif->state = WFX_STATE_AP;
 	wfx_upload_ap_templates(wvif);
 	hif_start(wvif, &vif->bss_conf, wvif->channel);
 	return 0;
@@ -462,7 +454,6 @@ void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 	wfx_tx_policy_init(wvif);
 	if (wvif_count(wvif->wdev) <= 1)
 		hif_set_block_ack_policy(wvif, 0xFF, 0xFF);
-	wvif->state = WFX_STATE_PASSIVE;
 }
 
 static void wfx_join_finalize(struct wfx_vif *wvif,
@@ -475,9 +466,6 @@ static void wfx_join_finalize(struct wfx_vif *wvif,
 	hif_set_bss_params(wvif, info->aid, 7);
 	hif_set_beacon_wakeup_period(wvif, 1, 1);
 	wfx_update_pm(wvif);
-
-	if (!info->ibss_joined)
-		wvif->state = WFX_STATE_STA;
 }
 
 int wfx_join_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
@@ -787,7 +775,6 @@ void wfx_remove_interface(struct ieee80211_hw *hw,
 	WARN(wvif->link_id_map != 1, "corrupted state");
 
 	hif_reset(wvif, false);
-	wvif->state = WFX_STATE_PASSIVE;
 	hif_set_macaddr(wvif, NULL);
 	wfx_tx_policy_init(wvif);
 
diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h
index fe728e642cfc..e814fe743b7d 100644
--- a/drivers/staging/wfx/sta.h
+++ b/drivers/staging/wfx/sta.h
@@ -15,14 +15,6 @@
 struct wfx_dev;
 struct wfx_vif;
 
-enum wfx_state {
-	WFX_STATE_PASSIVE = 0,
-	WFX_STATE_PRE_STA,
-	WFX_STATE_STA,
-	WFX_STATE_IBSS,
-	WFX_STATE_AP,
-};
-
 struct wfx_sta_priv {
 	int link_id;
 	int vif_id;
diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h
index 354a62394db0..8d29bf77cfed 100644
--- a/drivers/staging/wfx/wfx.h
+++ b/drivers/staging/wfx/wfx.h
@@ -66,7 +66,6 @@ struct wfx_vif {
 	struct ieee80211_vif	*vif;
 	struct ieee80211_channel *channel;
 	int			id;
-	enum wfx_state		state;
 
 	u32			link_id_map;
 
-- 
2.26.1


WARNING: multiple messages have this Message-ID (diff)
From: Jerome Pouiller <Jerome.Pouiller@silabs.com>
To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"David S . Miller" <davem@davemloft.net>,
	Kalle Valo <kvalo@codeaurora.org>
Subject: [PATCH 15/16] staging: wfx: drop unused enum wfx_state
Date: Mon, 20 Apr 2020 18:03:10 +0200	[thread overview]
Message-ID: <20200420160311.57323-16-Jerome.Pouiller@silabs.com> (raw)
In-Reply-To: <20200420160311.57323-1-Jerome.Pouiller@silabs.com>

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

In former code, the field wvif->state was more or less redundant with
vif->type. With the lasts change it has become unused. It is now time to
drop it.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
 drivers/staging/wfx/sta.c | 13 -------------
 drivers/staging/wfx/sta.h |  8 --------
 drivers/staging/wfx/wfx.h |  1 -
 3 files changed, 22 deletions(-)

diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 1732f3d0a1e5..1e43e3b65953 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -286,8 +286,6 @@ void wfx_set_default_unicast_key(struct ieee80211_hw *hw,
 // Call it with wdev->conf_mutex locked
 static void wfx_do_unjoin(struct wfx_vif *wvif)
 {
-	wvif->state = WFX_STATE_PASSIVE;
-
 	/* Unjoin is a reset. */
 	wfx_tx_lock_flush(wvif->wdev);
 	hif_reset(wvif, false);
@@ -367,11 +365,6 @@ static void wfx_do_join(struct wfx_vif *wvif)
 		wfx_do_unjoin(wvif);
 	} else {
 		wvif->join_complete_status = 0;
-		if (wvif->vif->type == NL80211_IFTYPE_ADHOC)
-			wvif->state = WFX_STATE_IBSS;
-		else
-			wvif->state = WFX_STATE_PRE_STA;
-
 		/* Due to beacon filtering it is possible that the
 		 * AP's beacon is not known for the mac80211 stack.
 		 * Disable filtering temporary to make sure the stack
@@ -448,7 +441,6 @@ int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 {
 	struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
 
-	wvif->state = WFX_STATE_AP;
 	wfx_upload_ap_templates(wvif);
 	hif_start(wvif, &vif->bss_conf, wvif->channel);
 	return 0;
@@ -462,7 +454,6 @@ void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 	wfx_tx_policy_init(wvif);
 	if (wvif_count(wvif->wdev) <= 1)
 		hif_set_block_ack_policy(wvif, 0xFF, 0xFF);
-	wvif->state = WFX_STATE_PASSIVE;
 }
 
 static void wfx_join_finalize(struct wfx_vif *wvif,
@@ -475,9 +466,6 @@ static void wfx_join_finalize(struct wfx_vif *wvif,
 	hif_set_bss_params(wvif, info->aid, 7);
 	hif_set_beacon_wakeup_period(wvif, 1, 1);
 	wfx_update_pm(wvif);
-
-	if (!info->ibss_joined)
-		wvif->state = WFX_STATE_STA;
 }
 
 int wfx_join_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
@@ -787,7 +775,6 @@ void wfx_remove_interface(struct ieee80211_hw *hw,
 	WARN(wvif->link_id_map != 1, "corrupted state");
 
 	hif_reset(wvif, false);
-	wvif->state = WFX_STATE_PASSIVE;
 	hif_set_macaddr(wvif, NULL);
 	wfx_tx_policy_init(wvif);
 
diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h
index fe728e642cfc..e814fe743b7d 100644
--- a/drivers/staging/wfx/sta.h
+++ b/drivers/staging/wfx/sta.h
@@ -15,14 +15,6 @@
 struct wfx_dev;
 struct wfx_vif;
 
-enum wfx_state {
-	WFX_STATE_PASSIVE = 0,
-	WFX_STATE_PRE_STA,
-	WFX_STATE_STA,
-	WFX_STATE_IBSS,
-	WFX_STATE_AP,
-};
-
 struct wfx_sta_priv {
 	int link_id;
 	int vif_id;
diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h
index 354a62394db0..8d29bf77cfed 100644
--- a/drivers/staging/wfx/wfx.h
+++ b/drivers/staging/wfx/wfx.h
@@ -66,7 +66,6 @@ struct wfx_vif {
 	struct ieee80211_vif	*vif;
 	struct ieee80211_channel *channel;
 	int			id;
-	enum wfx_state		state;
 
 	u32			link_id_map;
 
-- 
2.26.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2020-04-20 16:05 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 16:02 [PATCH 00/16] staging: wfx: rework the handling of the connection loss Jerome Pouiller
2020-04-20 16:02 ` Jerome Pouiller
2020-04-20 16:02 ` [PATCH 01/16] staging: wfx: simplify the check if the the device is associated Jerome Pouiller
2020-04-20 16:02   ` Jerome Pouiller
2020-04-20 16:02 ` [PATCH 02/16] staging: wfx: use ieee80211_beacon_loss() provided by mac80211 Jerome Pouiller
2020-04-20 16:02   ` Jerome Pouiller
2020-04-20 16:02 ` [PATCH 03/16] staging: wfx: drop useless attribute 'bss_params' Jerome Pouiller
2020-04-20 16:02   ` Jerome Pouiller
2020-04-20 16:02 ` [PATCH 04/16] staging: wfx: handle firmware events synchronously Jerome Pouiller
2020-04-20 16:02   ` Jerome Pouiller
2020-04-20 16:03 ` [PATCH 05/16] staging: wfx: also fix network parameters for IBSS networks Jerome Pouiller
2020-04-20 16:03   ` Jerome Pouiller
2020-04-20 16:03 ` [PATCH 06/16] staging: wfx: dual CTS is never necessary Jerome Pouiller
2020-04-20 16:03   ` Jerome Pouiller
2020-04-20 16:03 ` [PATCH 07/16] staging: wfx: field operational_rate_set is ignored by firmware Jerome Pouiller
2020-04-20 16:03   ` Jerome Pouiller
2020-04-20 16:03 ` [PATCH 08/16] staging: wfx: simplify hif_set_bss_params() Jerome Pouiller
2020-04-20 16:03   ` Jerome Pouiller
2020-04-20 16:03 ` [PATCH 09/16] staging: wfx: drop useless update of field basic_rate_set Jerome Pouiller
2020-04-20 16:03   ` Jerome Pouiller
2020-04-20 16:03 ` [PATCH 10/16] staging: wfx: introduce wfx_set_default_unicast_key() Jerome Pouiller
2020-04-20 16:03   ` Jerome Pouiller
2020-04-20 16:03 ` [PATCH 11/16] staging: wfx: keys are kept during whole firmware life Jerome Pouiller
2020-04-20 16:03   ` Jerome Pouiller
2020-04-20 16:03 ` [PATCH 12/16] staging: wfx: drop protection for asynchronous join during scan Jerome Pouiller
2020-04-20 16:03   ` Jerome Pouiller
2020-04-20 16:03 ` [PATCH 13/16] staging: wfx: drop useless checks in wfx_do_unjoin() Jerome Pouiller
2020-04-20 16:03   ` Jerome Pouiller
2020-04-20 16:03 ` [PATCH 14/16] staging: wfx: simplify wfx_remove_interface() Jerome Pouiller
2020-04-20 16:03   ` Jerome Pouiller
2020-04-20 16:03 ` Jerome Pouiller [this message]
2020-04-20 16:03   ` [PATCH 15/16] staging: wfx: drop unused enum wfx_state Jerome Pouiller
2020-04-20 16:03 ` [PATCH 16/16] staging: wfx: drop unused attribute 'join_complete_status' Jerome Pouiller
2020-04-20 16:03   ` Jerome Pouiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200420160311.57323-16-Jerome.Pouiller@silabs.com \
    --to=jerome.pouiller@silabs.com \
    --cc=davem@davemloft.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.