From 1359a9d28e4c6c124d8c796592add25f80c867be Mon Sep 17 00:00:00 2001 From: Pete A Date: Sat, 18 Feb 2023 23:04:50 +0000 Subject: [PATCH 01/34] Fix some accidental changes in last commit --- os_dep/linux/ioctl_cfg80211.c | 37 +++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index d0adee77..31ef8c2a 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -2683,19 +2683,28 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy } #ifdef CONFIG_P2P -if (pwdinfo->driver_interface == DRIVER_CFG80211) { - if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) { - rtw_p2p_set_state(pwdinfo, rtw_p2p_pre_state(pwdinfo)); - - #if RTW_P2P_GROUP_INTERFACE - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) - if (pwdev->iftype != NL80211_IFTYPE_P2P_CLIENT) - #endif - #endif - rtw_p2p_set_role(pwdinfo, P2P_ROLE_DEVICE); - - RTW_INFO("%s, role=%d, p2p_state=%d, pre_p2p_state=%d\n", __func__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo), rtw_p2p_pre_state(pwdinfo)); - } + if (pwdinfo->driver_interface == DRIVER_CFG80211) { + if (ssids->ssid != NULL + && _rtw_memcmp(ssids->ssid, "DIRECT-", 7) + && rtw_get_p2p_ie((u8 *)request->ie, request->ie_len, NULL, NULL) + ) { + if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) + rtw_p2p_enable(padapter, P2P_ROLE_DEVICE); + else { + rtw_p2p_set_pre_state(pwdinfo, rtw_p2p_state(pwdinfo)); + #ifdef CONFIG_DEBUG_CFG80211 + RTW_INFO("%s, role=%d, p2p_state=%d\n", __func__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo)); + #endif + } + rtw_p2p_set_state(pwdinfo, P2P_STATE_LISTEN); + + if (request->n_channels == 3 && + request->channels[0]->hw_value == 1 && + request->channels[1]->hw_value == 6 && + request->channels[2]->hw_value == 11 + ) + social_channel = 1; + } } #endif /*CONFIG_P2P*/ @@ -7811,6 +7820,8 @@ static struct cfg80211_ops rtw_cfg80211_ops = { .flush_pmksa = cfg80211_rtw_flush_pmksa, #ifdef CONFIG_AP_MODE + .add_virtual_intf = cfg80211_rtw_add_virtual_intf, + .del_virtual_intf = cfg80211_rtw_del_virtual_intf, #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)) && !defined(COMPAT_KERNEL_RELEASE) .add_beacon = cfg80211_rtw_add_beacon, .set_beacon = cfg80211_rtw_set_beacon, From 7b8b6b6c443ab7e2a8d3d626e2adfbf7494e7d8b Mon Sep 17 00:00:00 2001 From: Raphael Scholle Date: Mon, 20 Feb 2023 18:14:38 +0100 Subject: [PATCH 02/34] Revert "Merge branch 'svpcom:v5.2.20' into v5.2.20" This reverts commit 321c700f16807b444f44da5541346aa25b6823ab, reversing changes made to c96ed14f4454bc01253fb764c4794cb7d2e415d3. --- hal/rtl8812a/usb/rtl8812au_xmit.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/hal/rtl8812a/usb/rtl8812au_xmit.c b/hal/rtl8812a/usb/rtl8812au_xmit.c index a6148227..aa86d06a 100644 --- a/hal/rtl8812a/usb/rtl8812au_xmit.c +++ b/hal/rtl8812a/usb/rtl8812au_xmit.c @@ -112,24 +112,15 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba SET_TX_DESC_QUEUE_SEL_8812(ptxdesc, pattrib->qsel); /* offset 12 */ - // Not injected - if(pattrib->inject != 0xa5) - { - if (!pattrib->qos_en) { - SET_TX_DESC_HWSEQ_EN_8812(ptxdesc, 1); /* Hw set sequence number */ - } else { - SET_TX_DESC_SEQ_8812(ptxdesc, pattrib->seqnum); - } - } + + if (!pattrib->qos_en) { + SET_TX_DESC_HWSEQ_EN_8812(ptxdesc, 1); /* Hw set sequence number */ + } else + SET_TX_DESC_SEQ_8812(ptxdesc, pattrib->seqnum); /* injected frame */ if(pattrib->inject == 0xa5) { - /* Prevent sequence number from being overwritten */ - SET_TX_DESC_HWSEQ_EN_8812(ptxdesc, 0); /* Hw do not set sequence number */ - SET_TX_DESC_SEQ_8812(ptxdesc, pattrib->seqnum); /* Copy inject sequence number to TxDesc */ - SET_TX_DESC_RETRY_LIMIT_ENABLE_8812(ptxdesc, 1); - if (pattrib->retry_ctrl == _TRUE) { SET_TX_DESC_DATA_RETRY_LIMIT_8812(ptxdesc, 6); } else { @@ -328,7 +319,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz , u8 ba if (pattrib->retry_ctrl == _TRUE) SET_TX_DESC_DATA_RETRY_LIMIT_8812(ptxdesc, 6); else - SET_TX_DESC_DATA_RETRY_LIMIT_8812(ptxdesc, 0); + SET_TX_DESC_DATA_RETRY_LIMIT_8812(ptxdesc, 12); } #ifdef CONFIG_XMIT_ACK @@ -416,9 +407,7 @@ s32 rtl8812au_xmit_buf_handler(PADAPTER padapter) break; /* only XMITBUF_DATA & XMITBUF_MGNT */ - pxmitframe = (struct xmit_frame *) pxmitbuf->priv_data; rtw_write_port_and_wait(padapter, pxmitbuf->ff_hwaddr, pxmitbuf->len, (unsigned char *)pxmitbuf, 500); - rtw_free_xmitframe(pxmitpriv, pxmitframe); } while (1); #ifdef CONFIG_LPS_LCLK @@ -453,7 +442,7 @@ u32 upload_txpktbuf_8812au(_adapter *adapter, u8 *buf, u32 buflen) } rtw_write32(adapter, REG_PKTBUF_DBG_CTRL, 0xff800000+(beacon_head<<6) + qw_addr); loop_cnt = 0; - while ((rtw_read32(adapter, REG_PKTBUF_DBG_CTRL) & BIT23) != _FALSE) { + while ((rtw_read32(adapter, REG_PKTBUF_DBG_CTRL) & BIT23) == false) { rtw_udelay_os(10); if (loop_cnt++ == 100) return _FALSE; From 2423eaa410cd68ac7b1defe3d7d7d073e322d482 Mon Sep 17 00:00:00 2001 From: consti10 Date: Sun, 26 Feb 2023 17:14:52 +0100 Subject: [PATCH 03/34] add clion to .gitignore path --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0971eb15..0b1c4653 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ modules.order *.mod.c .tmp_versions .cache.mk +.idea From 4e0640466d49e4d27a4b465c5042bc0dffb04eb5 Mon Sep 17 00:00:00 2001 From: consti10 Date: Sun, 26 Feb 2023 17:16:36 +0100 Subject: [PATCH 04/34] reduce default log level back to 3 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 21003ffc..d0cbc3e0 100755 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ CONFIG_USB2_EXTERNAL_POWER = y CONFIG_RTW_DEBUG = y # default log level is _DRV_INFO_ = 4, # please refer to "How_to_set_driver_debug_log_level.doc" to set the available level. -CONFIG_RTW_LOG_LEVEL = 4 #Consti10 3==DRV_WARNING +CONFIG_RTW_LOG_LEVEL = 3 #Consti10 3==DRV_WARNING ######################## Wake On Lan ########################## CONFIG_WOWLAN = n CONFIG_WAKEUP_TYPE = 0x7 #bit2: deauth, bit1: unicast, bit0: magic pkt. From b81ac703347c2174fd6e2f484416feecb341c0ea Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:22:51 +0100 Subject: [PATCH 05/34] initial tests --- .github/workflows/autocompiler.yml | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/autocompiler.yml diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml new file mode 100644 index 00000000..7acf5c99 --- /dev/null +++ b/.github/workflows/autocompiler.yml @@ -0,0 +1,45 @@ +name: autoinstaller + +on: [push] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build: + runs-on: ubuntu-latest + env: + CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: create installer + run: | + ls -a + fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C /opt/rtl8812au -p rtl8812au-autocompiler.deb + ls -a + + + - name: Upload to Github + uses: 'actions/upload-artifact@v2' + with: + name: "rtl8812au-autocompiler" + path: | + rtl8812au/*.deb + + - name: Push + id: push + uses: cloudsmith-io/action@master + with: + api-key: ${{ secrets.CLOUDSMITH_API_KEY }} + command: "push" + format: "deb" + owner: "openhd" + repo: "openhd-2-3-evo" + distro: "any-distro" + release: "any-version" + republish: "true" # needed ONLY if version is not changing + file: "rtl8812au/*.deb" \ No newline at end of file From 94a5716b687b4fad3b37fda74ff6d037ba1a6230 Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:24:30 +0100 Subject: [PATCH 06/34] Update autocompiler.yml --- .github/workflows/autocompiler.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index 7acf5c99..1788a4d2 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -16,6 +16,11 @@ jobs: with: submodules: recursive + - name: install dependencies + run: | + apt install -y ruby-dev + gem install fpm + - name: create installer run: | ls -a From 48bfab8eddeed8173ce36fa03fcec12db788f944 Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:25:23 +0100 Subject: [PATCH 07/34] add sudo --- .github/workflows/autocompiler.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index 1788a4d2..c150fcd2 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -18,9 +18,9 @@ jobs: - name: install dependencies run: | - apt install -y ruby-dev - gem install fpm - + sudo apt install -y ruby-dev + sudo gem install fpm + - name: create installer run: | ls -a From c15aca5d03552fda92446317272d1b31df222c0e Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:26:52 +0100 Subject: [PATCH 08/34] try it this way (current dir) --- .github/workflows/autocompiler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index c150fcd2..3c58a187 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -24,7 +24,7 @@ jobs: - name: create installer run: | ls -a - fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C /opt/rtl8812au -p rtl8812au-autocompiler.deb + fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C . -p rtl8812au-autocompiler.deb ls -a From 9b48ac7d056c60f612c65b17dae70445e308a664 Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:42:27 +0100 Subject: [PATCH 09/34] create install service --- .github/workflows/autocompiler.yml | 11 +++++++---- .../etc/systemd/system/rtl8812auEasyCompile.service | 13 +++++++++++++ .../etc/usr/local/bin/rtl8812auEasyCompile.sh | 7 +++++++ 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 packagedir/etc/systemd/system/rtl8812auEasyCompile.service create mode 100644 packagedir/etc/usr/local/bin/rtl8812auEasyCompile.sh diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index 3c58a187..1aa67937 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -23,8 +23,11 @@ jobs: - name: create installer run: | - ls -a - fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C . -p rtl8812au-autocompiler.deb + mkdir ../temp + mv * ../temp + mkdir packagedir + mv ../temp/* packagedir + fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C packagedir -p rtl8812au-autocompiler.deb ls -a @@ -33,7 +36,7 @@ jobs: with: name: "rtl8812au-autocompiler" path: | - rtl8812au/*.deb + *.deb - name: Push id: push @@ -47,4 +50,4 @@ jobs: distro: "any-distro" release: "any-version" republish: "true" # needed ONLY if version is not changing - file: "rtl8812au/*.deb" \ No newline at end of file + file: "*.deb" \ No newline at end of file diff --git a/packagedir/etc/systemd/system/rtl8812auEasyCompile.service b/packagedir/etc/systemd/system/rtl8812auEasyCompile.service new file mode 100644 index 00000000..0847751b --- /dev/null +++ b/packagedir/etc/systemd/system/rtl8812auEasyCompile.service @@ -0,0 +1,13 @@ +[Unit] +Description=rtl8812au Compiler +After=multi-user.target + +[Service] +Type=simple +ExecStart=/usr/local/bin/rtl8812auEasyCompile.sh +User=root + + +[Install] +WantedBy=multi-user.target + diff --git a/packagedir/etc/usr/local/bin/rtl8812auEasyCompile.sh b/packagedir/etc/usr/local/bin/rtl8812auEasyCompile.sh new file mode 100644 index 00000000..7f619678 --- /dev/null +++ b/packagedir/etc/usr/local/bin/rtl8812auEasyCompile.sh @@ -0,0 +1,7 @@ +echo "We're now compiling the rtl8812au driver into your stock kernel" +sudo apt install dkms +./opt/rtl8812au/dkms-install.sh +systemctl disable rtl8812auEasyCompile +sudo rm -Rf /etc/systemd/system/rtl8812auEasyCompile.service +sudo rm -Rf /usr/local/bin/rtl8812auEasyCompile.sh +echo "cleanup done" \ No newline at end of file From 51e952548b310f63d5858b44509ba91ba196730e Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:50:51 +0100 Subject: [PATCH 10/34] Update autocompiler.yml --- .github/workflows/autocompiler.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index 1aa67937..4e4bded7 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -25,9 +25,11 @@ jobs: run: | mkdir ../temp mv * ../temp - mkdir packagedir - mv ../temp/* packagedir - fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C packagedir -p rtl8812au-autocompiler.deb + mkdir -p packagedir/opt/rtl8812au/ + mv ../temp/* packagedir/opt/rtl8812au + + + fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb ls -a From e31c581ed45ed820066d8ddbb67a18d0a2059ffb Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:55:39 +0100 Subject: [PATCH 11/34] package correctly --- .github/workflows/autocompiler.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index 4e4bded7..31da039a 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -24,11 +24,12 @@ jobs: - name: create installer run: | mkdir ../temp + mkdir ../tmp2 + mv packagedir/* ../tmp2 + rm -Rf packagedir mv * ../temp mkdir -p packagedir/opt/rtl8812au/ mv ../temp/* packagedir/opt/rtl8812au - - fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb ls -a From eb61c26e1c2703cebbb6962d6bb482d5b32f8c87 Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:59:45 +0100 Subject: [PATCH 12/34] add service --- .github/workflows/autocompiler.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index 31da039a..4efef013 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -30,6 +30,7 @@ jobs: mv * ../temp mkdir -p packagedir/opt/rtl8812au/ mv ../temp/* packagedir/opt/rtl8812au + mv ../temp2/* packagedir/opt/rtl8812au fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb ls -a From c9e73db0bb05f3f09a9fa2ff786351588aa6a38d Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 01:01:15 +0100 Subject: [PATCH 13/34] correct typo --- .github/workflows/autocompiler.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index 4efef013..bc8cac31 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -24,8 +24,8 @@ jobs: - name: create installer run: | mkdir ../temp - mkdir ../tmp2 - mv packagedir/* ../tmp2 + mkdir ../temp2 + mv packagedir/* ../temp2 rm -Rf packagedir mv * ../temp mkdir -p packagedir/opt/rtl8812au/ From 8ecb89a01c811165e8e5149c036eeba8acaa080b Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 01:04:42 +0100 Subject: [PATCH 14/34] fix path --- .github/workflows/autocompiler.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index bc8cac31..c931167e 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -25,12 +25,12 @@ jobs: run: | mkdir ../temp mkdir ../temp2 - mv packagedir/* ../temp2 + cp -r packagedir/* ../temp2 rm -Rf packagedir mv * ../temp mkdir -p packagedir/opt/rtl8812au/ mv ../temp/* packagedir/opt/rtl8812au - mv ../temp2/* packagedir/opt/rtl8812au + mv ../temp2/* packagedir/ fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb ls -a From cf00150e2609212dbb56b82212941418eac2cd60 Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 01:11:01 +0100 Subject: [PATCH 15/34] enable service --- .github/workflows/autocompiler.yml | 2 +- after-install.sh | 3 +++ packagedir/{etc => }/usr/local/bin/rtl8812auEasyCompile.sh | 0 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 after-install.sh rename packagedir/{etc => }/usr/local/bin/rtl8812auEasyCompile.sh (100%) diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index c931167e..1312053b 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -31,7 +31,7 @@ jobs: mkdir -p packagedir/opt/rtl8812au/ mv ../temp/* packagedir/opt/rtl8812au mv ../temp2/* packagedir/ - fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb + fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb --after-install after-install.sh ls -a diff --git a/after-install.sh b/after-install.sh new file mode 100644 index 00000000..2268cc74 --- /dev/null +++ b/after-install.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +systemctl enable rtl8812auEasyCompile \ No newline at end of file diff --git a/packagedir/etc/usr/local/bin/rtl8812auEasyCompile.sh b/packagedir/usr/local/bin/rtl8812auEasyCompile.sh similarity index 100% rename from packagedir/etc/usr/local/bin/rtl8812auEasyCompile.sh rename to packagedir/usr/local/bin/rtl8812auEasyCompile.sh From 7620e4aa6ba58d5aa49d82ebecb0314a63479758 Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 02:12:30 +0100 Subject: [PATCH 16/34] repair path --- .github/workflows/autocompiler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index 1312053b..26823108 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -31,7 +31,7 @@ jobs: mkdir -p packagedir/opt/rtl8812au/ mv ../temp/* packagedir/opt/rtl8812au mv ../temp2/* packagedir/ - fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb --after-install after-install.sh + fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb --after-install packagedir/opt/rtl8812au/after-install.sh ls -a From c26125f4e4ac25373d0175b89173d18dc166da48 Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 02:20:15 +0100 Subject: [PATCH 17/34] add shebang line --- packagedir/usr/local/bin/rtl8812auEasyCompile.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packagedir/usr/local/bin/rtl8812auEasyCompile.sh b/packagedir/usr/local/bin/rtl8812auEasyCompile.sh index 7f619678..8b23166b 100644 --- a/packagedir/usr/local/bin/rtl8812auEasyCompile.sh +++ b/packagedir/usr/local/bin/rtl8812auEasyCompile.sh @@ -1,5 +1,6 @@ +#!/bin/bash echo "We're now compiling the rtl8812au driver into your stock kernel" -sudo apt install dkms +sudo apt install -y dkms ./opt/rtl8812au/dkms-install.sh systemctl disable rtl8812auEasyCompile sudo rm -Rf /etc/systemd/system/rtl8812auEasyCompile.service From 0f4f8dd287fd5a9d08ee35fedaf15cf346f56bed Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 02:33:23 +0100 Subject: [PATCH 18/34] make script executable --- after-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/after-install.sh b/after-install.sh index 2268cc74..65d9cb56 100644 --- a/after-install.sh +++ b/after-install.sh @@ -1,3 +1,4 @@ #!/usr/bin/env bash -systemctl enable rtl8812auEasyCompile \ No newline at end of file +systemctl enable rtl8812auEasyCompile +chmod +x /usr/local/bin/rtl8812auEasyCompile.sh \ No newline at end of file From c32ff814b56e4f3b98aafd9ce3a540a942cdd5b7 Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 4 Mar 2023 02:39:49 +0100 Subject: [PATCH 19/34] add install log --- packagedir/usr/local/bin/rtl8812auEasyCompile.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packagedir/usr/local/bin/rtl8812auEasyCompile.sh b/packagedir/usr/local/bin/rtl8812auEasyCompile.sh index 8b23166b..fd1f8f9e 100644 --- a/packagedir/usr/local/bin/rtl8812auEasyCompile.sh +++ b/packagedir/usr/local/bin/rtl8812auEasyCompile.sh @@ -1,7 +1,7 @@ #!/bin/bash echo "We're now compiling the rtl8812au driver into your stock kernel" sudo apt install -y dkms -./opt/rtl8812au/dkms-install.sh +sudo ./opt/rtl8812au/dkms-install.sh > /opt/installrtl.log systemctl disable rtl8812auEasyCompile sudo rm -Rf /etc/systemd/system/rtl8812auEasyCompile.service sudo rm -Rf /usr/local/bin/rtl8812auEasyCompile.sh From 244580d800d83db267db612f1ea39b65fbc51202 Mon Sep 17 00:00:00 2001 From: consti10 Date: Wed, 29 Mar 2023 02:06:47 +0200 Subject: [PATCH 20/34] log whenever driver is successfully called with a channel change using RTW_WARN --- os_dep/linux/ioctl_cfg80211.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 2eae8a14..79c0e10a 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -5055,6 +5055,10 @@ static int cfg80211_rtw_set_channel(struct wiphy *wiphy RTW_INFO(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d\n" , FUNC_ADPT_ARG(padapter), chan_target, chan_width, chan_offset); + if(true){ + RTW_WARN(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d OpenHD\n" + , FUNC_ADPT_ARG(padapter), chan_target, chan_width, chan_offset); + } rtw_set_chbw_cmd(padapter, chan_target, chan_width, chan_offset, RTW_CMDF_WAIT_ACK); @@ -5155,6 +5159,10 @@ static int cfg80211_rtw_set_monitor_channel(struct wiphy *wiphy RTW_INFO(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d\n" , FUNC_ADPT_ARG(padapter), target_channal, target_width, target_offset); + if(true){ + RTW_INFO(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d OpenHD\n" + , FUNC_ADPT_ARG(padapter), target_channal, target_width, target_offset); + } rtw_set_chbw_cmd(padapter, target_channal, target_width, target_offset, RTW_CMDF_WAIT_ACK); return 0; From 95fc8cb3d9e2b1b5fb473bc0595660c13e423501 Mon Sep 17 00:00:00 2001 From: consti10 Date: Sat, 1 Apr 2023 14:14:39 +0200 Subject: [PATCH 21/34] add OpenHD channels debug --- core/rtw_cmd.c | 6 +++++- os_dep/linux/ioctl_cfg80211.c | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 5c337b2d..5d7be4a6 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -1496,7 +1496,7 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork) #endif /* CONFIG_80211N_HT */ #ifdef CONFIG_RTW_80211R - /*IEEE802.11-2012 Std. Table 8-101¡XAKM suite selectors*/ + /*IEEE802.11-2012 Std. Table 8-101�XAKM suite selectors*/ if ((rtw_chk_ft_flags(padapter, RTW_FT_STA_SUPPORTED)) && ((psecuritypriv->rsn_akm_suite_type == 3) || (psecuritypriv->rsn_akm_suite_type == 4)) ) { @@ -2103,6 +2103,10 @@ u8 rtw_set_chbw_cmd(_adapter *padapter, u8 ch, u8 bw, u8 ch_offset, u8 flags) RTW_INFO(FUNC_NDEV_FMT" ch:%u, bw:%u, ch_offset:%u\n", FUNC_NDEV_ARG(padapter->pnetdev), ch, bw, ch_offset); + if(true){ + RTW_WARN(FUNC_NDEV_FMT" ch:%u, bw:%u, ch_offset:%uOpenHD channel debug\n", + FUNC_NDEV_ARG(padapter->pnetdev), ch, bw, ch_offset); + } /* check input parameter */ diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 79c0e10a..2bcceacc 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -5007,6 +5007,9 @@ struct cfg80211_chan_def *chandef){ chandef->center_freq1 = center_freq; chandef->center_freq2 = center_freq2; //RTW_INFO("%s : channel %d width %d freq1 %d freq2 %d center_freq %d offset %d\n", __func__, channel, width, chandef->center_freq1, chandef->center_freq2, chandef->chan->center_freq,rtw_get_oper_choffset(padapter)); + if(true){ + RTW_WARN("OpenHD channel debug: %s : channel %d width %d freq1 %d freq2 %d center_freq %d offset %d\n", __func__, channel, width, chandef->center_freq1, chandef->center_freq2, chandef->chan->center_freq,rtw_get_oper_choffset(padapter)); + } } else { return -EINVAL; } @@ -5056,7 +5059,7 @@ static int cfg80211_rtw_set_channel(struct wiphy *wiphy RTW_INFO(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d\n" , FUNC_ADPT_ARG(padapter), chan_target, chan_width, chan_offset); if(true){ - RTW_WARN(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d OpenHD\n" + RTW_WARN(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d OpenHD channel debug\n" , FUNC_ADPT_ARG(padapter), chan_target, chan_width, chan_offset); } @@ -5160,7 +5163,7 @@ static int cfg80211_rtw_set_monitor_channel(struct wiphy *wiphy , FUNC_ADPT_ARG(padapter), target_channal, target_width, target_offset); if(true){ - RTW_INFO(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d OpenHD\n" + RTW_INFO(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d OpenHD channel debug\n" , FUNC_ADPT_ARG(padapter), target_channal, target_width, target_offset); } rtw_set_chbw_cmd(padapter, target_channal, target_width, target_offset, RTW_CMDF_WAIT_ACK); From 0a819be0276bc6620127c43d70b6439cfdfeda2a Mon Sep 17 00:00:00 2001 From: consti10 Date: Sat, 1 Apr 2023 15:00:54 +0200 Subject: [PATCH 22/34] add OpenHD channels debug --- core/rtw_mlme_ext.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index c6abf49f..4fd8df1c 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -3317,6 +3317,10 @@ unsigned int on_action_spct_ch_switch(_adapter *padapter, struct sta_info *psta, RTW_INFO(FUNC_NDEV_FMT" from "MAC_FMT"\n", FUNC_NDEV_ARG(padapter->pnetdev), MAC_ARG(psta->cmn.mac_addr)); + if(true){ + RTW_WARN(FUNC_NDEV_FMT" from "MAC_FMT"OpenHD channel debug\n", + FUNC_NDEV_ARG(padapter->pnetdev), MAC_ARG(psta->cmn.mac_addr)); + } for_each_ie(ie, ies, ies_len) { if (ie->id == WLAN_EID_CHANNEL_SWITCH) { From 2d61ea55098d99e469c963207a478c82be44d3cc Mon Sep 17 00:00:00 2001 From: consti10 Date: Sat, 1 Apr 2023 15:21:43 +0200 Subject: [PATCH 23/34] add OpenHD channels debug --- os_dep/linux/ioctl_cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 2bcceacc..a1a36264 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -5163,7 +5163,7 @@ static int cfg80211_rtw_set_monitor_channel(struct wiphy *wiphy , FUNC_ADPT_ARG(padapter), target_channal, target_width, target_offset); if(true){ - RTW_INFO(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d OpenHD channel debug\n" + RTW_WARN(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d OpenHD channel debug\n" , FUNC_ADPT_ARG(padapter), target_channal, target_width, target_offset); } rtw_set_chbw_cmd(padapter, target_channal, target_width, target_offset, RTW_CMDF_WAIT_ACK); From 66d85132d8060a1d78df999df3935f7b0798e64d Mon Sep 17 00:00:00 2001 From: consti10 Date: Sat, 1 Apr 2023 17:36:15 +0200 Subject: [PATCH 24/34] document --- os_dep/linux/ioctl_cfg80211.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index a1a36264..df77f1e0 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -5007,6 +5007,7 @@ struct cfg80211_chan_def *chandef){ chandef->center_freq1 = center_freq; chandef->center_freq2 = center_freq2; //RTW_INFO("%s : channel %d width %d freq1 %d freq2 %d center_freq %d offset %d\n", __func__, channel, width, chandef->center_freq1, chandef->center_freq2, chandef->chan->center_freq,rtw_get_oper_choffset(padapter)); + // Consti10: this method seems to be used if(true){ RTW_WARN("OpenHD channel debug: %s : channel %d width %d freq1 %d freq2 %d center_freq %d offset %d\n", __func__, channel, width, chandef->center_freq1, chandef->center_freq2, chandef->chan->center_freq,rtw_get_oper_choffset(padapter)); } @@ -5017,6 +5018,7 @@ struct cfg80211_chan_def *chandef){ } +// Consti10: In monitor mode, this method seems to be not used (set_monitor_channel is used instead) static int cfg80211_rtw_set_channel(struct wiphy *wiphy #if (CFG80211_API_LEVEL >= KERNEL_VERSION(2, 6, 35)) , struct net_device *ndev @@ -5068,6 +5070,7 @@ static int cfg80211_rtw_set_channel(struct wiphy *wiphy return 0; } +// Consti10: In monitor mode, this method is used the set the channel freq, at least on ubuntu 5.19.X static int cfg80211_rtw_set_monitor_channel(struct wiphy *wiphy #if (CFG80211_API_LEVEL >= KERNEL_VERSION(3, 8, 0)) , struct cfg80211_chan_def *chandef From 2e675be9c2293d25bbf16e730cedfd4f9a039292 Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Mon, 3 Apr 2023 21:59:08 +0200 Subject: [PATCH 25/34] Update autocompiler.yml --- .github/workflows/autocompiler.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index 26823108..e02cca92 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -31,7 +31,7 @@ jobs: mkdir -p packagedir/opt/rtl8812au/ mv ../temp/* packagedir/opt/rtl8812au mv ../temp2/* packagedir/ - fpm -a armhf -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb --after-install packagedir/opt/rtl8812au/after-install.sh + fpm -a arm64 -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb --after-install packagedir/opt/rtl8812au/after-install.sh ls -a @@ -54,4 +54,4 @@ jobs: distro: "any-distro" release: "any-version" republish: "true" # needed ONLY if version is not changing - file: "*.deb" \ No newline at end of file + file: "*.deb" From 58c1300f6c85360bc87e8bdcbc901c9caf6709b1 Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Tue, 11 Apr 2023 23:36:53 +0200 Subject: [PATCH 26/34] ignore misleading-indentation needed for newer kernels --- .github/workflows/autocompiler.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index e02cca92..448ca3b3 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -31,7 +31,7 @@ jobs: mkdir -p packagedir/opt/rtl8812au/ mv ../temp/* packagedir/opt/rtl8812au mv ../temp2/* packagedir/ - fpm -a arm64 -s dir -t deb -n rtl8812au-autocompiler -v 2.3-evo-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb --after-install packagedir/opt/rtl8812au/after-install.sh + fpm -a arm64 -s dir -t deb -n rtl8812au-autocompiler -v 2.3.4-evo-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb --after-install packagedir/opt/rtl8812au/after-install.sh ls -a diff --git a/Makefile b/Makefile index d0cbc3e0..bbd0723f 100755 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ EXTRA_CFLAGS += -Wno-unused-function EXTRA_CFLAGS += -Wno-unused EXTRA_CFLAGS += -Wno-cast-function-type EXTRA_CFLAGS += -Wno-date-time -#EXTRA_CFLAGS += -Wno-misleading-indentation +EXTRA_CFLAGS += -Wno-misleading-indentation EXTRA_CFLAGS += -Wno-uninitialized # Relax some warnings from '-Wextra' so we won't get flooded with warnings EXTRA_CFLAGS += -Wno-sign-compare From f3f4947bbf2be1c64ca6d4bd07ae4ddcd25b83ee Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Tue, 11 Apr 2023 23:46:05 +0200 Subject: [PATCH 27/34] Update rtl8812auEasyCompile.sh --- packagedir/usr/local/bin/rtl8812auEasyCompile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packagedir/usr/local/bin/rtl8812auEasyCompile.sh b/packagedir/usr/local/bin/rtl8812auEasyCompile.sh index fd1f8f9e..2f82f149 100644 --- a/packagedir/usr/local/bin/rtl8812auEasyCompile.sh +++ b/packagedir/usr/local/bin/rtl8812auEasyCompile.sh @@ -1,8 +1,8 @@ #!/bin/bash echo "We're now compiling the rtl8812au driver into your stock kernel" sudo apt install -y dkms -sudo ./opt/rtl8812au/dkms-install.sh > /opt/installrtl.log +sudo /opt/rtl8812au/dkms-install.sh > /opt/installrtl.log systemctl disable rtl8812auEasyCompile sudo rm -Rf /etc/systemd/system/rtl8812auEasyCompile.service sudo rm -Rf /usr/local/bin/rtl8812auEasyCompile.sh -echo "cleanup done" \ No newline at end of file +echo "cleanup done" From 30bf91e4b7b45a0f481a95dfe08a377759a7d53b Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Tue, 11 Apr 2023 23:48:46 +0200 Subject: [PATCH 28/34] Update rtl8812auEasyCompile.sh --- packagedir/usr/local/bin/rtl8812auEasyCompile.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packagedir/usr/local/bin/rtl8812auEasyCompile.sh b/packagedir/usr/local/bin/rtl8812auEasyCompile.sh index 2f82f149..8b61fb7f 100644 --- a/packagedir/usr/local/bin/rtl8812auEasyCompile.sh +++ b/packagedir/usr/local/bin/rtl8812auEasyCompile.sh @@ -1,7 +1,8 @@ #!/bin/bash echo "We're now compiling the rtl8812au driver into your stock kernel" sudo apt install -y dkms -sudo /opt/rtl8812au/dkms-install.sh > /opt/installrtl.log +cd /opt/rtl8812au/ +sudo ./dkms-install.sh > /opt/installrtl.log systemctl disable rtl8812auEasyCompile sudo rm -Rf /etc/systemd/system/rtl8812auEasyCompile.service sudo rm -Rf /usr/local/bin/rtl8812auEasyCompile.sh From 9707bf18bfc8bb6607079e9264af0eddb4915e9e Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Wed, 12 Apr 2023 01:19:16 +0200 Subject: [PATCH 29/34] Update rtl8812auEasyCompile.sh --- packagedir/usr/local/bin/rtl8812auEasyCompile.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packagedir/usr/local/bin/rtl8812auEasyCompile.sh b/packagedir/usr/local/bin/rtl8812auEasyCompile.sh index 8b61fb7f..e9486476 100644 --- a/packagedir/usr/local/bin/rtl8812auEasyCompile.sh +++ b/packagedir/usr/local/bin/rtl8812auEasyCompile.sh @@ -7,3 +7,6 @@ systemctl disable rtl8812auEasyCompile sudo rm -Rf /etc/systemd/system/rtl8812auEasyCompile.service sudo rm -Rf /usr/local/bin/rtl8812auEasyCompile.sh echo "cleanup done" +rm /etc/motd +mv /etc/motd2 /etc/motd +reboot From 64bfd3f5d3b5fcff29d2f6196cd5d703276455c3 Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Wed, 12 Apr 2023 01:20:26 +0200 Subject: [PATCH 30/34] Update rtl8812auEasyCompile.sh --- packagedir/usr/local/bin/rtl8812auEasyCompile.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/packagedir/usr/local/bin/rtl8812auEasyCompile.sh b/packagedir/usr/local/bin/rtl8812auEasyCompile.sh index e9486476..03d3e809 100644 --- a/packagedir/usr/local/bin/rtl8812auEasyCompile.sh +++ b/packagedir/usr/local/bin/rtl8812auEasyCompile.sh @@ -9,4 +9,5 @@ sudo rm -Rf /usr/local/bin/rtl8812auEasyCompile.sh echo "cleanup done" rm /etc/motd mv /etc/motd2 /etc/motd +systemctl enable openhd reboot From 12300c3d7b5abba8d342033f3a2e1fe11a77d4be Mon Sep 17 00:00:00 2001 From: consti10 Date: Mon, 17 Apr 2023 12:12:27 +0200 Subject: [PATCH 31/34] add openhd_override_channel and openhd_override_channel_width params (untested) --- include/drv_types.h | 2 ++ os_dep/linux/ioctl_cfg80211.c | 13 ++++++++++++- os_dep/linux/os_intfs.c | 16 ++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/include/drv_types.h b/include/drv_types.h index 3c05228d..a0401138 100644 --- a/include/drv_types.h +++ b/include/drv_types.h @@ -334,6 +334,8 @@ struct registry_priv { #endif u8 RegEnableTxPowerByRate; u8 RegTxPowerIndexOverride; + int32_t openhd_override_channel; + int32_t openhd_override_channel_width; u8 target_tx_pwr_valid; s8 target_tx_pwr_2g[RF_PATH_MAX][RATE_SECTION_NUM]; diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index df77f1e0..2b63066f 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -5015,7 +5015,6 @@ struct cfg80211_chan_def *chandef){ return -EINVAL; } return 0; - } // Consti10: In monitor mode, this method seems to be not used (set_monitor_channel is used instead) @@ -5165,6 +5164,18 @@ static int cfg80211_rtw_set_monitor_channel(struct wiphy *wiphy RTW_INFO(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d\n" , FUNC_ADPT_ARG(padapter), target_channal, target_width, target_offset); + // OpenHD channel via module param + { + if(padapter->registrypriv.openhd_override_channel){ + target_channal=padapter->registrypriv.openhd_override_channel; + RTW_WARN("OpenHD: using openhd_override_channel"); + } + if(padapter->registrypriv.openhd_override_channel_width){ + target_width=padapter->registrypriv.openhd_override_channel_width; + RTW_WARN("OpenHD: using openhd_override_channel_width"); + } + } + if(true){ RTW_WARN(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d OpenHD channel debug\n" , FUNC_ADPT_ARG(padapter), target_channal, target_width, target_offset); diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 74857213..457c4be8 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -588,6 +588,17 @@ int rtw_tx_pwr_by_rate = CONFIG_TXPWR_BY_RATE_EN; module_param(rtw_tx_pwr_by_rate, int, 0644); MODULE_PARM_DESC(rtw_tx_pwr_by_rate, "0:Disable, 1:Enable, 2: Depend on efuse"); +// OpenHD params +int openhd_override_channel = 0; +module_param(openhd_override_channel, int, 0644); +MODULE_PARM_DESC(openhd_override_channel, "OpenHD easy (CRDA workaround)"); +// +int openhd_override_channel_width = 0; +module_param(openhd_override_channel_width, int, 0644); +MODULE_PARM_DESC(openhd_override_channel_width, "OpenHD easy (CRDA workaround)"); +// + + #ifdef CONFIG_TXPWR_LIMIT int rtw_tx_pwr_lmt_enable = CONFIG_TXPWR_LIMIT_EN; module_param(rtw_tx_pwr_lmt_enable, int, 0644); @@ -1013,6 +1024,11 @@ uint loadparam(_adapter *padapter) registry_par->RegTxPowerIndexOverride = (u8)rtw_tx_pwr_idx_override; RTW_INFO("OpenHD:rtw_tx_pwr_idx_override:%d\n",(int)rtw_tx_pwr_idx_override); + registry_par->openhd_override_channel = openhd_override_channel; + registry_par->openhd_override_channel_width = openhd_override_channel_width; + RTW_WARN("OpenHD: openhd_override_channel %d, openhd_override_channel_width: %d", + registry_par->openhd_override_channel,registry_par->openhd_override_channel_width); + rtw_regsty_load_target_tx_power(registry_par); From 670f70ff3d470cba0bea08b9ea40813e4b3591b6 Mon Sep 17 00:00:00 2001 From: Raphael Scholle <68374617+raphaelscholle@users.noreply.github.com> Date: Thu, 20 Apr 2023 11:33:18 +0200 Subject: [PATCH 32/34] shorten version number --- .github/workflows/autocompiler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autocompiler.yml b/.github/workflows/autocompiler.yml index 448ca3b3..723afa67 100644 --- a/.github/workflows/autocompiler.yml +++ b/.github/workflows/autocompiler.yml @@ -31,7 +31,7 @@ jobs: mkdir -p packagedir/opt/rtl8812au/ mv ../temp/* packagedir/opt/rtl8812au mv ../temp2/* packagedir/ - fpm -a arm64 -s dir -t deb -n rtl8812au-autocompiler -v 2.3.4-evo-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb --after-install packagedir/opt/rtl8812au/after-install.sh + fpm -a arm64 -s dir -t deb -n rtl8812au-autocompiler -v 2.3.4-$(date '+%m%d%H%M') -C ./packagedir/ -p rtl8812au-autocompiler.deb --after-install packagedir/opt/rtl8812au/after-install.sh ls -a From 0471792d8436e3e6c941b0c1083b70b440be9571 Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Thu, 29 Jun 2023 14:37:31 +0200 Subject: [PATCH 33/34] Update Kconfig remove syntax error --- Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Kconfig b/Kconfig index e73fc154..d8cd3091 100644 --- a/Kconfig +++ b/Kconfig @@ -1,5 +1,6 @@ config RTL8812AU tristate "Realtek 8812A USB WiFi" depends on USB - ---help--- + select WIRELESS_EXT + help Help message of RTL8812AU From 1323b8ae635449c6a899b0dc63674d6042772a55 Mon Sep 17 00:00:00 2001 From: Zipdox2 <121819828+Zipdox2@users.noreply.github.com> Date: Thu, 13 Jul 2023 22:43:26 +0200 Subject: [PATCH 34/34] Fix for kernel 6.3 --- os_dep/linux/ioctl_cfg80211.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 2b63066f..6af3dd1b 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -408,7 +408,9 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8 if (ret != _SUCCESS) goto exit; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) + cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0); +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0); #else cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);