From: <Ajay.Kathat@microchip.com>
To: <linux-wireless@vger.kernel.org>
Cc: <devel@driverdev.osuosl.org>, <gregkh@linuxfoundation.org>,
<Adham.Abozaeid@microchip.com>, <johannes@sipsolutions.net>,
<Ajay.Kathat@microchip.com>
Subject: [PATCH 05/15] staging: wilc1000: rename timeout related macros
Date: Sat, 2 Feb 2019 19:17:05 +0000 [thread overview]
Message-ID: <1549134974-5545-6-git-send-email-ajay.kathat@microchip.com> (raw)
In-Reply-To: <1549134974-5545-1-git-send-email-ajay.kathat@microchip.com>
From: Ajay Singh <ajay.kathat@microchip.com>
Rename timeout related macros to have their unit clear from their name.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
drivers/staging/wilc1000/host_interface.c | 8 ++++----
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++--
drivers/staging/wilc1000/wilc_wlan.c | 4 ++--
drivers/staging/wilc1000/wilc_wlan.h | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index e958f9b..3576834 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -6,8 +6,8 @@
#include "wilc_wfi_netdevice.h"
-#define HOST_IF_SCAN_TIMEOUT 4000
-#define HOST_IF_CONNECT_TIMEOUT 9500
+#define WILC_HIF_SCAN_TIMEOUT_MS 4000
+#define WILC_HIF_CONNECT_TIMEOUT_MS 9500
#define FALSE_FRMWR_CHANNEL 100
@@ -327,7 +327,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,
hif_drv->usr_scan_req.arg = user_arg;
hif_drv->scan_timer_vif = vif;
mod_timer(&hif_drv->scan_timer,
- jiffies + msecs_to_jiffies(HOST_IF_SCAN_TIMEOUT));
+ jiffies + msecs_to_jiffies(WILC_HIF_SCAN_TIMEOUT_MS));
error:
if (search) {
@@ -1442,7 +1442,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ies,
hif_drv->connect_timer_vif = vif;
mod_timer(&hif_drv->connect_timer,
- jiffies + msecs_to_jiffies(HOST_IF_CONNECT_TIMEOUT));
+ jiffies + msecs_to_jiffies(WILC_HIF_CONNECT_TIMEOUT_MS));
return 0;
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index cd3df42..95230d7 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -72,7 +72,7 @@ static u8 curr_channel;
static u8 p2p_oui[] = {0x50, 0x6f, 0x9A, 0x09};
static u8 p2p_vendor_spec[] = {0xdd, 0x05, 0x00, 0x08, 0x40, 0x03};
-#define DURING_IP_TIME_OUT 15000
+#define WILC_IP_TIMEOUT_MS 15000
static void clear_during_ip(struct timer_list *t)
{
@@ -1489,7 +1489,7 @@ 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(DURING_IP_TIME_OUT));
+ 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;
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 58bcdc1..7a757c9 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1141,7 +1141,7 @@ int wilc_wlan_cfg_set(struct wilc_vif *vif, int start, u16 wid, u8 *buffer,
ret_size = 0;
if (!wait_for_completion_timeout(&wilc->cfg_event,
- msecs_to_jiffies(CFG_PKTS_TIMEOUT))) {
+ WILC_CFG_PKTS_TIMEOUT)) {
netdev_dbg(vif->ndev, "%s: Timed Out\n", __func__);
ret_size = 0;
}
@@ -1179,7 +1179,7 @@ int wilc_wlan_cfg_get(struct wilc_vif *vif, int start, u16 wid, int commit,
ret_size = 0;
if (!wait_for_completion_timeout(&wilc->cfg_event,
- msecs_to_jiffies(CFG_PKTS_TIMEOUT))) {
+ WILC_CFG_PKTS_TIMEOUT)) {
netdev_dbg(vif->ndev, "%s: Timed Out\n", __func__);
ret_size = 0;
}
diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
index 3880452..1d61e20 100644
--- a/drivers/staging/wilc1000/wilc_wlan.h
+++ b/drivers/staging/wilc1000/wilc_wlan.h
@@ -196,7 +196,7 @@
#define ENABLE_RX_VMM (SEL_VMM_TBL1 | EN_VMM)
#define ENABLE_TX_VMM (SEL_VMM_TBL0 | EN_VMM)
/*time for expiring the completion of cfg packets*/
-#define CFG_PKTS_TIMEOUT 2000
+#define WILC_CFG_PKTS_TIMEOUT msecs_to_jiffies(2000)
#define IS_MANAGMEMENT 0x100
#define IS_MANAGMEMENT_CALLBACK 0x080
--
2.7.4
next prev parent reply other threads:[~2019-02-02 19:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-02 19:16 [PATCH 00/15] staging: wilc1000: cleanup patches & handle review comments Ajay.Kathat
2019-02-02 19:16 ` [PATCH 01/15] staging: wilc1000: avoid the use of 'wilc_wfi_mon' static variable Ajay.Kathat
2019-02-04 13:38 ` Kalle Valo
2019-02-05 2:56 ` Ajay.Kathat
2019-02-02 19:16 ` [PATCH 02/15] staging: wilc1000: remove conditional lock in wilc_wfi_deinit_mon_interface() Ajay.Kathat
2019-02-02 19:16 ` [PATCH 03/15] staging: wilc1000: remove redundant macros for radiotap Ajay.Kathat
2019-02-02 19:17 ` [PATCH 04/15] staging: wilc1000: remove unnecessary debug log messages Ajay.Kathat
2019-02-02 19:17 ` Ajay.Kathat [this message]
2019-02-02 19:17 ` [PATCH 06/15] staging: wilc1000: make use of iface type to identify p2p interface Ajay.Kathat
2019-02-02 19:17 ` [PATCH 07/15] staging: wilc1000: refactor scan() cfg80211 ops callback Ajay.Kathat
2019-02-02 19:17 ` [PATCH 08/15] staging: wilc1000: use correct condition in loops for 'vif_num' count Ajay.Kathat
2019-02-04 8:13 ` Dan Carpenter
2019-02-04 9:42 ` Ajay.Kathat
2019-02-04 9:47 ` Dan Carpenter
2019-02-04 11:39 ` Greg KH
2019-02-04 12:25 ` Ajay.Kathat
2019-02-02 19:17 ` [PATCH 09/15] staging: wilc1000: remove use of 'terminated_handle' static variable Ajay.Kathat
2019-02-02 19:17 ` [PATCH 10/15] staging: wilc1000: refactor linux_wlan_init_test_config() Ajay.Kathat
2019-02-02 19:17 ` [PATCH 11/15] staging: wilc1000: refactor code to use cookie information Ajay.Kathat
2019-02-02 19:17 ` [PATCH 12/15] staging: wilc1000: use random number for cookie instead of pointer Ajay.Kathat
2019-02-02 19:17 ` [PATCH 13/15] staging: wilc1000: avoid use of interface names for validation Ajay.Kathat
2019-02-02 19:17 ` [PATCH 14/15] staging: wilc1000: add check before performing operation on net_device Ajay.Kathat
2019-02-02 19:17 ` [PATCH 15/15] staging: wilc1000: remove unused struct 'add_sta_param' Ajay.Kathat
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=1549134974-5545-6-git-send-email-ajay.kathat@microchip.com \
--to=ajay.kathat@microchip.com \
--cc=Adham.Abozaeid@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 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.