driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] wfx: move out from the staging area
@ 2020-10-07 10:19 Jerome Pouiller
  2020-10-07 10:19 ` [PATCH 1/7] staging: wfx: fix handling of MMIC error Jerome Pouiller
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Jerome Pouiller @ 2020-10-07 10:19 UTC (permalink / raw)
  To: devel, linux-wireless
  Cc: netdev, linux-kernel, Greg Kroah-Hartman, David S . Miller, Kalle Valo

From: Jérôme Pouiller <jerome.pouiller@silabs.com>

I think the wfx driver is now mature enough to be accepted in the
drivers/net/wireless directory.

There is still one item on the TODO list. It is an idea to improve the rate
control in some particular cases[1]. However, the current performances of the
driver seem to satisfy everyone. In add, the suggested change is large enough.
So, I would prefer to implement it only if it really solves an issue. I think it
is not an obstacle to move the driver out of the staging area.

In order to comply with the last rules for the DT bindings, I have converted the
documentation to yaml. I am moderately happy with the result. Especially, for
the description of the binding. Any comments are welcome.

The series also update the copyrights dates of the files. I don't know exactly
how this kind of changes should be sent. It's a bit weird to change all the
copyrights in one commit, but I do not see any better way.

I also include a few fixes I have found these last weeks.

[1] https://lore.kernel.org/lkml/3099559.gv3Q75KnN1@pc-42

Jérôme Pouiller (7):
  staging: wfx: fix handling of MMIC error
  staging: wfx: remove remaining code of 'secure link' feature
  staging: wfx: fix BA sessions for older firmwares
  staging: wfx: fix QoS priority for slow buses
  staging: wfx: update copyrights dates
  dt-bindings: staging: wfx: silabs,wfx yaml conversion
  wfx: move out from the staging area

 .../bindings/net/wireless/silabs,wfx.yaml     | 125 ++++++++++++++++++
 MAINTAINERS                                   |   2 +-
 drivers/net/wireless/Kconfig                  |   1 +
 drivers/net/wireless/Makefile                 |   1 +
 drivers/net/wireless/silabs/Kconfig           |  17 +++
 drivers/net/wireless/silabs/Makefile          |   3 +
 .../wireless/silabs}/wfx/Kconfig              |   0
 .../wireless/silabs}/wfx/Makefile             |   0
 .../{staging => net/wireless/silabs}/wfx/bh.c |   2 +-
 .../{staging => net/wireless/silabs}/wfx/bh.h |   2 +-
 .../wireless/silabs}/wfx/bus.h                |   2 +-
 .../wireless/silabs}/wfx/bus_sdio.c           |   2 +-
 .../wireless/silabs}/wfx/bus_spi.c            |   2 +-
 .../wireless/silabs}/wfx/data_rx.c            |   7 +-
 .../wireless/silabs}/wfx/data_rx.h            |   2 +-
 .../wireless/silabs}/wfx/data_tx.c            |   2 +-
 .../wireless/silabs}/wfx/data_tx.h            |   2 +-
 .../wireless/silabs}/wfx/debug.c              |  19 +--
 .../wireless/silabs}/wfx/debug.h              |   0
 .../wireless/silabs}/wfx/fwio.c               |   2 +-
 .../wireless/silabs}/wfx/fwio.h               |   0
 .../wireless/silabs}/wfx/hif_api_cmd.h        |   2 +-
 .../wireless/silabs}/wfx/hif_api_general.h    |   2 +-
 .../wireless/silabs}/wfx/hif_api_mib.h        |   2 +-
 .../wireless/silabs}/wfx/hif_rx.c             |   2 +-
 .../wireless/silabs}/wfx/hif_rx.h             |   0
 .../wireless/silabs}/wfx/hif_tx.c             |   2 +-
 .../wireless/silabs}/wfx/hif_tx.h             |   2 +-
 .../wireless/silabs}/wfx/hif_tx_mib.c         |   2 +-
 .../wireless/silabs}/wfx/hif_tx_mib.h         |   2 +-
 .../wireless/silabs}/wfx/hwio.c               |   2 +-
 .../wireless/silabs}/wfx/hwio.h               |   2 +-
 .../wireless/silabs}/wfx/key.c                |   2 +-
 .../wireless/silabs}/wfx/key.h                |   2 +-
 .../wireless/silabs}/wfx/main.c               |   2 +-
 .../wireless/silabs}/wfx/main.h               |   2 +-
 .../wireless/silabs}/wfx/queue.c              |  16 ++-
 .../wireless/silabs}/wfx/queue.h              |   3 +-
 .../wireless/silabs}/wfx/scan.c               |   2 +-
 .../wireless/silabs}/wfx/scan.h               |   2 +-
 .../wireless/silabs}/wfx/sta.c                |   2 +-
 .../wireless/silabs}/wfx/sta.h                |   2 +-
 .../wireless/silabs}/wfx/traces.h             |   2 +-
 .../wireless/silabs}/wfx/wfx.h                |   2 +-
 drivers/staging/Kconfig                       |   2 -
 drivers/staging/Makefile                      |   1 -
 .../bindings/net/wireless/siliabs,wfx.txt     |  98 --------------
 drivers/staging/wfx/TODO                      |   6 -
 48 files changed, 198 insertions(+), 161 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml
 create mode 100644 drivers/net/wireless/silabs/Kconfig
 create mode 100644 drivers/net/wireless/silabs/Makefile
 rename drivers/{staging => net/wireless/silabs}/wfx/Kconfig (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/Makefile (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bh.c (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bh.h (92%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bus.h (94%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bus_sdio.c (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bus_spi.c (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/data_rx.c (93%)
 rename drivers/{staging => net/wireless/silabs}/wfx/data_rx.h (86%)
 rename drivers/{staging => net/wireless/silabs}/wfx/data_tx.c (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/data_tx.h (96%)
 rename drivers/{staging => net/wireless/silabs}/wfx/debug.c (94%)
 rename drivers/{staging => net/wireless/silabs}/wfx/debug.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/fwio.c (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/fwio.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_api_cmd.h (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_api_general.h (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_api_mib.h (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_rx.c (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_rx.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_tx.c (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_tx.h (97%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_tx_mib.c (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_tx_mib.h (97%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hwio.c (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hwio.h (98%)
 rename drivers/{staging => net/wireless/silabs}/wfx/key.c (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/key.h (87%)
 rename drivers/{staging => net/wireless/silabs}/wfx/main.c (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/main.h (95%)
 rename drivers/{staging => net/wireless/silabs}/wfx/queue.c (93%)
 rename drivers/{staging => net/wireless/silabs}/wfx/queue.h (94%)
 rename drivers/{staging => net/wireless/silabs}/wfx/scan.c (98%)
 rename drivers/{staging => net/wireless/silabs}/wfx/scan.h (90%)
 rename drivers/{staging => net/wireless/silabs}/wfx/sta.c (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/sta.h (98%)
 rename drivers/{staging => net/wireless/silabs}/wfx/traces.h (99%)
 rename drivers/{staging => net/wireless/silabs}/wfx/wfx.h (98%)
 delete mode 100644 drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt
 delete mode 100644 drivers/staging/wfx/TODO

-- 
2.28.0

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

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

* [PATCH 1/7] staging: wfx: fix handling of MMIC error
  2020-10-07 10:19 [PATCH 0/7] wfx: move out from the staging area Jerome Pouiller
@ 2020-10-07 10:19 ` Jerome Pouiller
  2020-10-07 10:19 ` [PATCH 2/7] staging: wfx: remove remaining code of 'secure link' feature Jerome Pouiller
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Jerome Pouiller @ 2020-10-07 10:19 UTC (permalink / raw)
  To: devel, linux-wireless
  Cc: netdev, linux-kernel, Greg Kroah-Hartman, David S . Miller, Kalle Valo

From: Jérôme Pouiller <jerome.pouiller@silabs.com>

As expected, when the device detect a MMIC error, it returns a specific
status. However, it also strip IV from the frame (don't ask me why).

So, with the current code, mac80211 detects a corrupted frame and it
drops it before it handle the MMIC error. The expected behavior would be
to detect MMIC error then to renegotiate the EAP session.

So, this patch correctly informs mac80211 that IV is not available. So,
mac80211 correctly takes into account the MMIC error.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
 drivers/staging/wfx/data_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c
index fe111d0aab63..86781098edc0 100644
--- a/drivers/staging/wfx/data_rx.c
+++ b/drivers/staging/wfx/data_rx.c
@@ -41,7 +41,7 @@ void wfx_rx_cb(struct wfx_vif *wvif,
 	memset(hdr, 0, sizeof(*hdr));
 
 	if (arg->status == HIF_STATUS_RX_FAIL_MIC)
-		hdr->flag |= RX_FLAG_MMIC_ERROR;
+		hdr->flag |= RX_FLAG_MMIC_ERROR | RX_FLAG_IV_STRIPPED;
 	else if (arg->status)
 		goto drop;
 
-- 
2.28.0

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

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

* [PATCH 2/7] staging: wfx: remove remaining code of 'secure link' feature
  2020-10-07 10:19 [PATCH 0/7] wfx: move out from the staging area Jerome Pouiller
  2020-10-07 10:19 ` [PATCH 1/7] staging: wfx: fix handling of MMIC error Jerome Pouiller
@ 2020-10-07 10:19 ` Jerome Pouiller
  2020-10-07 10:19 ` [PATCH 3/7] staging: wfx: fix BA sessions for older firmwares Jerome Pouiller
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Jerome Pouiller @ 2020-10-07 10:19 UTC (permalink / raw)
  To: devel, linux-wireless
  Cc: netdev, linux-kernel, Greg Kroah-Hartman, David S . Miller, Kalle Valo

From: Jérôme Pouiller <jerome.pouiller@silabs.com>

Commit e8d607ce0c81 ("staging: wfx: drop 'secure link' feature") had
removed the 'secure link' feature. However, a few lines of codes were
yet here.

Fixes: e8d607ce0c81 ("staging: wfx: drop 'secure link' feature")
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
 .../bindings/net/wireless/siliabs,wfx.txt       |  2 --
 drivers/staging/wfx/debug.c                     | 17 -----------------
 2 files changed, 19 deletions(-)

diff --git a/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt b/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt
index 17db67559f5e..db8d06fc4baa 100644
--- a/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt
+++ b/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt
@@ -90,8 +90,6 @@ Some properties are recognized either by SPI and SDIO versions:
    this property, driver will disable most of power saving features.
  - config-file: Use an alternative file as PDS. Default is `wf200.pds`. Only
    necessary for development/debug purpose.
- - slk_key: String representing hexadecimal value of secure link key to use.
-   Must contains 64 hexadecimal digits. Not supported in current version.
 
 WFx driver also supports `mac-address` and `local-mac-address` as described in
 Documentation/devicetree/bindings/net/ethernet.txt
diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c
index ae44ffb66e34..4bd5f9fa21a1 100644
--- a/drivers/staging/wfx/debug.c
+++ b/drivers/staging/wfx/debug.c
@@ -230,21 +230,6 @@ static const struct file_operations wfx_send_pds_fops = {
 	.write = wfx_send_pds_write,
 };
 
-static ssize_t wfx_burn_slk_key_write(struct file *file,
-				      const char __user *user_buf,
-				      size_t count, loff_t *ppos)
-{
-	struct wfx_dev *wdev = file->private_data;
-
-	dev_info(wdev->dev, "this driver does not support secure link\n");
-	return -EINVAL;
-}
-
-static const struct file_operations wfx_burn_slk_key_fops = {
-	.open = simple_open,
-	.write = wfx_burn_slk_key_write,
-};
-
 struct dbgfs_hif_msg {
 	struct wfx_dev *wdev;
 	struct completion complete;
@@ -366,8 +351,6 @@ int wfx_debug_init(struct wfx_dev *wdev)
 	debugfs_create_file("tx_power_loop", 0444, d, wdev,
 			    &wfx_tx_power_loop_fops);
 	debugfs_create_file("send_pds", 0200, d, wdev, &wfx_send_pds_fops);
-	debugfs_create_file("burn_slk_key", 0200, d, wdev,
-			    &wfx_burn_slk_key_fops);
 	debugfs_create_file("send_hif_msg", 0600, d, wdev,
 			    &wfx_send_hif_msg_fops);
 	debugfs_create_file("ps_timeout", 0600, d, wdev, &wfx_ps_timeout_fops);
-- 
2.28.0

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

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

* [PATCH 3/7] staging: wfx: fix BA sessions for older firmwares
  2020-10-07 10:19 [PATCH 0/7] wfx: move out from the staging area Jerome Pouiller
  2020-10-07 10:19 ` [PATCH 1/7] staging: wfx: fix handling of MMIC error Jerome Pouiller
  2020-10-07 10:19 ` [PATCH 2/7] staging: wfx: remove remaining code of 'secure link' feature Jerome Pouiller
@ 2020-10-07 10:19 ` Jerome Pouiller
  2020-10-07 10:19 ` [PATCH 4/7] staging: wfx: fix QoS priority for slow buses Jerome Pouiller
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Jerome Pouiller @ 2020-10-07 10:19 UTC (permalink / raw)
  To: devel, linux-wireless
  Cc: netdev, linux-kernel, Greg Kroah-Hartman, David S . Miller, Kalle Valo

From: Jérôme Pouiller <jerome.pouiller@silabs.com>

Firmwares with API < 3.6 do not forward DELBA requests. Thus, when a
Block Ack session is restarted, the reordering buffer is not flushed and
the received sequence number is not contiguous. Therefore, mac80211
starts to wait some missing frames that it will never receive.

This patch disables the reordering buffer for old firmware. It is
harmless when the network is unencrypted. When the network is encrypted,
the non-contiguous frames will be thrown away by the TKIP/CCMP replay
protection. So, the user will observe some packet loss with UDP and
performance drop with TCP.

Fixes: e5da5fbd7741 ("staging: wfx: fix CCMP/TKIP replay protection")
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
 drivers/staging/wfx/data_rx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c
index 86781098edc0..3822a22b9fe3 100644
--- a/drivers/staging/wfx/data_rx.c
+++ b/drivers/staging/wfx/data_rx.c
@@ -17,6 +17,9 @@ static void wfx_rx_handle_ba(struct wfx_vif *wvif, struct ieee80211_mgmt *mgmt)
 {
 	int params, tid;
 
+	if (wfx_api_older_than(wvif->wdev, 3, 6))
+		return;
+
 	switch (mgmt->u.action.u.addba_req.action_code) {
 	case WLAN_ACTION_ADDBA_REQ:
 		params = le16_to_cpu(mgmt->u.action.u.addba_req.capab);
-- 
2.28.0

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

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

* [PATCH 4/7] staging: wfx: fix QoS priority for slow buses
  2020-10-07 10:19 [PATCH 0/7] wfx: move out from the staging area Jerome Pouiller
                   ` (2 preceding siblings ...)
  2020-10-07 10:19 ` [PATCH 3/7] staging: wfx: fix BA sessions for older firmwares Jerome Pouiller
@ 2020-10-07 10:19 ` Jerome Pouiller
  2020-10-07 10:19 ` [PATCH 5/7] staging: wfx: update copyrights dates Jerome Pouiller
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Jerome Pouiller @ 2020-10-07 10:19 UTC (permalink / raw)
  To: devel, linux-wireless
  Cc: netdev, linux-kernel, Greg Kroah-Hartman, David S . Miller, Kalle Valo

From: Jérôme Pouiller <jerome.pouiller@silabs.com>

The device is in charge of respecting the QoS constraints. The driver
have to ensure that all the queues contain data and the device choose
the right queue to send.

The things starts to be more difficult when the bandwidth of the bus is
lower than the bandwidth of the WiFi. The device quickly sends the
frames of the highest priority queue. Then, it starts to send frames
from a lower priority queue. Though, there are still some high priority
frames waiting in the driver.

To work around this problem, this patch add some priorities to each
queue. The weigh of the queue was (roughly) calculated experimentally by
checking the speed ratio of each queue when the bus does not limit the
traffic:
    - Be/Bk -> 20Mbps/10Mbps
    - Vi/Be -> 36Mbps/180Kbps
    - Vo/Be -> 35Mbps/600Kbps
    - Vi/Vo -> 24Mbps/12Mbps

So, if we fix the weigh of the Background to 1, the weight of Best
Effort should be 2. The weight of Video should be 116. However, since
there is only 32 queues, it make no sense to use a value greater than
64[1]. And finally, the weight of the Voice is set to 128.

[1] Because of this approximation, with very slow bus, we can still
observe frame starvation when we measure the speed ratio of Vi/Be. It is
around 35Mbps/1Mbps (instead of 36Mbps/180Kbps). However, it is still in
accepted error range.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
 drivers/staging/wfx/queue.c | 14 ++++++++++++--
 drivers/staging/wfx/queue.h |  1 +
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c
index 6e3159165143..55b801a02959 100644
--- a/drivers/staging/wfx/queue.c
+++ b/drivers/staging/wfx/queue.c
@@ -60,11 +60,16 @@ void wfx_tx_lock_flush(struct wfx_dev *wdev)
 
 void wfx_tx_queues_init(struct wfx_vif *wvif)
 {
+	// The device is in charge to respect the details of the QoS parameters.
+	// The driver just ensure that it roughtly respect the priorities to
+	// avoid any shortage.
+	const int priorities[IEEE80211_NUM_ACS] = { 1, 2, 64, 128 };
 	int i;
 
 	for (i = 0; i < IEEE80211_NUM_ACS; ++i) {
 		skb_queue_head_init(&wvif->tx_queue[i].normal);
 		skb_queue_head_init(&wvif->tx_queue[i].cab);
+		wvif->tx_queue[i].priority = priorities[i];
 	}
 }
 
@@ -219,6 +224,11 @@ bool wfx_tx_queues_has_cab(struct wfx_vif *wvif)
 	return false;
 }
 
+static int wfx_tx_queue_get_weight(struct wfx_queue *queue)
+{
+	return atomic_read(&queue->pending_frames) * queue->priority;
+}
+
 static struct sk_buff *wfx_tx_queues_get_skb(struct wfx_dev *wdev)
 {
 	struct wfx_queue *queues[IEEE80211_NUM_ACS * ARRAY_SIZE(wdev->vif)];
@@ -234,8 +244,8 @@ static struct sk_buff *wfx_tx_queues_get_skb(struct wfx_dev *wdev)
 			WARN_ON(num_queues >= ARRAY_SIZE(queues));
 			queues[num_queues] = &wvif->tx_queue[i];
 			for (j = num_queues; j > 0; j--)
-				if (atomic_read(&queues[j]->pending_frames) <
-				    atomic_read(&queues[j - 1]->pending_frames))
+				if (wfx_tx_queue_get_weight(queues[j]) <
+				    wfx_tx_queue_get_weight(queues[j - 1]))
 					swap(queues[j - 1], queues[j]);
 			num_queues++;
 		}
diff --git a/drivers/staging/wfx/queue.h b/drivers/staging/wfx/queue.h
index 22d7c936907f..2695c10d6a22 100644
--- a/drivers/staging/wfx/queue.h
+++ b/drivers/staging/wfx/queue.h
@@ -18,6 +18,7 @@ struct wfx_queue {
 	struct sk_buff_head	normal;
 	struct sk_buff_head	cab; // Content After (DTIM) Beacon
 	atomic_t		pending_frames;
+	int			priority;
 };
 
 void wfx_tx_lock(struct wfx_dev *wdev);
-- 
2.28.0

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

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

* [PATCH 5/7] staging: wfx: update copyrights dates
  2020-10-07 10:19 [PATCH 0/7] wfx: move out from the staging area Jerome Pouiller
                   ` (3 preceding siblings ...)
  2020-10-07 10:19 ` [PATCH 4/7] staging: wfx: fix QoS priority for slow buses Jerome Pouiller
@ 2020-10-07 10:19 ` Jerome Pouiller
  2020-10-07 10:19 ` [PATCH 6/7] dt-bindings: staging: wfx: silabs,wfx yaml conversion Jerome Pouiller
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Jerome Pouiller @ 2020-10-07 10:19 UTC (permalink / raw)
  To: devel, linux-wireless
  Cc: netdev, linux-kernel, Greg Kroah-Hartman, David S . Miller, Kalle Valo

From: Jérôme Pouiller <jerome.pouiller@silabs.com>

Most of the files have been modified in 2020, so update the copyright
notices.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
 drivers/staging/wfx/bh.c              | 2 +-
 drivers/staging/wfx/bh.h              | 2 +-
 drivers/staging/wfx/bus.h             | 2 +-
 drivers/staging/wfx/bus_sdio.c        | 2 +-
 drivers/staging/wfx/bus_spi.c         | 2 +-
 drivers/staging/wfx/data_rx.c         | 2 +-
 drivers/staging/wfx/data_rx.h         | 2 +-
 drivers/staging/wfx/data_tx.c         | 2 +-
 drivers/staging/wfx/data_tx.h         | 2 +-
 drivers/staging/wfx/debug.c           | 2 +-
 drivers/staging/wfx/fwio.c            | 2 +-
 drivers/staging/wfx/hif_api_cmd.h     | 2 +-
 drivers/staging/wfx/hif_api_general.h | 2 +-
 drivers/staging/wfx/hif_api_mib.h     | 2 +-
 drivers/staging/wfx/hif_rx.c          | 2 +-
 drivers/staging/wfx/hif_tx.c          | 2 +-
 drivers/staging/wfx/hif_tx.h          | 2 +-
 drivers/staging/wfx/hif_tx_mib.c      | 2 +-
 drivers/staging/wfx/hif_tx_mib.h      | 2 +-
 drivers/staging/wfx/hwio.c            | 2 +-
 drivers/staging/wfx/hwio.h            | 2 +-
 drivers/staging/wfx/key.c             | 2 +-
 drivers/staging/wfx/key.h             | 2 +-
 drivers/staging/wfx/main.c            | 2 +-
 drivers/staging/wfx/main.h            | 2 +-
 drivers/staging/wfx/queue.c           | 2 +-
 drivers/staging/wfx/queue.h           | 2 +-
 drivers/staging/wfx/scan.c            | 2 +-
 drivers/staging/wfx/scan.h            | 2 +-
 drivers/staging/wfx/sta.c             | 2 +-
 drivers/staging/wfx/sta.h             | 2 +-
 drivers/staging/wfx/traces.h          | 2 +-
 drivers/staging/wfx/wfx.h             | 2 +-
 33 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c
index 72da2f4af49f..586b769c0446 100644
--- a/drivers/staging/wfx/bh.c
+++ b/drivers/staging/wfx/bh.c
@@ -2,7 +2,7 @@
 /*
  * Interrupt bottom half (BH).
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <linux/gpio/consumer.h>
diff --git a/drivers/staging/wfx/bh.h b/drivers/staging/wfx/bh.h
index 4b73437869e1..78c49329e22a 100644
--- a/drivers/staging/wfx/bh.h
+++ b/drivers/staging/wfx/bh.h
@@ -2,7 +2,7 @@
 /*
  * Interrupt bottom half.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #ifndef WFX_BH_H
diff --git a/drivers/staging/wfx/bus.h b/drivers/staging/wfx/bus.h
index 0370b6c59863..ca04b3da6204 100644
--- a/drivers/staging/wfx/bus.h
+++ b/drivers/staging/wfx/bus.h
@@ -2,7 +2,7 @@
 /*
  * Common bus abstraction layer.
  *
- * Copyright (c) 2017-2018, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #ifndef WFX_BUS_H
diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c
index 496bfc8bbacc..e06d7e1ebe9c 100644
--- a/drivers/staging/wfx/bus_sdio.c
+++ b/drivers/staging/wfx/bus_sdio.c
@@ -2,7 +2,7 @@
 /*
  * SDIO interface.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <linux/module.h>
diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c
index d19c0478e8be..a99125d1a30d 100644
--- a/drivers/staging/wfx/bus_spi.c
+++ b/drivers/staging/wfx/bus_spi.c
@@ -2,7 +2,7 @@
 /*
  * SPI interface.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2011, Sagrad Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c
index 3822a22b9fe3..385f2d42a0e2 100644
--- a/drivers/staging/wfx/data_rx.c
+++ b/drivers/staging/wfx/data_rx.c
@@ -2,7 +2,7 @@
 /*
  * Datapath implementation.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <linux/etherdevice.h>
diff --git a/drivers/staging/wfx/data_rx.h b/drivers/staging/wfx/data_rx.h
index 125dbfc1f875..4c0da37f2084 100644
--- a/drivers/staging/wfx/data_rx.h
+++ b/drivers/staging/wfx/data_rx.h
@@ -2,7 +2,7 @@
 /*
  * Datapath implementation.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #ifndef WFX_DATA_RX_H
diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c
index e2fb770e98fc..b4d5dd3d2d23 100644
--- a/drivers/staging/wfx/data_tx.c
+++ b/drivers/staging/wfx/data_tx.c
@@ -2,7 +2,7 @@
 /*
  * Datapath implementation.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <net/mac80211.h>
diff --git a/drivers/staging/wfx/data_tx.h b/drivers/staging/wfx/data_tx.h
index 87e1b9b62dbb..46c9fff7a870 100644
--- a/drivers/staging/wfx/data_tx.h
+++ b/drivers/staging/wfx/data_tx.h
@@ -2,7 +2,7 @@
 /*
  * Datapath implementation.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #ifndef WFX_DATA_TX_H
diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c
index 4bd5f9fa21a1..eedada78c25f 100644
--- a/drivers/staging/wfx/debug.c
+++ b/drivers/staging/wfx/debug.c
@@ -2,7 +2,7 @@
 /*
  * Debugfs interface.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <linux/debugfs.h>
diff --git a/drivers/staging/wfx/fwio.c b/drivers/staging/wfx/fwio.c
index c99adb0c99f1..1b8aec02d169 100644
--- a/drivers/staging/wfx/fwio.c
+++ b/drivers/staging/wfx/fwio.c
@@ -2,7 +2,7 @@
 /*
  * Firmware loading.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <linux/firmware.h>
diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h
index bdd468800189..11bc1a58edae 100644
--- a/drivers/staging/wfx/hif_api_cmd.h
+++ b/drivers/staging/wfx/hif_api_cmd.h
@@ -2,7 +2,7 @@
 /*
  * WFx hardware interface definitions
  *
- * Copyright (c) 2018-2019, Silicon Laboratories Inc.
+ * Copyright (c) 2018-2020, Silicon Laboratories Inc.
  */
 
 #ifndef WFX_HIF_API_CMD_H
diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h
index 9d522bc1aa69..24188945718d 100644
--- a/drivers/staging/wfx/hif_api_general.h
+++ b/drivers/staging/wfx/hif_api_general.h
@@ -2,7 +2,7 @@
 /*
  * WFx hardware interface definitions
  *
- * Copyright (c) 2018-2019, Silicon Laboratories Inc.
+ * Copyright (c) 2018-2020, Silicon Laboratories Inc.
  */
 
 #ifndef WFX_HIF_API_GENERAL_H
diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h
index 55bd399ccdfb..ace924720ce6 100644
--- a/drivers/staging/wfx/hif_api_mib.h
+++ b/drivers/staging/wfx/hif_api_mib.h
@@ -2,7 +2,7 @@
 /*
  * WFx hardware interface definitions
  *
- * Copyright (c) 2018-2019, Silicon Laboratories Inc.
+ * Copyright (c) 2018-2020, Silicon Laboratories Inc.
  */
 
 #ifndef WFX_HIF_API_MIB_H
diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c
index b40af86356f1..d6dfab094b03 100644
--- a/drivers/staging/wfx/hif_rx.c
+++ b/drivers/staging/wfx/hif_rx.c
@@ -3,7 +3,7 @@
  * Implementation of chip-to-host event (aka indications) of WFxxx Split Mac
  * (WSM) API.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <linux/skbuff.h>
diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c
index 1bd7f773209c..e61cc2486761 100644
--- a/drivers/staging/wfx/hif_tx.c
+++ b/drivers/staging/wfx/hif_tx.c
@@ -3,7 +3,7 @@
  * Implementation of host-to-chip commands (aka request/confirmation) of WFxxx
  * Split Mac (WSM) API.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <linux/etherdevice.h>
diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h
index 960d5f2fa41c..3521c545ae6b 100644
--- a/drivers/staging/wfx/hif_tx.h
+++ b/drivers/staging/wfx/hif_tx.h
@@ -3,7 +3,7 @@
  * Implementation of host-to-chip commands (aka request/confirmation) of WFxxx
  * Split Mac (WSM) API.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  * Copyright (C) 2010, ST-Ericsson SA
  */
diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c
index c375b9052a07..1926cf1b62be 100644
--- a/drivers/staging/wfx/hif_tx_mib.c
+++ b/drivers/staging/wfx/hif_tx_mib.c
@@ -2,7 +2,7 @@
 /*
  * Implementation of host-to-chip MIBs of WFxxx Split Mac (WSM) API.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  * Copyright (C) 2010, ST-Ericsson SA
  */
diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h
index 6c25015173cd..812b3ba0f00e 100644
--- a/drivers/staging/wfx/hif_tx_mib.h
+++ b/drivers/staging/wfx/hif_tx_mib.h
@@ -2,7 +2,7 @@
 /*
  * Implementation of host-to-chip MIBs of WFxxx Split Mac (WSM) API.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  * Copyright (C) 2010, ST-Ericsson SA
  */
diff --git a/drivers/staging/wfx/hwio.c b/drivers/staging/wfx/hwio.c
index 777217cdf9a7..36fbc5b5d64c 100644
--- a/drivers/staging/wfx/hwio.c
+++ b/drivers/staging/wfx/hwio.c
@@ -2,7 +2,7 @@
 /*
  * Low-level I/O functions.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <linux/kernel.h>
diff --git a/drivers/staging/wfx/hwio.h b/drivers/staging/wfx/hwio.h
index 4b6ef061b40b..0b8e4f7157df 100644
--- a/drivers/staging/wfx/hwio.h
+++ b/drivers/staging/wfx/hwio.h
@@ -2,7 +2,7 @@
 /*
  * Low-level API.
  *
- * Copyright (c) 2017-2018, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #ifndef WFX_HWIO_H
diff --git a/drivers/staging/wfx/key.c b/drivers/staging/wfx/key.c
index 728e5f8d3b7c..2ab82bed4c1b 100644
--- a/drivers/staging/wfx/key.c
+++ b/drivers/staging/wfx/key.c
@@ -2,7 +2,7 @@
 /*
  * Key management related functions.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <linux/etherdevice.h>
diff --git a/drivers/staging/wfx/key.h b/drivers/staging/wfx/key.h
index ff31fc9c565a..70a44d0ca35e 100644
--- a/drivers/staging/wfx/key.h
+++ b/drivers/staging/wfx/key.h
@@ -2,7 +2,7 @@
 /*
  * Implementation of mac80211 API.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #ifndef WFX_KEY_H
diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c
index 2a9098bad1f5..df11c091e094 100644
--- a/drivers/staging/wfx/main.c
+++ b/drivers/staging/wfx/main.c
@@ -2,7 +2,7 @@
 /*
  * Device probe and register.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  * Copyright (c) 2008, Johannes Berg <johannes@sipsolutions.net>
  * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
diff --git a/drivers/staging/wfx/main.h b/drivers/staging/wfx/main.h
index 2457cb595b0f..a0db322383a3 100644
--- a/drivers/staging/wfx/main.h
+++ b/drivers/staging/wfx/main.h
@@ -2,7 +2,7 @@
 /*
  * Device probe and register.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  * Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
  * Copyright 2004-2006 Jean-Baptiste Note <jbnote@gmail.com>, et al.
diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c
index 55b801a02959..31c37f69c295 100644
--- a/drivers/staging/wfx/queue.c
+++ b/drivers/staging/wfx/queue.c
@@ -2,7 +2,7 @@
 /*
  * O(1) TX queue with built-in allocator.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <linux/sched.h>
diff --git a/drivers/staging/wfx/queue.h b/drivers/staging/wfx/queue.h
index 2695c10d6a22..80ba19455ef3 100644
--- a/drivers/staging/wfx/queue.h
+++ b/drivers/staging/wfx/queue.h
@@ -2,7 +2,7 @@
 /*
  * O(1) TX queue with built-in allocator.
  *
- * Copyright (c) 2017-2018, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #ifndef WFX_QUEUE_H
diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c
index 02d4e653d594..fb47c7cddf2f 100644
--- a/drivers/staging/wfx/scan.c
+++ b/drivers/staging/wfx/scan.c
@@ -2,7 +2,7 @@
 /*
  * Scan related functions.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <net/mac80211.h>
diff --git a/drivers/staging/wfx/scan.h b/drivers/staging/wfx/scan.h
index 2eb786c9572c..c7496a766478 100644
--- a/drivers/staging/wfx/scan.h
+++ b/drivers/staging/wfx/scan.h
@@ -2,7 +2,7 @@
 /*
  * Scan related functions.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #ifndef WFX_SCAN_H
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 0d27ca27e48c..a246f0d1d6e9 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -2,7 +2,7 @@
 /*
  * Implementation of mac80211 API.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #include <linux/etherdevice.h>
diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h
index 610cfb0fcd02..d7b5df5ea4e6 100644
--- a/drivers/staging/wfx/sta.h
+++ b/drivers/staging/wfx/sta.h
@@ -2,7 +2,7 @@
 /*
  * Implementation of mac80211 API.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  */
 #ifndef WFX_STA_H
diff --git a/drivers/staging/wfx/traces.h b/drivers/staging/wfx/traces.h
index d376db2f1891..e34c7a538c65 100644
--- a/drivers/staging/wfx/traces.h
+++ b/drivers/staging/wfx/traces.h
@@ -2,7 +2,7 @@
 /*
  * Tracepoints definitions.
  *
- * Copyright (c) 2018-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2018-2020, Silicon Laboratories, Inc.
  */
 
 #undef TRACE_SYSTEM
diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h
index 56fbfab05651..94898680ccde 100644
--- a/drivers/staging/wfx/wfx.h
+++ b/drivers/staging/wfx/wfx.h
@@ -2,7 +2,7 @@
 /*
  * Common private data for Silicon Labs WFx chips.
  *
- * Copyright (c) 2017-2019, Silicon Laboratories, Inc.
+ * Copyright (c) 2017-2020, Silicon Laboratories, Inc.
  * Copyright (c) 2010, ST-Ericsson
  * Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
  * Copyright 2004-2006 Jean-Baptiste Note <jbnote@gmail.com>, et al.
-- 
2.28.0

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

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

* [PATCH 6/7] dt-bindings: staging: wfx: silabs,wfx yaml conversion
  2020-10-07 10:19 [PATCH 0/7] wfx: move out from the staging area Jerome Pouiller
                   ` (4 preceding siblings ...)
  2020-10-07 10:19 ` [PATCH 5/7] staging: wfx: update copyrights dates Jerome Pouiller
@ 2020-10-07 10:19 ` Jerome Pouiller
  2020-10-07 10:19 ` [PATCH 7/7] wfx: move out from the staging area Jerome Pouiller
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Jerome Pouiller @ 2020-10-07 10:19 UTC (permalink / raw)
  To: devel, linux-wireless
  Cc: netdev, linux-kernel, Greg Kroah-Hartman, David S . Miller, Kalle Valo

From: Jérôme Pouiller <jerome.pouiller@silabs.com>

The device can be connected on SPI or on SDIO. The original file
described the two options separately. So, most of the file had to be
rewritten in order to match with the Yaml requirements.

Some device requirements are still written in the comments since they
cannot been expressed with the current scheme (e.g. reg must be set to 1
with SDIO, interrupt is mandatory with SPI, reset-gpio in SPI is
replaced by mmc-pwrseq in SDIO, etc...).

The examples provided have also been reworked in order to make
dt_binding_check happy.

Finally, also fix typo in the name of the file (siliabs instead of
silabs)

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
 .../bindings/net/wireless/silabs,wfx.yaml     | 125 ++++++++++++++++++
 .../bindings/net/wireless/siliabs,wfx.txt     |  96 --------------
 2 files changed, 125 insertions(+), 96 deletions(-)
 create mode 100644 drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml
 delete mode 100644 drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt

diff --git a/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml b/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml
new file mode 100644
index 000000000000..43b5630c0407
--- /dev/null
+++ b/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml
@@ -0,0 +1,125 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2020, Silicon Laboratories, Inc.
+%YAML 1.2
+---
+
+$id: http://devicetree.org/schemas/net/wireless/silabs,wfx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Silicon Labs WFxxx devicetree bindings
+
+maintainers:
+  - Jérôme Pouiller <jerome.pouiller@silabs.com>
+
+description:
+  The WFxxx chip series can be connected via SPI or via SDIO.
+
+  For SDIO':'
+
+    The driver is able to detect a WFxxx chip on SDIO bus by matching its Vendor
+    ID and Product ID. However, driver will only provide limited features in
+    this case. Thus declaring WFxxx chip in device tree is recommended (and may
+    become mandatory in the future).
+
+    In addition, it is recommended to declare a mmc-pwrseq on SDIO host above
+    WFx. Without it, you may encounter issues with warm boot. The mmc-pwrseq
+    should be compatible with mmc-pwrseq-simple. Please consult
+    Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt for more
+    information.
+
+  For SPI':'
+
+    In add of the properties below, please consult
+    Documentation/devicetree/bindings/spi/spi-controller.yaml for optional SPI
+    related properties.
+
+  Note that in add of the properties below, the WFx driver also supports
+  `mac-address` and `local-mac-address` as described in
+  Documentation/devicetree/bindings/net/ethernet.txt
+
+properties:
+  compatible:
+    const: silabs,wf200
+  reg:
+    description:
+      When used on SDIO bus, <reg> must be set to 1. When used on SPI bus, it is
+      the chip select address of the device as defined in the SPI devices
+      bindings.
+    maxItems: 1
+  spi-max-frequency:
+    description: (SPI only) Maximum SPI clocking speed of device in Hz.
+    maxItems: 1
+  interrupts:
+    description: The interrupt line. Triggers IRQ_TYPE_LEVEL_HIGH and
+      IRQ_TYPE_EDGE_RISING are both supported by the chip and the driver. When
+      SPI is used, this property is required. When SDIO is used, the "in-band"
+      interrupt provided by the SDIO bus is used unless an interrupt is defined
+      in the Device Tree.
+    maxItems: 1
+  reset-gpios:
+    description: (SPI only) Phandle of gpio that will be used to reset chip
+      during probe. Without this property, you may encounter issues with warm
+      boot. (For legacy purpose, the gpio in inverted when compatible ==
+      "silabs,wfx-spi")
+
+      For SDIO, the reset gpio should declared using a mmc-pwrseq.
+    maxItems: 1
+  wakeup-gpios:
+    description: Phandle of gpio that will be used to wake-up chip. Without this
+      property, driver will disable most of power saving features.
+    maxItems: 1
+  config-file:
+    description: Use an alternative file as PDS. Default is `wf200.pds`. Only
+      necessary for development/debug purpose.
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    spi0 {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        wfx@0 {
+            compatible = "silabs,wf200";
+            pinctrl-names = "default";
+            pinctrl-0 = <&wfx_irq &wfx_gpios>;
+            reg = <0>;
+            interrupts-extended = <&gpio 16 IRQ_TYPE_EDGE_RISING>;
+            wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+            reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+            spi-max-frequency = <42000000>;
+        };
+    };
+
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    wfx_pwrseq: wfx_pwrseq {
+        compatible = "mmc-pwrseq-simple";
+        pinctrl-names = "default";
+        pinctrl-0 = <&wfx_reset>;
+        reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+    };
+
+    mmc0 {
+        mmc-pwrseq = <&wfx_pwrseq>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        mmc@1 {
+            compatible = "silabs,wf200";
+            pinctrl-names = "default";
+            pinctrl-0 = <&wfx_wakeup>;
+            reg = <1>;
+            wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+        };
+    };
+...
diff --git a/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt b/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt
deleted file mode 100644
index db8d06fc4baa..000000000000
--- a/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt
+++ /dev/null
@@ -1,96 +0,0 @@
-The WFxxx chip series can be connected via SPI or via SDIO.
-
-SPI
----
-
-You have to declare the WFxxx chip in your device tree.
-
-Required properties:
- - compatible: Should be "silabs,wf200"
- - reg: Chip select address of device
- - spi-max-frequency: Maximum SPI clocking speed of device in Hz
- - interrupts-extended: Should contain interrupt line (interrupt-parent +
-   interrupt can also been used). Trigger should be `IRQ_TYPE_EDGE_RISING`.
-
-Optional properties:
- - reset-gpios: phandle of gpio that will be used to reset chip during probe.
-   Without this property, you may encounter issues with warm boot.
-   (Legacy: when compatible == "silabs,wfx-spi", the gpio is inverted.)
-
-Please consult Documentation/devicetree/bindings/spi/spi-bus.txt for optional
-SPI connection related properties,
-
-Example:
-
-&spi1 {
-	wfx {
-		compatible = "silabs,wf200";
-		pinctrl-names = "default";
-		pinctrl-0 = <&wfx_irq &wfx_gpios>;
-		interrupts-extended = <&gpio 16 IRQ_TYPE_EDGE_RISING>;
-		wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
-		reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
-		reg = <0>;
-		spi-max-frequency = <42000000>;
-	};
-};
-
-
-SDIO
-----
-
-The driver is able to detect a WFxxx chip on SDIO bus by matching its Vendor ID
-and Product ID. However, driver will only provide limited features in this
-case. Thus declaring WFxxx chip in device tree is strongly recommended (and may
-become mandatory in the future).
-
-Required properties:
- - compatible: Should be "silabs,wf200"
- - reg: Should be 1
-
-In addition, it is recommended to declare a mmc-pwrseq on SDIO host above WFx.
-Without it, you may encounter issues with warm boot. mmc-pwrseq should be
-compatible with mmc-pwrseq-simple. Please consult
-Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt for more
-information.
-
-Example:
-
-/ {
-	wfx_pwrseq: wfx_pwrseq {
-		compatible = "mmc-pwrseq-simple";
-		pinctrl-names = "default";
-		pinctrl-0 = <&wfx_reset>;
-		reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
-	};
-};
-
-&mmc1 {
-	mmc-pwrseq = <&wfx_pwrseq>;
-	#address-size = <1>;
-	#size = <0>;
-
-	mmc@1 {
-		compatible = "silabs,wf200";
-		reg = <1>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&wfx_wakeup>;
-		wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
-	};
-};
-
-Note that #address-size and #size shoud already be defined in node mmc1, but it
-is rarely the case.
-
-Common properties
------------------
-
-Some properties are recognized either by SPI and SDIO versions:
- - wakeup-gpios: phandle of gpio that will be used to wake-up chip. Without
-   this property, driver will disable most of power saving features.
- - config-file: Use an alternative file as PDS. Default is `wf200.pds`. Only
-   necessary for development/debug purpose.
-
-WFx driver also supports `mac-address` and `local-mac-address` as described in
-Documentation/devicetree/bindings/net/ethernet.txt
-
-- 
2.28.0

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

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

* [PATCH 7/7] wfx: move out from the staging area
  2020-10-07 10:19 [PATCH 0/7] wfx: move out from the staging area Jerome Pouiller
                   ` (5 preceding siblings ...)
  2020-10-07 10:19 ` [PATCH 6/7] dt-bindings: staging: wfx: silabs,wfx yaml conversion Jerome Pouiller
@ 2020-10-07 10:19 ` Jerome Pouiller
  2020-10-07 10:55 ` [PATCH 0/7] " Greg Kroah-Hartman
  2020-10-08 13:13 ` Dan Carpenter
  8 siblings, 0 replies; 14+ messages in thread
From: Jerome Pouiller @ 2020-10-07 10:19 UTC (permalink / raw)
  To: devel, linux-wireless
  Cc: netdev, linux-kernel, Greg Kroah-Hartman, David S . Miller, Kalle Valo

From: Jérôme Pouiller <jerome.pouiller@silabs.com>

The wfx driver is now mature enough to leave the staging area.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
---
 .../bindings/net/wireless/silabs,wfx.yaml       |  0
 MAINTAINERS                                     |  2 +-
 drivers/net/wireless/Kconfig                    |  1 +
 drivers/net/wireless/Makefile                   |  1 +
 drivers/net/wireless/silabs/Kconfig             | 17 +++++++++++++++++
 drivers/net/wireless/silabs/Makefile            |  3 +++
 .../wireless/silabs}/wfx/Kconfig                |  0
 .../wireless/silabs}/wfx/Makefile               |  0
 .../{staging => net/wireless/silabs}/wfx/bh.c   |  0
 .../{staging => net/wireless/silabs}/wfx/bh.h   |  0
 .../{staging => net/wireless/silabs}/wfx/bus.h  |  0
 .../wireless/silabs}/wfx/bus_sdio.c             |  0
 .../wireless/silabs}/wfx/bus_spi.c              |  0
 .../wireless/silabs}/wfx/data_rx.c              |  0
 .../wireless/silabs}/wfx/data_rx.h              |  0
 .../wireless/silabs}/wfx/data_tx.c              |  0
 .../wireless/silabs}/wfx/data_tx.h              |  0
 .../wireless/silabs}/wfx/debug.c                |  0
 .../wireless/silabs}/wfx/debug.h                |  0
 .../{staging => net/wireless/silabs}/wfx/fwio.c |  0
 .../{staging => net/wireless/silabs}/wfx/fwio.h |  0
 .../wireless/silabs}/wfx/hif_api_cmd.h          |  0
 .../wireless/silabs}/wfx/hif_api_general.h      |  0
 .../wireless/silabs}/wfx/hif_api_mib.h          |  0
 .../wireless/silabs}/wfx/hif_rx.c               |  0
 .../wireless/silabs}/wfx/hif_rx.h               |  0
 .../wireless/silabs}/wfx/hif_tx.c               |  0
 .../wireless/silabs}/wfx/hif_tx.h               |  0
 .../wireless/silabs}/wfx/hif_tx_mib.c           |  0
 .../wireless/silabs}/wfx/hif_tx_mib.h           |  0
 .../{staging => net/wireless/silabs}/wfx/hwio.c |  0
 .../{staging => net/wireless/silabs}/wfx/hwio.h |  0
 .../{staging => net/wireless/silabs}/wfx/key.c  |  0
 .../{staging => net/wireless/silabs}/wfx/key.h  |  0
 .../{staging => net/wireless/silabs}/wfx/main.c |  0
 .../{staging => net/wireless/silabs}/wfx/main.h |  0
 .../wireless/silabs}/wfx/queue.c                |  0
 .../wireless/silabs}/wfx/queue.h                |  0
 .../{staging => net/wireless/silabs}/wfx/scan.c |  0
 .../{staging => net/wireless/silabs}/wfx/scan.h |  0
 .../{staging => net/wireless/silabs}/wfx/sta.c  |  0
 .../{staging => net/wireless/silabs}/wfx/sta.h  |  0
 .../wireless/silabs}/wfx/traces.h               |  0
 .../{staging => net/wireless/silabs}/wfx/wfx.h  |  0
 drivers/staging/Kconfig                         |  2 --
 drivers/staging/Makefile                        |  1 -
 drivers/staging/wfx/TODO                        |  6 ------
 47 files changed, 23 insertions(+), 10 deletions(-)
 rename {drivers/staging/wfx/Documentation => Documentation}/devicetree/bindings/net/wireless/silabs,wfx.yaml (100%)
 create mode 100644 drivers/net/wireless/silabs/Kconfig
 create mode 100644 drivers/net/wireless/silabs/Makefile
 rename drivers/{staging => net/wireless/silabs}/wfx/Kconfig (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/Makefile (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bh.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bh.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bus.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bus_sdio.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/bus_spi.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/data_rx.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/data_rx.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/data_tx.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/data_tx.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/debug.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/debug.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/fwio.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/fwio.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_api_cmd.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_api_general.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_api_mib.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_rx.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_rx.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_tx.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_tx.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_tx_mib.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hif_tx_mib.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hwio.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/hwio.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/key.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/key.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/main.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/main.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/queue.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/queue.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/scan.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/scan.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/sta.c (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/sta.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/traces.h (100%)
 rename drivers/{staging => net/wireless/silabs}/wfx/wfx.h (100%)
 delete mode 100644 drivers/staging/wfx/TODO

diff --git a/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml b/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml
similarity index 100%
rename from drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml
rename to Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml
diff --git a/MAINTAINERS b/MAINTAINERS
index 5e10735be654..1c74a7c173c5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15799,7 +15799,7 @@ F:	drivers/platform/x86/touchscreen_dmi.c
 SILICON LABS WIRELESS DRIVERS (for WFxxx series)
 M:	Jérôme Pouiller <jerome.pouiller@silabs.com>
 S:	Supported
-F:	drivers/staging/wfx/
+F:	drivers/net/wireless/silabs/wfx/
 
 SILICON MOTION SM712 FRAME BUFFER DRIVER
 M:	Sudip Mukherjee <sudipm.mukherjee@gmail.com>
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 170a64e67709..69ea83279907 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -44,6 +44,7 @@ source "drivers/net/wireless/microchip/Kconfig"
 source "drivers/net/wireless/ralink/Kconfig"
 source "drivers/net/wireless/realtek/Kconfig"
 source "drivers/net/wireless/rsi/Kconfig"
+source "drivers/net/wireless/silabs/Kconfig"
 source "drivers/net/wireless/st/Kconfig"
 source "drivers/net/wireless/ti/Kconfig"
 source "drivers/net/wireless/zydas/Kconfig"
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index 80b324499786..76885e5f0ea7 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -16,6 +16,7 @@ obj-$(CONFIG_WLAN_VENDOR_MICROCHIP) += microchip/
 obj-$(CONFIG_WLAN_VENDOR_RALINK) += ralink/
 obj-$(CONFIG_WLAN_VENDOR_REALTEK) += realtek/
 obj-$(CONFIG_WLAN_VENDOR_RSI) += rsi/
+obj-$(CONFIG_WLAN_VENDOR_SILABS) += silabs/
 obj-$(CONFIG_WLAN_VENDOR_ST) += st/
 obj-$(CONFIG_WLAN_VENDOR_TI) += ti/
 obj-$(CONFIG_WLAN_VENDOR_ZYDAS) += zydas/
diff --git a/drivers/net/wireless/silabs/Kconfig b/drivers/net/wireless/silabs/Kconfig
new file mode 100644
index 000000000000..a15768f36d06
--- /dev/null
+++ b/drivers/net/wireless/silabs/Kconfig
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0
+config WLAN_VENDOR_SILABS
+	bool "Silicon Laboratories devices"
+	default y
+	help
+	  If you have a wireless card belonging to this class, say Y.
+
+	  Note that the answer to this question doesn't directly affect the
+	  kernel: saying N will just cause the configurator to skip all the
+	  questions about these cards. If you say Y, you will be asked for
+	  your specific card in the following questions.
+
+if WLAN_VENDOR_SILABS
+
+source "drivers/net/wireless/silabs/wfx/Kconfig"
+
+endif # WLAN_VENDOR_SILABS
diff --git a/drivers/net/wireless/silabs/Makefile b/drivers/net/wireless/silabs/Makefile
new file mode 100644
index 000000000000..2d32f4c1b8ef
--- /dev/null
+++ b/drivers/net/wireless/silabs/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+
+obj-$(CONFIG_WFX)	+= wfx/
diff --git a/drivers/staging/wfx/Kconfig b/drivers/net/wireless/silabs/wfx/Kconfig
similarity index 100%
rename from drivers/staging/wfx/Kconfig
rename to drivers/net/wireless/silabs/wfx/Kconfig
diff --git a/drivers/staging/wfx/Makefile b/drivers/net/wireless/silabs/wfx/Makefile
similarity index 100%
rename from drivers/staging/wfx/Makefile
rename to drivers/net/wireless/silabs/wfx/Makefile
diff --git a/drivers/staging/wfx/bh.c b/drivers/net/wireless/silabs/wfx/bh.c
similarity index 100%
rename from drivers/staging/wfx/bh.c
rename to drivers/net/wireless/silabs/wfx/bh.c
diff --git a/drivers/staging/wfx/bh.h b/drivers/net/wireless/silabs/wfx/bh.h
similarity index 100%
rename from drivers/staging/wfx/bh.h
rename to drivers/net/wireless/silabs/wfx/bh.h
diff --git a/drivers/staging/wfx/bus.h b/drivers/net/wireless/silabs/wfx/bus.h
similarity index 100%
rename from drivers/staging/wfx/bus.h
rename to drivers/net/wireless/silabs/wfx/bus.h
diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/net/wireless/silabs/wfx/bus_sdio.c
similarity index 100%
rename from drivers/staging/wfx/bus_sdio.c
rename to drivers/net/wireless/silabs/wfx/bus_sdio.c
diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/net/wireless/silabs/wfx/bus_spi.c
similarity index 100%
rename from drivers/staging/wfx/bus_spi.c
rename to drivers/net/wireless/silabs/wfx/bus_spi.c
diff --git a/drivers/staging/wfx/data_rx.c b/drivers/net/wireless/silabs/wfx/data_rx.c
similarity index 100%
rename from drivers/staging/wfx/data_rx.c
rename to drivers/net/wireless/silabs/wfx/data_rx.c
diff --git a/drivers/staging/wfx/data_rx.h b/drivers/net/wireless/silabs/wfx/data_rx.h
similarity index 100%
rename from drivers/staging/wfx/data_rx.h
rename to drivers/net/wireless/silabs/wfx/data_rx.h
diff --git a/drivers/staging/wfx/data_tx.c b/drivers/net/wireless/silabs/wfx/data_tx.c
similarity index 100%
rename from drivers/staging/wfx/data_tx.c
rename to drivers/net/wireless/silabs/wfx/data_tx.c
diff --git a/drivers/staging/wfx/data_tx.h b/drivers/net/wireless/silabs/wfx/data_tx.h
similarity index 100%
rename from drivers/staging/wfx/data_tx.h
rename to drivers/net/wireless/silabs/wfx/data_tx.h
diff --git a/drivers/staging/wfx/debug.c b/drivers/net/wireless/silabs/wfx/debug.c
similarity index 100%
rename from drivers/staging/wfx/debug.c
rename to drivers/net/wireless/silabs/wfx/debug.c
diff --git a/drivers/staging/wfx/debug.h b/drivers/net/wireless/silabs/wfx/debug.h
similarity index 100%
rename from drivers/staging/wfx/debug.h
rename to drivers/net/wireless/silabs/wfx/debug.h
diff --git a/drivers/staging/wfx/fwio.c b/drivers/net/wireless/silabs/wfx/fwio.c
similarity index 100%
rename from drivers/staging/wfx/fwio.c
rename to drivers/net/wireless/silabs/wfx/fwio.c
diff --git a/drivers/staging/wfx/fwio.h b/drivers/net/wireless/silabs/wfx/fwio.h
similarity index 100%
rename from drivers/staging/wfx/fwio.h
rename to drivers/net/wireless/silabs/wfx/fwio.h
diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/net/wireless/silabs/wfx/hif_api_cmd.h
similarity index 100%
rename from drivers/staging/wfx/hif_api_cmd.h
rename to drivers/net/wireless/silabs/wfx/hif_api_cmd.h
diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/net/wireless/silabs/wfx/hif_api_general.h
similarity index 100%
rename from drivers/staging/wfx/hif_api_general.h
rename to drivers/net/wireless/silabs/wfx/hif_api_general.h
diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/net/wireless/silabs/wfx/hif_api_mib.h
similarity index 100%
rename from drivers/staging/wfx/hif_api_mib.h
rename to drivers/net/wireless/silabs/wfx/hif_api_mib.h
diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/net/wireless/silabs/wfx/hif_rx.c
similarity index 100%
rename from drivers/staging/wfx/hif_rx.c
rename to drivers/net/wireless/silabs/wfx/hif_rx.c
diff --git a/drivers/staging/wfx/hif_rx.h b/drivers/net/wireless/silabs/wfx/hif_rx.h
similarity index 100%
rename from drivers/staging/wfx/hif_rx.h
rename to drivers/net/wireless/silabs/wfx/hif_rx.h
diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/net/wireless/silabs/wfx/hif_tx.c
similarity index 100%
rename from drivers/staging/wfx/hif_tx.c
rename to drivers/net/wireless/silabs/wfx/hif_tx.c
diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/net/wireless/silabs/wfx/hif_tx.h
similarity index 100%
rename from drivers/staging/wfx/hif_tx.h
rename to drivers/net/wireless/silabs/wfx/hif_tx.h
diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/net/wireless/silabs/wfx/hif_tx_mib.c
similarity index 100%
rename from drivers/staging/wfx/hif_tx_mib.c
rename to drivers/net/wireless/silabs/wfx/hif_tx_mib.c
diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/net/wireless/silabs/wfx/hif_tx_mib.h
similarity index 100%
rename from drivers/staging/wfx/hif_tx_mib.h
rename to drivers/net/wireless/silabs/wfx/hif_tx_mib.h
diff --git a/drivers/staging/wfx/hwio.c b/drivers/net/wireless/silabs/wfx/hwio.c
similarity index 100%
rename from drivers/staging/wfx/hwio.c
rename to drivers/net/wireless/silabs/wfx/hwio.c
diff --git a/drivers/staging/wfx/hwio.h b/drivers/net/wireless/silabs/wfx/hwio.h
similarity index 100%
rename from drivers/staging/wfx/hwio.h
rename to drivers/net/wireless/silabs/wfx/hwio.h
diff --git a/drivers/staging/wfx/key.c b/drivers/net/wireless/silabs/wfx/key.c
similarity index 100%
rename from drivers/staging/wfx/key.c
rename to drivers/net/wireless/silabs/wfx/key.c
diff --git a/drivers/staging/wfx/key.h b/drivers/net/wireless/silabs/wfx/key.h
similarity index 100%
rename from drivers/staging/wfx/key.h
rename to drivers/net/wireless/silabs/wfx/key.h
diff --git a/drivers/staging/wfx/main.c b/drivers/net/wireless/silabs/wfx/main.c
similarity index 100%
rename from drivers/staging/wfx/main.c
rename to drivers/net/wireless/silabs/wfx/main.c
diff --git a/drivers/staging/wfx/main.h b/drivers/net/wireless/silabs/wfx/main.h
similarity index 100%
rename from drivers/staging/wfx/main.h
rename to drivers/net/wireless/silabs/wfx/main.h
diff --git a/drivers/staging/wfx/queue.c b/drivers/net/wireless/silabs/wfx/queue.c
similarity index 100%
rename from drivers/staging/wfx/queue.c
rename to drivers/net/wireless/silabs/wfx/queue.c
diff --git a/drivers/staging/wfx/queue.h b/drivers/net/wireless/silabs/wfx/queue.h
similarity index 100%
rename from drivers/staging/wfx/queue.h
rename to drivers/net/wireless/silabs/wfx/queue.h
diff --git a/drivers/staging/wfx/scan.c b/drivers/net/wireless/silabs/wfx/scan.c
similarity index 100%
rename from drivers/staging/wfx/scan.c
rename to drivers/net/wireless/silabs/wfx/scan.c
diff --git a/drivers/staging/wfx/scan.h b/drivers/net/wireless/silabs/wfx/scan.h
similarity index 100%
rename from drivers/staging/wfx/scan.h
rename to drivers/net/wireless/silabs/wfx/scan.h
diff --git a/drivers/staging/wfx/sta.c b/drivers/net/wireless/silabs/wfx/sta.c
similarity index 100%
rename from drivers/staging/wfx/sta.c
rename to drivers/net/wireless/silabs/wfx/sta.c
diff --git a/drivers/staging/wfx/sta.h b/drivers/net/wireless/silabs/wfx/sta.h
similarity index 100%
rename from drivers/staging/wfx/sta.h
rename to drivers/net/wireless/silabs/wfx/sta.h
diff --git a/drivers/staging/wfx/traces.h b/drivers/net/wireless/silabs/wfx/traces.h
similarity index 100%
rename from drivers/staging/wfx/traces.h
rename to drivers/net/wireless/silabs/wfx/traces.h
diff --git a/drivers/staging/wfx/wfx.h b/drivers/net/wireless/silabs/wfx/wfx.h
similarity index 100%
rename from drivers/staging/wfx/wfx.h
rename to drivers/net/wireless/silabs/wfx/wfx.h
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 2d0310448eba..2d326b16272e 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -114,8 +114,6 @@ source "drivers/staging/kpc2000/Kconfig"
 
 source "drivers/staging/qlge/Kconfig"
 
-source "drivers/staging/wfx/Kconfig"
-
 source "drivers/staging/hikey9xx/Kconfig"
 
 endif # STAGING
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 757a892ab5b9..9de260802db5 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -47,5 +47,4 @@ obj-$(CONFIG_XIL_AXIS_FIFO)	+= axis-fifo/
 obj-$(CONFIG_FIELDBUS_DEV)     += fieldbus/
 obj-$(CONFIG_KPC2000)		+= kpc2000/
 obj-$(CONFIG_QLGE)		+= qlge/
-obj-$(CONFIG_WFX)		+= wfx/
 obj-y				+= hikey9xx/
diff --git a/drivers/staging/wfx/TODO b/drivers/staging/wfx/TODO
deleted file mode 100644
index 1b4bc2af94b6..000000000000
--- a/drivers/staging/wfx/TODO
+++ /dev/null
@@ -1,6 +0,0 @@
-This is a list of things that need to be done to get this driver out of the
-staging directory.
-
-  - As suggested by Felix, rate control could be improved following this idea:
-        https://lore.kernel.org/lkml/3099559.gv3Q75KnN1@pc-42/
-
-- 
2.28.0

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

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

* Re: [PATCH 0/7] wfx: move out from the staging area
  2020-10-07 10:19 [PATCH 0/7] wfx: move out from the staging area Jerome Pouiller
                   ` (6 preceding siblings ...)
  2020-10-07 10:19 ` [PATCH 7/7] wfx: move out from the staging area Jerome Pouiller
@ 2020-10-07 10:55 ` Greg Kroah-Hartman
  2020-10-08  7:30   ` Kalle Valo
  2020-10-08 13:13 ` Dan Carpenter
  8 siblings, 1 reply; 14+ messages in thread
From: Greg Kroah-Hartman @ 2020-10-07 10:55 UTC (permalink / raw)
  To: Jerome Pouiller
  Cc: devel, netdev, linux-wireless, linux-kernel, David S . Miller,
	Kalle Valo

On Wed, Oct 07, 2020 at 12:19:36PM +0200, Jerome Pouiller wrote:
> From: Jérôme Pouiller <jerome.pouiller@silabs.com>
> 
> I think the wfx driver is now mature enough to be accepted in the
> drivers/net/wireless directory.
> 
> There is still one item on the TODO list. It is an idea to improve the rate
> control in some particular cases[1]. However, the current performances of the
> driver seem to satisfy everyone. In add, the suggested change is large enough.
> So, I would prefer to implement it only if it really solves an issue. I think it
> is not an obstacle to move the driver out of the staging area.
> 
> In order to comply with the last rules for the DT bindings, I have converted the
> documentation to yaml. I am moderately happy with the result. Especially, for
> the description of the binding. Any comments are welcome.
> 
> The series also update the copyrights dates of the files. I don't know exactly
> how this kind of changes should be sent. It's a bit weird to change all the
> copyrights in one commit, but I do not see any better way.
> 
> I also include a few fixes I have found these last weeks.
> 
> [1] https://lore.kernel.org/lkml/3099559.gv3Q75KnN1@pc-42

I'll take the first 6 patches here, the last one you should work with
the wireless maintainers to get reviewed.

Maybe that might want to wait until after 5.10-rc1 is out, with all of
these changes in it, making it an easier move.

thanks,

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

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

* Re: [PATCH 0/7] wfx: move out from the staging area
  2020-10-07 10:55 ` [PATCH 0/7] " Greg Kroah-Hartman
@ 2020-10-08  7:30   ` Kalle Valo
  2020-10-08  9:50     ` Kalle Valo
  2020-10-08 10:10     ` Jérôme Pouiller
  0 siblings, 2 replies; 14+ messages in thread
From: Kalle Valo @ 2020-10-08  7:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, netdev, linux-wireless, linux-kernel, David S . Miller

Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:

> On Wed, Oct 07, 2020 at 12:19:36PM +0200, Jerome Pouiller wrote:
>> From: Jérôme Pouiller <jerome.pouiller@silabs.com>
>> 
>> I think the wfx driver is now mature enough to be accepted in the
>> drivers/net/wireless directory.
>> 
>> There is still one item on the TODO list. It is an idea to improve the rate
>> control in some particular cases[1]. However, the current performances of the
>> driver seem to satisfy everyone. In add, the suggested change is large enough.
>> So, I would prefer to implement it only if it really solves an issue. I think it
>> is not an obstacle to move the driver out of the staging area.
>> 
>> In order to comply with the last rules for the DT bindings, I have converted the
>> documentation to yaml. I am moderately happy with the result. Especially, for
>> the description of the binding. Any comments are welcome.
>> 
>> The series also update the copyrights dates of the files. I don't know exactly
>> how this kind of changes should be sent. It's a bit weird to change all the
>> copyrights in one commit, but I do not see any better way.
>> 
>> I also include a few fixes I have found these last weeks.
>> 
>> [1] https://lore.kernel.org/lkml/3099559.gv3Q75KnN1@pc-42
>
> I'll take the first 6 patches here, the last one you should work with
> the wireless maintainers to get reviewed.
>
> Maybe that might want to wait until after 5.10-rc1 is out, with all of
> these changes in it, making it an easier move.

Yes, the driver needs to be reviewed in linux-wireless list. I recommend
submitting the whole driver in a patchset with one file per patch, which
seems to be the easiest way to review a full driver. The final move will
be in just one commit moving the driver, just like patch 7 does here. As
an example see how wilc1000 review was done.

Device tree bindings needs to be reviewed by the DT maintainer so CC
devicetree on that patch.

But do note that there's currently one new driver in review queue, so it
will most likely take some time before wfx is reviewed.

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

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 0/7] wfx: move out from the staging area
  2020-10-08  7:30   ` Kalle Valo
@ 2020-10-08  9:50     ` Kalle Valo
  2020-10-08 10:10     ` Jérôme Pouiller
  1 sibling, 0 replies; 14+ messages in thread
From: Kalle Valo @ 2020-10-08  9:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, netdev, linux-wireless, linux-kernel, David S . Miller

Kalle Valo <kvalo@codeaurora.org> writes:

> Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
>
>> On Wed, Oct 07, 2020 at 12:19:36PM +0200, Jerome Pouiller wrote:
>>> From: Jérôme Pouiller <jerome.pouiller@silabs.com>
>>> 
>>> I think the wfx driver is now mature enough to be accepted in the
>>> drivers/net/wireless directory.
>>> 
>>> There is still one item on the TODO list. It is an idea to improve the rate
>>> control in some particular cases[1]. However, the current performances of the
>>> driver seem to satisfy everyone. In add, the suggested change is large enough.
>>> So, I would prefer to implement it only if it really solves an issue. I think it
>>> is not an obstacle to move the driver out of the staging area.
>>> 
>>> In order to comply with the last rules for the DT bindings, I have converted the
>>> documentation to yaml. I am moderately happy with the result. Especially, for
>>> the description of the binding. Any comments are welcome.
>>> 
>>> The series also update the copyrights dates of the files. I don't know exactly
>>> how this kind of changes should be sent. It's a bit weird to change all the
>>> copyrights in one commit, but I do not see any better way.
>>> 
>>> I also include a few fixes I have found these last weeks.
>>> 
>>> [1] https://lore.kernel.org/lkml/3099559.gv3Q75KnN1@pc-42
>>
>> I'll take the first 6 patches here, the last one you should work with
>> the wireless maintainers to get reviewed.
>>
>> Maybe that might want to wait until after 5.10-rc1 is out, with all of
>> these changes in it, making it an easier move.
>
> Yes, the driver needs to be reviewed in linux-wireless list. I recommend
> submitting the whole driver in a patchset with one file per patch, which
> seems to be the easiest way to review a full driver. The final move will
> be in just one commit moving the driver, just like patch 7 does here. As
> an example see how wilc1000 review was done.
>
> Device tree bindings needs to be reviewed by the DT maintainer so CC
> devicetree on that patch.

BTW, I wrote some instructions for new wireless drivers:

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

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

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 0/7] wfx: move out from the staging area
  2020-10-08  7:30   ` Kalle Valo
  2020-10-08  9:50     ` Kalle Valo
@ 2020-10-08 10:10     ` Jérôme Pouiller
  2020-10-08 11:00       ` Kalle Valo
  1 sibling, 1 reply; 14+ messages in thread
From: Jérôme Pouiller @ 2020-10-08 10:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Kalle Valo
  Cc: devel, netdev, linux-wireless, linux-kernel, David S . Miller

On Thursday 8 October 2020 09:30:06 CEST Kalle Valo wrote:
[...]
> Yes, the driver needs to be reviewed in linux-wireless list. I recommend
> submitting the whole driver in a patchset with one file per patch, which
> seems to be the easiest way to review a full driver. The final move will
> be in just one commit moving the driver, just like patch 7 does here. As
> an example see how wilc1000 review was done.

I see. I suppose it is still a bit complicated to review? Maybe I could
try to make things easier.

For my submission to staging/ I had taken time to split the driver in an
understandable series of patches[1]. I think it was easier to review than
just sending files one by one. I could do the same thing for the
submission to linux-wireless. It would ask me a bit of work but, since I
already have a template, it is conceivable.

Do you think it is worth it, or it would be an unnecessary effort?

[1] https://lore.kernel.org/driverdev-devel/20190919142527.31797-1-Jerome.Pouiller@silabs.com/
     or commits a7a91ca5a23d^..40115bbc40e2

-- 
Jérôme Pouiller


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

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

* Re: [PATCH 0/7] wfx: move out from the staging area
  2020-10-08 10:10     ` Jérôme Pouiller
@ 2020-10-08 11:00       ` Kalle Valo
  0 siblings, 0 replies; 14+ messages in thread
From: Kalle Valo @ 2020-10-08 11:00 UTC (permalink / raw)
  To: Jérôme Pouiller
  Cc: devel, Greg Kroah-Hartman, linux-wireless, linux-kernel, netdev,
	David S . Miller

Jérôme Pouiller <jerome.pouiller@silabs.com> writes:

> On Thursday 8 October 2020 09:30:06 CEST Kalle Valo wrote:
> [...]
>> Yes, the driver needs to be reviewed in linux-wireless list. I recommend
>> submitting the whole driver in a patchset with one file per patch, which
>> seems to be the easiest way to review a full driver. The final move will
>> be in just one commit moving the driver, just like patch 7 does here. As
>> an example see how wilc1000 review was done.
>
> I see. I suppose it is still a bit complicated to review? Maybe I could
> try to make things easier.
>
> For my submission to staging/ I had taken time to split the driver in an
> understandable series of patches[1]. I think it was easier to review than
> just sending files one by one. I could do the same thing for the
> submission to linux-wireless. It would ask me a bit of work but, since I
> already have a template, it is conceivable.
>
> Do you think it is worth it, or it would be an unnecessary effort?
>
> [1]
> https://lore.kernel.org/driverdev-devel/20190919142527.31797-1-Jerome.Pouiller@silabs.com/
>      or commits a7a91ca5a23d^..40115bbc40e2

I don't know how others think, but I prefer to review new drivers "one
file per patch" style as I get to see the big picture easily. And
besides, splitting the driver like that would be a huge job for you. I
don't think it's worth your time in this case. And making changes in the
driver during review process becomes even more complex.

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

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 0/7] wfx: move out from the staging area
  2020-10-07 10:19 [PATCH 0/7] wfx: move out from the staging area Jerome Pouiller
                   ` (7 preceding siblings ...)
  2020-10-07 10:55 ` [PATCH 0/7] " Greg Kroah-Hartman
@ 2020-10-08 13:13 ` Dan Carpenter
  8 siblings, 0 replies; 14+ messages in thread
From: Dan Carpenter @ 2020-10-08 13:13 UTC (permalink / raw)
  To: Jerome Pouiller
  Cc: devel, netdev, linux-wireless, linux-kernel, Greg Kroah-Hartman,
	David S . Miller, Kalle Valo

There are some static checker warnings to look at from linux-next from
Tuesday.

drivers/staging/wfx/hif_tx.c:319 hif_join() error: we previously assumed 'channel' could be null (see line 315)
drivers/staging/wfx/main.c:228 wfx_send_pdata_pds() warn: potential NULL parameter dereference 'tmp_buf'
drivers/staging/wfx/hif_rx.c:177 hif_scan_complete_indication() warn: potential NULL parameter dereference 'wvif'
drivers/staging/wfx/data_tx.c:576 wfx_flush() warn: potential NULL parameter dereference 'wvif'
drivers/staging/wfx/bus_spi.c:228 wfx_spi_probe() warn: 'bus->core' could be an error pointer
drivers/staging/wfx/bus_sdio.c:221 wfx_sdio_probe() warn: 'bus->core' could be an error pointer
drivers/staging/wfx/hif_rx.c:26 hif_generic_confirm() warn: negative user subtract: 0-u16max - 4
drivers/staging/wfx/hif_rx.c:98 hif_wakeup_indication() warn: 'gpiod_get_value(wdev->pdata.gpio_wakeup)' returns positive and negative
drivers/staging/wfx/bh.c:24 device_wakeup() warn: 'gpiod_get_value_cansleep(wdev->pdata.gpio_wakeup)' returns positive and negative
drivers/staging/wfx/hif_rx.c:235 hif_generic_indication() warn: format string contains non-ascii character '\xc2'
drivers/staging/wfx/hif_rx.c:235 hif_generic_indication() warn: format string contains non-ascii character '\xb0'
drivers/staging/wfx/data_tx.c:37 wfx_get_hw_rate() warn: constraint '(struct ieee80211_supported_band)->bitrates' overflow 'band->bitrates' 0 <= abs_rl '0-127' user_rl '' required = '(struct ieee80211_supported_band)->n_bitrates'

Some of these are unpublished checks that I haven't published because
they are too crap.  The rest of the email is just long explanations.
Skip if not required.

regards,
dan carpenter

#1
drivers/staging/wfx/hif_tx.c:319 hif_join() error: we previously assumed 'channel' could be null (see line 315)
   311          if (!hif)
   312                  return -ENOMEM;
   313          body->infrastructure_bss_mode = !conf->ibss_joined;
   314          body->short_preamble = conf->use_short_preamble;
   315          if (channel && channel->flags & IEEE80211_CHAN_NO_IR)
                    ^^^^^^^
Check for NULL.

   316                  body->probe_for_join = 0;
   317          else
   318                  body->probe_for_join = 1;
   319          body->channel_number = channel->hw_value;
                                       ^^^^^^^^^^^^^^^^^
Unchecked dereference.

   320          body->beacon_interval = cpu_to_le32(conf->beacon_int);
   321          body->basic_rate_set =

#2
drivers/staging/wfx/main.c:228 wfx_send_pdata_pds() warn: potential NULL parameter dereference 'tmp_buf'
   227          tmp_buf = kmemdup(pds->data, pds->size, GFP_KERNEL);

No check for allocation failure.

   228          ret = wfx_send_pds(wdev, tmp_buf, pds->size);
   229          kfree(tmp_buf);

#3
drivers/staging/wfx/hif_rx.c:177 hif_scan_complete_indication() warn: potential NULL parameter dereference 'wvif'
   170  static int hif_scan_complete_indication(struct wfx_dev *wdev,
   171                                          const struct hif_msg *hif,
   172                                          const void *buf)
   173  {
   174          struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface);
                                ^^^^^^^^^^^^^^^^^^^
Smatch thinks wdev_to_wvif() can return NULL.

   175  
   176          WARN_ON(!wvif);
   177          wfx_scan_complete(wvif);
   178  
   179          return 0;
   180  }

#4
drivers/staging/wfx/data_tx.c:576 wfx_flush() warn: potential NULL parameter dereference 'wvif'
   572          while ((skb = skb_dequeue(&dropped)) != NULL) {
   573                  hif = (struct hif_msg *)skb->data;
   574                  wvif = wdev_to_wvif(wdev, hif->interface);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Same.
   575                  ieee80211_tx_info_clear_status(IEEE80211_SKB_CB(skb));
   576                  wfx_skb_dtor(wvif, skb);
   577          }
   578  }

#5 and #6
drivers/staging/wfx/bus_spi.c:228 wfx_spi_probe() warn: 'bus->core' could be an error pointer
drivers/staging/wfx/bus_sdio.c:221 wfx_sdio_probe() warn: 'bus->core' could be an error pointer

The wfx_init_common() function should return NULL instead of error
pointer if devm_gpiod_get_optional() fails.

#7
drivers/staging/wfx/hif_rx.c:26 hif_generic_confirm() warn: negative user subtract: 0-u16max - 4
    20  static int hif_generic_confirm(struct wfx_dev *wdev,
    21                                 const struct hif_msg *hif, const void *buf)
    22  {
    23          // All confirm messages start with status
    24          int status = le32_to_cpup((__le32 *)buf);
    25          int cmd = hif->id;
    26          int len = le16_to_cpu(hif->len) - 4; // drop header

Can "len" get set to negative 4?

    27  
    28          WARN(!mutex_is_locked(&wdev->hif_cmd.lock), "data locking error");


#8 and #9
drivers/staging/wfx/hif_rx.c:98 hif_wakeup_indication() warn: 'gpiod_get_value(wdev->pdata.gpio_wakeup)' returns positive and negative
drivers/staging/wfx/bh.c:24 device_wakeup() warn: 'gpiod_get_value_cansleep(wdev->pdata.gpio_wakeup)' returns positive and negative
    94  static int hif_wakeup_indication(struct wfx_dev *wdev,
    95                                   const struct hif_msg *hif, const void *buf)
    96  {
    97          if (!wdev->pdata.gpio_wakeup
    98              || !gpiod_get_value(wdev->pdata.gpio_wakeup)) {
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Negative error codes from gpiod_get_value() should be treated as error.

    99                  dev_warn(wdev->dev, "unexpected wake-up indication\n");
   100                  return -EIO;
   101          }
   102          return 0;
   103  }

#10 and #11
drivers/staging/wfx/hif_rx.c:235 hif_generic_indication() warn: format string contains non-ascii character '\xc2'
drivers/staging/wfx/hif_rx.c:235 hif_generic_indication() warn: format string contains non-ascii character '\xb0'
   234                  if (!wfx_api_older_than(wdev, 1, 4))
   235                          dev_info(wdev->dev, "Rx test ongoing. Temperature: %d°C\n",
                                                                                     ^
Can we output non-ascii to dmesg?  (I didn't add this Smatch check so I
don't really know the answer).

   236                                   body->data.rx_stats.current_temp);

#12
drivers/staging/wfx/data_tx.c:37 wfx_get_hw_rate() warn: constraint '(struct ieee80211_supported_band)->bitrates' overflow 'band->bitrates' 0 <= abs_rl '0-127' user_rl '' required = '(struct ieee80211_supported_band)->n_bitrates'

    20  static int wfx_get_hw_rate(struct wfx_dev *wdev,
    21                             const struct ieee80211_tx_rate *rate)
    22  {
    23          struct ieee80211_supported_band *band;
    24  
    25          if (rate->idx < 0)
    26                  return -1;
    27          if (rate->flags & IEEE80211_TX_RC_MCS) {
    28                  if (rate->idx > 7) {
    29                          WARN(1, "wrong rate->idx value: %d", rate->idx);
    30                          return -1;
    31                  }
    32                  return rate->idx + 14;
    33          }
    34          // WFx only support 2GHz, else band information should be retrieved
    35          // from ieee80211_tx_info
    36          band = wdev->hw->wiphy->bands[NL80211_BAND_2GHZ];
    37          return band->bitrates[rate->idx].hw_value;

This code assumes that "rate->idx" can be all sort of invalid values
including negatives but it doesn't cap it against:

	if (rate->idx >= band->n_bitrates)
		return -1;

    38  }

If you you read all the way down to the second end of the email then you
are a true hero.  regards again,
dan carpenter
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2020-10-08 13:15 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-07 10:19 [PATCH 0/7] wfx: move out from the staging area Jerome Pouiller
2020-10-07 10:19 ` [PATCH 1/7] staging: wfx: fix handling of MMIC error Jerome Pouiller
2020-10-07 10:19 ` [PATCH 2/7] staging: wfx: remove remaining code of 'secure link' feature Jerome Pouiller
2020-10-07 10:19 ` [PATCH 3/7] staging: wfx: fix BA sessions for older firmwares Jerome Pouiller
2020-10-07 10:19 ` [PATCH 4/7] staging: wfx: fix QoS priority for slow buses Jerome Pouiller
2020-10-07 10:19 ` [PATCH 5/7] staging: wfx: update copyrights dates Jerome Pouiller
2020-10-07 10:19 ` [PATCH 6/7] dt-bindings: staging: wfx: silabs,wfx yaml conversion Jerome Pouiller
2020-10-07 10:19 ` [PATCH 7/7] wfx: move out from the staging area Jerome Pouiller
2020-10-07 10:55 ` [PATCH 0/7] " Greg Kroah-Hartman
2020-10-08  7:30   ` Kalle Valo
2020-10-08  9:50     ` Kalle Valo
2020-10-08 10:10     ` Jérôme Pouiller
2020-10-08 11:00       ` Kalle Valo
2020-10-08 13:13 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).