All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] wilc1000: added chip wakeup support and few fixes
@ 2021-04-23 18:29 Ajay.Kathat
  2021-04-23 18:29 ` [PATCH 02/12] wilc1000: fix possible memory leak in cfg_scan_result() Ajay.Kathat
                   ` (11 more replies)
  0 siblings, 12 replies; 24+ messages in thread
From: Ajay.Kathat @ 2021-04-23 18:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Ajay.Kathat

From: Ajay Singh <ajay.kathat@microchip.com>

The series contains following patches:
 - added chip wakeup sequence support required for PS mode
 - added WID to handle passing of wow info to FW
 - added reset command support for WILC SPI bus
 - few trivial fixes for WILC SPI

Ajay Singh (12):
  wilc1000: move 'deinit_lock' lock init/destory inside module probe
  wilc1000: fix possible memory leak in cfg_scan_result()
  wilc1000: added new WID to pass WOW info to firmware
  wilc1000: setup registers to support chip wakeup sequence
  wilc1000: add reset/terminate/repeat command support for SPI bus
  wilc1000: handle register read fail issue for SPI bus
  wilc1000: ignore error response for SPI clockless registers
  wilc1000: invoke chip reset register while FW download
  wilc1000: avoid 'isinit' static by moving inside priv data
  wilc1000: added initialized variable check before processing
  wilc1000: use write command after read in wilc_spi_sync_ext()
  wilc1000: increase WILC_CFG_PKTS_TIMEOUT timeout value

 .../wireless/microchip/wilc1000/cfg80211.c    |  11 +-
 drivers/net/wireless/microchip/wilc1000/hif.c |  31 +++-
 drivers/net/wireless/microchip/wilc1000/hif.h |   1 +
 .../net/wireless/microchip/wilc1000/netdev.h  |   2 -
 .../net/wireless/microchip/wilc1000/sdio.c    |  14 ++
 drivers/net/wireless/microchip/wilc1000/spi.c | 113 +++++++++++++--
 .../net/wireless/microchip/wilc1000/wlan.c    | 136 +++++++++++-------
 .../net/wireless/microchip/wilc1000/wlan.h    |   6 +-
 .../wireless/microchip/wilc1000/wlan_cfg.c    |   1 +
 .../net/wireless/microchip/wilc1000/wlan_if.h |   7 +-
 10 files changed, 240 insertions(+), 82 deletions(-)

-- 
2.24.0

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 02/12] wilc1000: fix possible memory leak in cfg_scan_result()
  2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
@ 2021-04-23 18:29 ` Ajay.Kathat
  2021-04-23 18:29 ` [PATCH 01/12] wilc1000: move 'deinit_lock' lock init/destory inside module probe Ajay.Kathat
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Ajay.Kathat @ 2021-04-23 18:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Ajay.Kathat

From: Ajay Singh <ajay.kathat@microchip.com>

Free 'cg80211_bss' reference when 'bss' handler is valid.
'if' condition is incorrect because it calls 'cfg80211_put_bss' when bss
is NULL(i.e 'if (!bss) is used instead of 'if (bss)')
Remove 'if' condition because 'cfg80211_put_bss' API already takes care
of NULL check.

Fixes: 6cd4fa5ab691 ("staging: wilc1000: make use of cfg80211_inform_bss_frame()")
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/net/wireless/microchip/wilc1000/cfg80211.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
index 530a768547cc..36b87ed38092 100644
--- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c
+++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
@@ -129,8 +129,7 @@ static void cfg_scan_result(enum scan_event scan_event,
 						info->frame_len,
 						(s32)info->rssi * 100,
 						GFP_KERNEL);
-		if (!bss)
-			cfg80211_put_bss(wiphy, bss);
+		cfg80211_put_bss(wiphy, bss);
 	} else if (scan_event == SCAN_EVENT_DONE) {
 		mutex_lock(&priv->scan_req_lock);
 
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 01/12] wilc1000: move 'deinit_lock' lock init/destory inside module probe
  2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
  2021-04-23 18:29 ` [PATCH 02/12] wilc1000: fix possible memory leak in cfg_scan_result() Ajay.Kathat
@ 2021-04-23 18:29 ` Ajay.Kathat
  2021-06-24  5:43   ` Ajay.Kathat
  2021-04-23 18:29 ` [PATCH 03/12] wilc1000: added new WID to pass WOW info to firmware Ajay.Kathat
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Ajay.Kathat @ 2021-04-23 18:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Ajay.Kathat

From: Ajay Singh <ajay.kathat@microchip.com>

Move initialization & deinitialization of 'deinit_lock' mutex lock
inside driver init and deinit respectively alongside other locks
initialization. After following changes no need to maintain client count
variable(client_count) just to init/destroy the lock.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/net/wireless/microchip/wilc1000/cfg80211.c | 2 ++
 drivers/net/wireless/microchip/wilc1000/hif.c      | 7 -------
 drivers/net/wireless/microchip/wilc1000/netdev.h   | 1 -
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
index 96973ec7bd9a..530a768547cc 100644
--- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c
+++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
@@ -1683,6 +1683,7 @@ static void wlan_init_locks(struct wilc *wl)
 	mutex_init(&wl->rxq_cs);
 	mutex_init(&wl->cfg_cmd_lock);
 	mutex_init(&wl->vif_mutex);
+	mutex_init(&wl->deinit_lock);
 
 	spin_lock_init(&wl->txq_spinlock);
 	mutex_init(&wl->txq_add_to_head_cs);
@@ -1701,6 +1702,7 @@ void wlan_deinit_locks(struct wilc *wilc)
 	mutex_destroy(&wilc->cfg_cmd_lock);
 	mutex_destroy(&wilc->txq_add_to_head_cs);
 	mutex_destroy(&wilc->vif_mutex);
+	mutex_destroy(&wilc->deinit_lock);
 	cleanup_srcu_struct(&wilc->srcu);
 }
 
diff --git a/drivers/net/wireless/microchip/wilc1000/hif.c b/drivers/net/wireless/microchip/wilc1000/hif.c
index a133736a7821..497a49a182ef 100644
--- a/drivers/net/wireless/microchip/wilc1000/hif.c
+++ b/drivers/net/wireless/microchip/wilc1000/hif.c
@@ -1494,7 +1494,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
 {
 	struct host_if_drv *hif_drv;
 	struct wilc_vif *vif = netdev_priv(dev);
-	struct wilc *wilc = vif->wilc;
 
 	hif_drv  = kzalloc(sizeof(*hif_drv), GFP_KERNEL);
 	if (!hif_drv)
@@ -1504,9 +1503,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
 
 	vif->hif_drv = hif_drv;
 
-	if (wilc->clients_count == 0)
-		mutex_init(&wilc->deinit_lock);
-
 	timer_setup(&vif->periodic_rssi, get_periodic_rssi, 0);
 	mod_timer(&vif->periodic_rssi, jiffies + msecs_to_jiffies(5000));
 
@@ -1518,8 +1514,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
 
 	hif_drv->p2p_timeout = 0;
 
-	wilc->clients_count++;
-
 	return 0;
 }
 
@@ -1550,7 +1544,6 @@ int wilc_deinit(struct wilc_vif *vif)
 
 	kfree(hif_drv);
 	vif->hif_drv = NULL;
-	vif->wilc->clients_count--;
 	mutex_unlock(&vif->wilc->deinit_lock);
 	return result;
 }
diff --git a/drivers/net/wireless/microchip/wilc1000/netdev.h b/drivers/net/wireless/microchip/wilc1000/netdev.h
index 86209b391a3d..a39c62a20f04 100644
--- a/drivers/net/wireless/microchip/wilc1000/netdev.h
+++ b/drivers/net/wireless/microchip/wilc1000/netdev.h
@@ -264,7 +264,6 @@ struct wilc {
 	struct device *dev;
 	bool suspend_event;
 
-	int clients_count;
 	struct workqueue_struct *hif_workqueue;
 	enum chip_ps_states chip_ps_state;
 	struct wilc_cfg cfg;
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 03/12] wilc1000: added new WID to pass WOW info to firmware
  2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
  2021-04-23 18:29 ` [PATCH 02/12] wilc1000: fix possible memory leak in cfg_scan_result() Ajay.Kathat
  2021-04-23 18:29 ` [PATCH 01/12] wilc1000: move 'deinit_lock' lock init/destory inside module probe Ajay.Kathat
@ 2021-04-23 18:29 ` Ajay.Kathat
  2021-06-24  9:25   ` Kalle Valo
  2021-04-23 18:29 ` [PATCH 04/12] wilc1000: setup registers to support chip wakeup sequence Ajay.Kathat
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Ajay.Kathat @ 2021-04-23 18:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Ajay.Kathat

From: Ajay Singh <ajay.kathat@microchip.com>

Added new WID to handle WOW and pass the information to FW in
wilc_set_wakeup().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 .../wireless/microchip/wilc1000/cfg80211.c    |  1 +
 drivers/net/wireless/microchip/wilc1000/hif.c | 24 +++++++++++++++++++
 drivers/net/wireless/microchip/wilc1000/hif.h |  1 +
 .../wireless/microchip/wilc1000/wlan_cfg.c    |  1 +
 .../net/wireless/microchip/wilc1000/wlan_if.h |  1 +
 5 files changed, 28 insertions(+)

diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
index 36b87ed38092..75160ab3914a 100644
--- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c
+++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
@@ -1580,6 +1580,7 @@ static void wilc_set_wakeup(struct wiphy *wiphy, bool enabled)
 	}
 
 	netdev_info(vif->ndev, "cfg set wake up = %d\n", enabled);
+	wilc_set_wowlan_trigger(vif, enabled);
 	srcu_read_unlock(&wl->srcu, srcu_idx);
 }
 
diff --git a/drivers/net/wireless/microchip/wilc1000/hif.c b/drivers/net/wireless/microchip/wilc1000/hif.c
index 497a49a182ef..e69b9c7f3d31 100644
--- a/drivers/net/wireless/microchip/wilc1000/hif.c
+++ b/drivers/net/wireless/microchip/wilc1000/hif.c
@@ -23,6 +23,10 @@ struct wilc_set_multicast {
 	u8 *mc_list;
 };
 
+struct host_if_wowlan_trigger {
+	u8 wowlan_trigger;
+};
+
 struct wilc_del_all_sta {
 	u8 assoc_sta;
 	u8 mac[WILC_MAX_NUM_STA][ETH_ALEN];
@@ -34,6 +38,7 @@ union wilc_message_body {
 	struct wilc_set_multicast mc_info;
 	struct wilc_remain_ch remain_on_ch;
 	char *data;
+	struct host_if_wowlan_trigger wow_trigger;
 };
 
 struct host_if_msg {
@@ -962,6 +967,25 @@ static void handle_set_mcast_filter(struct work_struct *work)
 	kfree(msg);
 }
 
+void wilc_set_wowlan_trigger(struct wilc_vif *vif, bool enabled)
+{
+	int ret;
+	struct wid wid;
+	u8 wowlan_trigger = 0;
+
+	if (enabled)
+		wowlan_trigger = 1;
+
+	wid.id = WID_WOWLAN_TRIGGER;
+	wid.type = WID_CHAR;
+	wid.val = &wowlan_trigger;
+	wid.size = sizeof(char);
+
+	ret = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1);
+	if (ret)
+		pr_err("Failed to send wowlan trigger config packet\n");
+}
+
 static void handle_scan_timer(struct work_struct *work)
 {
 	struct host_if_msg *msg = container_of(work, struct host_if_msg, work);
diff --git a/drivers/net/wireless/microchip/wilc1000/hif.h b/drivers/net/wireless/microchip/wilc1000/hif.h
index 58811911213b..cccd54ed0518 100644
--- a/drivers/net/wireless/microchip/wilc1000/hif.h
+++ b/drivers/net/wireless/microchip/wilc1000/hif.h
@@ -207,6 +207,7 @@ int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats);
 int wilc_get_vif_idx(struct wilc_vif *vif);
 int wilc_set_tx_power(struct wilc_vif *vif, u8 tx_power);
 int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power);
+void wilc_set_wowlan_trigger(struct wilc_vif *vif, bool enabled);
 void wilc_scan_complete_received(struct wilc *wilc, u8 *buffer, u32 length);
 void wilc_network_info_received(struct wilc *wilc, u8 *buffer, u32 length);
 void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *buffer, u32 length);
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan_cfg.c b/drivers/net/wireless/microchip/wilc1000/wlan_cfg.c
index fe2a7ed8e5cd..dba301378b7f 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan_cfg.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan_cfg.c
@@ -22,6 +22,7 @@ static const struct wilc_cfg_byte g_cfg_byte[] = {
 	{WID_STATUS, 0},
 	{WID_RSSI, 0},
 	{WID_LINKSPEED, 0},
+	{WID_WOWLAN_TRIGGER, 0},
 	{WID_NIL, 0}
 };
 
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan_if.h b/drivers/net/wireless/microchip/wilc1000/wlan_if.h
index f85fd575136d..31c68643731d 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan_if.h
+++ b/drivers/net/wireless/microchip/wilc1000/wlan_if.h
@@ -662,6 +662,7 @@ enum {
 
 	WID_LOG_TERMINAL_SWITCH		= 0x00CD,
 	WID_TX_POWER			= 0x00CE,
+	WID_WOWLAN_TRIGGER		= 0X00CF,
 	/*  EMAC Short WID list */
 	/*  RTS Threshold */
 	/*
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 04/12] wilc1000: setup registers to support chip wakeup sequence
  2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
                   ` (2 preceding siblings ...)
  2021-04-23 18:29 ` [PATCH 03/12] wilc1000: added new WID to pass WOW info to firmware Ajay.Kathat
@ 2021-04-23 18:29 ` Ajay.Kathat
  2021-06-24  9:27   ` Kalle Valo
  2021-04-23 18:29 ` [PATCH 05/12] wilc1000: add reset/terminate/repeat command support for SPI bus Ajay.Kathat
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Ajay.Kathat @ 2021-04-23 18:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Ajay.Kathat

From: Ajay Singh <ajay.kathat@microchip.com>

Configure required register for WILC1000 wakeup sequence out of sleep
for SPI and SDIO module.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 .../wireless/microchip/wilc1000/cfg80211.c    |  1 -
 .../net/wireless/microchip/wilc1000/netdev.h  |  1 -
 .../net/wireless/microchip/wilc1000/wlan.c    | 98 ++++++++++---------
 .../net/wireless/microchip/wilc1000/wlan.h    |  2 +
 .../net/wireless/microchip/wilc1000/wlan_if.h |  6 --
 5 files changed, 53 insertions(+), 55 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
index 75160ab3914a..91a471f3b1c8 100644
--- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c
+++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
@@ -1726,7 +1726,6 @@ int wilc_cfg80211_init(struct wilc **wilc, struct device *dev, int io_type,
 	*wilc = wl;
 	wl->io_type = io_type;
 	wl->hif_func = ops;
-	wl->chip_ps_state = WILC_CHIP_WAKEDUP;
 
 	for (i = 0; i < NQUEUES; i++)
 		INIT_LIST_HEAD(&wl->txq[i].txq_head.list);
diff --git a/drivers/net/wireless/microchip/wilc1000/netdev.h b/drivers/net/wireless/microchip/wilc1000/netdev.h
index a39c62a20f04..79f73a72da57 100644
--- a/drivers/net/wireless/microchip/wilc1000/netdev.h
+++ b/drivers/net/wireless/microchip/wilc1000/netdev.h
@@ -265,7 +265,6 @@ struct wilc {
 	bool suspend_event;
 
 	struct workqueue_struct *hif_workqueue;
-	enum chip_ps_states chip_ps_state;
 	struct wilc_cfg cfg;
 	void *bus_data;
 	struct net_device *monitor_dev;
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index 2030fc7f53ca..177e42a9a603 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -10,6 +10,8 @@
 #include "cfg80211.h"
 #include "wlan_cfg.h"
 
+#define WAKE_UP_TRIAL_RETRY		10000
+
 static inline bool is_wilc1000(u32 id)
 {
 	return (id & (~WILC_CHIP_REV_FIELD)) == WILC_1000_BASE_ID;
@@ -611,60 +613,62 @@ EXPORT_SYMBOL_GPL(chip_allow_sleep);
 
 void chip_wakeup(struct wilc *wilc)
 {
-	u32 reg, clk_status_reg;
-	const struct wilc_hif_func *h = wilc->hif_func;
-
-	if (wilc->io_type == WILC_HIF_SPI) {
-		do {
-			h->hif_read_reg(wilc, WILC_SPI_WAKEUP_REG, &reg);
-			h->hif_write_reg(wilc, WILC_SPI_WAKEUP_REG,
-					 reg | WILC_SPI_WAKEUP_BIT);
-			h->hif_write_reg(wilc, WILC_SPI_WAKEUP_REG,
-					 reg & ~WILC_SPI_WAKEUP_BIT);
-
-			do {
-				usleep_range(2000, 2500);
-				wilc_get_chipid(wilc, true);
-			} while (wilc_get_chipid(wilc, true) == 0);
-		} while (wilc_get_chipid(wilc, true) == 0);
-	} else if (wilc->io_type == WILC_HIF_SDIO) {
-		h->hif_write_reg(wilc, WILC_SDIO_HOST_TO_FW_REG,
-				 WILC_SDIO_HOST_TO_FW_BIT);
-		usleep_range(200, 400);
-		h->hif_read_reg(wilc, WILC_SDIO_WAKEUP_REG, &reg);
-		do {
-			h->hif_write_reg(wilc, WILC_SDIO_WAKEUP_REG,
-					 reg | WILC_SDIO_WAKEUP_BIT);
-			h->hif_read_reg(wilc, WILC_SDIO_CLK_STATUS_REG,
-					&clk_status_reg);
-
-			while (!(clk_status_reg & WILC_SDIO_CLK_STATUS_BIT)) {
-				usleep_range(2000, 2500);
+	u32 ret = 0;
+	u32 clk_status_val = 0, trials = 0;
+	u32 wakeup_reg, wakeup_bit;
+	u32 clk_status_reg, clk_status_bit;
+	u32 to_host_from_fw_reg, to_host_from_fw_bit;
+	u32 from_host_to_fw_reg, from_host_to_fw_bit;
+	const struct wilc_hif_func *hif_func = wilc->hif_func;
 
-				h->hif_read_reg(wilc, WILC_SDIO_CLK_STATUS_REG,
-						&clk_status_reg);
-			}
-			if (!(clk_status_reg & WILC_SDIO_CLK_STATUS_BIT)) {
-				h->hif_write_reg(wilc, WILC_SDIO_WAKEUP_REG,
-						 reg & ~WILC_SDIO_WAKEUP_BIT);
-			}
-		} while (!(clk_status_reg & WILC_SDIO_CLK_STATUS_BIT));
+	if (wilc->io_type == WILC_HIF_SDIO) {
+		wakeup_reg = WILC_SDIO_WAKEUP_REG;
+		wakeup_bit = WILC_SDIO_WAKEUP_BIT;
+		clk_status_reg = WILC_SDIO_CLK_STATUS_REG;
+		clk_status_bit = WILC_SDIO_CLK_STATUS_BIT;
+		from_host_to_fw_reg = WILC_SDIO_HOST_TO_FW_REG;
+		from_host_to_fw_bit = WILC_SDIO_HOST_TO_FW_BIT;
+		to_host_from_fw_reg = WILC_SDIO_FW_TO_HOST_REG;
+		to_host_from_fw_bit = WILC_SDIO_FW_TO_HOST_BIT;
+	} else {
+		wakeup_reg = WILC_SPI_WAKEUP_REG;
+		wakeup_bit = WILC_SPI_WAKEUP_BIT;
+		clk_status_reg = WILC_SPI_CLK_STATUS_REG;
+		clk_status_bit = WILC_SPI_CLK_STATUS_BIT;
+		from_host_to_fw_reg = WILC_SPI_HOST_TO_FW_REG;
+		from_host_to_fw_bit = WILC_SPI_HOST_TO_FW_BIT;
+		to_host_from_fw_reg = WILC_SPI_FW_TO_HOST_REG;
+		to_host_from_fw_bit = WILC_SPI_FW_TO_HOST_BIT;
 	}
 
-	if (wilc->chip_ps_state == WILC_CHIP_SLEEPING_MANUAL) {
-		if (wilc_get_chipid(wilc, false) < WILC_1000_BASE_ID_2B) {
-			u32 val32;
+	/* indicate host wakeup */
+	ret = hif_func->hif_write_reg(wilc, from_host_to_fw_reg,
+				      from_host_to_fw_bit);
+	if (ret)
+		return;
 
-			h->hif_read_reg(wilc, WILC_REG_4_TO_1_RX, &val32);
-			val32 |= BIT(6);
-			h->hif_write_reg(wilc, WILC_REG_4_TO_1_RX, val32);
+	/* Set wake-up bit */
+	ret = hif_func->hif_write_reg(wilc, wakeup_reg,
+				      wakeup_bit);
+	if (ret)
+		return;
 
-			h->hif_read_reg(wilc, WILC_REG_4_TO_1_TX_BANK0, &val32);
-			val32 |= BIT(6);
-			h->hif_write_reg(wilc, WILC_REG_4_TO_1_TX_BANK0, val32);
+	while (trials < WAKE_UP_TRIAL_RETRY) {
+		ret = hif_func->hif_read_reg(wilc, clk_status_reg,
+					     &clk_status_val);
+		if (ret) {
+			pr_err("Bus error %d %x\n", ret, clk_status_val);
+			return;
 		}
+		if (clk_status_val & clk_status_bit)
+			break;
+
+		trials++;
+	}
+	if (trials >= WAKE_UP_TRIAL_RETRY) {
+		pr_err("Failed to wake-up the chip\n");
+		return;
 	}
-	wilc->chip_ps_state = WILC_CHIP_WAKEDUP;
 }
 EXPORT_SYMBOL_GPL(chip_wakeup);
 
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.h b/drivers/net/wireless/microchip/wilc1000/wlan.h
index 771c25fa849b..285e5d9a2b48 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.h
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.h
@@ -97,6 +97,8 @@
 #define WILC_SPI_WAKEUP_REG		0x1
 #define WILC_SPI_WAKEUP_BIT		BIT(1)
 
+#define WILC_SPI_CLK_STATUS_REG        0x0f
+#define WILC_SPI_CLK_STATUS_BIT        BIT(2)
 #define WILC_SPI_HOST_TO_FW_REG		0x0b
 #define WILC_SPI_HOST_TO_FW_BIT		BIT(0)
 
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan_if.h b/drivers/net/wireless/microchip/wilc1000/wlan_if.h
index 31c68643731d..6eb7eb4ac294 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan_if.h
+++ b/drivers/net/wireless/microchip/wilc1000/wlan_if.h
@@ -48,12 +48,6 @@ enum {
 	WILC_FW_MAX_PSPOLL_PS = 4
 };
 
-enum chip_ps_states {
-	WILC_CHIP_WAKEDUP = 0,
-	WILC_CHIP_SLEEPING_AUTO = 1,
-	WILC_CHIP_SLEEPING_MANUAL = 2
-};
-
 enum bus_acquire {
 	WILC_BUS_ACQUIRE_ONLY = 0,
 	WILC_BUS_ACQUIRE_AND_WAKEUP = 1,
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 05/12] wilc1000: add reset/terminate/repeat command support for SPI bus
  2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
                   ` (3 preceding siblings ...)
  2021-04-23 18:29 ` [PATCH 04/12] wilc1000: setup registers to support chip wakeup sequence Ajay.Kathat
@ 2021-04-23 18:29 ` Ajay.Kathat
  2021-06-24  9:28   ` Kalle Valo
  2021-04-23 18:29 ` [PATCH 06/12] wilc1000: handle register read fail issue " Ajay.Kathat
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Ajay.Kathat @ 2021-04-23 18:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Ajay.Kathat

From: Ajay Singh <ajay.kathat@microchip.com>

Added API to send reset/terminate/repeat SPI commands to FW.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/net/wireless/microchip/wilc1000/spi.c | 61 +++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/drivers/net/wireless/microchip/wilc1000/spi.c b/drivers/net/wireless/microchip/wilc1000/spi.c
index 1472e9843896..607c8b642865 100644
--- a/drivers/net/wireless/microchip/wilc1000/spi.c
+++ b/drivers/net/wireless/microchip/wilc1000/spi.c
@@ -143,6 +143,12 @@ struct wilc_spi_rsp_data {
 	u8 data[];
 } __packed;
 
+struct wilc_spi_special_cmd_rsp {
+	u8 skip_byte;
+	u8 rsp_cmd_type;
+	u8 status;
+} __packed;
+
 static int wilc_bus_probe(struct spi_device *spi)
 {
 	int ret;
@@ -705,6 +711,61 @@ static int wilc_spi_dma_rw(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz)
 	return 0;
 }
 
+static int wilc_spi_special_cmd(struct wilc *wilc, u8 cmd)
+{
+	struct spi_device *spi = to_spi_device(wilc->dev);
+	struct wilc_spi *spi_priv = wilc->bus_data;
+	u8 wb[32], rb[32];
+	int cmd_len, resp_len = 0;
+	struct wilc_spi_cmd *c;
+	struct wilc_spi_special_cmd_rsp *r;
+
+	if (cmd != CMD_TERMINATE && cmd != CMD_REPEAT && cmd != CMD_RESET)
+		return -EINVAL;
+
+	memset(wb, 0x0, sizeof(wb));
+	memset(rb, 0x0, sizeof(rb));
+	c = (struct wilc_spi_cmd *)wb;
+	c->cmd_type = cmd;
+
+	if (cmd == CMD_RESET)
+		memset(c->u.simple_cmd.addr, 0xFF, 3);
+
+	cmd_len = offsetof(struct wilc_spi_cmd, u.simple_cmd.crc);
+	resp_len = sizeof(*r);
+
+	if (spi_priv->crc7_enabled) {
+		c->u.simple_cmd.crc[0] = wilc_get_crc7(wb, cmd_len);
+		cmd_len += 1;
+	}
+	if (cmd_len + resp_len > ARRAY_SIZE(wb)) {
+		dev_err(&spi->dev, "spi buffer size too small (%d) (%d) (%zu)\n",
+			cmd_len, resp_len, ARRAY_SIZE(wb));
+		return -EINVAL;
+	}
+
+	if (wilc_spi_tx_rx(wilc, wb, rb, cmd_len + resp_len)) {
+		dev_err(&spi->dev, "Failed cmd write, bus error...\n");
+		return -EINVAL;
+	}
+
+	r = (struct wilc_spi_special_cmd_rsp *)&rb[cmd_len];
+	if (r->rsp_cmd_type != cmd) {
+		if (!spi_priv->probing_crc)
+			dev_err(&spi->dev,
+				"Failed cmd response, cmd (%02x), resp (%02x)\n",
+				cmd, r->rsp_cmd_type);
+		return -EINVAL;
+	}
+
+	if (r->status != WILC_SPI_COMMAND_STAT_SUCCESS) {
+		dev_err(&spi->dev, "Failed cmd state response state (%02x)\n",
+			r->status);
+		return -EINVAL;
+	}
+	return 0;
+}
+
 static int wilc_spi_read_reg(struct wilc *wilc, u32 addr, u32 *data)
 {
 	struct spi_device *spi = to_spi_device(wilc->dev);
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 06/12] wilc1000: handle register read fail issue for SPI bus
  2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
                   ` (4 preceding siblings ...)
  2021-04-23 18:29 ` [PATCH 05/12] wilc1000: add reset/terminate/repeat command support for SPI bus Ajay.Kathat
@ 2021-04-23 18:29 ` Ajay.Kathat
  2021-04-23 18:29 ` [PATCH 07/12] wilc1000: ignore error response for SPI clockless registers Ajay.Kathat
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Ajay.Kathat @ 2021-04-23 18:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Ajay.Kathat

From: Ajay Singh <ajay.kathat@microchip.com>

For SPI bus, sometimes registers read fails after read/write to
clockless register so added workaround to issue reset command during
wakeup sequence.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/net/wireless/microchip/wilc1000/sdio.c |  1 +
 drivers/net/wireless/microchip/wilc1000/spi.c  | 16 ++++++++++++++++
 drivers/net/wireless/microchip/wilc1000/wlan.c |  5 +++++
 drivers/net/wireless/microchip/wilc1000/wlan.h |  1 +
 4 files changed, 23 insertions(+)

diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c
index e14b9fc2c67a..db490f449c27 100644
--- a/drivers/net/wireless/microchip/wilc1000/sdio.c
+++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
@@ -975,6 +975,7 @@ static const struct wilc_hif_func wilc_hif_sdio = {
 	.hif_sync_ext = wilc_sdio_sync_ext,
 	.enable_interrupt = wilc_sdio_enable_interrupt,
 	.disable_interrupt = wilc_sdio_disable_interrupt,
+	.hif_reset = wilc_sdio_reset,
 };
 
 static int wilc_sdio_resume(struct device *dev)
diff --git a/drivers/net/wireless/microchip/wilc1000/spi.c b/drivers/net/wireless/microchip/wilc1000/spi.c
index 607c8b642865..95228dc2d7e0 100644
--- a/drivers/net/wireless/microchip/wilc1000/spi.c
+++ b/drivers/net/wireless/microchip/wilc1000/spi.c
@@ -46,6 +46,8 @@ struct wilc_spi {
 
 static const struct wilc_hif_func wilc_hif_spi;
 
+static int wilc_spi_reset(struct wilc *wilc);
+
 /********************************************
  *
  *      Spi protocol Function
@@ -952,6 +954,19 @@ static int wilc_spi_write(struct wilc *wilc, u32 addr, u8 *buf, u32 size)
  *
  ********************************************/
 
+static int wilc_spi_reset(struct wilc *wilc)
+{
+	struct spi_device *spi = to_spi_device(wilc->dev);
+	struct wilc_spi *spi_priv = wilc->bus_data;
+	int result;
+
+	result = wilc_spi_special_cmd(wilc, CMD_RESET);
+	if (result && !spi_priv->probing_crc)
+		dev_err(&spi->dev, "Failed cmd reset\n");
+
+	return result;
+}
+
 static int wilc_spi_deinit(struct wilc *wilc)
 {
 	/*
@@ -1169,4 +1184,5 @@ static const struct wilc_hif_func wilc_hif_spi = {
 	.hif_block_tx_ext = wilc_spi_write,
 	.hif_block_rx_ext = wilc_spi_read,
 	.hif_sync_ext = wilc_spi_sync_ext,
+	.hif_reset = wilc_spi_reset,
 };
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index 177e42a9a603..9f0bb876975a 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -669,6 +669,11 @@ void chip_wakeup(struct wilc *wilc)
 		pr_err("Failed to wake-up the chip\n");
 		return;
 	}
+	/* Sometimes spi fail to read clock regs after reading
+	 * writing clockless registers
+	 */
+	if (wilc->io_type == WILC_HIF_SPI)
+		wilc->hif_func->hif_reset(wilc);
 }
 EXPORT_SYMBOL_GPL(chip_wakeup);
 
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.h b/drivers/net/wireless/microchip/wilc1000/wlan.h
index 285e5d9a2b48..150648b2c872 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.h
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.h
@@ -373,6 +373,7 @@ struct wilc_hif_func {
 	int (*hif_sync_ext)(struct wilc *wilc, int nint);
 	int (*enable_interrupt)(struct wilc *nic);
 	void (*disable_interrupt)(struct wilc *nic);
+	int (*hif_reset)(struct wilc *wilc);
 };
 
 #define WILC_MAX_CFG_FRAME_SIZE		1468
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 07/12] wilc1000: ignore error response for SPI clockless registers
  2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
                   ` (5 preceding siblings ...)
  2021-04-23 18:29 ` [PATCH 06/12] wilc1000: handle register read fail issue " Ajay.Kathat
@ 2021-04-23 18:29 ` Ajay.Kathat
  2021-04-23 18:29 ` [PATCH 08/12] wilc1000: invoke chip reset register while FW download Ajay.Kathat
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Ajay.Kathat @ 2021-04-23 18:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Ajay.Kathat

From: Ajay Singh <ajay.kathat@microchip.com>

Sometimes during wake-up sequence, clockless register status is not
correct even when the operation is successful. Suppress error for
clockless register so that wake-up sequence is successful.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/net/wireless/microchip/wilc1000/spi.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/spi.c b/drivers/net/wireless/microchip/wilc1000/spi.c
index 95228dc2d7e0..4f5464170426 100644
--- a/drivers/net/wireless/microchip/wilc1000/spi.c
+++ b/drivers/net/wireless/microchip/wilc1000/spi.c
@@ -470,7 +470,7 @@ static int wilc_spi_single_read(struct wilc *wilc, u8 cmd, u32 adr, void *b,
 	}
 
 	r = (struct wilc_spi_rsp_data *)&rb[cmd_len];
-	if (r->rsp_cmd_type != cmd) {
+	if (r->rsp_cmd_type != cmd && !clockless) {
 		if (!spi_priv->probing_crc)
 			dev_err(&spi->dev,
 				"Failed cmd, cmd (%02x), resp (%02x)\n",
@@ -478,7 +478,7 @@ static int wilc_spi_single_read(struct wilc *wilc, u8 cmd, u32 adr, void *b,
 		return -EINVAL;
 	}
 
-	if (r->status != WILC_SPI_COMMAND_STAT_SUCCESS) {
+	if (r->status != WILC_SPI_COMMAND_STAT_SUCCESS && !clockless) {
 		dev_err(&spi->dev, "Failed cmd state response state (%02x)\n",
 			r->status);
 		return -EINVAL;
@@ -567,14 +567,18 @@ static int wilc_spi_write_cmd(struct wilc *wilc, u8 cmd, u32 adr, u32 data,
 	}
 
 	r = (struct wilc_spi_rsp_data *)&rb[cmd_len];
-	if (r->rsp_cmd_type != cmd) {
+	/*
+	 * Clockless registers operations might return unexptected responses,
+	 * even if successful.
+	 */
+	if (r->rsp_cmd_type != cmd && !clockless) {
 		dev_err(&spi->dev,
 			"Failed cmd response, cmd (%02x), resp (%02x)\n",
 			cmd, r->rsp_cmd_type);
 		return -EINVAL;
 	}
 
-	if (r->status != WILC_SPI_COMMAND_STAT_SUCCESS) {
+	if (r->status != WILC_SPI_COMMAND_STAT_SUCCESS && !clockless) {
 		dev_err(&spi->dev, "Failed cmd state response state (%02x)\n",
 			r->status);
 		return -EINVAL;
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 08/12] wilc1000: invoke chip reset register while FW download
  2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
                   ` (6 preceding siblings ...)
  2021-04-23 18:29 ` [PATCH 07/12] wilc1000: ignore error response for SPI clockless registers Ajay.Kathat
@ 2021-04-23 18:29 ` Ajay.Kathat
  2021-06-24  9:32   ` Kalle Valo
  2021-04-23 18:29 ` [PATCH 09/12] wilc1000: avoid 'isinit' static by moving inside priv data Ajay.Kathat
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Ajay.Kathat @ 2021-04-23 18:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Ajay.Kathat

From: Ajay Singh <ajay.kathat@microchip.com>

Added chip-reset command before firmware download to initialize the
chip. Also configure chip in wake state, ready to accept the FW
binary.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 .../net/wireless/microchip/wilc1000/wlan.c    | 22 ++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index 9f0bb876975a..24e016a0dfa8 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -1080,6 +1080,7 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
 	u32 addr, size, size2, blksz;
 	u8 *dma_buffer;
 	int ret = 0;
+	u32 reg = 0;
 
 	blksz = BIT(12);
 
@@ -1088,10 +1089,22 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
 		return -EIO;
 
 	offset = 0;
+	pr_info("%s: Downloading firmware size = %d\n", __func__, buffer_size);
+
+	acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP);
+
+	wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, &reg);
+	reg &= ~BIT(10);
+	ret = wilc->hif_func->hif_write_reg(wilc, WILC_GLB_RESET_0, reg);
+	wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, &reg);
+	if (reg & BIT(10))
+		pr_err("%s: Failed to reset\n", __func__);
+
+	release_bus(wilc, WILC_BUS_RELEASE_ONLY);
 	do {
 		addr = get_unaligned_le32(&buffer[offset]);
 		size = get_unaligned_le32(&buffer[offset + 4]);
-		acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY);
+		acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP);
 		offset += 8;
 		while (((int)size) && (offset < buffer_size)) {
 			if (size <= blksz)
@@ -1109,10 +1122,13 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
 			offset += size2;
 			size -= size2;
 		}
-		release_bus(wilc, WILC_BUS_RELEASE_ONLY);
+		release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP);
 
-		if (ret)
+		if (ret) {
+			pr_err("%s Bus error\n", __func__);
 			goto fail;
+		}
+		pr_info("%s Offset = %d\n", __func__, offset);
 	} while (offset < buffer_size);
 
 fail:
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 09/12] wilc1000: avoid 'isinit' static by moving inside priv data
  2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
                   ` (7 preceding siblings ...)
  2021-04-23 18:29 ` [PATCH 08/12] wilc1000: invoke chip reset register while FW download Ajay.Kathat
@ 2021-04-23 18:29 ` Ajay.Kathat
  2021-06-24  9:40   ` Kalle Valo
  2021-04-23 18:29 ` [PATCH 11/12] wilc1000: use write command after read in wilc_spi_sync_ext() Ajay.Kathat
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Ajay.Kathat @ 2021-04-23 18:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Ajay.Kathat

From: Ajay Singh <ajay.kathat@microchip.com>

Instead of using static variable(isinit) move to priv struct.
Added hif_is_init function to set is_init variable.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 .../net/wireless/microchip/wilc1000/sdio.c    | 13 +++++++++++
 drivers/net/wireless/microchip/wilc1000/spi.c | 22 +++++++++++++------
 .../net/wireless/microchip/wilc1000/wlan.c    |  2 +-
 .../net/wireless/microchip/wilc1000/wlan.h    |  1 +
 4 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c
index db490f449c27..9c9f46a171b3 100644
--- a/drivers/net/wireless/microchip/wilc1000/sdio.c
+++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
@@ -26,6 +26,7 @@ static const struct sdio_device_id wilc_sdio_ids[] = {
 struct wilc_sdio {
 	bool irq_gpio;
 	u32 block_size;
+	bool is_init;
 	int has_thrpt_enh3;
 };
 
@@ -188,6 +189,13 @@ static int wilc_sdio_reset(struct wilc *wilc)
 	return 0;
 }
 
+static bool wilc_sdio_is_init(struct wilc *wilc)
+{
+	struct wilc_sdio *sdio_priv = wilc->bus_data;
+
+	return sdio_priv->is_init;
+}
+
 static int wilc_sdio_suspend(struct device *dev)
 {
 	struct sdio_func *func = dev_to_sdio_func(dev);
@@ -576,6 +584,9 @@ static int wilc_sdio_read(struct wilc *wilc, u32 addr, u8 *buf, u32 size)
 
 static int wilc_sdio_deinit(struct wilc *wilc)
 {
+	struct wilc_sdio *sdio_priv = wilc->bus_data;
+
+	sdio_priv->is_init = false;
 	return 0;
 }
 
@@ -695,6 +706,7 @@ static int wilc_sdio_init(struct wilc *wilc, bool resume)
 			 sdio_priv->has_thrpt_enh3);
 	}
 
+	sdio_priv->is_init = true;
 	return 0;
 }
 
@@ -976,6 +988,7 @@ static const struct wilc_hif_func wilc_hif_sdio = {
 	.enable_interrupt = wilc_sdio_enable_interrupt,
 	.disable_interrupt = wilc_sdio_disable_interrupt,
 	.hif_reset = wilc_sdio_reset,
+	.hif_is_init = wilc_sdio_is_init,
 };
 
 static int wilc_sdio_resume(struct device *dev)
diff --git a/drivers/net/wireless/microchip/wilc1000/spi.c b/drivers/net/wireless/microchip/wilc1000/spi.c
index 4f5464170426..8e88986db9a4 100644
--- a/drivers/net/wireless/microchip/wilc1000/spi.c
+++ b/drivers/net/wireless/microchip/wilc1000/spi.c
@@ -42,6 +42,7 @@ struct wilc_spi {
 	bool probing_crc;	/* true if we're probing chip's CRC config */
 	bool crc7_enabled;	/* true if crc7 is currently enabled */
 	bool crc16_enabled;	/* true if crc16 is currently enabled */
+	bool is_init;
 };
 
 static const struct wilc_hif_func wilc_hif_spi;
@@ -971,11 +972,19 @@ static int wilc_spi_reset(struct wilc *wilc)
 	return result;
 }
 
+static bool wilc_spi_is_init(struct wilc *wilc)
+{
+	struct wilc_spi *spi_priv = wilc->bus_data;
+
+	return spi_priv->is_init;
+}
+
 static int wilc_spi_deinit(struct wilc *wilc)
 {
-	/*
-	 * TODO:
-	 */
+	struct wilc_spi *spi_priv = wilc->bus_data;
+
+	spi_priv->is_init = false;
+
 	return 0;
 }
 
@@ -985,10 +994,9 @@ static int wilc_spi_init(struct wilc *wilc, bool resume)
 	struct wilc_spi *spi_priv = wilc->bus_data;
 	u32 reg;
 	u32 chipid;
-	static int isinit;
 	int ret, i;
 
-	if (isinit) {
+	if (spi_priv->is_init) {
 		ret = wilc_spi_read_reg(wilc, WILC_CHIPID, &chipid);
 		if (ret)
 			dev_err(&spi->dev, "Fail cmd read chip id...\n");
@@ -1059,8 +1067,7 @@ static int wilc_spi_init(struct wilc *wilc, bool resume)
 		return ret;
 	}
 
-	isinit = 1;
-
+	spi_priv->is_init = true;
 	return 0;
 }
 
@@ -1189,4 +1196,5 @@ static const struct wilc_hif_func wilc_hif_spi = {
 	.hif_block_rx_ext = wilc_spi_read,
 	.hif_sync_ext = wilc_spi_sync_ext,
 	.hif_reset = wilc_spi_reset,
+	.hif_is_init = wilc_spi_is_init,
 };
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index 24e016a0dfa8..6ae5d82c6f99 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -1255,7 +1255,7 @@ void wilc_wlan_cleanup(struct net_device *dev)
 	wilc->rx_buffer = NULL;
 	kfree(wilc->tx_buffer);
 	wilc->tx_buffer = NULL;
-	wilc->hif_func->hif_deinit(NULL);
+	wilc->hif_func->hif_deinit(wilc);
 }
 
 static int wilc_wlan_cfg_commit(struct wilc_vif *vif, int type,
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.h b/drivers/net/wireless/microchip/wilc1000/wlan.h
index 150648b2c872..8b7c3d1034ec 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.h
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.h
@@ -374,6 +374,7 @@ struct wilc_hif_func {
 	int (*enable_interrupt)(struct wilc *nic);
 	void (*disable_interrupt)(struct wilc *nic);
 	int (*hif_reset)(struct wilc *wilc);
+	bool (*hif_is_init)(struct wilc *wilc);
 };
 
 #define WILC_MAX_CFG_FRAME_SIZE		1468
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 10/12] wilc1000: added initialized variable check before processing
  2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
                   ` (9 preceding siblings ...)
  2021-04-23 18:29 ` [PATCH 11/12] wilc1000: use write command after read in wilc_spi_sync_ext() Ajay.Kathat
@ 2021-04-23 18:29 ` Ajay.Kathat
  2021-06-24  9:41   ` Kalle Valo
  2021-04-23 18:29 ` [PATCH 12/12] wilc1000: increase WILC_CFG_PKTS_TIMEOUT timeout value Ajay.Kathat
  11 siblings, 1 reply; 24+ messages in thread
From: Ajay.Kathat @ 2021-04-23 18:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Ajay.Kathat

From: Ajay Singh <ajay.kathat@microchip.com>

Added initialization success check before adding net/mgmt packet to Tx
queue and processing wilc_get_statistics() command to FW.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/net/wireless/microchip/wilc1000/cfg80211.c | 4 ++++
 drivers/net/wireless/microchip/wilc1000/wlan.c     | 9 +++++++++
 2 files changed, 13 insertions(+)

diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
index 91a471f3b1c8..dc4bfe7be378 100644
--- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c
+++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
@@ -728,6 +728,7 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev,
 {
 	struct wilc_vif *vif = netdev_priv(dev);
 	struct wilc_priv *priv = &vif->priv;
+	struct wilc *wilc = vif->wilc;
 	u32 i = 0;
 	u32 associatedsta = ~0;
 	u32 inactive_time = 0;
@@ -754,6 +755,9 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev,
 	} else if (vif->iftype == WILC_STATION_MODE) {
 		struct rf_info stats;
 
+		if (!wilc->initialized)
+			return -EBUSY;
+
 		wilc_get_statistics(vif, &stats);
 
 		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL) |
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index 6ae5d82c6f99..0e059b889fbd 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -427,6 +427,11 @@ int wilc_wlan_txq_add_net_pkt(struct net_device *dev,
 		return 0;
 	}
 
+	if (!wilc->initialized) {
+		tx_complete_fn(tx_data, 0);
+		return 0;
+	}
+
 	tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC);
 
 	if (!tqe) {
@@ -476,6 +481,10 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
 		return 0;
 	}
 
+	if (!wilc->initialized) {
+		tx_complete_fn(priv, 0);
+		return 0;
+	}
 	tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC);
 
 	if (!tqe) {
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 11/12] wilc1000: use write command after read in wilc_spi_sync_ext()
  2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
                   ` (8 preceding siblings ...)
  2021-04-23 18:29 ` [PATCH 09/12] wilc1000: avoid 'isinit' static by moving inside priv data Ajay.Kathat
@ 2021-04-23 18:29 ` Ajay.Kathat
  2021-06-24  9:42   ` Kalle Valo
  2021-04-23 18:29 ` [PATCH 10/12] wilc1000: added initialized variable check before processing Ajay.Kathat
  2021-04-23 18:29 ` [PATCH 12/12] wilc1000: increase WILC_CFG_PKTS_TIMEOUT timeout value Ajay.Kathat
  11 siblings, 1 reply; 24+ messages in thread
From: Ajay.Kathat @ 2021-04-23 18:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Ajay.Kathat

From: Ajay Singh <ajay.kathat@microchip.com>

Use write command instead of read command to have correct sequence of
reg read followed by write operation.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/net/wireless/microchip/wilc1000/spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/spi.c b/drivers/net/wireless/microchip/wilc1000/spi.c
index 8e88986db9a4..1ab0b6dd0288 100644
--- a/drivers/net/wireless/microchip/wilc1000/spi.c
+++ b/drivers/net/wireless/microchip/wilc1000/spi.c
@@ -1170,7 +1170,7 @@ static int wilc_spi_sync_ext(struct wilc *wilc, int nint)
 		for (i = 0; (i < 3) && (nint > 0); i++, nint--)
 			reg |= BIT(i);
 
-		ret = wilc_spi_read_reg(wilc, WILC_INTR2_ENABLE, &reg);
+		ret = wilc_spi_write_reg(wilc, WILC_INTR2_ENABLE, reg);
 		if (ret) {
 			dev_err(&spi->dev, "Failed write reg (%08x)...\n",
 				WILC_INTR2_ENABLE);
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 12/12] wilc1000: increase WILC_CFG_PKTS_TIMEOUT timeout value
  2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
                   ` (10 preceding siblings ...)
  2021-04-23 18:29 ` [PATCH 10/12] wilc1000: added initialized variable check before processing Ajay.Kathat
@ 2021-04-23 18:29 ` Ajay.Kathat
  2021-06-24  9:42   ` Kalle Valo
  11 siblings, 1 reply; 24+ messages in thread
From: Ajay.Kathat @ 2021-04-23 18:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, Ajay.Kathat

From: Ajay Singh <ajay.kathat@microchip.com>

Increase duration for WID config response timeout to have enough
wait for the response message.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/net/wireless/microchip/wilc1000/wlan.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.h b/drivers/net/wireless/microchip/wilc1000/wlan.h
index 8b7c3d1034ec..cb709d3b91df 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.h
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.h
@@ -302,7 +302,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 WILC_CFG_PKTS_TIMEOUT	msecs_to_jiffies(2000)
+#define WILC_CFG_PKTS_TIMEOUT	msecs_to_jiffies(3000)
 
 #define IS_MANAGMEMENT		0x100
 #define IS_MANAGMEMENT_CALLBACK	0x080
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 01/12] wilc1000: move 'deinit_lock' lock init/destory inside module probe
  2021-04-23 18:29 ` [PATCH 01/12] wilc1000: move 'deinit_lock' lock init/destory inside module probe Ajay.Kathat
@ 2021-06-24  5:43   ` Ajay.Kathat
  2021-06-24  5:55     ` Kalle Valo
  0 siblings, 1 reply; 24+ messages in thread
From: Ajay.Kathat @ 2021-06-24  5:43 UTC (permalink / raw)
  To: linux-wireless, kvalo; +Cc: Claudiu.Beznea

Hi Kalle,

I observed the series status is updated to 'Deferred' state in the 
patchwork link. Since there are no comments in patchwork, so I just 
wanted to confirm if anything is needed from me.


Regards,

Ajay

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 01/12] wilc1000: move 'deinit_lock' lock init/destory inside module probe
  2021-06-24  5:43   ` Ajay.Kathat
@ 2021-06-24  5:55     ` Kalle Valo
  0 siblings, 0 replies; 24+ messages in thread
From: Kalle Valo @ 2021-06-24  5:55 UTC (permalink / raw)
  To: Ajay.Kathat; +Cc: linux-wireless, Claudiu.Beznea

<Ajay.Kathat@microchip.com> writes:

> I observed the series status is updated to 'Deferred' state in the 
> patchwork link. Since there are no comments in patchwork, so I just 
> wanted to confirm if anything is needed from me.

I don't remember anymore why I deferred it, most likely just to cleanup
my queue, but it's now back in New state. Thanks for the reminder.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 03/12] wilc1000: added new WID to pass WOW info to firmware
  2021-04-23 18:29 ` [PATCH 03/12] wilc1000: added new WID to pass WOW info to firmware Ajay.Kathat
@ 2021-06-24  9:25   ` Kalle Valo
  2021-06-24 11:00     ` Ajay.Kathat
  0 siblings, 1 reply; 24+ messages in thread
From: Kalle Valo @ 2021-06-24  9:25 UTC (permalink / raw)
  To: Ajay.Kathat; +Cc: linux-wireless, Claudiu.Beznea

<Ajay.Kathat@microchip.com> writes:

> From: Ajay Singh <ajay.kathat@microchip.com>
>
> Added new WID to handle WOW and pass the information to FW in
> wilc_set_wakeup().

The commit log does not answer to "Why?". If you are fixing a bug,
please describe the issue.

And use imperative voice: "added" -> "add"

Please read the wiki which contains more information:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#commit_messages

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 04/12] wilc1000: setup registers to support chip wakeup sequence
  2021-04-23 18:29 ` [PATCH 04/12] wilc1000: setup registers to support chip wakeup sequence Ajay.Kathat
@ 2021-06-24  9:27   ` Kalle Valo
  0 siblings, 0 replies; 24+ messages in thread
From: Kalle Valo @ 2021-06-24  9:27 UTC (permalink / raw)
  To: Ajay.Kathat; +Cc: linux-wireless, Claudiu.Beznea

<Ajay.Kathat@microchip.com> writes:

> From: Ajay Singh <ajay.kathat@microchip.com>
>
> Configure required register for WILC1000 wakeup sequence out of sleep
> for SPI and SDIO module.

Why?

>  .../wireless/microchip/wilc1000/cfg80211.c    |  1 -
>  .../net/wireless/microchip/wilc1000/netdev.h  |  1 -
>  .../net/wireless/microchip/wilc1000/wlan.c    | 98 ++++++++++---------
>  .../net/wireless/microchip/wilc1000/wlan.h    |  2 +
>  .../net/wireless/microchip/wilc1000/wlan_if.h |  6 --
>  5 files changed, 53 insertions(+), 55 deletions(-)

Single sentence commit logs for non-trivial patches are usually a bad
idea. Please don't do that, that saves both yours and my time.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 05/12] wilc1000: add reset/terminate/repeat command support for SPI bus
  2021-04-23 18:29 ` [PATCH 05/12] wilc1000: add reset/terminate/repeat command support for SPI bus Ajay.Kathat
@ 2021-06-24  9:28   ` Kalle Valo
  0 siblings, 0 replies; 24+ messages in thread
From: Kalle Valo @ 2021-06-24  9:28 UTC (permalink / raw)
  To: Ajay.Kathat; +Cc: linux-wireless, Claudiu.Beznea

<Ajay.Kathat@microchip.com> writes:

> From: Ajay Singh <ajay.kathat@microchip.com>
>
> Added API to send reset/terminate/repeat SPI commands to FW.

Why? I'm guessing because you need it in the next patch, but please
document that clearly in the commit log so that people don't need to
guess.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 08/12] wilc1000: invoke chip reset register while FW download
  2021-04-23 18:29 ` [PATCH 08/12] wilc1000: invoke chip reset register while FW download Ajay.Kathat
@ 2021-06-24  9:32   ` Kalle Valo
  0 siblings, 0 replies; 24+ messages in thread
From: Kalle Valo @ 2021-06-24  9:32 UTC (permalink / raw)
  To: Ajay.Kathat; +Cc: linux-wireless, Claudiu.Beznea

<Ajay.Kathat@microchip.com> writes:

> From: Ajay Singh <ajay.kathat@microchip.com>
>
> Added chip-reset command before firmware download to initialize the
> chip. Also configure chip in wake state, ready to accept the FW
> binary.

"Added" -> "Add"

This repeats many times, so I don't comment on that anymore.

> @@ -1088,10 +1089,22 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
>  		return -EIO;
>  
>  	offset = 0;
> +	pr_info("%s: Downloading firmware size = %d\n", __func__, buffer_size);
> +
> +	acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP);
> +
> +	wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, &reg);
> +	reg &= ~BIT(10);
> +	ret = wilc->hif_func->hif_write_reg(wilc, WILC_GLB_RESET_0, reg);
> +	wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, &reg);
> +	if (reg & BIT(10))
> +		pr_err("%s: Failed to reset\n", __func__);
> +
> +	release_bus(wilc, WILC_BUS_RELEASE_ONLY);
>  	do {
>  		addr = get_unaligned_le32(&buffer[offset]);
>  		size = get_unaligned_le32(&buffer[offset + 4]);
> -		acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY);
> +		acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP);
>  		offset += 8;
>  		while (((int)size) && (offset < buffer_size)) {
>  			if (size <= blksz)
> @@ -1109,10 +1122,13 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
>  			offset += size2;
>  			size -= size2;
>  		}
> -		release_bus(wilc, WILC_BUS_RELEASE_ONLY);
> +		release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP);
>  
> -		if (ret)
> +		if (ret) {
> +			pr_err("%s Bus error\n", __func__);
>  			goto fail;
> +		}
> +		pr_info("%s Offset = %d\n", __func__, offset);

Please use pr_info() sparingly, it's only for important messages like
hardware info, firmware version/features and so on. I think pr_info()
calls in this function should be debug messages instead.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 09/12] wilc1000: avoid 'isinit' static by moving inside priv data
  2021-04-23 18:29 ` [PATCH 09/12] wilc1000: avoid 'isinit' static by moving inside priv data Ajay.Kathat
@ 2021-06-24  9:40   ` Kalle Valo
  0 siblings, 0 replies; 24+ messages in thread
From: Kalle Valo @ 2021-06-24  9:40 UTC (permalink / raw)
  To: Ajay.Kathat; +Cc: linux-wireless, Claudiu.Beznea

<Ajay.Kathat@microchip.com> writes:

> From: Ajay Singh <ajay.kathat@microchip.com>
>
> Instead of using static variable(isinit) move to priv struct.
> Added hif_is_init function to set is_init variable.

This is a good patch. But I also see one more static non-const variable:

wlan.c:       static u32 chipid;

Upstream drivers should not use static variables, unless they are const.
Please fix that also, but in a separate patch of course.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 10/12] wilc1000: added initialized variable check before processing
  2021-04-23 18:29 ` [PATCH 10/12] wilc1000: added initialized variable check before processing Ajay.Kathat
@ 2021-06-24  9:41   ` Kalle Valo
  0 siblings, 0 replies; 24+ messages in thread
From: Kalle Valo @ 2021-06-24  9:41 UTC (permalink / raw)
  To: Ajay.Kathat; +Cc: linux-wireless, Claudiu.Beznea

<Ajay.Kathat@microchip.com> writes:

> From: Ajay Singh <ajay.kathat@microchip.com>
>
> Added initialization success check before adding net/mgmt packet to Tx
> queue and processing wilc_get_statistics() command to FW.

Why?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 11/12] wilc1000: use write command after read in wilc_spi_sync_ext()
  2021-04-23 18:29 ` [PATCH 11/12] wilc1000: use write command after read in wilc_spi_sync_ext() Ajay.Kathat
@ 2021-06-24  9:42   ` Kalle Valo
  0 siblings, 0 replies; 24+ messages in thread
From: Kalle Valo @ 2021-06-24  9:42 UTC (permalink / raw)
  To: Ajay.Kathat; +Cc: linux-wireless, Claudiu.Beznea

<Ajay.Kathat@microchip.com> writes:

> From: Ajay Singh <ajay.kathat@microchip.com>
>
> Use write command instead of read command to have correct sequence of
> reg read followed by write operation.

Why?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 12/12] wilc1000: increase WILC_CFG_PKTS_TIMEOUT timeout value
  2021-04-23 18:29 ` [PATCH 12/12] wilc1000: increase WILC_CFG_PKTS_TIMEOUT timeout value Ajay.Kathat
@ 2021-06-24  9:42   ` Kalle Valo
  0 siblings, 0 replies; 24+ messages in thread
From: Kalle Valo @ 2021-06-24  9:42 UTC (permalink / raw)
  To: Ajay.Kathat; +Cc: linux-wireless, Claudiu.Beznea

<Ajay.Kathat@microchip.com> writes:

> From: Ajay Singh <ajay.kathat@microchip.com>
>
> Increase duration for WID config response timeout to have enough
> wait for the response message.

Why?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 03/12] wilc1000: added new WID to pass WOW info to firmware
  2021-06-24  9:25   ` Kalle Valo
@ 2021-06-24 11:00     ` Ajay.Kathat
  0 siblings, 0 replies; 24+ messages in thread
From: Ajay.Kathat @ 2021-06-24 11:00 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Claudiu.Beznea

Hi Kalle,

On 24/06/21 2:55 pm, Kalle Valo wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> <Ajay.Kathat@microchip.com> writes:
>
>> From: Ajay Singh <ajay.kathat@microchip.com>
>>
>> Added new WID to handle WOW and pass the information to FW in
>> wilc_set_wakeup().
> The commit log does not answer to "Why?". If you are fixing a bug,
> please describe the issue.


Sure, I will rework on the review comments and resubmit v2 series by 
including more commit details.


Regards,

Ajay

> And use imperative voice: "added" -> "add"
>
> Please read the wiki which contains more information:
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#commit_messages
>
> --
> https://patchwork.kernel.org/project/linux-wireless/list/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2021-06-24 11:00 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 18:29 [PATCH 00/12] wilc1000: added chip wakeup support and few fixes Ajay.Kathat
2021-04-23 18:29 ` [PATCH 02/12] wilc1000: fix possible memory leak in cfg_scan_result() Ajay.Kathat
2021-04-23 18:29 ` [PATCH 01/12] wilc1000: move 'deinit_lock' lock init/destory inside module probe Ajay.Kathat
2021-06-24  5:43   ` Ajay.Kathat
2021-06-24  5:55     ` Kalle Valo
2021-04-23 18:29 ` [PATCH 03/12] wilc1000: added new WID to pass WOW info to firmware Ajay.Kathat
2021-06-24  9:25   ` Kalle Valo
2021-06-24 11:00     ` Ajay.Kathat
2021-04-23 18:29 ` [PATCH 04/12] wilc1000: setup registers to support chip wakeup sequence Ajay.Kathat
2021-06-24  9:27   ` Kalle Valo
2021-04-23 18:29 ` [PATCH 05/12] wilc1000: add reset/terminate/repeat command support for SPI bus Ajay.Kathat
2021-06-24  9:28   ` Kalle Valo
2021-04-23 18:29 ` [PATCH 06/12] wilc1000: handle register read fail issue " Ajay.Kathat
2021-04-23 18:29 ` [PATCH 07/12] wilc1000: ignore error response for SPI clockless registers Ajay.Kathat
2021-04-23 18:29 ` [PATCH 08/12] wilc1000: invoke chip reset register while FW download Ajay.Kathat
2021-06-24  9:32   ` Kalle Valo
2021-04-23 18:29 ` [PATCH 09/12] wilc1000: avoid 'isinit' static by moving inside priv data Ajay.Kathat
2021-06-24  9:40   ` Kalle Valo
2021-04-23 18:29 ` [PATCH 11/12] wilc1000: use write command after read in wilc_spi_sync_ext() Ajay.Kathat
2021-06-24  9:42   ` Kalle Valo
2021-04-23 18:29 ` [PATCH 10/12] wilc1000: added initialized variable check before processing Ajay.Kathat
2021-06-24  9:41   ` Kalle Valo
2021-04-23 18:29 ` [PATCH 12/12] wilc1000: increase WILC_CFG_PKTS_TIMEOUT timeout value Ajay.Kathat
2021-06-24  9:42   ` Kalle Valo

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.