Commit 4b815a9d authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman

staging: wfx: drop unused enum wfx_state

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: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200420160311.57323-16-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cf24a82b
...@@ -286,8 +286,6 @@ void wfx_set_default_unicast_key(struct ieee80211_hw *hw, ...@@ -286,8 +286,6 @@ void wfx_set_default_unicast_key(struct ieee80211_hw *hw,
// Call it with wdev->conf_mutex locked // Call it with wdev->conf_mutex locked
static void wfx_do_unjoin(struct wfx_vif *wvif) static void wfx_do_unjoin(struct wfx_vif *wvif)
{ {
wvif->state = WFX_STATE_PASSIVE;
/* Unjoin is a reset. */ /* Unjoin is a reset. */
wfx_tx_lock_flush(wvif->wdev); wfx_tx_lock_flush(wvif->wdev);
hif_reset(wvif, false); hif_reset(wvif, false);
...@@ -367,11 +365,6 @@ static void wfx_do_join(struct wfx_vif *wvif) ...@@ -367,11 +365,6 @@ static void wfx_do_join(struct wfx_vif *wvif)
wfx_do_unjoin(wvif); wfx_do_unjoin(wvif);
} else { } else {
wvif->join_complete_status = 0; 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 /* Due to beacon filtering it is possible that the
* AP's beacon is not known for the mac80211 stack. * AP's beacon is not known for the mac80211 stack.
* Disable filtering temporary to make sure the 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) ...@@ -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; struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv;
wvif->state = WFX_STATE_AP;
wfx_upload_ap_templates(wvif); wfx_upload_ap_templates(wvif);
hif_start(wvif, &vif->bss_conf, wvif->channel); hif_start(wvif, &vif->bss_conf, wvif->channel);
return 0; return 0;
...@@ -462,7 +454,6 @@ void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) ...@@ -462,7 +454,6 @@ void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
wfx_tx_policy_init(wvif); wfx_tx_policy_init(wvif);
if (wvif_count(wvif->wdev) <= 1) if (wvif_count(wvif->wdev) <= 1)
hif_set_block_ack_policy(wvif, 0xFF, 0xFF); hif_set_block_ack_policy(wvif, 0xFF, 0xFF);
wvif->state = WFX_STATE_PASSIVE;
} }
static void wfx_join_finalize(struct wfx_vif *wvif, static void wfx_join_finalize(struct wfx_vif *wvif,
...@@ -475,9 +466,6 @@ 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_bss_params(wvif, info->aid, 7);
hif_set_beacon_wakeup_period(wvif, 1, 1); hif_set_beacon_wakeup_period(wvif, 1, 1);
wfx_update_pm(wvif); 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) int wfx_join_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
...@@ -787,7 +775,6 @@ void wfx_remove_interface(struct ieee80211_hw *hw, ...@@ -787,7 +775,6 @@ void wfx_remove_interface(struct ieee80211_hw *hw,
WARN(wvif->link_id_map != 1, "corrupted state"); WARN(wvif->link_id_map != 1, "corrupted state");
hif_reset(wvif, false); hif_reset(wvif, false);
wvif->state = WFX_STATE_PASSIVE;
hif_set_macaddr(wvif, NULL); hif_set_macaddr(wvif, NULL);
wfx_tx_policy_init(wvif); wfx_tx_policy_init(wvif);
......
...@@ -15,14 +15,6 @@ ...@@ -15,14 +15,6 @@
struct wfx_dev; struct wfx_dev;
struct wfx_vif; 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 { struct wfx_sta_priv {
int link_id; int link_id;
int vif_id; int vif_id;
......
...@@ -66,7 +66,6 @@ struct wfx_vif { ...@@ -66,7 +66,6 @@ struct wfx_vif {
struct ieee80211_vif *vif; struct ieee80211_vif *vif;
struct ieee80211_channel *channel; struct ieee80211_channel *channel;
int id; int id;
enum wfx_state state;
u32 link_id_map; u32 link_id_map;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment