Merge pull request #2776 from MilhouseVH/linux4170

linux (Generic): update to linux-4.17.2
This commit is contained in:
CvH
2018-06-17 21:53:12 +02:00
committed by GitHub
36 changed files with 29161 additions and 1353 deletions

View File

@@ -264,6 +264,18 @@ kernel_config_path() {
done
}
kernel_make() {
LDFLAGS="" make CROSS_COMPILE=$TARGET_KERNEL_PREFIX \
ARCH="$TARGET_KERNEL_ARCH" \
HOSTCC="$TOOLCHAIN/bin/host-gcc" \
HOSTCXX="$TOOLCHAIN/bin/host-g++" \
HOSTCFLAGS="$HOST_CFLAGS" \
HOSTLDFLAGS="$HOST_LDFLAGS" \
HOSTCXXFLAGS="$HOST_CXXFLAGS" \
DEPMOD="$TOOLCHAIN/bin/depmod" \
"$@"
}
# get kernel module dir
get_module_dir() {
if [ -n "${_CACHED_KERNEL_MODULE_DIR}" ]; then

View File

@@ -47,7 +47,7 @@ pre_make_target() {
}
make_target() {
make SRCDIR=$(kernel_path) untar
kernel_make SRCDIR=$(kernel_path) untar
# copy config file
if [ "$PROJECT" = Generic ]; then
@@ -72,7 +72,7 @@ make_target() {
fi
# add menuconfig to edit .config
make VER=$KERNEL_VER SRCDIR=$(kernel_path)
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path)
}
makeinstall_target() {

View File

@@ -47,7 +47,7 @@ pre_make_target() {
make_target() {
cp -RP $(get_build_dir media_tree)/* $PKG_BUILD/linux
make VER=$KERNEL_VER SRCDIR=$(kernel_path) stagingconfig
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path) stagingconfig
# hack to workaround media_build bug
if [ $LINUX = "amlogic-3.14" -o $LINUX = "amlogic-3.10" ]; then
@@ -56,7 +56,7 @@ make_target() {
sed -e 's/CONFIG_VIDEO_S5C73M3=m/# CONFIG_VIDEO_S5C73M3 is not set/g' -i v4l/.config
fi
make VER=$KERNEL_VER SRCDIR=$(kernel_path)
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path)
}
makeinstall_target() {

View File

@@ -1,24 +1,25 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="RTL8188EU"
PKG_VERSION="c5113ff"
PKG_SHA256="c80bdf4740696eb2b903089efbb913b218c2f71a5c791dc91e43dd578528a440"
PKG_VERSION="277e396"
PKG_SHA256="5a3582ddd259b072d47956070f1df2985045c4005db3871fc152e43bc0f579e8"
PKG_ARCH="any"
PKG_LICENSE="GPL"
# realtek: PKG_SITE="http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PFid=48&Level=5&Conn=4&ProdID=274&DownTypeID=3&GetDown=false&Downloads=true"

View File

@@ -1,24 +1,25 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="RTL8192CU"
PKG_VERSION="8757801"
PKG_SHA256="8738f74fbfb003dd4de77c482d70fca9dacb05ab4eb44147a8046fb4d5531ee7"
PKG_VERSION="756f2ec"
PKG_SHA256="83e0858914dfe1455df9fd824ade8776746b8730143ae3946f7b7f9556fd9365"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/pvaret/rtl8192cu-fixes"

View File

@@ -1,259 +0,0 @@
diff -Naur a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
--- a/os_dep/linux/ioctl_cfg80211.c 2016-06-23 13:32:35.544763290 +0100
+++ b/os_dep/linux/ioctl_cfg80211.c 2016-06-23 13:33:02.888918609 +0100
@@ -57,7 +57,7 @@
}
#define CHAN2G(_channel, _freq, _flags) { \
- .band = IEEE80211_BAND_2GHZ, \
+ .band = NL80211_BAND_2GHZ, \
.center_freq = (_freq), \
.hw_value = (_channel), \
.flags = (_flags), \
@@ -66,7 +66,7 @@
}
#define CHAN5G(_channel, _flags) { \
- .band = IEEE80211_BAND_5GHZ, \
+ .band = NL80211_BAND_5GHZ, \
.center_freq = 5000 + (5 * (_channel)), \
.hw_value = (_channel), \
.flags = (_flags), \
@@ -166,18 +166,18 @@
}
struct ieee80211_supported_band *rtw_spt_band_alloc(
- enum ieee80211_band band
+ enum nl80211_band band
)
{
struct ieee80211_supported_band *spt_band = NULL;
int n_channels, n_bitrates;
- if(band == IEEE80211_BAND_2GHZ)
+ if(band == NL80211_BAND_2GHZ)
{
n_channels = RTW_2G_CHANNELS_NUM;
n_bitrates = RTW_G_RATES_NUM;
}
- else if(band == IEEE80211_BAND_5GHZ)
+ else if(band == NL80211_BAND_5GHZ)
{
n_channels = RTW_5G_CHANNELS_NUM;
n_bitrates = RTW_A_RATES_NUM;
@@ -201,12 +201,12 @@
spt_band->n_channels = n_channels;
spt_band->n_bitrates = n_bitrates;
- if(band == IEEE80211_BAND_2GHZ)
+ if(band == NL80211_BAND_2GHZ)
{
rtw_2g_channels_init(spt_band->channels);
rtw_2g_rates_init(spt_band->bitrates);
}
- else if(band == IEEE80211_BAND_5GHZ)
+ else if(band == NL80211_BAND_5GHZ)
{
rtw_5g_channels_init(spt_band->channels);
rtw_5g_rates_init(spt_band->bitrates);
@@ -226,13 +226,13 @@
if(!spt_band)
return;
- if(spt_band->band == IEEE80211_BAND_2GHZ)
+ if(spt_band->band == NL80211_BAND_2GHZ)
{
size = sizeof(struct ieee80211_supported_band)
+ sizeof(struct ieee80211_channel)*RTW_2G_CHANNELS_NUM
+ sizeof(struct ieee80211_rate)*RTW_G_RATES_NUM;
}
- else if(spt_band->band == IEEE80211_BAND_5GHZ)
+ else if(spt_band->band == NL80211_BAND_5GHZ)
{
size = sizeof(struct ieee80211_supported_band)
+ sizeof(struct ieee80211_channel)*RTW_5G_CHANNELS_NUM
@@ -301,12 +301,12 @@
/* see 802.11 17.3.8.3.2 and Annex J
* there are overlapping channel numbers in 5GHz and 2GHz bands */
- if (band == IEEE80211_BAND_5GHZ) {
+ if (band == NL80211_BAND_5GHZ) {
if (chan >= 182 && chan <= 196)
return 4000 + chan * 5;
else
return 5000 + chan * 5;
- } else { /* IEEE80211_BAND_2GHZ */
+ } else { /* NL80211_BAND_2GHZ */
if (chan == 14)
return 2484;
else if (chan < 14)
@@ -391,9 +391,9 @@
DBG_871X("%s, got sr, but ssid mismatch, to remove this bss\n", __func__);
if (pselect_network->Configuration.DSConfig <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, NL80211_BAND_5GHZ);
notify_channel = ieee80211_get_channel(wiphy, freq);
pselect_bss = cfg80211_get_bss(wiphy, NULL/*notify_channel*/,
@@ -424,9 +424,9 @@
channel = pnetwork->network.Configuration.DSConfig;
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
notify_channel = ieee80211_get_channel(wiphy, freq);
@@ -569,9 +569,9 @@
return _FALSE;
if (pnetwork->Configuration.DSConfig <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, NL80211_BAND_5GHZ);
notify_channel = ieee80211_get_channel(padapter->rtw_wdev->wiphy, freq);
bss = cfg80211_get_bss(padapter->rtw_wdev->wiphy, notify_channel,
@@ -626,9 +626,9 @@
u16 channel = cur_network->network.Configuration.DSConfig;
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
notify_channel = ieee80211_get_channel(wiphy, freq);
#endif
@@ -3097,9 +3097,9 @@
#else /* defined(RTW_USE_CFG80211_STA_EVENT) */
channel = pmlmeext->cur_channel;
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
#ifdef COMPAT_KERNEL_RELEASE
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
@@ -3142,9 +3142,9 @@
#else /* defined(RTW_USE_CFG80211_STA_EVENT) */
channel = pmlmeext->cur_channel;
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
pmgmt_frame = mgmt_buf;
pwlanhdr = (struct rtw_ieee80211_hdr *)pmgmt_frame;
@@ -3950,9 +3950,9 @@
indicate:
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
@@ -3990,9 +3990,9 @@
indicate:
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
@@ -4020,9 +4020,9 @@
DBG_871X("RTW_Rx:category(%u), action(%u)\n", category, action);
if (channel <= RTW_CH_MAX_2G_CHANNEL)
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
else
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
rtw_cfg80211_rx_mgmt(adapter, freq, 0, frame, frame_len, GFP_ATOMIC);
@@ -5199,7 +5199,7 @@
#endif
};
-static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum ieee80211_band band, u8 rf_type)
+static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum nl80211_band band, u8 rf_type)
{
#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
@@ -5223,7 +5223,7 @@
ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
/*
- *hw->wiphy->bands[IEEE80211_BAND_2GHZ]
+ *hw->wiphy->bands[NL80211_BAND_2GHZ]
*base on ant_num
*rx_mask: RX mask
*if rx_ant =1 rx_mask[0]=0xff;==>MCS0-MCS7
@@ -5268,16 +5268,16 @@
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
{
- bands = wiphy->bands[IEEE80211_BAND_2GHZ];
+ bands = wiphy->bands[NL80211_BAND_2GHZ];
if(bands)
- rtw_cfg80211_init_ht_capab(&bands->ht_cap, IEEE80211_BAND_2GHZ, rf_type);
+ rtw_cfg80211_init_ht_capab(&bands->ht_cap, NL80211_BAND_2GHZ, rf_type);
}
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */
{
- bands = wiphy->bands[IEEE80211_BAND_5GHZ];
+ bands = wiphy->bands[NL80211_BAND_5GHZ];
if(bands)
- rtw_cfg80211_init_ht_capab(&bands->ht_cap, IEEE80211_BAND_5GHZ, rf_type);
+ rtw_cfg80211_init_ht_capab(&bands->ht_cap, NL80211_BAND_5GHZ, rf_type);
}
}
@@ -5348,9 +5348,9 @@
wiphy->n_cipher_suites = ARRAY_SIZE(rtw_cipher_suites);
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
- wiphy->bands[IEEE80211_BAND_2GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_2GHZ);
+ wiphy->bands[NL80211_BAND_2GHZ] = rtw_spt_band_alloc(NL80211_BAND_2GHZ);
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */
- wiphy->bands[IEEE80211_BAND_5GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_5GHZ);
+ wiphy->bands[NL80211_BAND_5GHZ] = rtw_spt_band_alloc(NL80211_BAND_5GHZ);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) && LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0))
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS;
@@ -5456,8 +5456,8 @@
pwdev_priv = wdev_to_priv(wdev);
- rtw_spt_band_free(wdev->wiphy->bands[IEEE80211_BAND_2GHZ]);
- rtw_spt_band_free(wdev->wiphy->bands[IEEE80211_BAND_5GHZ]);
+ rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_2GHZ]);
+ rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_5GHZ]);
wiphy_free(wdev->wiphy);

View File

@@ -1,24 +1,25 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="RTL8192DU"
PKG_VERSION="5cb0486"
PKG_SHA256="1506bd7c3e255708aa9fa3cbc103eb26d8b98467647c0b8ed15a45f1281dd070"
PKG_VERSION="a9deaec"
PKG_SHA256="af71aa79c0382f056f2c7091b45a3c2d79b9c2848eb6bb1ffed22b6f0a63cbfd"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/lwfinger/rtl8192du"

View File

@@ -0,0 +1,64 @@
From d295ee29d71a7969047fbe5042cec471408632c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Peron?=
<1859302+clementperon@users.noreply.github.com>
Date: Wed, 6 Jun 2018 17:40:54 +0200
Subject: [PATCH] Change __vfs_read_alt to __vfs_read
For kernel from 4.1 to 4.10 there is no call_read_iter used in new_sync_read.
Why create a new __vfs_read_alt whereas the __vfs_read is exported and seems to do exactly the same.
Remove __vfs_read_alt code and it's dependencies and use the __vfs_read function instead
---
os_dep/osdep_service.c | 32 +-------------------------------
1 file changed, 1 insertion(+), 31 deletions(-)
diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c
index 286096a..9dd3d2b 100644
--- a/os_dep/osdep_service.c
+++ b/os_dep/osdep_service.c
@@ -40,36 +40,6 @@ atomic_t _malloc_cnt = ATOMIC_INIT(0);
atomic_t _malloc_size = ATOMIC_INIT(0);
#endif /* DBG_MEMORY_LEAK */
-
-static ssize_t new_sync_read(struct file *filp, void __user *buf, __kernel_size_t len, loff_t *ppos)
-{
- struct iovec iov;
- struct kiocb kiocb;
- struct iov_iter iter;
- ssize_t ret;
-
- iov.iov_base = buf;
- iov.iov_len = len;
- init_sync_kiocb(&kiocb, filp);
- kiocb.ki_pos = *ppos;
- iov_iter_init(&iter, READ, &iov, 1, len);
-
- ret = call_read_iter(filp, &kiocb, &iter);
- BUG_ON(ret == -EIOCBQUEUED);
- *ppos = kiocb.ki_pos;
- return ret;
-}
-
-static ssize_t __vfs_read_alt(struct file *file, char __user *buf, size_t count,
- loff_t *pos)
-{
- if (file->f_op->read)
- return file->f_op->read(file, buf, count, pos);
- else if (file->f_op->read_iter)
- return new_sync_read(file, (void *)buf, (__kernel_size_t)count, pos);
- else
- return -EINVAL;
-}
/*
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
* @return: one of RTW_STATUS_CODE
@@ -1086,7 +1056,7 @@ static int readFile(struct file *fp,char *buf,int len)
while(sum<len) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
- rlen = __vfs_read_alt(fp, buf+sum, len-sum, &fp->f_pos);
+ rlen = __vfs_read(fp, buf+sum, len-sum, &fp->f_pos);
#else
rlen = fp->f_op->read(fp, buf+sum, len-sum, &fp->f_pos);
#endif

View File

@@ -0,0 +1,27 @@
From 9e477ff7fb1626f188e0d3314799371a5cce8681 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Wed, 13 Jun 2018 18:54:09 +0100
Subject: [PATCH] fix vfs_read with 4.14.y+
---
os_dep/osdep_service.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c
index 9dd3d2b..bd1df96 100644
--- a/os_dep/osdep_service.c
+++ b/os_dep/osdep_service.c
@@ -1055,7 +1055,9 @@ static int readFile(struct file *fp,char *buf,int len)
return -EPERM;
while(sum<len) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
+ rlen = kernel_read(fp, buf+sum, len-sum, &fp->f_pos);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
rlen = __vfs_read(fp, buf+sum, len-sum, &fp->f_pos);
#else
rlen = fp->f_op->read(fp, buf+sum, len-sum, &fp->f_pos);
--
2.14.1

View File

@@ -0,0 +1,25 @@
From fb85a57a5cd6241cc8c066c5efc5b43781b0e42d Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Wed, 13 Jun 2018 06:43:10 +0100
Subject: [PATCH] aarch64/4.4.y: implicit declaration of function
'csum_ipv6_magic'
---
core/rtw_br_ext.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/core/rtw_br_ext.c b/core/rtw_br_ext.c
index da9c5e5..19af0fe 100644
--- a/core/rtw_br_ext.c
+++ b/core/rtw_br_ext.c
@@ -51,6 +51,7 @@
#include <linux/icmpv6.h>
#include <net/ndisc.h>
#include <net/checksum.h>
+#include <net/ip6_checksum.h>
#endif
#endif
--
2.14.1

View File

@@ -0,0 +1,26 @@
diff --git a/include/ieee80211.h b/include/ieee80211.h
index 3c28a0b..2268fbd 100644
--- a/include/ieee80211.h
+++ b/include/ieee80211.h
@@ -969,18 +969,18 @@ enum ieee80211_state {
#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+static __inline int is_multicast_mac_addr(const u8 *addr)
{
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}
-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+static __inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
}
-extern __inline int is_zero_mac_addr(const u8 *addr)
+static __inline int is_zero_mac_addr(const u8 *addr)
{
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));

View File

@@ -1,24 +1,25 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="RTL8192EU"
PKG_VERSION="49a0fb5"
PKG_SHA256="b09e37edd3882e05c7d430914fb3b78b82dad8e54830a69f72c241bc0b18bf46"
PKG_VERSION="77bb7c3"
PKG_SHA256="9cb7e5382edeb4b6323fae40aecfa041aa4ef80233ffaebf2be99fc7900b6a7f"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/Mange/rtl8192eu-linux-driver"

View File

@@ -1,24 +1,25 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="RTL8812AU"
PKG_VERSION="da70677"
PKG_SHA256="2a8950db3314833b32cf7ea2720509d05210ce11daa01d8f19c2ecc70c705fe2"
PKG_VERSION="af07b27"
PKG_SHA256="a2c3c9554ec0a586e879684ba87b08bdbde5cd30231b4794f3a10ef822e461fc"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/paspro/rtl8812au"

View File

@@ -37,7 +37,7 @@ pre_make_target() {
}
make_target() {
make -C "$(kernel_path)" M="$PKG_BUILD/driver"
kernel_make -C "$(kernel_path)" M="$PKG_BUILD/driver"
make FD628Service
}

View File

@@ -1,19 +1,20 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present Team LibreELEC
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
# Downloadlocation:
@@ -36,7 +37,7 @@ PKG_IS_KERNEL_PKG="yes"
make_target() {
cd x86-64
KBUILD_NOPEDANTIC=1 make V=1 CC=$CC -C $(kernel_path) M=`pwd` BINARCH=$TARGET_KERNEL_ARCH
KBUILD_NOPEDANTIC=1 kernel_make V=1 CC=$CC -C $(kernel_path) M=`pwd` BINARCH=$TARGET_KERNEL_ARCH
}
makeinstall_target() {

View File

@@ -0,0 +1,61 @@
From a893fac9b9e883f39a545e8ce87926cecc26ba12 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Sun, 10 Jun 2018 19:13:17 +0100
Subject: [PATCH] add 4.15.y support
Credit: https://github.com/UnitedRPMs/broadcom-wl-dkms/blob/5147b5f1867273e2762f777fd724b6523c3ab8dd/008-linux415.patch
---
x86-64/src/wl/sys/wl_linux.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/x86-64/src/wl/sys/wl_linux.c b/x86-64/src/wl/sys/wl_linux.c
index f7149da..89a3831 100644
--- a/x86-64/src/wl/sys/wl_linux.c
+++ b/x86-64/src/wl/sys/wl_linux.c
@@ -97,7 +97,11 @@ struct iw_statistics *wl_get_wireless_stats(struct net_device *dev);
#include <wlc_wowl.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+static void wl_timer(struct timer_list *tl);
+#else
static void wl_timer(ulong data);
+#endif
static void _wl_timer(wl_timer_t *t);
static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
@@ -2296,10 +2300,17 @@ wl_timer_task(wl_task_t *task)
atomic_dec(&t->wl->callbacks);
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+static void
+wl_timer(struct timer_list *tl)
+{
+ wl_timer_t *t = (wl_timer_t *)tl;
+#else
static void
wl_timer(ulong data)
{
wl_timer_t *t = (wl_timer_t *)data;
+#endif
if (!WL_ALL_PASSIVE_ENAB(t->wl))
_wl_timer(t);
@@ -2351,9 +2362,13 @@ wl_init_timer(wl_info_t *wl, void (*fn)(void *arg), void *arg, const char *tname
bzero(t, sizeof(wl_timer_t));
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+ timer_setup(&t->timer, wl_timer, 0);
+#else
init_timer(&t->timer);
t->timer.data = (ulong) t;
t->timer.function = wl_timer;
+#endif
t->wl = wl;
t->fn = fn;
t->arg = arg;
--
2.14.1

View File

@@ -0,0 +1,177 @@
From 6bc816ae3ef424bc52b2736aeb1eb08ab09f38a9 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Sun, 10 Jun 2018 19:32:39 +0100
Subject: [PATCH] fix kernel warnings
Credit: https://github.com/UnitedRPMs/broadcom-wl-dkms/blob/master/wl-kmod-008_fix_kernel_warnings.patch
---
x86-64/src/wl/sys/wl_cfg80211_hybrid.c | 88 +++++++++++++++++++++++-----------
1 file changed, 60 insertions(+), 28 deletions(-)
diff --git a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c
index 2e8625d..4da9b38 100644
--- a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c
+++ b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c
@@ -1983,7 +1983,7 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
if (dtoh32(bi->length) > WL_BSS_INFO_MAX) {
WL_DBG(("Beacon is larger than buffer. Discarding\n"));
- return err;
+ return -E2BIG;
}
notif_bss_info = kzalloc(sizeof(*notif_bss_info) + sizeof(*mgmt) - sizeof(u8) +
WL_BSS_INFO_MAX, GFP_KERNEL);
@@ -2007,9 +2007,15 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
beacon_proberesp->capab_info = cpu_to_le16(bi->capability);
wl_rst_ie(wl);
- wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);
- wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -
- offsetof(struct wl_cfg80211_bss_info, frame_buf));
+ err = wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);
+ if (err)
+ goto inform_single_bss_out;
+
+ err = wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -
+ offsetof(struct wl_cfg80211_bss_info, frame_buf));
+ if (err)
+ goto inform_single_bss_out;
+
notif_bss_info->frame_len = offsetof(struct ieee80211_mgmt, u.beacon.variable) +
wl_get_ielen(wl);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
@@ -2021,14 +2027,14 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
#endif
if (freq == 0) {
WL_ERR(("Invalid channel, fail to chcnage channel to freq\n"));
- kfree(notif_bss_info);
- return -EINVAL;
+ err = -EINVAL;
+ goto inform_single_bss_out;
}
channel = ieee80211_get_channel(wiphy, freq);
if (unlikely(!channel)) {
WL_ERR(("ieee80211_get_channel error\n"));
- kfree(notif_bss_info);
- return -EINVAL;
+ err = -EINVAL;
+ goto inform_single_bss_out;
}
WL_DBG(("SSID : \"%s\", rssi %d, channel %d, capability : 0x04%x, bssid %pM\n",
@@ -2036,28 +2042,35 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
mgmt->u.beacon.capab_info, &bi->BSSID));
signal = notif_bss_info->rssi * 100;
- cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,
- le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);
- if (unlikely(!cbss)) {
- WL_ERR(("cfg80211_inform_bss_frame error\n"));
- kfree(notif_bss_info);
- return -EINVAL;
+ if (!wl->scan_request) {
+ cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,
+ le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);
+ if (unlikely(!cbss)) {
+ WL_ERR(("cfg80211_inform_bss_frame error\n"));
+ err = -ENOMEM;
+ goto inform_single_bss_out;
+ }
}
-
- notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
- notify_ielen = le32_to_cpu(bi->ie_length);
+ else {
+ notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
+ notify_ielen = le32_to_cpu(bi->ie_length);
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
- cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
- 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
- (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+ cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
+ 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
#else
- cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet),
- 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
- (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+ cbss = cfg80211_inform_bss(wiphy, channel,
+ wl->active_scan ? CFG80211_BSS_FTYPE_PRESP : CFG80211_BSS_FTYPE_BEACON,
+ (const u8 *)(bi->BSSID.octet),
+ 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
#endif
-
- if (unlikely(!cbss))
- return -ENOMEM;
+ if (unlikely(!cbss)) {
+ WL_ERR(("cfg80211_inform_bss error\n"));
+ err = -ENOMEM;
+ goto inform_single_bss_out;
+ }
+ }
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
cfg80211_put_bss(wiphy, cbss);
@@ -2065,6 +2078,7 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
cfg80211_put_bss(cbss);
#endif
+inform_single_bss_out:
kfree(notif_bss_info);
return err;
@@ -2331,6 +2345,9 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)
if (err)
goto update_bss_info_out;
+ bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
+ ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
+
ie = ((u8 *)bi) + bi->ie_offset;
ie_len = bi->ie_length;
} else {
@@ -2343,12 +2360,20 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)
ie_len = bss->len_information_elements;
#endif
wl->conf->channel = *bss->channel;
+ }
+
+ if (bss) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
cfg80211_put_bss(wiphy, bss);
#else
cfg80211_put_bss(bss);
#endif
}
+ else {
+ WL_DBG(("Could not update BSS\n"));
+ err = -EINVAL;
+ goto update_bss_info_out;
+ }
tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
if (tim) {
@@ -2375,10 +2400,17 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
s32 err = 0;
- wl_get_assoc_ies(wl);
+ err = wl_get_assoc_ies(wl);
+ if (err)
+ return err;
+
memcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN);
memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
- wl_update_bss_info(wl);
+
+ err = wl_update_bss_info(wl);
+ if (err)
+ return err;
+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
{
struct cfg80211_roam_info roam_info = {
--
2.14.1

View File

@@ -48,11 +48,11 @@ pre_make_target() {
make_target() {
if [ "$MESON_FAMILY" = "gxm" ] ; then
LDFLAGS="" make -C $(kernel_path) M=$PKG_MIDGARD_BUILD_DIR \
kernel_make -C $(kernel_path) M=$PKG_MIDGARD_BUILD_DIR \
EXTRA_CFLAGS="-DCONFIG_MALI_PLATFORM_DEVICETREE -DCONFIG_MALI_BACKEND=gpu" \
CONFIG_MALI_MIDGARD=m CONFIG_MALI_PLATFORM_DEVICETREE=y CONFIG_MALI_BACKEND=gpu modules
else
LDFLAGS="" make -C $(kernel_path) M=$PKG_UTGARD_BUILD_DIR \
kernel_make -C $(kernel_path) M=$PKG_UTGARD_BUILD_DIR \
EXTRA_CFLAGS="-DCONFIG_MALI450=y" \
CONFIG_MALI400=m CONFIG_MALI450=y
fi
@@ -60,11 +60,11 @@ make_target() {
makeinstall_target() {
if [ "$MESON_FAMILY" = "gxm" ] ; then
LDFLAGS="" make -C $(kernel_path) M=$PKG_MIDGARD_BUILD_DIR \
kernel_make -C $(kernel_path) M=$PKG_MIDGARD_BUILD_DIR \
INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) INSTALL_MOD_STRIP=1 DEPMOD=: \
modules_install
else
LDFLAGS="" make -C $(kernel_path) M=$PKG_UTGARD_BUILD_DIR \
kernel_make -C $(kernel_path) M=$PKG_UTGARD_BUILD_DIR \
INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) INSTALL_MOD_STRIP=1 DEPMOD=: \
modules_install
fi

View File

@@ -35,7 +35,7 @@ pre_make_target() {
}
make_target() {
make KDIR=$(kernel_path)
kernel_make KDIR=$(kernel_path)
}
makeinstall_target() {

View File

@@ -35,7 +35,7 @@ pre_make_target() {
}
make_target() {
make KDIR=$(kernel_path)
kernel_make KDIR=$(kernel_path)
}
makeinstall_target() {

Some files were not shown because too many files have changed in this diff Show More