Skip to content

Commit

Permalink
backports: Remove support for kernel smaller than 4.14
Browse files Browse the repository at this point in the history
This removes all the code which is needed to support kernel 4.13.

Signed-off-by: Hauke Mehrtens <[email protected]>
  • Loading branch information
hauke committed Feb 7, 2024
1 parent 8b8a75a commit bc457bc
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 136 deletions.
1 change: 0 additions & 1 deletion .github/workflows/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ jobs:
strategy:
matrix:
kernel: [
"4.13",
"4.14",
"4.15",
"4.16",
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ down to older kernels. It currently backports the following subsystems:
* WWAN

This package provides the latest Linux kernel subsystem enhancements
for kernels 4.13 and above.
for kernels 4.14 and above.

# Documentation

Expand Down
27 changes: 0 additions & 27 deletions backport/backport-include/linux/netlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,6 @@
#include_next <linux/netlink.h>
#include <linux/version.h>

#if LINUX_VERSION_IS_LESS(4,14,0)
struct nla_bitfield32 {
__u32 value;
__u32 selector;
};
#endif

#ifndef NL_SET_ERR_MSG_ATTR
#define NL_SET_ERR_MSG_ATTR(extack, attr, msg) do { \
static const char __msg[] = msg; \
struct netlink_ext_ack *__extack = (extack); \
\
if (__extack) { \
__extack->_msg = __msg; \
__extack->bad_attr = (attr); \
} \
} while (0)
#endif


#ifndef NL_SET_BAD_ATTR
#define NL_SET_BAD_ATTR(extack, attr) do { \
if ((extack)) \
(extack)->bad_attr = (attr); \
} while (0)
#endif /* NL_SET_BAD_ATTR */

#if LINUX_VERSION_IS_LESS(5,0,0)
static inline void nl_set_extack_cookie_u64(struct netlink_ext_ack *extack,
u64 cookie)
Expand Down
59 changes: 0 additions & 59 deletions backport/backport-include/linux/rbtree.h

This file was deleted.

22 changes: 0 additions & 22 deletions patches/0013-fix-makefile-includes/mt76.patch
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
additional include needed for kernel 4.2, 4.11, 4.12 and 4.13

linux/kthread.h include needed against kernel 4.19.

--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -6,6 +6,7 @@
*/

#include <linux/firmware.h>
+#include <linux/module.h>
#include "mt7615.h"
#include "mcu.h"
#include "mac.h"
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
@@ -2,6 +2,7 @@
/* Copyright (C) 2020 MediaTek Inc. */

#include "mt76_connac_mcu.h"
+#include <linux/module.h>

int mt76_connac_mcu_start_firmware(struct mt76_dev *dev, u32 addr, u32 option)
{
--- a/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c
@@ -9,6 +9,7 @@
Expand Down
24 changes: 1 addition & 23 deletions patches/0013-fix-makefile-includes/wilc1000.patch
Original file line number Diff line number Diff line change
@@ -1,34 +1,12 @@
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 @@
@@ -9,6 +9,7 @@
#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
@@ -8,6 +8,7 @@
#include <linux/spi/spi.h>
#include <linux/crc7.h>
#include <linux/crc-itu-t.h>
+#include <linux/module.h>

#include "netdev.h"
#include "cfg80211.h"
6 changes: 3 additions & 3 deletions patches/0095-spi-delay/wilc1000.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/microchip/wilc1000/spi.c
+++ b/drivers/net/wireless/microchip/wilc1000/spi.c
@@ -219,10 +219,14 @@ static int wilc_spi_tx(struct wilc *wilc
@@ -218,10 +218,14 @@ static int wilc_spi_tx(struct wilc *wilc
struct spi_transfer tr = {
.tx_buf = b,
.len = len,
Expand All @@ -15,7 +15,7 @@
};
char *r_buffer = kzalloc(len, GFP_KERNEL);

@@ -263,10 +267,14 @@ static int wilc_spi_rx(struct wilc *wilc
@@ -262,10 +266,14 @@ static int wilc_spi_rx(struct wilc *wilc
struct spi_transfer tr = {
.rx_buf = rb,
.len = rlen,
Expand All @@ -30,7 +30,7 @@

};
char *t_buffer = kzalloc(rlen, GFP_KERNEL);
@@ -308,10 +316,14 @@ static int wilc_spi_tx_rx(struct wilc *w
@@ -307,10 +315,14 @@ static int wilc_spi_tx_rx(struct wilc *w
.tx_buf = wb,
.len = rlen,
.bits_per_word = 8,
Expand Down

0 comments on commit bc457bc

Please sign in to comment.