Commit 28ab936e authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: remove unnecessary static variable 'p2p_listen_state'

Remove the use of unnecessary static variable 'p2p_listen_state'.
Already 'p2p_listen_state' is present in 'wilc_priv' struct. So making
use of that variable as its getting set in channel ready and
remain on channel expired callback.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 804146b4
...@@ -187,7 +187,6 @@ struct join_bss_param { ...@@ -187,7 +187,6 @@ struct join_bss_param {
}; };
static struct host_if_drv *terminated_handle; static struct host_if_drv *terminated_handle;
static u8 p2p_listen_state;
static struct completion hif_driver_comp; static struct completion hif_driver_comp;
static struct mutex hif_deinit_lock; static struct mutex hif_deinit_lock;
...@@ -2355,7 +2354,6 @@ static int handle_remain_on_chan(struct wilc_vif *vif, ...@@ -2355,7 +2354,6 @@ static int handle_remain_on_chan(struct wilc_vif *vif,
netdev_err(vif->ndev, "Failed to set remain on channel\n"); netdev_err(vif->ndev, "Failed to set remain on channel\n");
error: error:
p2p_listen_state = 1;
hif_drv->remain_on_ch_timer_vif = vif; hif_drv->remain_on_ch_timer_vif = vif;
mod_timer(&hif_drv->remain_on_ch_timer, mod_timer(&hif_drv->remain_on_ch_timer,
jiffies + msecs_to_jiffies(hif_remain_ch->duration)); jiffies + msecs_to_jiffies(hif_remain_ch->duration));
...@@ -2411,8 +2409,9 @@ static void handle_listen_state_expired(struct work_struct *work) ...@@ -2411,8 +2409,9 @@ static void handle_listen_state_expired(struct work_struct *work)
struct wid wid; struct wid wid;
int result; int result;
struct host_if_drv *hif_drv = vif->hif_drv; struct host_if_drv *hif_drv = vif->hif_drv;
struct wilc_priv *priv = wdev_priv(vif->ndev->ieee80211_ptr);
if (p2p_listen_state) { if (priv->p2p_listen_state) {
remain_on_chan_flag = false; remain_on_chan_flag = false;
wid.id = WID_REMAIN_ON_CHAN; wid.id = WID_REMAIN_ON_CHAN;
wid.type = WID_STR; wid.type = WID_STR;
...@@ -2437,7 +2436,6 @@ static void handle_listen_state_expired(struct work_struct *work) ...@@ -2437,7 +2436,6 @@ static void handle_listen_state_expired(struct work_struct *work)
hif_drv->remain_on_ch.expired(hif_drv->remain_on_ch.arg, hif_drv->remain_on_ch.expired(hif_drv->remain_on_ch.arg,
hif_remain_ch->id); hif_remain_ch->id);
} }
p2p_listen_state = 0;
} else { } else {
netdev_dbg(vif->ndev, "Not in listen state\n"); netdev_dbg(vif->ndev, "Not in listen state\n");
} }
......
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