Commit 08127ad2 authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman

staging: wfx: relax the PDS existence constraint

The PDS file contains antenna parameters. The file is specific to each
hardware design. Normally, the board designer should add a line in the
of_device_id table with his own antenna parameters.

Until, now the absence of PDS file is a hard fatal error. However,
during the development, in most of the cases, an empty PDS file is
sufficient to start WiFi communication.

This patch keep an error, but allow the user to play with the device.
Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-12-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 583f188e
...@@ -220,7 +220,7 @@ static int wfx_send_pdata_pds(struct wfx_dev *wdev) ...@@ -220,7 +220,7 @@ static int wfx_send_pdata_pds(struct wfx_dev *wdev)
ret = request_firmware(&pds, wdev->pdata.file_pds, wdev->dev); ret = request_firmware(&pds, wdev->pdata.file_pds, wdev->dev);
if (ret) { if (ret) {
dev_err(wdev->dev, "can't load PDS file %s\n", dev_err(wdev->dev, "can't load antenna parameters (PDS file %s). The device may be unstable.\n",
wdev->pdata.file_pds); wdev->pdata.file_pds);
goto err1; goto err1;
} }
...@@ -396,7 +396,7 @@ int wfx_probe(struct wfx_dev *wdev) ...@@ -396,7 +396,7 @@ int wfx_probe(struct wfx_dev *wdev)
dev_dbg(wdev->dev, "sending configuration file %s\n", dev_dbg(wdev->dev, "sending configuration file %s\n",
wdev->pdata.file_pds); wdev->pdata.file_pds);
err = wfx_send_pdata_pds(wdev); err = wfx_send_pdata_pds(wdev);
if (err < 0) if (err < 0 && err != -ENOENT)
goto err0; goto err0;
wdev->poll_irq = false; wdev->poll_irq = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment