]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
xradio: remove driver and firmware
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 12 Feb 2023 12:09:06 +0000 (12:09 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 13 Feb 2023 09:41:05 +0000 (09:41 +0000)
this module was build only for arm 32bit arch.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/common/xr819-firmware [deleted file]
lfs/xr819-firmware [deleted file]
lfs/xradio [deleted file]
make.sh
src/patches/xradio/disable_warnings.patch [deleted file]
src/patches/xradio/eth_platform_get_mac_address.patch [deleted file]
src/patches/xradio/fix-missing-wpa1-2-sequence-numbers-for-group.patch [deleted file]
src/patches/xradio/fix-transmit-of-tkip-encrypted-packets.patch [deleted file]
src/patches/xradio/report-mic-fails-to-kernel-and-correct-iv-str.patch [deleted file]

diff --git a/config/rootfiles/common/xr819-firmware b/config/rootfiles/common/xr819-firmware
deleted file mode 100644 (file)
index 84de5cb..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#lib/firmware/xr819
-lib/firmware/xr819/boot_xr819.bin
-lib/firmware/xr819/fw_xr819.bin
-lib/firmware/xr819/sdd_xr819.bin
diff --git a/lfs/xr819-firmware b/lfs/xr819-firmware
deleted file mode 100644 (file)
index 032e13a..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-###############################################################################
-#                                                                             #
-# IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2018  IPFire Team  <info@ipfire.org>                     #
-#                                                                             #
-# This program 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 3 of the License, or           #
-# (at your option) any later version.                                         #
-#                                                                             #
-# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.       #
-#                                                                             #
-###############################################################################
-
-###############################################################################
-# Definitions
-###############################################################################
-
-include Config
-
-VER        = c01.08.0043
-THISAPP    = xr819-firmware-$(VER)
-DL_FILE    = $(THISAPP).tar.xz
-DL_FROM    = $(URL_IPFIRE)
-TARGET     = $(DIR_INFO)/$(THISAPP)
-
-###############################################################################
-# Top-level Rules
-###############################################################################
-
-objects = $(DL_FILE)
-
-$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-
-$(DL_FILE)_BLAKE2 = c01fc497053ac1f95638f3283f15ae5232fe598b5b807d925e0d8c8d5266ffc5f19bbc61fbf342f3cd705b1375a36983efbc64d0d1bc4b1c999e0a55bbc74244
-
-install : $(TARGET)
-
-check : $(patsubst %,$(DIR_CHK)/%,$(objects))
-
-download :$(patsubst %,$(DIR_DL)/%,$(objects))
-
-b2 : $(subst %,%_BLAKE2,$(objects))
-
-###############################################################################
-# Downloading, checking, b2sum
-###############################################################################
-
-$(patsubst %,$(DIR_CHK)/%,$(objects)) :
-       @$(CHECK)
-
-$(patsubst %,$(DIR_DL)/%,$(objects)) :
-       @$(LOAD)
-
-$(subst %,%_BLAKE2,$(objects)) :
-       @$(B2SUM)
-
-###############################################################################
-# Installation Details
-###############################################################################
-
-$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
-       @$(PREBUILD)
-       mkdir -p /lib/firmware/xr819
-       @cd /lib/firmware/xr819 && tar axf $(DIR_DL)/$(DL_FILE)
-       @$(POSTBUILD)
diff --git a/lfs/xradio b/lfs/xradio
deleted file mode 100644 (file)
index f51458a..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-###############################################################################
-#                                                                             #
-# IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2021  IPFire Team <info@ipfire.org>                      #
-#                                                                             #
-# This program 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 3 of the License, or           #
-# (at your option) any later version.                                         #
-#                                                                             #
-# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.       #
-#                                                                             #
-###############################################################################
-
-###############################################################################
-# Definitions
-###############################################################################
-
-include Config
-
-VERSUFIX = ipfire$(KCFG)
-MODPATH = /lib/modules/$(KVER)-$(VERSUFIX)/extra/wlan/
-
-VER        = 354e8c32e7948d46a63796d0ca266b1f702999b0
-
-THISAPP    = xradio-$(VER)
-DL_FILE    = $(THISAPP).tar.gz
-DL_FROM    = $(URL_IPFIRE)
-DIR_APP    = $(DIR_SRC)/$(THISAPP)
-TARGET     = $(DIR_INFO)/$(THISAPP)-kmod-$(KVER)-$(VERSUFIX)
-
-SUP_ARCH   = none
-
-###############################################################################
-# Top-level Rules
-###############################################################################
-
-objects = $(DL_FILE)
-
-$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-
-$(DL_FILE)_BLAKE2 = cd4f2f5df76a4832956b8697a99da1a58cbb764c6bc014f1bd1fc77dc5b5241556f20dcaa1731c8f45c8e5b2b9fa50092eb7ee5a3c60dd8b1290a616f8edc360
-
-install : $(TARGET)
-
-check : $(patsubst %,$(DIR_CHK)/%,$(objects))
-
-download :$(patsubst %,$(DIR_DL)/%,$(objects))
-
-b2 : $(subst %,%_BLAKE2,$(objects))
-
-dist:
-       $(PAK)
-
-###############################################################################
-# Downloading, checking, b2sum
-###############################################################################
-
-$(patsubst %,$(DIR_CHK)/%,$(objects)) :
-       @$(CHECK)
-
-$(patsubst %,$(DIR_DL)/%,$(objects)) :
-       @$(LOAD)
-
-$(subst %,%_BLAKE2,$(objects)) :
-       @$(B2SUM)
-
-###############################################################################
-# Installation Details
-###############################################################################
-
-$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
-       @$(PREBUILD)
-       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/xradio/disable_warnings.patch
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/xradio/fix-transmit-of-tkip-encrypted-packets.patch
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/xradio/fix-missing-wpa1-2-sequence-numbers-for-group.patch
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/xradio/report-mic-fails-to-kernel-and-correct-iv-str.patch
-       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/xradio/eth_platform_get_mac_address.patch
-
-       cd $(DIR_APP) && CONFIG_WLAN_VENDOR_XRADIO=m \
-               make $(MAKETUNING) -C /lib/modules/$(KVER)-$(VERSUFIX)/build/ M=$(DIR_APP)/ modules
-
-       # Install the built kernel modules.
-       mkdir -p $(MODPATH)
-       cd $(DIR_APP) && for f in $$(ls *.ko); do \
-               /lib/modules/$$(uname -r)$(KCFG)/build/scripts/sign-file sha512 \
-                       /lib/modules/$$(uname -r)$(KCFG)/build/certs/signing_key.pem \
-                       /lib/modules/$$(uname -r)$(KCFG)/build/certs/signing_key.x509 \
-                       $$f; \
-               xz $$f; \
-               install -m 644 $$f.xz $(MODPATH); \
-       done
-
-       @rm -rf $(DIR_APP)
-       @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 68277b09bf9cfda4c08644fd3ff48fba398c5906..6222a741fe8aec6337a29492881ef516fc84ac5b 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -1114,7 +1114,6 @@ buildipfire() {
   lfsmake2 which
   lfsmake2 linux-firmware
   lfsmake2 dvb-firmwares
-  lfsmake2 xr819-firmware
   lfsmake2 zd1211-firmware
   lfsmake2 rpi-firmware
   lfsmake2 intel-microcode
@@ -1147,7 +1146,6 @@ buildipfire() {
   lfsmake2 rtl8812au           KCFG=""
   lfsmake2 rtl8822bu           KCFG=""
   lfsmake2 rtl8821cu           KCFG=""
-  lfsmake2 xradio              KCFG=""
   lfsmake2 linux-initrd                KCFG=""
 
   lfsmake2 expat
diff --git a/src/patches/xradio/disable_warnings.patch b/src/patches/xradio/disable_warnings.patch
deleted file mode 100644 (file)
index 674e5dc..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -Naur a/debug.h b/debug.h
---- a/debug.h  2020-05-02 17:17:06.000000000 +0000
-+++ b/debug.h  2021-05-26 06:42:41.347972240 +0000
-@@ -21,13 +21,13 @@
- #define XRADIO_DBG_DEV    0x40                /* current dev */
- /* debug levels, default 0x07 */
--#define XRADIO_DBG_LEV_AP     0x47    /* ap */
--#define XRADIO_DBG_LEV_PM     0x47    /* pm */
--#define XRADIO_DBG_LEV_SCAN   0x47    /* scan */
--#define XRADIO_DBG_LEV_STA    0x47    /* sta, keys */
--#define XRADIO_DBG_LEV_TXRX   0x47    /* tx, rx, ht, p2p, queue */
--#define XRADIO_DBG_LEV_WSM    0x47    /* wsm */
--#define XRADIO_DBG_LEV_XR     0x47    /* xradio, fwio, sdio, bh */
-+#define XRADIO_DBG_LEV_AP     0x03    /* ap */
-+#define XRADIO_DBG_LEV_PM     0x03    /* pm */
-+#define XRADIO_DBG_LEV_SCAN   0x03    /* scan */
-+#define XRADIO_DBG_LEV_STA    0x03    /* sta, keys */
-+#define XRADIO_DBG_LEV_TXRX   0x03    /* tx, rx, ht, p2p, queue */
-+#define XRADIO_DBG_LEV_WSM    0x03    /* wsm */
-+#define XRADIO_DBG_LEV_XR     0x03    /* xradio, fwio, sdio, bh */
- #define ap_printk(level, ...) \
-       do {                    \
diff --git a/src/patches/xradio/eth_platform_get_mac_address.patch b/src/patches/xradio/eth_platform_get_mac_address.patch
deleted file mode 100644 (file)
index bc1733e..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-diff -Naur xradio-354e8c32e7948d46a63796d0ca266b1f702999b0.org/main.c xradio-354e8c32e7948d46a63796d0ca266b1f702999b0/main.c
---- xradio-354e8c32e7948d46a63796d0ca266b1f702999b0.org/main.c 2020-05-02 17:17:06.000000000 +0000
-+++ xradio-354e8c32e7948d46a63796d0ca266b1f702999b0/main.c     2021-11-07 10:30:26.153851399 +0000
-@@ -12,7 +12,7 @@
- #include <linux/firmware.h>
- #include <net/cfg80211.h>
--#include <linux/of_net.h>
-+#include <linux/etherdevice.h>
- #include <linux/mmc/sdio_func.h>
- #include "xradio.h"
-@@ -501,9 +501,8 @@
-       u8 b;           /* MRK 5.5a */
-       struct ieee80211_hw *dev;
-       struct xradio_common *hw_priv;
--      unsigned char randomaddr[ETH_ALEN];
--      const unsigned char *addr = NULL;
--
-+      unsigned char addr[ETH_ALEN];
-+      int ret;
-       //init xradio_common
-       dev = xradio_init_common(sizeof(struct xradio_common));
-       if (!dev) {
-@@ -517,12 +516,12 @@
-       // fill in mac addresses
-       if (hw_priv->pdev->of_node) {
--              addr = of_get_mac_address(hw_priv->pdev->of_node);
-+              ret = eth_platform_get_mac_address(hw_priv->pdev, addr);
-       }
--      if (!addr) {
-+
-+      if (ret<0) {
-               dev_warn(hw_priv->pdev, "no mac address provided, using random\n");
--              eth_random_addr(randomaddr);
--              addr = randomaddr;
-+              eth_random_addr(addr);
-       }
-       for (b = 0; b < XRWL_MAX_VIFS; b++) {                           /* MRK 5.5a */
-               memcpy(hw_priv->addresses[b].addr, addr, ETH_ALEN);
diff --git a/src/patches/xradio/fix-missing-wpa1-2-sequence-numbers-for-group.patch b/src/patches/xradio/fix-missing-wpa1-2-sequence-numbers-for-group.patch
deleted file mode 100644 (file)
index d27dca4..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-From 70307b17ea3bd388d608bf77d0d0dd2058d05d3f Mon Sep 17 00:00:00 2001
-From: Arne Fitzenreiter <arne_f@ipfire.org>
-Date: Wed, 7 Mar 2018 23:23:39 +0100
-Subject: [PATCH 116/144] xradio: fix missing wpa1/2 sequence numbers for group
- rekeying
-
-Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
----
- drivers/net/wireless/xradio/keys.c | 26 ++++++++++++++++++++++----
- 1 file changed, 22 insertions(+), 4 deletions(-)
-
-diff --git a/keys.c b/keys.c
-index 20050e1e75c2..1d95410932e1 100644
---- a/keys.c
-+++ b/keys.c
-@@ -56,6 +56,7 @@ int xradio_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
-       int ret = -EOPNOTSUPP;
-       struct xradio_common *hw_priv = dev->priv;
-       struct xradio_vif *priv = xrwl_get_vif_from_ieee80211(vif);
-+      struct ieee80211_key_seq seq;
-       wiphy_dbg(dev->wiphy, "vif %d: set_key cmd %d\n", priv->if_id, (int) cmd);
-       
-@@ -103,6 +104,7 @@ int xradio_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
-                       }
-                       break;
-               case WLAN_CIPHER_SUITE_TKIP:
-+                      ieee80211_get_key_rx_seq(key, 0, &seq);
-                       if (pairwise) {
-                               wsm_key->type = WSM_KEY_TYPE_TKIP_PAIRWISE;
-                               memcpy(wsm_key->tkipPairwiseKey.peerAddress, peer_addr, ETH_ALEN);
-@@ -115,12 +117,20 @@ int xradio_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
-                               memcpy(wsm_key->tkipGroupKey.tkipKeyData,&key->key[0],  16);
-                               memcpy(wsm_key->tkipGroupKey.rxMicKey, &key->key[mic_offset], 8);
--                              /* TODO: Where can I find TKIP SEQ? */
--                              memset(wsm_key->tkipGroupKey.rxSeqCounter, 0, 8);
-+                              wsm_key->tkipGroupKey.rxSeqCounter[0] =  seq.tkip.iv16      & 0xff;
-+                              wsm_key->tkipGroupKey.rxSeqCounter[1] = (seq.tkip.iv16>>8)  & 0xff;
-+                              wsm_key->tkipGroupKey.rxSeqCounter[2] =  seq.tkip.iv32      & 0xff;
-+                              wsm_key->tkipGroupKey.rxSeqCounter[3] = (seq.tkip.iv32>> 8) & 0xff;
-+                              wsm_key->tkipGroupKey.rxSeqCounter[4] = (seq.tkip.iv32>>16) & 0xff;
-+                              wsm_key->tkipGroupKey.rxSeqCounter[5] = (seq.tkip.iv32>>24) & 0xff;
-+                              wsm_key->tkipGroupKey.rxSeqCounter[6] = 0;
-+                              wsm_key->tkipGroupKey.rxSeqCounter[7] = 0;
-+
-                               wsm_key->tkipGroupKey.keyId = key->keyidx;
-                       }
-                       break;
-               case WLAN_CIPHER_SUITE_CCMP:
-+                      ieee80211_get_key_rx_seq(key, 0, &seq);
-                       if (pairwise) {
-                               wsm_key->type = WSM_KEY_TYPE_AES_PAIRWISE;
-                               memcpy(wsm_key->aesPairwiseKey.peerAddress, peer_addr, ETH_ALEN);
-@@ -130,8 +140,16 @@ int xradio_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
-                       } else {
-                               wsm_key->type = WSM_KEY_TYPE_AES_GROUP;
-                               memcpy(wsm_key->aesGroupKey.aesKeyData, &key->key[0], 16);
--                              /* TODO: Where can I find AES SEQ? */
--                              memset(wsm_key->aesGroupKey.rxSeqCounter, 0, 8);
-+
-+                              wsm_key->aesGroupKey.rxSeqCounter[0] = seq.ccmp.pn[5];
-+                              wsm_key->aesGroupKey.rxSeqCounter[1] = seq.ccmp.pn[4];
-+                              wsm_key->aesGroupKey.rxSeqCounter[2] = seq.ccmp.pn[3];
-+                              wsm_key->aesGroupKey.rxSeqCounter[3] = seq.ccmp.pn[2];
-+                              wsm_key->aesGroupKey.rxSeqCounter[4] = seq.ccmp.pn[1];
-+                              wsm_key->aesGroupKey.rxSeqCounter[5] = seq.ccmp.pn[0];
-+                              wsm_key->aesGroupKey.rxSeqCounter[6] = 0;
-+                              wsm_key->aesGroupKey.rxSeqCounter[7] = 0;
-+
-                               wsm_key->aesGroupKey.keyId = key->keyidx;
-                       }
-                       break;
--- 
-2.31.0
-
diff --git a/src/patches/xradio/fix-transmit-of-tkip-encrypted-packets.patch b/src/patches/xradio/fix-transmit-of-tkip-encrypted-packets.patch
deleted file mode 100644 (file)
index a0ec0cf..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -Naur a/tx.c b/tx.c
---- a/tx.c     2020-05-02 19:17:06.000000000 +0200
-+++ b/tx.c     2021-05-26 12:33:36.117730336 +0200
-@@ -707,8 +707,11 @@
-               memmove(p, &p[offset], t->skb->len - offset);
-               skb_trim(t->skb, t->skb->len - offset);
-       }
--      /* ccmp pkt from umac to driver,it has iv room,,so ccmp pkt do not add iv room */
--      if (t->tx_info->control.hw_key->cipher != WLAN_CIPHER_SUITE_CCMP){
-+
-+      /* ccmp/tkip pkt from umac to driver,it has iv room,,so ccmp/tkip pkt do not add iv room */
-+      if ( (t->tx_info->control.hw_key->cipher != WLAN_CIPHER_SUITE_CCMP) &&
-+           (t->tx_info->control.hw_key->cipher != WLAN_CIPHER_SUITE_TKIP) )
-+      {
-               u8 *newhdr;
-               newhdr = skb_push(t->skb, iv_len);
-               memmove(newhdr, newhdr + iv_len, t->hdrlen);
diff --git a/src/patches/xradio/report-mic-fails-to-kernel-and-correct-iv-str.patch b/src/patches/xradio/report-mic-fails-to-kernel-and-correct-iv-str.patch
deleted file mode 100644 (file)
index ece413b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From dd2f835ae8a634794c4bf6b7fce1f778ae925e25 Mon Sep 17 00:00:00 2001
-From: Arne Fitzenreiter <arne_f@ipfire.org>
-Date: Sun, 18 Mar 2018 10:55:00 +0100
-Subject: [PATCH 120/144] xradio: report mic fails to kernel and correct iv
- stripping.
-
-Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
----
- drivers/net/wireless/xradio/rx.c | 9 ++++-----
- 1 file changed, 4 insertions(+), 5 deletions(-)
-
-diff --git a/rx.c b/rx.c
-index 271632c96baa..5a2466edf534 100644
---- a/rx.c
-+++ b/rx.c
-@@ -269,7 +269,8 @@ void xradio_rx_cb(struct xradio_vif *priv,
-               /* Firmware strips ICV in case of MIC failure. */
-               if (arg->status == WSM_STATUS_MICFAILURE) {
-                       icv_len = 0;
--                      hdr->flag |= RX_FLAG_IV_STRIPPED;
-+                      hdr->flag |= RX_FLAG_IV_STRIPPED |
-+                                   RX_FLAG_MMIC_ERROR;
-               }
-               if (skb->len < hdrlen + iv_len + icv_len) {
-@@ -285,10 +286,8 @@ void xradio_rx_cb(struct xradio_vif *priv,
-                               skb->data + skb->len-icv_len+8, 4);
-                       skb_trim(skb, skb->len - 8);
-                       hdr->flag |= RX_FLAG_MMIC_STRIPPED;
--              } else if (unlikely(WSM_RX_STATUS_ENCRYPTION(arg->flags) ==
--                         WSM_RX_STATUS_WAPI)) {
--                      /* Protocols not defined in mac80211 should be
--                         stripped/crypted in driver/firmware */
-+              } 
-+              if (hdr->flag & RX_FLAG_IV_STRIPPED) {
-                       /* Remove IV, ICV and MIC */
-                       skb_trim(skb, skb->len - icv_len);
-                       memmove(skb->data + iv_len, skb->data, hdrlen);
--- 
-2.31.0
-