linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Adham.Abozaeid@microchip.com>
To: <linux-wireless@vger.kernel.org>
Cc: <devel@driverdev.osuosl.org>, <gregkh@linuxfoundation.org>,
	<johannes@sipsolutions.net>, <Ajay.Kathat@microchip.com>,
	<Adham.Abozaeid@microchip.com>
Subject: [PATCH 2/6] staging: wilc1000: remove ip timeout timer
Date: Thu, 25 Jul 2019 21:31:34 +0000	[thread overview]
Message-ID: <20190725213125.2810-3-adham.abozaeid@microchip.com> (raw)
In-Reply-To: <20190725213125.2810-1-adham.abozaeid@microchip.com>

From: Adham Abozaeid <adham.abozaeid@microchip.com>

during_ip_timer is not required after removing the code that disables
powersave while the ip is being obtained.
Its handler clear_during_ip is also removed

Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
---
 drivers/staging/wilc1000/wilc_hif.c              |  2 --
 .../staging/wilc1000/wilc_wfi_cfgoperations.c    | 16 ----------------
 2 files changed, 18 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_hif.c b/drivers/staging/wilc1000/wilc_hif.c
index 9345cabe3c93..9bd2d14ad610 100644
--- a/drivers/staging/wilc1000/wilc_hif.c
+++ b/drivers/staging/wilc1000/wilc_hif.c
@@ -684,8 +684,6 @@ static inline void host_int_parse_assoc_resp_info(struct wilc_vif *vif,
 		hif_drv->hif_state = HOST_IF_CONNECTED;
 
 		vif->obtaining_ip = true;
-		mod_timer(&vif->during_ip_timer,
-			  jiffies + msecs_to_jiffies(10000));
 	} else {
 		hif_drv->hif_state = HOST_IF_IDLE;
 	}
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 736eedef23b6..5559f27c8e24 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -70,15 +70,6 @@ struct wilc_p2p_mgmt_data {
 static const u8 p2p_oui[] = {0x50, 0x6f, 0x9A, 0x09};
 static const u8 p2p_vendor_spec[] = {0xdd, 0x05, 0x00, 0x08, 0x40, 0x03};
 
-#define WILC_IP_TIMEOUT_MS		15000
-
-static void clear_during_ip(struct timer_list *t)
-{
-	struct wilc_vif *vif = from_timer(vif, t, during_ip_timer);
-
-	vif->obtaining_ip = false;
-}
-
 static void cfg_scan_result(enum scan_event scan_event,
 			    struct wilc_rcvd_net_info *info, void *user_void)
 {
@@ -1422,7 +1413,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
 	priv->p2p.recv_random = 0x00;
 	priv->p2p.is_wilc_ie = false;
 	vif->obtaining_ip = false;
-	del_timer(&vif->during_ip_timer);
 
 	switch (type) {
 	case NL80211_IFTYPE_STATION:
@@ -1470,8 +1460,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
 
 	case NL80211_IFTYPE_P2P_GO:
 		vif->obtaining_ip = true;
-		mod_timer(&vif->during_ip_timer,
-			  jiffies + msecs_to_jiffies(WILC_IP_TIMEOUT_MS));
 		wilc_set_operation_mode(vif, WILC_AP_MODE);
 		dev->ieee80211_ptr->iftype = type;
 		priv->wdev.iftype = type;
@@ -1949,8 +1937,6 @@ int wilc_init_host_int(struct net_device *net)
 	struct wilc_vif *vif = netdev_priv(net);
 	struct wilc_priv *priv = &vif->priv;
 
-	timer_setup(&vif->during_ip_timer, clear_during_ip, 0);
-
 	priv->p2p_listen_state = false;
 
 	mutex_init(&priv->scan_req_lock);
@@ -1973,8 +1959,6 @@ void wilc_deinit_host_int(struct net_device *net)
 	mutex_destroy(&priv->scan_req_lock);
 	ret = wilc_deinit(vif);
 
-	del_timer_sync(&vif->during_ip_timer);
-
 	if (ret)
 		netdev_err(net, "Error while deinitializing host interface\n");
 }
-- 
2.17.1


  parent reply	other threads:[~2019-07-25 21:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 21:31 [PATCH 0/6] staging: wilc1000: don't override user power management selection Adham.Abozaeid
2019-07-25 21:31 ` [PATCH 1/6] staging: wilc1000: remove inetaddr notifier Adham.Abozaeid
2019-07-25 21:31 ` Adham.Abozaeid [this message]
2019-07-25 21:31 ` [PATCH 3/6] staging: wilc1000: remove unused members Adham.Abozaeid
2019-08-06 12:46   ` Dan Carpenter
2019-08-06 19:32     ` Adham.Abozaeid
2019-08-07 11:03       ` Dan Carpenter
2019-08-08 18:14         ` Adham.Abozaeid
2019-08-08 18:16         ` Adham.Abozaeid
2019-07-25 21:31 ` [PATCH 4/6] staging: wilc1000: avoid overriding powersave state Adham.Abozaeid
2019-07-25 21:31 ` [PATCH 5/6] staging: wilc1000: apply power management regardless of open interfaces Adham.Abozaeid
2019-07-25 21:31 ` [PATCH 6/6] staging: wilc1000: remove manual sleep mode Adham.Abozaeid

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=20190725213125.2810-3-adham.abozaeid@microchip.com \
    --to=adham.abozaeid@microchip.com \
    --cc=Ajay.Kathat@microchip.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).