From 55f8b72dbf8777dc8e71f593c7306853ceb05385 Mon Sep 17 00:00:00 2001 From: Jookia Date: Mon, 30 Oct 2023 16:46:06 +1100 Subject: [PATCH 1/2] Fix cfg80211_rtw_change_beacon on kernel 6.7 --- os_dep/linux/ioctl_cfg80211.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 87ee7e92..685daf65 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -4979,9 +4979,16 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev, return ret; } +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)) +static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, + struct cfg80211_ap_update *params) +{ + struct cfg80211_beacon_data *info = ¶ms->beacon; +#else static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, struct cfg80211_beacon_data *info) { +#endif int ret = 0; _adapter *adapter = (_adapter *)rtw_netdev_priv(ndev); From 278f5a2e6066789a9ec19897cea2ea37b351f46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Garc=C3=A9s?= Date: Sun, 22 Oct 2023 14:40:19 +0000 Subject: [PATCH 2/2] Added compatibility with backported kernels. Fix GLIBC_2.38 requirement for CI GCC 12 is allready installed. --- .github/workflows/build.yml | 53 +++++++++++++++++------------------ include/osdep_service_linux.h | 3 +- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b2989ab4..03e13d97 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,39 +8,38 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - id: set-matrix - run: | - JSON=$(curl https://www.kernel.org/releases.json) - VERSIONSARRAY=$(echo $JSON | jq -c '[.releases[] | {version: .version, moniker: .moniker} | select(.moniker != "linux-next") | .version]') - echo ::set-output name=matrix::${VERSIONSARRAY} + - id: set-matrix + run: | + JSON=$(curl https://www.kernel.org/releases.json) + VERSIONSARRAY=$(echo $JSON | jq -c '[.releases[] | {version: .version, moniker: .moniker} | select(.moniker != "linux-next") | .version]') + echo ::set-output name=matrix::${VERSIONSARRAY} build: needs: fetchKernelData runs-on: ubuntu-22.04 strategy: fail-fast: false - matrix: + matrix: version: ${{fromJson(needs.fetchKernelData.outputs.matrix)}} #version: [4.9.248, 4.4.248] steps: - - name: download-Kernel - env: - VERSION: ${{matrix.version }} - run: | - KERNEL_URL=https://kernel.ubuntu.com/~kernel-ppa/mainline/ - KERNEL_URL_DETAILS=$(wget --quiet -O - ${KERNEL_URL}v${VERSION}/ | grep -A8 "Build for amd64\|Test amd64") - ALL_DEB=$(echo "$KERNEL_URL_DETAILS" | grep -m1 'all.deb' | cut -d '"' -f 2) - AMD64_DEB=$(echo "$KERNEL_URL_DETAILS" | grep -m1 "amd64.deb" | cut -d '"' -f 2) - [ -z "$ALL_DEB" ] && exit 1 - [ -z "$AMD64_DEB" ] && exit 2 - wget -nv ${KERNEL_URL}v${VERSION}/$AMD64_DEB - wget -nv ${KERNEL_URL}v${VERSION}/$ALL_DEB - sudo dpkg --force-all -i *.deb - echo "KVER=$(echo $ALL_DEB | cut -d '_' -f 2 | rev | cut -c14- | rev)-generic" >> $GITHUB_ENV - - name: Set up GCC - uses: egor-tensin/setup-gcc@v1 - with: - version: 12 - - uses: actions/checkout@v2 - - name: build - run: make KVER=$KVER CONFIG_PLATFORM_I386_PC=y CC=cc + - name: download-Kernel + env: + VERSION: ${{matrix.version }} + run: | + KERNEL_URL=https://kernel.ubuntu.com/~kernel-ppa/mainline/ + KERNEL_URL_DETAILS=$(wget --quiet -O - ${KERNEL_URL}v${VERSION}/ | grep -A8 "Build for amd64\|Test amd64") + ALL_DEB=$(echo "$KERNEL_URL_DETAILS" | grep -m1 'all.deb' | cut -d '"' -f 2) + AMD64_DEB=$(echo "$KERNEL_URL_DETAILS" | grep -m1 "amd64.deb" | cut -d '"' -f 2) + [ -z "$ALL_DEB" ] && exit 1 + [ -z "$AMD64_DEB" ] && exit 2 + wget -nv ${KERNEL_URL}v${VERSION}/$AMD64_DEB + wget -nv ${KERNEL_URL}v${VERSION}/$ALL_DEB + wget -nv http://mirrors.kernel.org/ubuntu/pool/main/g/glibc/libc6_2.38-1ubuntu6_amd64.deb + sudo dpkg --force-all -i *.deb + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12 + echo "KVER=$(echo $ALL_DEB | cut -d '_' -f 2 | rev | cut -c14- | rev)-generic" >> $GITHUB_ENV + - uses: actions/checkout@v2 + - name: build + run: make KVER=$KVER CONFIG_PLATFORM_I386_PC=y CC=cc diff --git a/include/osdep_service_linux.h b/include/osdep_service_linux.h index e1daa04a..b366b205 100644 --- a/include/osdep_service_linux.h +++ b/include/osdep_service_linux.h @@ -225,10 +225,11 @@ typedef void *timer_hdl_context; 3f6cffb8604b537e3d7ea040d7f4368689638eaf adeef3e32146a8d2a73c399dc6f5d76a449131b1 */ -static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr) +static inline void rtw_eth_hw_addr_set(struct net_device *dev, const u8 *addr) { memcpy(dev->dev_addr, addr, ETH_ALEN); } +#define eth_hw_addr_set rtw_eth_hw_addr_set #endif typedef unsigned long systime;