DriverDev-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/6] staging: wilc1000: changes to rename files and few other review comments
@ 2019-11-05  9:51 Ajay.Kathat
  2019-11-05  9:51 ` [PATCH 1/6] staging: wilc1000: avoid 'bool' datatype in struct sent to firmware Ajay.Kathat
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ajay.Kathat @ 2019-11-05  9:51 UTC (permalink / raw)
  To: linux-wireless; +Cc: devel, gregkh, johannes, Ajay.Kathat, Adham.Abozaeid

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

This patch series contains changes to address some of the review
comments received during full driver review [1]. Mainly the changes
are related to files rename and comments formatting.

1. https://www.spinics.net/lists/linux-wireless/msg191489.html

Ajay Singh (6):
  staging: wilc1000: avoid 'bool' datatype in struct sent to firmware
  staging: wilc1000: remove 'wilc_' prefix from filenames
  staging: wilc1000: added 'WILC_' prefix in header guard macro
  staging: wilc1000: avoid use of C++ style comments
  staging: wilc1000: added proper spacing for comments
  staging: wilc1000: use defines for msg types received from firmware

 drivers/staging/wilc1000/Makefile             |  8 ++---
 .../{wilc_wfi_cfgoperations.c => cfg80211.c}  |  2 +-
 .../{wilc_wfi_cfgoperations.h => cfg80211.h}  |  6 ++--
 .../staging/wilc1000/{wilc_hif.c => hif.c}    | 10 ++++---
 .../staging/wilc1000/{wilc_hif.h => hif.h}    |  6 ++--
 .../staging/wilc1000/{wilc_mon.c => mon.c}    |  4 +--
 .../wilc1000/{wilc_netdev.c => netdev.c}      |  4 +--
 .../{wilc_wfi_netdevice.h => netdev.h}        | 29 +++++++++++-------
 .../staging/wilc1000/{wilc_sdio.c => sdio.c}  |  4 +--
 .../staging/wilc1000/{wilc_spi.c => spi.c}    |  4 +--
 .../staging/wilc1000/{wilc_wlan.c => wlan.c}  |  4 +--
 .../staging/wilc1000/{wilc_wlan.h => wlan.h}  |  2 +-
 .../wilc1000/{wilc_wlan_cfg.c => wlan_cfg.c}  | 30 +++++++++----------
 .../wilc1000/{wilc_wlan_cfg.h => wlan_cfg.h}  |  0
 .../wilc1000/{wilc_wlan_if.h => wlan_if.h}    |  8 ++---
 15 files changed, 65 insertions(+), 56 deletions(-)
 rename drivers/staging/wilc1000/{wilc_wfi_cfgoperations.c => cfg80211.c} (99%)
 rename drivers/staging/wilc1000/{wilc_wfi_cfgoperations.h => cfg80211.h} (92%)
 rename drivers/staging/wilc1000/{wilc_hif.c => hif.c} (99%)
 rename drivers/staging/wilc1000/{wilc_hif.h => hif.h} (99%)
 rename drivers/staging/wilc1000/{wilc_mon.c => mon.c} (98%)
 rename drivers/staging/wilc1000/{wilc_netdev.c => netdev.c} (99%)
 rename drivers/staging/wilc1000/{wilc_wfi_netdevice.h => netdev.h} (95%)
 rename drivers/staging/wilc1000/{wilc_sdio.c => sdio.c} (99%)
 rename drivers/staging/wilc1000/{wilc_spi.c => spi.c} (99%)
 rename drivers/staging/wilc1000/{wilc_wlan.c => wlan.c} (99%)
 rename drivers/staging/wilc1000/{wilc_wlan.h => wlan.h} (99%)
 rename drivers/staging/wilc1000/{wilc_wlan_cfg.c => wlan_cfg.c} (94%)
 rename drivers/staging/wilc1000/{wilc_wlan_cfg.h => wlan_cfg.h} (100%)
 rename drivers/staging/wilc1000/{wilc_wlan_if.h => wlan_if.h} (99%)

-- 
2.22.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 1/6] staging: wilc1000: avoid 'bool' datatype in struct sent to firmware
  2019-11-05  9:51 [PATCH 0/6] staging: wilc1000: changes to rename files and few other review comments Ajay.Kathat
@ 2019-11-05  9:51 ` Ajay.Kathat
  2019-11-05  9:51 ` [PATCH 2/6] staging: wilc1000: remove 'wilc_' prefix from filenames Ajay.Kathat
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ajay.Kathat @ 2019-11-05  9:51 UTC (permalink / raw)
  To: linux-wireless; +Cc: devel, gregkh, johannes, Ajay.Kathat, Adham.Abozaeid

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

Use 'u8' instead of 'bool' datatype for struct element sent to firmware
because storage of bool datatype is not guaranteed.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/wilc_hif.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_hif.c b/drivers/staging/wilc1000/wilc_hif.c
index e0a95c5cc0d5..59eb7600619b 100644
--- a/drivers/staging/wilc1000/wilc_hif.c
+++ b/drivers/staging/wilc1000/wilc_hif.c
@@ -32,7 +32,7 @@ struct wilc_op_mode {
 };
 
 struct wilc_reg_frame {
-	bool reg;
+	u8 reg;
 	u8 reg_id;
 	__le16 frame_type;
 } __packed;
@@ -1784,7 +1784,9 @@ void wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
 	wid.val = (u8 *)&reg_frame;
 
 	memset(&reg_frame, 0x0, sizeof(reg_frame));
-	reg_frame.reg = reg;
+
+	if (reg)
+		reg_frame.reg = 1;
 
 	switch (frame_type) {
 	case IEEE80211_STYPE_ACTION:
-- 
2.22.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 2/6] staging: wilc1000: remove 'wilc_' prefix from filenames
  2019-11-05  9:51 [PATCH 0/6] staging: wilc1000: changes to rename files and few other review comments Ajay.Kathat
  2019-11-05  9:51 ` [PATCH 1/6] staging: wilc1000: avoid 'bool' datatype in struct sent to firmware Ajay.Kathat
@ 2019-11-05  9:51 ` Ajay.Kathat
  2019-11-05  9:51 ` [PATCH 3/6] staging: wilc1000: added 'WILC_' prefix in header guard macro Ajay.Kathat
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ajay.Kathat @ 2019-11-05  9:51 UTC (permalink / raw)
  To: linux-wireless; +Cc: devel, gregkh, johannes, Ajay.Kathat, Adham.Abozaeid

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

Remove 'wilc_' prefix from filenames, the driver is already present
inside the 'wilc1000' directory so no need to add 'wilc_' in
filenames.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/Makefile                         | 8 ++++----
 .../wilc1000/{wilc_wfi_cfgoperations.c => cfg80211.c}     | 2 +-
 .../wilc1000/{wilc_wfi_cfgoperations.h => cfg80211.h}     | 2 +-
 drivers/staging/wilc1000/{wilc_hif.c => hif.c}            | 2 +-
 drivers/staging/wilc1000/{wilc_hif.h => hif.h}            | 2 +-
 drivers/staging/wilc1000/{wilc_mon.c => mon.c}            | 2 +-
 drivers/staging/wilc1000/{wilc_netdev.c => netdev.c}      | 4 ++--
 .../staging/wilc1000/{wilc_wfi_netdevice.h => netdev.h}   | 6 +++---
 drivers/staging/wilc1000/{wilc_sdio.c => sdio.c}          | 4 ++--
 drivers/staging/wilc1000/{wilc_spi.c => spi.c}            | 4 ++--
 drivers/staging/wilc1000/{wilc_wlan.c => wlan.c}          | 4 ++--
 drivers/staging/wilc1000/{wilc_wlan.h => wlan.h}          | 0
 drivers/staging/wilc1000/{wilc_wlan_cfg.c => wlan_cfg.c}  | 8 ++++----
 drivers/staging/wilc1000/{wilc_wlan_cfg.h => wlan_cfg.h}  | 0
 drivers/staging/wilc1000/{wilc_wlan_if.h => wlan_if.h}    | 0
 15 files changed, 24 insertions(+), 24 deletions(-)
 rename drivers/staging/wilc1000/{wilc_wfi_cfgoperations.c => cfg80211.c} (99%)
 rename drivers/staging/wilc1000/{wilc_wfi_cfgoperations.h => cfg80211.h} (97%)
 rename drivers/staging/wilc1000/{wilc_hif.c => hif.c} (99%)
 rename drivers/staging/wilc1000/{wilc_hif.h => hif.h} (99%)
 rename drivers/staging/wilc1000/{wilc_mon.c => mon.c} (99%)
 rename drivers/staging/wilc1000/{wilc_netdev.c => netdev.c} (99%)
 rename drivers/staging/wilc1000/{wilc_wfi_netdevice.h => netdev.h} (98%)
 rename drivers/staging/wilc1000/{wilc_sdio.c => sdio.c} (99%)
 rename drivers/staging/wilc1000/{wilc_spi.c => spi.c} (99%)
 rename drivers/staging/wilc1000/{wilc_wlan.c => wlan.c} (99%)
 rename drivers/staging/wilc1000/{wilc_wlan.h => wlan.h} (100%)
 rename drivers/staging/wilc1000/{wilc_wlan_cfg.c => wlan_cfg.c} (98%)
 rename drivers/staging/wilc1000/{wilc_wlan_cfg.h => wlan_cfg.h} (100%)
 rename drivers/staging/wilc1000/{wilc_wlan_if.h => wlan_if.h} (100%)

diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile
index a5a8e806b98e..a3305a0a888a 100644
--- a/drivers/staging/wilc1000/Makefile
+++ b/drivers/staging/wilc1000/Makefile
@@ -4,11 +4,11 @@ obj-$(CONFIG_WILC1000) += wilc1000.o
 ccflags-y += -DFIRMWARE_1002=\"atmel/wilc1002_firmware.bin\" \
 		-DFIRMWARE_1003=\"atmel/wilc1003_firmware.bin\"
 
-wilc1000-objs := wilc_wfi_cfgoperations.o wilc_netdev.o wilc_mon.o \
-			wilc_hif.o wilc_wlan_cfg.o wilc_wlan.o
+wilc1000-objs := cfg80211.o netdev.o mon.o \
+			hif.o wlan_cfg.o wlan.o
 
 obj-$(CONFIG_WILC1000_SDIO) += wilc1000-sdio.o
-wilc1000-sdio-objs += wilc_sdio.o
+wilc1000-sdio-objs += sdio.o
 
 obj-$(CONFIG_WILC1000_SPI) += wilc1000-spi.o
-wilc1000-spi-objs += wilc_spi.o
+wilc1000-spi-objs += spi.o
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/cfg80211.c
similarity index 99%
rename from drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
rename to drivers/staging/wilc1000/cfg80211.c
index 66328ac85adc..4863e516ff13 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/cfg80211.c
@@ -4,7 +4,7 @@
  * All rights reserved.
  */
 
-#include "wilc_wfi_cfgoperations.h"
+#include "cfg80211.h"
 
 #define FRAME_TYPE_ID			0
 #define ACTION_CAT_ID			24
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b/drivers/staging/wilc1000/cfg80211.h
similarity index 97%
rename from drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
rename to drivers/staging/wilc1000/cfg80211.h
index 7206b6162a8c..05c910baf095 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
+++ b/drivers/staging/wilc1000/cfg80211.h
@@ -6,7 +6,7 @@
 
 #ifndef NM_WFI_CFGOPERATIONS
 #define NM_WFI_CFGOPERATIONS
-#include "wilc_wfi_netdevice.h"
+#include "netdev.h"
 
 struct wiphy *wilc_cfg_alloc(void);
 int wilc_cfg80211_init(struct wilc **wilc, struct device *dev, int io_type,
diff --git a/drivers/staging/wilc1000/wilc_hif.c b/drivers/staging/wilc1000/hif.c
similarity index 99%
rename from drivers/staging/wilc1000/wilc_hif.c
rename to drivers/staging/wilc1000/hif.c
index 59eb7600619b..25f035c02b10 100644
--- a/drivers/staging/wilc1000/wilc_hif.c
+++ b/drivers/staging/wilc1000/hif.c
@@ -4,7 +4,7 @@
  * All rights reserved.
  */
 
-#include "wilc_wfi_netdevice.h"
+#include "netdev.h"
 
 #define WILC_HIF_SCAN_TIMEOUT_MS                5000
 #define WILC_HIF_CONNECT_TIMEOUT_MS             9500
diff --git a/drivers/staging/wilc1000/wilc_hif.h b/drivers/staging/wilc1000/hif.h
similarity index 99%
rename from drivers/staging/wilc1000/wilc_hif.h
rename to drivers/staging/wilc1000/hif.h
index ac5fe57f872b..2defe58ab194 100644
--- a/drivers/staging/wilc1000/wilc_hif.h
+++ b/drivers/staging/wilc1000/hif.h
@@ -7,7 +7,7 @@
 #ifndef HOST_INT_H
 #define HOST_INT_H
 #include <linux/ieee80211.h>
-#include "wilc_wlan_if.h"
+#include "wlan_if.h"
 
 enum {
 	WILC_IDLE_MODE = 0x0,
diff --git a/drivers/staging/wilc1000/wilc_mon.c b/drivers/staging/wilc1000/mon.c
similarity index 99%
rename from drivers/staging/wilc1000/wilc_mon.c
rename to drivers/staging/wilc1000/mon.c
index d6f14f69ad64..853fe3056a53 100644
--- a/drivers/staging/wilc1000/wilc_mon.c
+++ b/drivers/staging/wilc1000/mon.c
@@ -4,7 +4,7 @@
  * All rights reserved.
  */
 
-#include "wilc_wfi_cfgoperations.h"
+#include "cfg80211.h"
 
 struct wilc_wfi_radiotap_hdr {
 	struct ieee80211_radiotap_header hdr;
diff --git a/drivers/staging/wilc1000/wilc_netdev.c b/drivers/staging/wilc1000/netdev.c
similarity index 99%
rename from drivers/staging/wilc1000/wilc_netdev.c
rename to drivers/staging/wilc1000/netdev.c
index 2bc7e5427fa8..d2c0b0f7cf63 100644
--- a/drivers/staging/wilc1000/wilc_netdev.c
+++ b/drivers/staging/wilc1000/netdev.c
@@ -10,8 +10,8 @@
 #include <linux/netdevice.h>
 #include <linux/inetdevice.h>
 
-#include "wilc_wfi_cfgoperations.h"
-#include "wilc_wlan_cfg.h"
+#include "cfg80211.h"
+#include "wlan_cfg.h"
 
 #define WILC_MULTICAST_TABLE_SIZE	8
 
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/netdev.h
similarity index 98%
rename from drivers/staging/wilc1000/wilc_wfi_netdevice.h
rename to drivers/staging/wilc1000/netdev.h
index d94a4808bdf9..8bc62ce4f2f7 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/netdev.h
@@ -14,9 +14,9 @@
 #include <linux/if_arp.h>
 #include <linux/gpio/consumer.h>
 
-#include "wilc_hif.h"
-#include "wilc_wlan.h"
-#include "wilc_wlan_cfg.h"
+#include "hif.h"
+#include "wlan.h"
+#include "wlan_cfg.h"
 
 #define FLOW_CONTROL_LOWER_THRESHOLD		128
 #define FLOW_CONTROL_UPPER_THRESHOLD		256
diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/sdio.c
similarity index 99%
rename from drivers/staging/wilc1000/wilc_sdio.c
rename to drivers/staging/wilc1000/sdio.c
index c787c5da8f2b..319e039380b0 100644
--- a/drivers/staging/wilc1000/wilc_sdio.c
+++ b/drivers/staging/wilc1000/sdio.c
@@ -8,8 +8,8 @@
 #include <linux/mmc/sdio_func.h>
 #include <linux/mmc/host.h>
 
-#include "wilc_wfi_netdevice.h"
-#include "wilc_wfi_cfgoperations.h"
+#include "netdev.h"
+#include "cfg80211.h"
 
 #define SDIO_MODALIAS "wilc1000_sdio"
 
diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/spi.c
similarity index 99%
rename from drivers/staging/wilc1000/wilc_spi.c
rename to drivers/staging/wilc1000/spi.c
index 166455a969bf..55f8757325f0 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/spi.c
@@ -7,8 +7,8 @@
 #include <linux/clk.h>
 #include <linux/spi/spi.h>
 
-#include "wilc_wfi_netdevice.h"
-#include "wilc_wfi_cfgoperations.h"
+#include "netdev.h"
+#include "cfg80211.h"
 
 struct wilc_spi {
 	int crc_off;
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wlan.c
similarity index 99%
rename from drivers/staging/wilc1000/wilc_wlan.c
rename to drivers/staging/wilc1000/wlan.c
index 771d8cb68dc1..d3de76126b78 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wlan.c
@@ -6,8 +6,8 @@
 
 #include <linux/if_ether.h>
 #include <linux/ip.h>
-#include "wilc_wfi_cfgoperations.h"
-#include "wilc_wlan_cfg.h"
+#include "cfg80211.h"
+#include "wlan_cfg.h"
 
 static inline bool is_wilc1000(u32 id)
 {
diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wlan.h
similarity index 100%
rename from drivers/staging/wilc1000/wilc_wlan.h
rename to drivers/staging/wilc1000/wlan.h
diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wlan_cfg.c
similarity index 98%
rename from drivers/staging/wilc1000/wilc_wlan_cfg.c
rename to drivers/staging/wilc1000/wlan_cfg.c
index 3f53807cee0f..904f84077ff7 100644
--- a/drivers/staging/wilc1000/wilc_wlan_cfg.c
+++ b/drivers/staging/wilc1000/wlan_cfg.c
@@ -4,10 +4,10 @@
  * All rights reserved.
  */
 
-#include "wilc_wlan_if.h"
-#include "wilc_wlan.h"
-#include "wilc_wlan_cfg.h"
-#include "wilc_wfi_netdevice.h"
+#include "wlan_if.h"
+#include "wlan.h"
+#include "wlan_cfg.h"
+#include "netdev.h"
 
 enum cfg_cmd_type {
 	CFG_BYTE_CMD	= 0,
diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.h b/drivers/staging/wilc1000/wlan_cfg.h
similarity index 100%
rename from drivers/staging/wilc1000/wilc_wlan_cfg.h
rename to drivers/staging/wilc1000/wlan_cfg.h
diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wlan_if.h
similarity index 100%
rename from drivers/staging/wilc1000/wilc_wlan_if.h
rename to drivers/staging/wilc1000/wlan_if.h
-- 
2.22.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 3/6] staging: wilc1000: added 'WILC_' prefix in header guard macro
  2019-11-05  9:51 [PATCH 0/6] staging: wilc1000: changes to rename files and few other review comments Ajay.Kathat
  2019-11-05  9:51 ` [PATCH 1/6] staging: wilc1000: avoid 'bool' datatype in struct sent to firmware Ajay.Kathat
  2019-11-05  9:51 ` [PATCH 2/6] staging: wilc1000: remove 'wilc_' prefix from filenames Ajay.Kathat
@ 2019-11-05  9:51 ` Ajay.Kathat
  2019-11-05  9:51 ` [PATCH 4/6] staging: wilc1000: avoid use of C++ style comments Ajay.Kathat
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Ajay.Kathat @ 2019-11-05  9:51 UTC (permalink / raw)
  To: linux-wireless; +Cc: devel, gregkh, johannes, Ajay.Kathat, Adham.Abozaeid

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

Use 'WILC_' prefix in header guard to follow the proper naming
convention for macro name.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/cfg80211.h | 4 ++--
 drivers/staging/wilc1000/hif.h      | 4 ++--
 drivers/staging/wilc1000/netdev.h   | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/cfg80211.h b/drivers/staging/wilc1000/cfg80211.h
index 05c910baf095..5e5d63f70df2 100644
--- a/drivers/staging/wilc1000/cfg80211.h
+++ b/drivers/staging/wilc1000/cfg80211.h
@@ -4,8 +4,8 @@
  * All rights reserved.
  */
 
-#ifndef NM_WFI_CFGOPERATIONS
-#define NM_WFI_CFGOPERATIONS
+#ifndef WILC_CFG80211_H
+#define WILC_CFG80211_H
 #include "netdev.h"
 
 struct wiphy *wilc_cfg_alloc(void);
diff --git a/drivers/staging/wilc1000/hif.h b/drivers/staging/wilc1000/hif.h
index 2defe58ab194..22ee6fffd599 100644
--- a/drivers/staging/wilc1000/hif.h
+++ b/drivers/staging/wilc1000/hif.h
@@ -4,8 +4,8 @@
  * All rights reserved.
  */
 
-#ifndef HOST_INT_H
-#define HOST_INT_H
+#ifndef WILC_HIF_H
+#define WILC_HIF_H
 #include <linux/ieee80211.h>
 #include "wlan_if.h"
 
diff --git a/drivers/staging/wilc1000/netdev.h b/drivers/staging/wilc1000/netdev.h
index 8bc62ce4f2f7..42e0eb192b86 100644
--- a/drivers/staging/wilc1000/netdev.h
+++ b/drivers/staging/wilc1000/netdev.h
@@ -4,8 +4,8 @@
  * All rights reserved.
  */
 
-#ifndef WILC_WFI_NETDEVICE
-#define WILC_WFI_NETDEVICE
+#ifndef WILC_NETDEV_H
+#define WILC_NETDEV_H
 
 #include <linux/tcp.h>
 #include <linux/ieee80211.h>
-- 
2.22.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 4/6] staging: wilc1000: avoid use of C++ style comments
  2019-11-05  9:51 [PATCH 0/6] staging: wilc1000: changes to rename files and few other review comments Ajay.Kathat
                   ` (2 preceding siblings ...)
  2019-11-05  9:51 ` [PATCH 3/6] staging: wilc1000: added 'WILC_' prefix in header guard macro Ajay.Kathat
@ 2019-11-05  9:51 ` Ajay.Kathat
  2019-11-05  9:51 ` [PATCH 5/6] staging: wilc1000: added proper spacing for comments Ajay.Kathat
  2019-11-05  9:51 ` [PATCH 6/6] staging: wilc1000: use defines for msg types received from firmware Ajay.Kathat
  5 siblings, 0 replies; 7+ messages in thread
From: Ajay.Kathat @ 2019-11-05  9:51 UTC (permalink / raw)
  To: linux-wireless; +Cc: devel, gregkh, johannes, Ajay.Kathat, Adham.Abozaeid

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

Replace C++ style comment with C style.

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

diff --git a/drivers/staging/wilc1000/hif.c b/drivers/staging/wilc1000/hif.c
index 25f035c02b10..5f6706bcedf6 100644
--- a/drivers/staging/wilc1000/hif.c
+++ b/drivers/staging/wilc1000/hif.c
@@ -552,7 +552,7 @@ void *wilc_parse_join_bss_param(struct cfg80211_bss *bss,
 
 		param->mode_802_11i = 2;
 		param->rsn_found = true;
-		//extract RSN capabilities
+		/* extract RSN capabilities */
 		offset += (rsn_ie[offset] * 4) + 2;
 		offset += (rsn_ie[offset] * 4) + 2;
 		memcpy(param->rsn_cap, &rsn_ie[offset], 2);
-- 
2.22.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 5/6] staging: wilc1000: added proper spacing for comments
  2019-11-05  9:51 [PATCH 0/6] staging: wilc1000: changes to rename files and few other review comments Ajay.Kathat
                   ` (3 preceding siblings ...)
  2019-11-05  9:51 ` [PATCH 4/6] staging: wilc1000: avoid use of C++ style comments Ajay.Kathat
@ 2019-11-05  9:51 ` Ajay.Kathat
  2019-11-05  9:51 ` [PATCH 6/6] staging: wilc1000: use defines for msg types received from firmware Ajay.Kathat
  5 siblings, 0 replies; 7+ messages in thread
From: Ajay.Kathat @ 2019-11-05  9:51 UTC (permalink / raw)
  To: linux-wireless; +Cc: devel, gregkh, johannes, Ajay.Kathat, Adham.Abozaeid

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

Added proper space for the comments and added newline before the
comments inside a struct.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/mon.c      |  2 +-
 drivers/staging/wilc1000/netdev.h   | 19 ++++++++++++++-----
 drivers/staging/wilc1000/wlan.h     |  2 +-
 drivers/staging/wilc1000/wlan_cfg.c |  2 +-
 drivers/staging/wilc1000/wlan_if.h  |  8 ++++----
 5 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/wilc1000/mon.c b/drivers/staging/wilc1000/mon.c
index 853fe3056a53..48ac33f06f63 100644
--- a/drivers/staging/wilc1000/mon.c
+++ b/drivers/staging/wilc1000/mon.c
@@ -220,7 +220,7 @@ struct net_device *wilc_wfi_init_mon_interface(struct wilc *wl,
 {
 	struct wilc_wfi_mon_priv *priv;
 
-	/*If monitor interface is already initialized, return it*/
+	/* If monitor interface is already initialized, return it */
 	if (wl->monitor_dev)
 		return wl->monitor_dev;
 
diff --git a/drivers/staging/wilc1000/netdev.h b/drivers/staging/wilc1000/netdev.h
index 42e0eb192b86..cd8f0d72caaa 100644
--- a/drivers/staging/wilc1000/netdev.h
+++ b/drivers/staging/wilc1000/netdev.h
@@ -60,7 +60,7 @@ struct sta_info {
 	u8 sta_associated_bss[WILC_MAX_NUM_STA][ETH_ALEN];
 };
 
-/*Parameters needed for host interface for  remaining on channel*/
+/* Parameters needed for host interface for remaining on channel */
 struct wilc_wfi_p2p_listen_params {
 	struct ieee80211_channel *listen_ch;
 	u32 listen_duration;
@@ -145,11 +145,13 @@ struct wilc_priv {
 	struct wilc_pmkid_attr pmkid_list;
 	u8 wep_key[4][WLAN_KEY_LEN_WEP104];
 	u8 wep_key_len[4];
+
 	/* The real interface that the monitor is on */
 	struct net_device *real_ndev;
 	struct wilc_wfi_key *wilc_gtk[WILC_MAX_NUM_STA];
 	struct wilc_wfi_key *wilc_ptk[WILC_MAX_NUM_STA];
 	u8 wilc_groupkey;
+
 	/* mutexes */
 	struct mutex scan_req_lock;
 	bool p2p_listen_state;
@@ -224,16 +226,21 @@ struct wilc {
 	int close;
 	u8 vif_num;
 	struct list_head vif_list;
-	/*protect vif list*/
+
+	/* protect vif list */
 	struct mutex vif_mutex;
 	struct srcu_struct srcu;
 	u8 open_ifcs;
-	/*protect head of transmit queue*/
+
+	/* protect head of transmit queue */
 	struct mutex txq_add_to_head_cs;
-	/*protect txq_entry_t transmit queue*/
+
+	/* protect txq_entry_t transmit queue */
 	spinlock_t txq_spinlock;
-	/*protect rxq_entry_t receiver queue*/
+
+	/* protect rxq_entry_t receiver queue */
 	struct mutex rxq_cs;
+
 	/* lock to protect hif access */
 	struct mutex hif_cs;
 
@@ -245,6 +252,7 @@ struct wilc {
 	struct task_struct *txq_thread;
 
 	int quit;
+
 	/* lock to protect issue of wid command to firmware */
 	struct mutex cfg_cmd_lock;
 	struct wilc_cfg_frame cfg_frame;
@@ -271,6 +279,7 @@ struct wilc {
 	struct wilc_cfg cfg;
 	void *bus_data;
 	struct net_device *monitor_dev;
+
 	/* deinit lock */
 	struct mutex deinit_lock;
 	u8 sta_ch;
diff --git a/drivers/staging/wilc1000/wlan.h b/drivers/staging/wilc1000/wlan.h
index 7469fa47d588..1f6957cf2e9c 100644
--- a/drivers/staging/wilc1000/wlan.h
+++ b/drivers/staging/wilc1000/wlan.h
@@ -190,7 +190,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*/
+/* time for expiring the completion of cfg packets */
 #define WILC_CFG_PKTS_TIMEOUT	msecs_to_jiffies(2000)
 
 #define IS_MANAGMEMENT		0x100
diff --git a/drivers/staging/wilc1000/wlan_cfg.c b/drivers/staging/wilc1000/wlan_cfg.c
index 904f84077ff7..c5b1678c7b5e 100644
--- a/drivers/staging/wilc1000/wlan_cfg.c
+++ b/drivers/staging/wilc1000/wlan_cfg.c
@@ -378,7 +378,7 @@ void wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size,
 		wilc_wlan_parse_info_frame(wilc, frame);
 		rsp->type = WILC_CFG_RSP_STATUS;
 		rsp->seq_no = msg_id;
-		/*call host interface info parse as well*/
+		/* call host interface info parse as well */
 		wilc_gnrl_async_info_received(wilc, frame - 4, size + 4);
 		break;
 
diff --git a/drivers/staging/wilc1000/wlan_if.h b/drivers/staging/wilc1000/wlan_if.h
index 70eac586f80c..7c7ee66c35f5 100644
--- a/drivers/staging/wilc1000/wlan_if.h
+++ b/drivers/staging/wilc1000/wlan_if.h
@@ -750,10 +750,10 @@ enum {
 	WID_REMOVE_KEY			= 0x301E,
 	WID_ASSOC_REQ_INFO		= 0x301F,
 	WID_ASSOC_RES_INFO		= 0x3020,
-	WID_MANUFACTURER		= 0x3026, /*Added for CAPI tool */
-	WID_MODEL_NAME			= 0x3027, /*Added for CAPI tool */
-	WID_MODEL_NUM			= 0x3028, /*Added for CAPI tool */
-	WID_DEVICE_NAME			= 0x3029, /*Added for CAPI tool */
+	WID_MANUFACTURER		= 0x3026, /* Added for CAPI tool */
+	WID_MODEL_NAME			= 0x3027, /* Added for CAPI tool */
+	WID_MODEL_NUM			= 0x3028, /* Added for CAPI tool */
+	WID_DEVICE_NAME			= 0x3029, /* Added for CAPI tool */
 
 	/* NMAC String WID list */
 	WID_SET_OPERATION_MODE		= 0x3079,
-- 
2.22.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 6/6] staging: wilc1000: use defines for msg types received from firmware
  2019-11-05  9:51 [PATCH 0/6] staging: wilc1000: changes to rename files and few other review comments Ajay.Kathat
                   ` (4 preceding siblings ...)
  2019-11-05  9:51 ` [PATCH 5/6] staging: wilc1000: added proper spacing for comments Ajay.Kathat
@ 2019-11-05  9:51 ` Ajay.Kathat
  5 siblings, 0 replies; 7+ messages in thread
From: Ajay.Kathat @ 2019-11-05  9:51 UTC (permalink / raw)
  To: linux-wireless; +Cc: devel, gregkh, johannes, Ajay.Kathat, Adham.Abozaeid

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

Added defines for different types of messages received from firmware.
Removed the unnecessary comments because after the addition of macros
the message types are self-explanatory.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/wlan_cfg.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/wilc1000/wlan_cfg.c b/drivers/staging/wilc1000/wlan_cfg.c
index c5b1678c7b5e..6f6b286788d1 100644
--- a/drivers/staging/wilc1000/wlan_cfg.c
+++ b/drivers/staging/wilc1000/wlan_cfg.c
@@ -44,6 +44,11 @@ static const struct wilc_cfg_str g_cfg_str[] = {
 	{WID_NIL, NULL}
 };
 
+#define WILC_RESP_MSG_TYPE_CONFIG_REPLY		'R'
+#define WILC_RESP_MSG_TYPE_STATUS_INFO		'I'
+#define WILC_RESP_MSG_TYPE_NETWORK_INFO		'N'
+#define WILC_RESP_MSG_TYPE_SCAN_COMPLETE	'S'
+
 /********************************************
  *
  *      Configuration Functions
@@ -360,21 +365,14 @@ void wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size,
 	size -= 4;
 	rsp->type = 0;
 
-	/*
-	 * The valid types of response messages are
-	 * 'R' (Response),
-	 * 'I' (Information), and
-	 * 'N' (Network Information)
-	 */
-
 	switch (msg_type) {
-	case 'R':
+	case WILC_RESP_MSG_TYPE_CONFIG_REPLY:
 		wilc_wlan_parse_response_frame(wilc, frame, size);
 		rsp->type = WILC_CFG_RSP;
 		rsp->seq_no = msg_id;
 		break;
 
-	case 'I':
+	case WILC_RESP_MSG_TYPE_STATUS_INFO:
 		wilc_wlan_parse_info_frame(wilc, frame);
 		rsp->type = WILC_CFG_RSP_STATUS;
 		rsp->seq_no = msg_id;
@@ -382,11 +380,11 @@ void wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size,
 		wilc_gnrl_async_info_received(wilc, frame - 4, size + 4);
 		break;
 
-	case 'N':
+	case WILC_RESP_MSG_TYPE_NETWORK_INFO:
 		wilc_network_info_received(wilc, frame - 4, size + 4);
 		break;
 
-	case 'S':
+	case WILC_RESP_MSG_TYPE_SCAN_COMPLETE:
 		wilc_scan_complete_received(wilc, frame - 4, size + 4);
 		break;
 
-- 
2.22.0

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05  9:51 [PATCH 0/6] staging: wilc1000: changes to rename files and few other review comments Ajay.Kathat
2019-11-05  9:51 ` [PATCH 1/6] staging: wilc1000: avoid 'bool' datatype in struct sent to firmware Ajay.Kathat
2019-11-05  9:51 ` [PATCH 2/6] staging: wilc1000: remove 'wilc_' prefix from filenames Ajay.Kathat
2019-11-05  9:51 ` [PATCH 3/6] staging: wilc1000: added 'WILC_' prefix in header guard macro Ajay.Kathat
2019-11-05  9:51 ` [PATCH 4/6] staging: wilc1000: avoid use of C++ style comments Ajay.Kathat
2019-11-05  9:51 ` [PATCH 5/6] staging: wilc1000: added proper spacing for comments Ajay.Kathat
2019-11-05  9:51 ` [PATCH 6/6] staging: wilc1000: use defines for msg types received from firmware Ajay.Kathat

DriverDev-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/driverdev-devel/0 driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ https://lore.kernel.org/driverdev-devel \
		driverdev-devel@linuxdriverproject.org devel@driverdev.osuosl.org
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxdriverproject.driverdev-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git