All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] staging: ks7010: minor cleanups
@ 2018-04-26 13:42 Sergio Paracuellos
  2018-04-26 13:42 ` [PATCH 01/10] staging: ks7010: remove missing WPS preprocessor conditional code Sergio Paracuellos
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Sergio Paracuellos @ 2018-04-26 13:42 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, wsa

This patch series just do minor cleanups of the driver, changing
some trivial types for its preferred, removing some comments and
cleaning some missing stuff from previous series. Minor function
refactor has been included also.

Sergio Paracuellos (10):
  staging: ks7010: remove missing WPS preprocessor conditional code
  staging: ks7010: use u8 instead of unsigned char in write_to_device
    function
  staging: ks7010: change local variable type in _ks_wlan_hw_power_save
  staging: ks7010: change local variable type in ks7010_rw_function
  staging: ks7010: change some local variables type in ks_sdio_interrupt
  staging: ks7010: change local variable type in ks7010_sdio_init_irqs
  staging: ks7010: use the same parameter for 'event' in
    hostif_sme_enqueue
  staging: ks7010: refactor ks7010_sme_enqueue_events function
  staging: ks7010: change local variable type in ks_wlan_hw_rx
  staging: ks7010: remove nonsense comment in ks_wlan.h file

 drivers/staging/ks7010/ks7010_sdio.c | 46 +++++++++++++++------------------
 drivers/staging/ks7010/ks_hostif.c   |  8 +-----
 drivers/staging/ks7010/ks_hostif.h   |  4 +--
 drivers/staging/ks7010/ks_wlan.h     | 49 ++++++++++++++++++------------------
 4 files changed, 46 insertions(+), 61 deletions(-)

-- 
2.7.4

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

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

* [PATCH 01/10] staging: ks7010: remove missing WPS preprocessor conditional code
  2018-04-26 13:42 [PATCH 00/10] staging: ks7010: minor cleanups Sergio Paracuellos
@ 2018-04-26 13:42 ` Sergio Paracuellos
  2018-04-26 13:42 ` [PATCH 02/10] staging: ks7010: use u8 instead of unsigned char in write_to_device function Sergio Paracuellos
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Sergio Paracuellos @ 2018-04-26 13:42 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, wsa

The following commit:

Commit '92c1552caef3 (staging: ks7010: remove WPS definition conditional code)'

removes WPS hardcoded definition and its related conditional preprocessor code. 
There was some missing stuff already in this files. Remove it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/ks7010/ks_hostif.c | 6 ------
 drivers/staging/ks7010/ks_hostif.h | 2 --
 2 files changed, 8 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index c0a9a67..ea484f2 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -611,10 +611,8 @@ void hostif_mib_set_confirm(struct ks_wlan_private *priv)
 	case DOT11_PMK_TSC:
 	case LOCAL_PMK:
 	case LOCAL_GAIN:
-#ifdef WPS
 	case LOCAL_WPS_ENABLE:
 	case LOCAL_WPS_PROBE_REQ:
-#endif /* WPS */
 	case LOCAL_REGION:
 	default:
 		break;
@@ -644,7 +642,6 @@ void hostif_sleep_confirm(struct ks_wlan_private *priv)
 static
 void hostif_start_confirm(struct ks_wlan_private *priv)
 {
-#ifdef WPS
 	union iwreq_data wrqu;
 
 	wrqu.data.length = 0;
@@ -654,7 +651,6 @@ void hostif_start_confirm(struct ks_wlan_private *priv)
 		eth_zero_addr(wrqu.ap_addr.sa_data);
 		wireless_send_event(priv->net_dev, SIOCGIWAP, &wrqu, NULL);
 	}
-#endif
 	netdev_dbg(priv->net_dev, " scan_ind_count=%d\n", priv->scan_ind_count);
 	hostif_sme_enqueue(priv, SME_START_CONFIRM);
 }
@@ -2174,7 +2170,6 @@ void hostif_sme_execute(struct ks_wlan_private *priv, int event)
 	case SME_SET_PMKSA:
 		hostif_sme_set_pmksa(priv);
 		break;
-#ifdef WPS
 	case SME_WPS_ENABLE_REQUEST:
 		hostif_mib_set_request(priv, LOCAL_WPS_ENABLE,
 				       sizeof(priv->wps.wps_enabled),
@@ -2186,7 +2181,6 @@ void hostif_sme_execute(struct ks_wlan_private *priv, int event)
 				       priv->wps.ielen,
 				       MIB_VALUE_TYPE_OSTRING, priv->wps.ie);
 		break;
-#endif /* WPS */
 	case SME_MODE_SET_REQUEST:
 		hostif_sme_mode_setup(priv);
 		break;
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index 172d38f..cb906f0 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -124,10 +124,8 @@ struct channel_list {
 
 #define LOCAL_REGION                      0xF10A0100	/* Region setting */
 
-#ifdef WPS
 #define LOCAL_WPS_ENABLE                  0xF10B0100	/* WiFi Protected Setup */
 #define LOCAL_WPS_PROBE_REQ               0xF10C0100	/* WPS Probe Request */
-#endif /* WPS */
 
 #define LOCAL_GAIN                        0xF10D0100	/* Carrer sense threshold for demo ato show */
 #define LOCAL_EEPROM_SUM                  0xF10E0100	/* EEPROM checksum information */
-- 
2.7.4

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

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

* [PATCH 02/10] staging: ks7010: use u8 instead of unsigned char in write_to_device function
  2018-04-26 13:42 [PATCH 00/10] staging: ks7010: minor cleanups Sergio Paracuellos
  2018-04-26 13:42 ` [PATCH 01/10] staging: ks7010: remove missing WPS preprocessor conditional code Sergio Paracuellos
@ 2018-04-26 13:42 ` Sergio Paracuellos
  2018-04-26 13:42 ` [PATCH 03/10] staging: ks7010: change local variable type in _ks_wlan_hw_power_save Sergio Paracuellos
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Sergio Paracuellos @ 2018-04-26 13:42 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, wsa

Parameter buffer in write_to_device function is declared as
a pointer to unsigned char and can be declared as an u8 type
which is preferred. Internally it calls to ks7010_sdio_write
which is using also u8 as parameter type. Update calls to this
function as well.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/ks7010/ks7010_sdio.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 078f37e..71e12d6 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -318,7 +318,7 @@ static int enqueue_txdev(struct ks_wlan_private *priv, unsigned char *p,
 }
 
 /* write data */
-static int write_to_device(struct ks_wlan_private *priv, unsigned char *buffer,
+static int write_to_device(struct ks_wlan_private *priv, u8 *buffer,
 			   unsigned long size)
 {
 	struct hostif_hdr *hdr;
@@ -1071,8 +1071,7 @@ static int send_stop_request(struct sdio_func *func)
 	pp->header.event = cpu_to_le16((uint16_t)HIF_STOP_REQ);
 
 	sdio_claim_host(func);
-	write_to_device(card->priv, (unsigned char *)pp,
-			hif_align_size(sizeof(*pp)));
+	write_to_device(card->priv, (u8 *)pp, hif_align_size(sizeof(*pp)));
 	sdio_release_host(func);
 
 	kfree(pp);
-- 
2.7.4

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

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

* [PATCH 03/10] staging: ks7010: change local variable type in _ks_wlan_hw_power_save
  2018-04-26 13:42 [PATCH 00/10] staging: ks7010: minor cleanups Sergio Paracuellos
  2018-04-26 13:42 ` [PATCH 01/10] staging: ks7010: remove missing WPS preprocessor conditional code Sergio Paracuellos
  2018-04-26 13:42 ` [PATCH 02/10] staging: ks7010: use u8 instead of unsigned char in write_to_device function Sergio Paracuellos
@ 2018-04-26 13:42 ` Sergio Paracuellos
  2018-04-26 13:42 ` [PATCH 04/10] staging: ks7010: change local variable type in ks7010_rw_function Sergio Paracuellos
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Sergio Paracuellos @ 2018-04-26 13:42 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, wsa

Local variable 'byte' in _ks_wlan_hw_power_save function is declared
as unsigned char and can be declared as u8 which is preferred. It
is being using with ks7010_sdio_readb which expects u8 already.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/ks7010/ks7010_sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 71e12d6..3574a22 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -217,7 +217,7 @@ void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv)
 
 static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
 {
-	unsigned char byte;
+	u8 byte;
 	int ret;
 
 	if (priv->reg.power_mgmt == POWER_MGMT_ACTIVE)
-- 
2.7.4

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

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

* [PATCH 04/10] staging: ks7010: change local variable type in ks7010_rw_function
  2018-04-26 13:42 [PATCH 00/10] staging: ks7010: minor cleanups Sergio Paracuellos
                   ` (2 preceding siblings ...)
  2018-04-26 13:42 ` [PATCH 03/10] staging: ks7010: change local variable type in _ks_wlan_hw_power_save Sergio Paracuellos
@ 2018-04-26 13:42 ` Sergio Paracuellos
  2018-04-26 13:42 ` [PATCH 05/10] staging: ks7010: change some local variables type in ks_sdio_interrupt Sergio Paracuellos
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Sergio Paracuellos @ 2018-04-26 13:42 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, wsa

Local variable 'byte' in ks7010_rw_function is declared as unsigned
char and can be declared as u8 which is preferred. It is being used
in ks7010_sdio_readb which is already expecting an u8.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/ks7010/ks7010_sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 3574a22..dab44bb 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -477,7 +477,7 @@ static void ks7010_rw_function(struct work_struct *work)
 						    struct ks_wlan_private,
 						    rw_dwork.work);
 	struct sdio_func *func = ks7010_to_func(priv);
-	unsigned char byte;
+	u8 byte;
 	int ret;
 
 	/* wait after DOZE */
-- 
2.7.4

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

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

* [PATCH 05/10] staging: ks7010: change some local variables type in ks_sdio_interrupt
  2018-04-26 13:42 [PATCH 00/10] staging: ks7010: minor cleanups Sergio Paracuellos
                   ` (3 preceding siblings ...)
  2018-04-26 13:42 ` [PATCH 04/10] staging: ks7010: change local variable type in ks7010_rw_function Sergio Paracuellos
@ 2018-04-26 13:42 ` Sergio Paracuellos
  2018-04-26 13:42 ` [PATCH 06/10] staging: ks7010: change local variable type in ks7010_sdio_init_irqs Sergio Paracuellos
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Sergio Paracuellos @ 2018-04-26 13:42 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, wsa

Local variables 'status', 'rsize' and 'byte' are declared as
unsigned char and can be declared as u8 which is preferred.
They are being used in ks7010_sdio_readb calls which is already
expected an u8.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/ks7010/ks7010_sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index dab44bb..db954f1 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -542,7 +542,7 @@ static void ks_sdio_interrupt(struct sdio_func *func)
 	int ret;
 	struct ks_sdio_card *card;
 	struct ks_wlan_private *priv;
-	unsigned char status, rsize, byte;
+	u8 status, rsize, byte;
 
 	card = sdio_get_drvdata(func);
 	priv = card->priv;
-- 
2.7.4

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

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

* [PATCH 06/10] staging: ks7010: change local variable type in ks7010_sdio_init_irqs
  2018-04-26 13:42 [PATCH 00/10] staging: ks7010: minor cleanups Sergio Paracuellos
                   ` (4 preceding siblings ...)
  2018-04-26 13:42 ` [PATCH 05/10] staging: ks7010: change some local variables type in ks_sdio_interrupt Sergio Paracuellos
@ 2018-04-26 13:42 ` Sergio Paracuellos
  2018-04-26 13:42 ` [PATCH 07/10] staging: ks7010: use the same parameter for 'event' in hostif_sme_enqueue Sergio Paracuellos
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Sergio Paracuellos @ 2018-04-26 13:42 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, wsa

Local variable 'byte' in ks7010_sdio_init_irqs is declared as
unsigned char and can be declared as u8 which is preferred.
It is being used in calls to ks7010_sdio_writeb which is already
expected an u8.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/ks7010/ks7010_sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index db954f1..9085ed7 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -904,7 +904,7 @@ static int ks7010_sdio_setup_irqs(struct sdio_func *func)
 static void ks7010_sdio_init_irqs(struct sdio_func *func,
 				  struct ks_wlan_private *priv)
 {
-	unsigned char byte;
+	u8 byte;
 	int ret;
 
 	/*
-- 
2.7.4

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

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

* [PATCH 07/10] staging: ks7010: use the same parameter for 'event' in hostif_sme_enqueue
  2018-04-26 13:42 [PATCH 00/10] staging: ks7010: minor cleanups Sergio Paracuellos
                   ` (5 preceding siblings ...)
  2018-04-26 13:42 ` [PATCH 06/10] staging: ks7010: change local variable type in ks7010_sdio_init_irqs Sergio Paracuellos
@ 2018-04-26 13:42 ` Sergio Paracuellos
  2018-04-26 13:43 ` [PATCH 08/10] staging: ks7010: refactor ks7010_sme_enqueue_events function Sergio Paracuellos
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Sergio Paracuellos @ 2018-04-26 13:42 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, wsa

Declaration of second parameter 'event' in ks_hostif .h and .c
file is different using uint16_t and unsigned short respectively.
Just unify both using 'u16' which is preferred instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index ea484f2..965a23d 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -2259,7 +2259,7 @@ void hostif_sme_task(unsigned long dev)
 }
 
 /* send to Station Management Entity module */
-void hostif_sme_enqueue(struct ks_wlan_private *priv, unsigned short event)
+void hostif_sme_enqueue(struct ks_wlan_private *priv, u16 event)
 {
 	/* enqueue sme event */
 	if (cnt_smeqbody(priv) < (SME_EVENT_BUFF_SIZE - 1)) {
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index cb906f0..974e639 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -542,7 +542,7 @@ static inline bool is_hif_conf(unsigned short event)
 int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb);
 void hostif_receive(struct ks_wlan_private *priv, unsigned char *p,
 		    unsigned int size);
-void hostif_sme_enqueue(struct ks_wlan_private *priv, uint16_t event);
+void hostif_sme_enqueue(struct ks_wlan_private *priv, u16 event);
 int hostif_init(struct ks_wlan_private *priv);
 void hostif_exit(struct ks_wlan_private *priv);
 int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p, unsigned long size,
-- 
2.7.4

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

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

* [PATCH 08/10] staging: ks7010: refactor ks7010_sme_enqueue_events function
  2018-04-26 13:42 [PATCH 00/10] staging: ks7010: minor cleanups Sergio Paracuellos
                   ` (6 preceding siblings ...)
  2018-04-26 13:42 ` [PATCH 07/10] staging: ks7010: use the same parameter for 'event' in hostif_sme_enqueue Sergio Paracuellos
@ 2018-04-26 13:43 ` Sergio Paracuellos
  2018-04-26 13:43 ` [PATCH 09/10] staging: ks7010: change local variable type in ks_wlan_hw_rx Sergio Paracuellos
  2018-04-26 13:43 ` [PATCH 10/10] staging: ks7010: remove nonsense comments in ks_wlan.h file Sergio Paracuellos
  9 siblings, 0 replies; 11+ messages in thread
From: Sergio Paracuellos @ 2018-04-26 13:43 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, wsa

Event to send to init the card are always the same so change
code to be more readable putting them into an array and
enqueuing also using a for loop.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/ks7010/ks7010_sdio.c | 31 +++++++++++++------------------
 1 file changed, 13 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index 9085ed7..a27e466 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -806,24 +806,19 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
 
 static void ks7010_sme_enqueue_events(struct ks_wlan_private *priv)
 {
-	hostif_sme_enqueue(priv, SME_GET_EEPROM_CKSUM);
-
-	/* load initial wireless parameter */
-	hostif_sme_enqueue(priv, SME_STOP_REQUEST);
-
-	hostif_sme_enqueue(priv, SME_RTS_THRESHOLD_REQUEST);
-	hostif_sme_enqueue(priv, SME_FRAGMENTATION_THRESHOLD_REQUEST);
-
-	hostif_sme_enqueue(priv, SME_WEP_INDEX_REQUEST);
-	hostif_sme_enqueue(priv, SME_WEP_KEY1_REQUEST);
-	hostif_sme_enqueue(priv, SME_WEP_KEY2_REQUEST);
-	hostif_sme_enqueue(priv, SME_WEP_KEY3_REQUEST);
-	hostif_sme_enqueue(priv, SME_WEP_KEY4_REQUEST);
-
-	hostif_sme_enqueue(priv, SME_WEP_FLAG_REQUEST);
-	hostif_sme_enqueue(priv, SME_RSN_ENABLED_REQUEST);
-	hostif_sme_enqueue(priv, SME_MODE_SET_REQUEST);
-	hostif_sme_enqueue(priv, SME_START_REQUEST);
+	static const u16 init_events[] = {
+		SME_GET_EEPROM_CKSUM, SME_STOP_REQUEST,
+		SME_RTS_THRESHOLD_REQUEST, SME_FRAGMENTATION_THRESHOLD_REQUEST,
+		SME_WEP_INDEX_REQUEST, SME_WEP_KEY1_REQUEST,
+		SME_WEP_KEY2_REQUEST, SME_WEP_KEY3_REQUEST,
+		SME_WEP_KEY4_REQUEST, SME_WEP_FLAG_REQUEST,
+		SME_RSN_ENABLED_REQUEST, SME_MODE_SET_REQUEST,
+		SME_START_REQUEST
+	};
+	int ev;
+
+	for (ev = 0; ev < ARRAY_SIZE(init_events); ev++)
+		hostif_sme_enqueue(priv, ev);
 }
 
 static void ks7010_card_init(struct ks_wlan_private *priv)
-- 
2.7.4

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

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

* [PATCH 09/10] staging: ks7010: change local variable type in ks_wlan_hw_rx
  2018-04-26 13:42 [PATCH 00/10] staging: ks7010: minor cleanups Sergio Paracuellos
                   ` (7 preceding siblings ...)
  2018-04-26 13:43 ` [PATCH 08/10] staging: ks7010: refactor ks7010_sme_enqueue_events function Sergio Paracuellos
@ 2018-04-26 13:43 ` Sergio Paracuellos
  2018-04-26 13:43 ` [PATCH 10/10] staging: ks7010: remove nonsense comments in ks_wlan.h file Sergio Paracuellos
  9 siblings, 0 replies; 11+ messages in thread
From: Sergio Paracuellos @ 2018-04-26 13:43 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, wsa

Local variable event in ks_wlan_hw_rx function is declared
as unsigned short and can be declared as u16 which is preferred
style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/ks7010/ks7010_sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index a27e466..28e3224 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -425,7 +425,7 @@ static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size)
 	int ret;
 	struct rx_device_buffer *rx_buffer;
 	struct hostif_hdr *hdr;
-	unsigned short event = 0;
+	u16 event = 0;
 
 	/* receive data */
 	if (rxq_count(priv) >= (RX_DEVICE_BUFF_SIZE - 1)) {
-- 
2.7.4

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

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

* [PATCH 10/10] staging: ks7010: remove nonsense comments in ks_wlan.h file
  2018-04-26 13:42 [PATCH 00/10] staging: ks7010: minor cleanups Sergio Paracuellos
                   ` (8 preceding siblings ...)
  2018-04-26 13:43 ` [PATCH 09/10] staging: ks7010: change local variable type in ks_wlan_hw_rx Sergio Paracuellos
@ 2018-04-26 13:43 ` Sergio Paracuellos
  9 siblings, 0 replies; 11+ messages in thread
From: Sergio Paracuellos @ 2018-04-26 13:43 UTC (permalink / raw)
  To: gregkh; +Cc: driverdev-devel, wsa

Header file ks_wlan.h has a lot of nonsense comments along
the different declarations included on it. Most of them are
just the same as the variable name. Just remove them all.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/staging/ks7010/ks_wlan.h | 49 ++++++++++++++++++++--------------------
 1 file changed, 24 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index ad349ef..fb080fe 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -9,35 +9,35 @@
 #ifndef _KS_WLAN_H
 #define _KS_WLAN_H
 
-#include <linux/atomic.h>	/* struct atomic_t */
+#include <linux/atomic.h>
 #include <linux/circ_buf.h>
-#include <linux/completion.h>	/* struct completion */
-#include <linux/netdevice.h>	/* struct net_device_stats,  struct sk_buff */
-#include <linux/sched.h>	/* wait_queue_head_t */
-#include <linux/spinlock.h>	/* spinlock_t */
+#include <linux/completion.h>
+#include <linux/netdevice.h>
+#include <linux/sched.h>
+#include <linux/spinlock.h>
 #include <linux/wireless.h>
 
 struct ks_wlan_parameter {
-	u8 operation_mode;	/* Operation Mode */
-	u8 channel;	/*  Channel */
-	u8 tx_rate;	/*  Transmit Rate */
+	u8 operation_mode;
+	u8 channel;
+	u8 tx_rate;
 	struct {
 		u8 size;
 		u8 body[16];
 	} rate_set;
-	u8 bssid[ETH_ALEN];	/* BSSID */
+	u8 bssid[ETH_ALEN];
 	struct {
 		u8 size;
 		u8 body[32 + 1];
-	} ssid;	/*  SSID */
-	u8 preamble;	/*  Preamble */
+	} ssid;
+	u8 preamble;
 	u8 power_mgmt;
-	u32 scan_type;	/*  AP List Scan Type */
+	u32 scan_type;
 #define BEACON_LOST_COUNT_MIN 0
 #define BEACON_LOST_COUNT_MAX 65535
-	u32 beacon_lost_count;	/*  Beacon Lost Count */
-	u32 rts;	/*  RTS Threashold */
-	u32 fragment;	/*  Fragmentation Threshold */
+	u32 beacon_lost_count;
+	u32 rts;
+	u32 fragment;
 	u32 privacy_invoked;
 	u32 wep_index;
 	struct {
@@ -45,9 +45,9 @@ struct ks_wlan_parameter {
 		u8 val[13 * 2 + 1];
 	} wep_key[4];
 	u16 authenticate_type;
-	u16 phy_type;	/* 11b/11g/11bg mode type */
-	u16 cts_mode;	/* for 11g/11bg mode cts mode */
-	u16 phy_info_timer;	/* phy information timer */
+	u16 phy_type;
+	u16 cts_mode;
+	u16 phy_info_timer;
 };
 
 enum {
@@ -155,7 +155,7 @@ enum {
 	SME_WEP_SET_CONFIRM,
 	SME_TERMINATE,
 
-	SME_EVENT_SIZE	/* end */
+	SME_EVENT_SIZE
 };
 
 /* SME Status */
@@ -330,7 +330,7 @@ struct mic_failure {
 	u16 failure;	/* MIC Failure counter 0 or 1 or 2 */
 	u16 counter;	/* 1sec counter 0-60 */
 	u32 last_failure_time;
-	int stop;	/* stop flag */
+	int stop;
 };
 
 struct wpa_status {
@@ -339,7 +339,7 @@ struct wpa_status {
 	int version;
 	int pairwise_suite;	/* unicast cipher */
 	int group_suite;	/* multicast cipher */
-	int key_mgmt_suite;	/* authentication key management suite */
+	int key_mgmt_suite;
 	int auth_alg;
 	int txkey;
 	struct wpa_key key[WPA_KEY_INDEX_MAX];
@@ -485,17 +485,16 @@ struct ks_wlan_private {
 	unsigned char firmware_version[128 + 1];
 	int version_size;
 
-	bool mac_address_valid;	/* Mac Address Status */
+	bool mac_address_valid;
 
 	int dev_state;
 
 	struct sk_buff *skb;
 	unsigned int cur_rx;	/* Index into the Rx buffer of next Rx pkt. */
-	/* spinlock_t lock; */
 #define FORCE_DISCONNECT    0x80000000
 #define CONNECT_STATUS_MASK 0x7FFFFFFF
-	u32 connect_status;	/* connect status */
-	int infra_status;	/* Infractructure status */
+	u32 connect_status;
+	int infra_status;
 	u8 scan_ssid_len;
 	u8 scan_ssid[IW_ESSID_MAX_SIZE + 1];
 	struct local_gain gain;
-- 
2.7.4

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

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

end of thread, other threads:[~2018-04-26 13:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-26 13:42 [PATCH 00/10] staging: ks7010: minor cleanups Sergio Paracuellos
2018-04-26 13:42 ` [PATCH 01/10] staging: ks7010: remove missing WPS preprocessor conditional code Sergio Paracuellos
2018-04-26 13:42 ` [PATCH 02/10] staging: ks7010: use u8 instead of unsigned char in write_to_device function Sergio Paracuellos
2018-04-26 13:42 ` [PATCH 03/10] staging: ks7010: change local variable type in _ks_wlan_hw_power_save Sergio Paracuellos
2018-04-26 13:42 ` [PATCH 04/10] staging: ks7010: change local variable type in ks7010_rw_function Sergio Paracuellos
2018-04-26 13:42 ` [PATCH 05/10] staging: ks7010: change some local variables type in ks_sdio_interrupt Sergio Paracuellos
2018-04-26 13:42 ` [PATCH 06/10] staging: ks7010: change local variable type in ks7010_sdio_init_irqs Sergio Paracuellos
2018-04-26 13:42 ` [PATCH 07/10] staging: ks7010: use the same parameter for 'event' in hostif_sme_enqueue Sergio Paracuellos
2018-04-26 13:43 ` [PATCH 08/10] staging: ks7010: refactor ks7010_sme_enqueue_events function Sergio Paracuellos
2018-04-26 13:43 ` [PATCH 09/10] staging: ks7010: change local variable type in ks_wlan_hw_rx Sergio Paracuellos
2018-04-26 13:43 ` [PATCH 10/10] staging: ks7010: remove nonsense comments in ks_wlan.h file Sergio Paracuellos

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.