aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2020-08-31 20:22:48 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2020-12-05 21:24:52 +0100
commit57194bc586a7975dc480fd91c339269e4798226f (patch)
tree1bd808d291e25e0d67c2cf49e31a0ff13ec56bec
parentbb5a14e471d54e62defc018f5fe924dfccc4e562 (diff)
downloadbackports-57194bc586a7975dc480fd91c339269e4798226f.tar.gz
backports: Add microchip wilc1000 driver
This driver was newly added to mainline, also add it to backports. The driver needs minimal changes to compile against older kernel versions. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--copy-list1
-rw-r--r--patches/0013-fix-makefile-includes/wilc1000.patch34
-rw-r--r--patches/0095-spi-delay/wilc1000.patch47
3 files changed, 82 insertions, 0 deletions
diff --git a/copy-list b/copy-list
index 6aeb9cc6..8c787e06 100644
--- a/copy-list
+++ b/copy-list
@@ -104,6 +104,7 @@ drivers/net/wireless/intel/
drivers/net/wireless/ralink/
drivers/net/wireless/zydas/
drivers/net/wireless/marvell/
+drivers/net/wireless/microchip/
drivers/net/wireless/intersil/
drivers/net/wireless/quantenna/
drivers/net/wireless/realtek/
diff --git a/patches/0013-fix-makefile-includes/wilc1000.patch b/patches/0013-fix-makefile-includes/wilc1000.patch
new file mode 100644
index 00000000..819a1593
--- /dev/null
+++ b/patches/0013-fix-makefile-includes/wilc1000.patch
@@ -0,0 +1,34 @@
+linux/interrupt.h include needed for kernel 4.14
+linux/module.h include needed for kernel 3.18
+
+--- a/drivers/net/wireless/microchip/wilc1000/netdev.c
++++ b/drivers/net/wireless/microchip/wilc1000/netdev.c
+@@ -9,6 +9,8 @@
+ #include <linux/firmware.h>
+ #include <linux/netdevice.h>
+ #include <linux/inetdevice.h>
++#include <linux/interrupt.h>
++#include <linux/module.h>
+
+ #include "cfg80211.h"
+ #include "wlan_cfg.h"
+--- a/drivers/net/wireless/microchip/wilc1000/sdio.c
++++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
+@@ -10,6 +10,7 @@
+ #include <linux/mmc/host.h>
+ #include <linux/mmc/sdio.h>
+ #include <linux/of_irq.h>
++#include <linux/module.h>
+
+ #include "netdev.h"
+ #include "cfg80211.h"
+--- a/drivers/net/wireless/microchip/wilc1000/spi.c
++++ b/drivers/net/wireless/microchip/wilc1000/spi.c
+@@ -7,6 +7,7 @@
+ #include <linux/clk.h>
+ #include <linux/spi/spi.h>
+ #include <linux/crc7.h>
++#include <linux/module.h>
+
+ #include "netdev.h"
+ #include "cfg80211.h"
diff --git a/patches/0095-spi-delay/wilc1000.patch b/patches/0095-spi-delay/wilc1000.patch
new file mode 100644
index 00000000..6565c432
--- /dev/null
+++ b/patches/0095-spi-delay/wilc1000.patch
@@ -0,0 +1,47 @@
+--- a/drivers/net/wireless/microchip/wilc1000/spi.c
++++ b/drivers/net/wireless/microchip/wilc1000/spi.c
+@@ -160,10 +160,14 @@ static int wilc_spi_tx(struct wilc *wilc
+ struct spi_transfer tr = {
+ .tx_buf = b,
+ .len = len,
++#if LINUX_VERSION_IS_GEQ(5,5,0)
+ .delay = {
+ .value = 0,
+ .unit = SPI_DELAY_UNIT_USECS
+ },
++#else
++ .delay_usecs = 0,
++#endif /* >= 5.5 */
+ };
+ char *r_buffer = kzalloc(len, GFP_KERNEL);
+
+@@ -204,10 +208,14 @@ static int wilc_spi_rx(struct wilc *wilc
+ struct spi_transfer tr = {
+ .rx_buf = rb,
+ .len = rlen,
++#if LINUX_VERSION_IS_GEQ(5,5,0)
+ .delay = {
+ .value = 0,
+ .unit = SPI_DELAY_UNIT_USECS
+ },
++#else
++ .delay_usecs = 0,
++#endif /* >= 5.5 */
+
+ };
+ char *t_buffer = kzalloc(rlen, GFP_KERNEL);
+@@ -249,10 +257,14 @@ static int wilc_spi_tx_rx(struct wilc *w
+ .tx_buf = wb,
+ .len = rlen,
+ .bits_per_word = 8,
++#if LINUX_VERSION_IS_GEQ(5,5,0)
+ .delay = {
+ .value = 0,
+ .unit = SPI_DELAY_UNIT_USECS
+ },
++#else
++ .delay_usecs = 0,
++#endif /* >= 5.5 */
+
+ };
+