From 7fab35999e25a88bb87c54a2d88f555024e9ccf4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 15 Sep 2024 01:17:29 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=89=20Sync=202024-09-15=2001:17:29?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aic8800/Makefile | 60 ++ aic8800/patches/010-fixes-build.patch | 114 ++++ aic8800/patches/020-update-path.patch | 12 + aic8800/patches/030-wireless-5.15.patch | 92 +++ aic8800/patches/031-wireless-6.1.patch | 159 +++++ aic8800/patches/032-wireless-6.6.patch | 13 + aic8800/patches/040-disable-log.patch | 32 + .../root/usr/share/3ginfo-lite/3ginfo.sh | 54 +- .../luci-static/resources/view/wifidogx.js | 31 + .../po/zh_Hans/apfree-wifidog.po | 26 +- .../rpcd/acl.d/luci-app-apfree-wifidog.json | 5 +- luci-app-nekoclash/Makefile | 2 +- luci-app-nekoclash/htdocs/nekoclash/mo.php | 24 +- .../htdocs/nekoclash/upload.php | 642 +++++++++--------- .../htdocs/nekoclash/upload_sb.php | 29 +- .../root/usr/share/passwall/0_default_config | 16 +- .../root/usr/share/passwall/iptables.sh | 40 +- mihomo/Makefile | 10 +- mihomo/files/mihomo.conf | 2 +- mihomo/files/uci-defaults/migrate.sh | 3 - ppp/Makefile | 4 +- 21 files changed, 949 insertions(+), 421 deletions(-) create mode 100644 aic8800/Makefile create mode 100644 aic8800/patches/010-fixes-build.patch create mode 100644 aic8800/patches/020-update-path.patch create mode 100644 aic8800/patches/030-wireless-5.15.patch create mode 100644 aic8800/patches/031-wireless-6.1.patch create mode 100644 aic8800/patches/032-wireless-6.6.patch create mode 100644 aic8800/patches/040-disable-log.patch diff --git a/aic8800/Makefile b/aic8800/Makefile new file mode 100644 index 000000000..1033f9913 --- /dev/null +++ b/aic8800/Makefile @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (c) 2023-2024 AnYun +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=aic8800 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_DATE:=2024-03-04 +PKG_SOURCE_URL:=https://github.com/radxa-pkg/aic8800.git +PKG_SOURCE_VERSION:=75fd5545a3e7a8ec2c2b022f0088cc352ad2b623 +PKG_MIRROR_HASH:=skip + +MAKE_PATH:=src/SDIO/driver_fw/driver/aic8800 +PKG_EXTMOD_SUBDIRS:=$(MAKE_PATH) + +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/aic8800 + SUBMENU:=Wireless Drivers + TITLE:=SKI WB800D80S wireless support + DEPENDS:=+kmod-mac80211 +kmod-mmc \ + +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT + FILES:= \ + $(PKG_BUILD_DIR)/$(MAKE_PATH)/aic8800_bsp/aic8800_bsp.ko \ + $(PKG_BUILD_DIR)/$(MAKE_PATH)/aic8800_fdrv/aic8800_fdrv.ko + AUTOLOAD:=$(call AutoProbe,aic8800_bsp aic8800_fdrv) + MODPARAMS.aic8800_fdrv:=he_on=n +endef + +NOSTDINC_FLAGS := \ + $(KERNEL_NOSTDINC_FLAGS) \ + -I$(PKG_BUILD_DIR) \ + -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \ + -I$(STAGING_DIR)/usr/include/mac80211-backport \ + -I$(STAGING_DIR)/usr/include/mac80211/uapi \ + -I$(STAGING_DIR)/usr/include/mac80211 \ + -include backport/backport.h + +EXTRA_CFLAGS:= -DBUILD_OPENWRT + +define Build/Compile + +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ + NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + $(KERNEL_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)/$(MAKE_PATH)/" \ + modules +endef + +define KernelPackage/aic8800/install + $(INSTALL_DIR) $(1)/lib/firmware/aic8800 + $(CP) $(PKG_BUILD_DIR)/src/SDIO/driver_fw/fw/aic8800D80/* $(1)/lib/firmware/aic8800 +endef + +$(eval $(call KernelPackage,aic8800)) diff --git a/aic8800/patches/010-fixes-build.patch b/aic8800/patches/010-fixes-build.patch new file mode 100644 index 000000000..7237486df --- /dev/null +++ b/aic8800/patches/010-fixes-build.patch @@ -0,0 +1,114 @@ +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c +@@ -2932,7 +2932,7 @@ static struct rwnx_vif *rwnx_interface_a + vif->ap.generation = 0; + vif->ap.mesh_pm = NL80211_MESH_POWER_ACTIVE; + vif->ap.next_mesh_pm = NL80211_MESH_POWER_ACTIVE; +- // no break ++ fallthrough; + case NL80211_IFTYPE_AP: + INIT_LIST_HEAD(&vif->ap.sta_list); + memset(&vif->ap.bcn, 0, sizeof(vif->ap.bcn)); +@@ -3349,7 +3349,7 @@ static int rwnx_cfg80211_change_iface(st + INIT_LIST_HEAD(&vif->ap.proxy_list); + vif->ap.create_path = false; + vif->ap.generation = 0; +- // no break ++ fallthrough; + case NL80211_IFTYPE_AP: + case NL80211_IFTYPE_P2P_GO: + INIT_LIST_HEAD(&vif->ap.sta_list); +@@ -5257,6 +5257,7 @@ static int rwnx_cfg80211_mgmt_tx(struct + switch (RWNX_VIF_TYPE(rwnx_vif)) { + case NL80211_IFTYPE_AP_VLAN: + rwnx_vif = rwnx_vif->ap_vlan.master; ++ fallthrough; + case NL80211_IFTYPE_AP: + case NL80211_IFTYPE_P2P_GO: + case NL80211_IFTYPE_MESH_POINT: +@@ -5569,7 +5570,7 @@ rwnx_cfg80211_tdls_mgmt(struct wiphy *wi + printk("%s: only one TDLS link is supported!\n", __func__); + status_code = WLAN_STATUS_REQUEST_DECLINED; + } +- /* fall-through */ ++ fallthrough; + case WLAN_TDLS_SETUP_REQUEST: + case WLAN_TDLS_TEARDOWN: + case WLAN_TDLS_DISCOVERY_REQUEST: +@@ -5889,6 +5890,7 @@ static int rwnx_fill_station_info(struct + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) + case FORMATMOD_HE_MU: + sinfo->rxrate.he_ru_alloc = rx_vect1->he.ru_size; ++ fallthrough; + case FORMATMOD_HE_SU: + case FORMATMOD_HE_ER: + sinfo->rxrate.flags = RATE_INFO_FLAGS_HE_MCS; +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_msg_tx.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_msg_tx.c +@@ -524,7 +524,7 @@ int rwnx_send_add_if (struct rwnx_hw *rw + //case NL80211_IFTYPE_P2P_DEVICE: + case NL80211_IFTYPE_P2P_CLIENT: + add_if_req_param->p2p = true; +- // no break ++ fallthrough; + #endif /* CONFIG_RWNX_FULLMAC */ + case NL80211_IFTYPE_STATION: + add_if_req_param->type = MM_STA; +@@ -537,7 +537,7 @@ int rwnx_send_add_if (struct rwnx_hw *rw + #ifdef CONFIG_RWNX_FULLMAC + case NL80211_IFTYPE_P2P_GO: + add_if_req_param->p2p = true; +- // no break ++ fallthrough; + #endif /* CONFIG_RWNX_FULLMAC */ + case NL80211_IFTYPE_AP: + add_if_req_param->type = MM_AP; +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_tdls.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_tdls.c +@@ -255,17 +255,24 @@ rwnx_add_wmm_info_ie(struct sk_buff *skb + static u8 rwnx_ac_from_wmm(int ac) + { + switch (ac) { +- default: +- WARN_ON_ONCE(1); + case 0: + return AC_BE; ++ break; + case 1: + return AC_BK; ++ break; + case 2: + return AC_VI; ++ break; + case 3: + return AC_VO; ++ break; ++ default: ++ WARN_ON_ONCE(1); ++ break; + } ++ ++ return 0; + } + + static void +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_tx.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_tx.c +@@ -325,6 +325,7 @@ u16 rwnx_select_txq(struct rwnx_vif *rwn + /* AP_VLAN interface is not used for a 4A STA, + fallback searching sta amongs all AP's clients */ + rwnx_vif = rwnx_vif->ap_vlan.master; ++ fallthrough; + case NL80211_IFTYPE_AP: + case NL80211_IFTYPE_P2P_GO: + { +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_txq.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_txq.c +@@ -635,6 +635,7 @@ static inline void rwnx_txq_vif_for_each + } + case NL80211_IFTYPE_AP_VLAN: + rwnx_vif = rwnx_vif->ap_vlan.master; ++ fallthrough; + case NL80211_IFTYPE_AP: + case NL80211_IFTYPE_MESH_POINT: + case NL80211_IFTYPE_P2P_GO: diff --git a/aic8800/patches/020-update-path.patch b/aic8800/patches/020-update-path.patch new file mode 100644 index 000000000..a12fa0831 --- /dev/null +++ b/aic8800/patches/020-update-path.patch @@ -0,0 +1,12 @@ +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/Makefile ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/Makefile +@@ -1,7 +1,7 @@ + CONFIG_SDIO_SUPPORT := y + CONFIG_SDIO_PWRCTRL := y +-CONFIG_AIC_FW_PATH = "/vendor/etc/firmware" +-#CONFIG_AIC_FW_PATH = "/lib/firmware/aic8800" ++#CONFIG_AIC_FW_PATH = "/vendor/etc/firmware" ++CONFIG_AIC_FW_PATH = "/lib/firmware/aic8800" + export CONFIG_AIC_FW_PATH + ccflags-y += -DCONFIG_AIC_FW_PATH=\"$(CONFIG_AIC_FW_PATH)\" + diff --git a/aic8800/patches/030-wireless-5.15.patch b/aic8800/patches/030-wireless-5.15.patch new file mode 100644 index 000000000..ba3337dd4 --- /dev/null +++ b/aic8800/patches/030-wireless-5.15.patch @@ -0,0 +1,92 @@ +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_compat.h ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_compat.h +@@ -52,7 +52,7 @@ + #endif + + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 60) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 60) || defined(BUILD_OPENWRT) + #define IEEE80211_MAX_AMPDU_BUF IEEE80211_MAX_AMPDU_BUF_HE + #define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB + #define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c +@@ -2998,7 +2998,7 @@ static struct rwnx_vif *rwnx_interface_a + } else + vif->use_4addr = false; + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) || defined(BUILD_OPENWRT) + if (cfg80211_register_netdevice(ndev)) + #else + if (register_netdevice(ndev)) +@@ -3271,7 +3271,7 @@ static int rwnx_cfg80211_del_iface(struc + + if (dev->reg_state == NETREG_REGISTERED) { + /* Will call rwnx_close if interface is UP */ +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) || defined(BUILD_OPENWRT) + cfg80211_unregister_netdevice(dev); + #else + unregister_netdevice(dev); +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_mod_params.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_mod_params.c +@@ -1312,7 +1312,7 @@ static void rwnx_set_he_capa(struct rwnx + if (rwnx_hw->mod_params->stbc_on) + he_cap->he_cap_elem.phy_cap_info[2] |= IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ; + +- #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) || defined(BUILD_OPENWRT) + he_cap->he_cap_elem.phy_cap_info[3] |= IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_16_QAM | + IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1 | + IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU; +@@ -1330,7 +1330,7 @@ static void rwnx_set_he_capa(struct rwnx + } + he_cap->he_cap_elem.phy_cap_info[5] |= IEEE80211_HE_PHY_CAP5_NG16_SU_FEEDBACK | + IEEE80211_HE_PHY_CAP5_NG16_MU_FEEDBACK; +- #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) || defined(BUILD_OPENWRT) + he_cap->he_cap_elem.phy_cap_info[6] |= IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU | + IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU | + IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB | +@@ -1429,7 +1429,7 @@ static void rwnx_set_he_capa(struct rwnx + #endif + if (rwnx_hw->mod_params->stbc_on) + he_cap->he_cap_elem.phy_cap_info[2] |= IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ; +- #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) || defined(BUILD_OPENWRT) + he_cap->he_cap_elem.phy_cap_info[3] |= IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_16_QAM | + IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1 | + IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU; +@@ -1446,7 +1446,7 @@ static void rwnx_set_he_capa(struct rwnx + } + he_cap->he_cap_elem.phy_cap_info[5] |= IEEE80211_HE_PHY_CAP5_NG16_SU_FEEDBACK | + IEEE80211_HE_PHY_CAP5_NG16_MU_FEEDBACK; +- #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) || defined(BUILD_OPENWRT) + he_cap->he_cap_elem.phy_cap_info[6] |= IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU | + IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU | + IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB | +@@ -1732,7 +1732,7 @@ void rwnx_custregd(struct rwnx_hw *rwnx_ + wiphy->regulatory_flags |= REGULATORY_WIPHY_SELF_MANAGED; + + rtnl_lock(); +- #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0) ++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0) || defined(BUILD_OPENWRT) + if (regulatory_set_wiphy_regd_sync(wiphy, getRegdomainFromRwnxDB(wiphy, default_ccode))){ + wiphy_err(wiphy, "Failed to set custom regdomain\n"); + } +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_radar.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_radar.c +@@ -1282,7 +1282,11 @@ static void rwnx_radar_detected(struct r + chan_def = rwnx_hw->chanctx_table[rwnx_hw->cur_chanctx].chan_def; + + rwnx_radar_cancel_cac(&rwnx_hw->radar); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) || defined(BUILD_OPENWRT) ++ __cfg80211_radar_event(rwnx_hw->wiphy, &chan_def, true, GFP_KERNEL); ++#else + cfg80211_radar_event(rwnx_hw->wiphy, &chan_def, GFP_KERNEL); ++#endif + + #endif /* CONFIG_RWNX_FULLMAC */ + } diff --git a/aic8800/patches/031-wireless-6.1.patch b/aic8800/patches/031-wireless-6.1.patch new file mode 100644 index 000000000..a3a942199 --- /dev/null +++ b/aic8800/patches/031-wireless-6.1.patch @@ -0,0 +1,159 @@ +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c +@@ -776,7 +776,7 @@ static void rwnx_csa_finish(struct work_ + spin_unlock_bh(&rwnx_hw->cb_lock); + #if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION3) + cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0, 0); +-#elif (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION) ++#elif (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION) || defined(BUILD_OPENWRT) + cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0); + #else + cfg80211_ch_switch_notify(vif->ndev, &csa->chandef); +@@ -3540,7 +3540,7 @@ bool key_flag = false; + * when adding a group key. + */ + static int rwnx_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev, +-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) ++#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) || defined(BUILD_OPENWRT) + int link_id, + #endif + u8 key_index, bool pairwise, const u8 *mac_addr, +@@ -3637,7 +3637,7 @@ bool key_flag = false; + * + */ + static int rwnx_cfg80211_get_key(struct wiphy *wiphy, struct net_device *netdev, +-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) ++#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) || defined(BUILD_OPENWRT) + int link_id, + #endif + u8 key_index, bool pairwise, const u8 *mac_addr, +@@ -3655,7 +3655,7 @@ static int rwnx_cfg80211_get_key(struct + * and @key_index, return -ENOENT if the key doesn't exist. + */ + static int rwnx_cfg80211_del_key(struct wiphy *wiphy, struct net_device *netdev, +-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) ++#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) || defined(BUILD_OPENWRT) + int link_id, + #endif + u8 key_index, bool pairwise, const u8 *mac_addr) +@@ -3694,7 +3694,7 @@ static int rwnx_cfg80211_del_key(struct + */ + static int rwnx_cfg80211_set_default_key(struct wiphy *wiphy, + struct net_device *netdev, +-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) ++#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) || defined(BUILD_OPENWRT) + int link_id, + #endif + u8 key_index, bool unicast, bool multicast) +@@ -3709,7 +3709,7 @@ static int rwnx_cfg80211_set_default_key + */ + static int rwnx_cfg80211_set_default_mgmt_key(struct wiphy *wiphy, + struct net_device *netdev, +-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) ++#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) || defined(BUILD_OPENWRT) + int link_id, + #endif + u8 key_index) +@@ -3796,7 +3796,7 @@ static int rwnx_cfg80211_connect(struct + key_params.seq_len = 0; + key_params.cipher = sme->crypto.cipher_group; + rwnx_cfg80211_add_key(wiphy, dev, +-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) ++#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) || defined(BUILD_OPENWRT) + 0, + #endif + sme->key_idx, false, NULL, &key_params); +@@ -4063,7 +4063,7 @@ static int rwnx_cfg80211_add_station(str + sta->vif_idx = rwnx_vif->vif_index; + sta->vlan_idx = sta->vif_idx; + sta->qos = (params->sta_flags_set & BIT(NL80211_STA_FLAG_WME)) != 0; +-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION ++#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT) + sta->ht = params->link_sta_params.ht_capa ? 1 : 0; + sta->vht = params->link_sta_params.vht_capa ? 1 : 0; + #else +@@ -4469,7 +4469,7 @@ static int rwnx_cfg80211_change_station( + sta->vif_idx = rwnx_vif->vif_index; + sta->vlan_idx = sta->vif_idx; + sta->qos = (params->sta_flags_set & BIT(NL80211_STA_FLAG_WME)) != 0; +-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION ++#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT) + sta->ht = params->link_sta_params.ht_capa ? 1 : 0; + sta->vht = params->link_sta_params.vht_capa ? 1 : 0; + #else +@@ -4716,7 +4716,7 @@ static int rwnx_cfg80211_change_beacon(s + /** + * * @stop_ap: Stop being an AP, including stopping beaconing. + */ +-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION) ++#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION) || defined(BUILD_OPENWRT) + static int rwnx_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *dev, unsigned int link_id) + #else + static int rwnx_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *dev) +@@ -5190,7 +5190,7 @@ static int rwnx_cfg80211_dump_survey(str + */ + static int rwnx_cfg80211_get_channel(struct wiphy *wiphy, + struct wireless_dev *wdev, +-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION ++#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT) + unsigned int link_id, + #endif + struct cfg80211_chan_def *chandef) +@@ -5487,7 +5487,7 @@ int rwnx_cfg80211_channel_switch (struct + INIT_WORK(&csa->work, rwnx_csa_finish); + #if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION4 + cfg80211_ch_switch_started_notify(dev, &csa->chandef, 0, params->count, false, 0); +-#elif LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2 ++#elif LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2 || defined(BUILD_OPENWRT) + cfg80211_ch_switch_started_notify(dev, &csa->chandef, 0, params->count, false); + #elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) + cfg80211_ch_switch_started_notify(dev, &csa->chandef, params->count, params->block_tx); +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_msg_rx.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_msg_rx.c +@@ -836,7 +836,7 @@ static inline int rwnx_rx_sm_connect_ind + + do { + bss = cfg80211_get_bss(wdev->wiphy, NULL, rwnx_vif->sta.bssid, +-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION ++#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT) + wdev->u.client.ssid, wdev->u.client.ssid_len, + #else + wdev->ssid, wdev->ssid_len, +@@ -866,7 +866,7 @@ static inline int rwnx_rx_sm_connect_ind + #else + WLAN_CAPABILITY_ESS, + #endif +-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION ++#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT) + (int)wdev->u.client.ssid_len, + wdev->u.client.ssid, + #else +@@ -887,7 +887,7 @@ static inline int rwnx_rx_sm_connect_ind + rwnx_vif->sta.bssid[0], rwnx_vif->sta.bssid[1], rwnx_vif->sta.bssid[2], + rwnx_vif->sta.bssid[3], rwnx_vif->sta.bssid[4], rwnx_vif->sta.bssid[5]); + +-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION ++#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT) + wdev->u.client.ssid_len = (int)rwnx_vif->sta.ssid_len; + memcpy(wdev->u.client.ssid, rwnx_vif->sta.ssid, wdev->u.client.ssid_len); + #else +@@ -927,7 +927,7 @@ static inline int rwnx_rx_sm_connect_ind + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) + struct cfg80211_roam_info info; + memset(&info, 0, sizeof(info)); +-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION ++#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT) + if (rwnx_vif->ch_index < NX_CHAN_CTXT_CNT) + info.links[0].channel = rwnx_hw->chanctx_table[rwnx_vif->ch_index].chan_def.chan; + info.links[0].bssid = (const u8 *)ind->bssid.array; +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_msg_tx.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_msg_tx.c +@@ -1941,7 +1941,7 @@ int rwnx_send_me_sta_add(struct rwnx_hw + { + struct me_sta_add_req *req; + +-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION ++#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT) + struct link_station_parameters *link_sta_params = ¶ms->link_sta_params; + #else + struct station_parameters *link_sta_params = params; diff --git a/aic8800/patches/032-wireless-6.6.patch b/aic8800/patches/032-wireless-6.6.patch new file mode 100644 index 000000000..4962b62d5 --- /dev/null +++ b/aic8800/patches/032-wireless-6.6.patch @@ -0,0 +1,13 @@ +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_compat.h ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_compat.h +@@ -47,8 +47,8 @@ + #else + #define HIGH_KERNEL_VERSION KERNEL_VERSION(6, 0, 0) + #define HIGH_KERNEL_VERSION2 KERNEL_VERSION(6, 1, 0) +-#define HIGH_KERNEL_VERSION3 KERNEL_VERSION(6, 3, 0) +-#define HIGH_KERNEL_VERSION4 KERNEL_VERSION(6, 3, 0) ++#define HIGH_KERNEL_VERSION3 KERNEL_VERSION(6, 9, 0) ++#define HIGH_KERNEL_VERSION4 KERNEL_VERSION(6, 9, 0) + #endif + + diff --git a/aic8800/patches/040-disable-log.patch b/aic8800/patches/040-disable-log.patch new file mode 100644 index 000000000..7c0b13237 --- /dev/null +++ b/aic8800/patches/040-disable-log.patch @@ -0,0 +1,32 @@ +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/aic_bsp_main.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/aic_bsp_main.c +@@ -15,7 +15,7 @@ + #define DRV_AUTHOR "AICSemi" + #define DRV_VERS_MOD "1.0" + +-int aicwf_dbg_level_bsp = LOGERROR|LOGINFO|LOGDEBUG|LOGTRACE; ++int aicwf_dbg_level_bsp = LOGDATA; + + static struct platform_device *aicbsp_pdev; + +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c +@@ -503,7 +503,7 @@ static const int rwnx_hwq2uapsd[NL80211_ + + + extern uint8_t scanning; +-int aicwf_dbg_level = LOGERROR|LOGINFO|LOGDEBUG|LOGTRACE; ++int aicwf_dbg_level = LOGWAKELOCK; + module_param(aicwf_dbg_level, int, 0660); + int testmode = 0; + char aic_fw_path[200]; +--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_tx.c ++++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_tx.c +@@ -169,7 +169,6 @@ void rwnx_ps_bh_traffic_req(struct rwnx_ + // sta->mac_addr)) + // return; + if (!sta->ps.active) { +- printk("sta %pM is not in Power Save mode", sta->mac_addr); + return; + } + #ifdef CREATE_TRACE_POINTS diff --git a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh index be090ca3c..1aabadc47 100644 --- a/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh +++ b/luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh @@ -308,24 +308,29 @@ if [ -z "$COPS" ]; then fi fi [ -z "$COPS" ] && COPS=$COPS_NUM +case "$COPS" in + *\ *) + COPS=$(echo "$COPS" | awk '{if(NF==2 && tolower($1)==tolower($2)){print $1}else{print $0}}') + ;; +esac -if [[ "$COPS" =~ " " ]]; then - COPS=$(echo "$COPS" | awk '{if(NF==2 && tolower($1)==tolower($2)){print $1}else{print $0}}') -fi - -isp=$(sms_tool -d $DEVICE at "AT+COPS?"|sed -n '2p'|cut -d '"' -f2|tr -d '\r') +isp=$(sms_tool -d "$DEVICE" at "AT+COPS?" | sed -n '2p' | cut -d '"' -f2 | tr -d '\r') isp_num="$COPS_MCC $COPS_MNC" isp_numws="$COPS_MCC$COPS_MNC" -if [[ "$COPS" =~ ^[0-9]+$ ]]; then - if [[ "$COPS" == "$isp_num" || "$COPS" == "$isp_numws" ]]; then - if [[ -n "$isp" ]]; then - COPS=$(awk -F[\;] '/^'$isp';/ {print $3}' $RES/mccmnc.dat | xargs) - LOC=$(awk -F[\;] '/^'$isp';/ {print $2}' $RES/mccmnc.dat) - fi - fi -fi - +case "$COPS" in + *[!0-9]* | '') + # Non-numeric characters or is blank + ;; + *) + if [ "$COPS" = "$isp_num" ] || [ "$COPS" = "$isp_numws" ]; then + if [ -n "$isp" ]; then + COPS=$(awk -F[\;] '/^'"$isp"';/ {print $3}' $RES/mccmnc.dat | xargs) + LOC=$(awk -F[\;] '/^'"$isp"';/ {print $2}' $RES/mccmnc.dat) + fi + fi + ;; +esac # operator location from temporary config LOCATIONFILE=/tmp/location @@ -348,14 +353,19 @@ if [ -e "$LOCATIONFILE" ]; then fi fi else - if [[ "$COPS_MCC$COPS_MNC" =~ ^[0-9]+$ ]]; then - if [ -n "$LOC" ]; then - LOC=$(awk -F[\;] '/^'$COPS_MCC$COPS_MNC';/ {print $2}' $RES/mccmnc.dat) - echo "$LOC" > /tmp/location - else - echo "-" > /tmp/location - fi - fi + case "$COPS_MCC$COPS_MNC" in + *[!0-9]* | '') + # Non-numeric characters or is blank + ;; + *) + if [ -n "$LOC" ]; then + LOC=$(awk -F[\;] '/^'"$COPS_MCC$COPS_MNC"';/ {print $2}' $RES/mccmnc.dat) + echo "$LOC" > /tmp/location + else + echo "-" > /tmp/location + fi + ;; + esac fi T=$(echo "$O" | awk -F[,\ ] '/^\+CPIN:/ {print $0;exit}' | xargs) diff --git a/luci-app-apfree-wifidog/htdocs/luci-static/resources/view/wifidogx.js b/luci-app-apfree-wifidog/htdocs/luci-static/resources/view/wifidogx.js index 3af421901..996f9152e 100644 --- a/luci-app-apfree-wifidog/htdocs/luci-static/resources/view/wifidogx.js +++ b/luci-app-apfree-wifidog/htdocs/luci-static/resources/view/wifidogx.js @@ -61,29 +61,59 @@ return view.extend({ o = s.taboption('basic', form.Flag, 'enabled', _('Enable'), _('Enable apfree-wifidog service.')); o.rmempty = false; + o = s.taboption('basic', form.Flag, 'no_auth_server', _('No Auth Server'), _('Do not use authentication server.')); + o.rmempty = false; + o = s.taboption('basic', form.Value, 'device_id', _('Device ID'), _('The ID of the device.')); + o.depends('no_auth_server', '0'); o.rmempty = false; o.datatype = 'string'; o.optional = false; o = s.taboption('basic', form.Value, 'auth_server_hostname', _('Auth Server Hostname'), _('The domain or IP address of the authentication server.')); + o.depends('no_auth_server', '0'); o.rmempty = false; o.datatype = 'or(host,ip4addr)'; o.optional = false; o = s.taboption('basic', form.Value, 'auth_server_port', _('Auth Server Port'), _('The port of the authentication server.')); + o.depends('no_auth_server', '0'); o.rmempty = false; o.datatype = 'port'; o.optional = false; o = s.taboption('basic', form.Value, 'auth_server_path', _('Auth Server URI path'), _('The URI path of the authentication server.')); + o.depends('no_auth_server', '0'); o.rmempty = false; o.datatype = 'string'; o.optional = false; + o = s.taboption('basic', form.FileUpload, 'auth_server_offline_page', _('Upload offline Page'), + _('The offline page of the authentication server.')); + o.depends('no_auth_server', '1'); + o.rmempty = false; + o.optional = true + o.datatype = 'file'; + o.root_directory = '/etc/wifidogx'; + + o = s.taboption('basic', form.Value, 'auth_server_offline_file', _('Offline Page Full Path'), + _('The full path of the uploaded offline page.')); + o.depends('no_auth_server', '1'); + o.rmempty = false; + o.datatype = 'string'; + o.optional = true; + o.placeholder = '/etc/wifidogx/'; + + o = s.taboption('basic', form.Value, 'local_portal', _('Local Portal'), + _('The local portal url.')); + o.depends('no_auth_server', '1'); + o.rmempty = false; + o.datatype = 'string'; + o.optional = true; + o = s.taboption('basic', form.ListValue, 'log_level', _('Log Level'), _('The log level of the apfree-wifidog.')); o.value(7, _('Debug')); @@ -125,6 +155,7 @@ return view.extend({ o.rmempty = false; o.optional = true; + // advanced settings o = s.taboption('advanced', form.Flag, 'enable_websocket', _('Enable WebSocket'), _('Enable websocket support.')); diff --git a/luci-app-apfree-wifidog/po/zh_Hans/apfree-wifidog.po b/luci-app-apfree-wifidog/po/zh_Hans/apfree-wifidog.po index 4a5dfa28f..809dfe932 100644 --- a/luci-app-apfree-wifidog/po/zh_Hans/apfree-wifidog.po +++ b/luci-app-apfree-wifidog/po/zh_Hans/apfree-wifidog.po @@ -220,4 +220,28 @@ msgid "Gateway Settings" msgstr "网关设置" msgid "Log Level" -msgstr "日志级别" \ No newline at end of file +msgstr "日志级别" + +msgid "No Auth Server" +msgstr "无认证服务器" + +msgid "Do not use authentication server." +msgstr "不使用认证服务器" + +msgid "The offline page of the authentication server." +msgstr "认证服务器离线用户展示页面" + +msgid "Upload offline Page" +msgstr "上传离线页面" + +msgid "Offline Page Full Path" +msgstr "离线页面完整路径" + +msgid "The full path of the uploaded offline page." +msgstr "上传的离线页面的完整路径" + +msgid "Local Portal" +msgstr "本地门户" + +msgid "The local portal url." +msgstr "本地门户跳转URL" \ No newline at end of file diff --git a/luci-app-apfree-wifidog/root/usr/share/rpcd/acl.d/luci-app-apfree-wifidog.json b/luci-app-apfree-wifidog/root/usr/share/rpcd/acl.d/luci-app-apfree-wifidog.json index 76af95c61..801a00441 100644 --- a/luci-app-apfree-wifidog/root/usr/share/rpcd/acl.d/luci-app-apfree-wifidog.json +++ b/luci-app-apfree-wifidog/root/usr/share/rpcd/acl.d/luci-app-apfree-wifidog.json @@ -11,7 +11,10 @@ "uci": ["wifidogx"] }, "write": { - "uci": ["wifidogx"] + "uci": ["wifidogx"], + "file": { + "/etc/wifidogx/*": [ "write" ] + } } } } diff --git a/luci-app-nekoclash/Makefile b/luci-app-nekoclash/Makefile index a01d62fd1..d12dad708 100644 --- a/luci-app-nekoclash/Makefile +++ b/luci-app-nekoclash/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_MAINTAINER:=Thaolga PKG_NAME:=luci-app-nekoclash PKG_VERSION:=1.3.0 -PKG_RELEASE:=27 +PKG_RELEASE:=28 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/luci-app-nekoclash/htdocs/nekoclash/mo.php b/luci-app-nekoclash/htdocs/nekoclash/mo.php index d4edf733e..f96d41ecd 100644 --- a/luci-app-nekoclash/htdocs/nekoclash/mo.php +++ b/luci-app-nekoclash/htdocs/nekoclash/mo.php @@ -1,14 +1,13 @@ false, 'update_time' => '00:00']; if (!file_exists($subscriptionPath)) { mkdir($subscriptionPath, 0755, true); @@ -18,13 +17,8 @@ if (!file_exists($subscriptionFile)) { file_put_contents($subscriptionFile, json_encode([])); } -if (!file_exists($autoUpdateConfigFile)) { - file_put_contents($autoUpdateConfigFile, json_encode($autoUpdateConfig)); -} - $subscriptions = json_decode(file_get_contents($subscriptionFile), true); if (!$subscriptions) { - $subscriptions = []; for ($i = 0; $i < 7; $i++) { $subscriptions[$i] = [ 'url' => '', @@ -33,8 +27,6 @@ if (!$subscriptions) { } } -$autoUpdateConfig = json_decode(file_get_contents($autoUpdateConfigFile), true); - if (isset($_POST['update'])) { $index = intval($_POST['index']); $url = $_POST['subscription_url'] ?? ''; @@ -60,18 +52,6 @@ if (isset($_POST['update'])) { file_put_contents($subscriptionFile, json_encode($subscriptions)); } -if (isset($_POST['set_auto_update'])) { - $updateTime = $_POST['update_time'] ?? '00:00'; - $autoUpdateEnabled = isset($_POST['auto_update_enabled']); - - $autoUpdateConfig = [ - 'auto_update_enabled' => $autoUpdateEnabled, - 'update_time' => $updateTime - ]; - - file_put_contents($autoUpdateConfigFile, json_encode($autoUpdateConfig)); - $message = "自动更新设置已保存!"; -} ?> diff --git a/luci-app-nekoclash/htdocs/nekoclash/upload.php b/luci-app-nekoclash/htdocs/nekoclash/upload.php index 241e3ca52..a9aeab5f8 100644 --- a/luci-app-nekoclash/htdocs/nekoclash/upload.php +++ b/luci-app-nekoclash/htdocs/nekoclash/upload.php @@ -114,28 +114,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { echo '

文件内容已更新:' . htmlspecialchars(basename($fileToSave)) . '

'; } - if (isset($_FILES['customFileInput']) && isset($_POST['customDir'])) { - $customDir = rtrim($_POST['customDir'], '/') . '/'; - if (!is_dir($customDir)) { - if (!mkdir($customDir, 0755, true)) { - echo '自定义目录创建失败!'; - } - } - - $file = $_FILES['customFileInput']; - $uploadFilePath = $customDir . basename($file['name']); - - if ($file['error'] === UPLOAD_ERR_OK) { - if (move_uploaded_file($file['tmp_name'], $uploadFilePath)) { - echo '文件上传到自定义目录成功:' . htmlspecialchars(basename($file['name'])); - } else { - echo '文件上传到自定义目录失败!'; - } - } else { - echo '上传错误:' . $file['error']; - } - } - if (isset($_GET['customFile'])) { $customDir = rtrim($_GET['customDir'], '/') . '/'; $customFilePath = $customDir . basename($_GET['customFile']); @@ -522,119 +500,37 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { } ?> - + - 文件上传和管理 + Mihomo 文件管理 + + +
-

Mihomo文件管理器

- -
-

代理文件管理

-
-
- - -
-
-
    +

    Mihomo 文件管理

    +

    代理文件管理

    + + + + + + + + + + -
  • - - (大小: ) -
    -
    - - - -
    - - - - - -
    - - - - -
    -
  • - - - + + + + + + + + +
    文件名大小修改时间执行操作
    +
    +
    + + +
    + + + +
    + + + +
    -
    -

    配置文件管理

    -
    -
    - - + + + + + +
    +
    +
+ + + +

配置文件管理

+ + + + + + + + + + -
  • - - (大小: ) -
    -
    - - - -
    - - - - - -
    - - - - -
    -
  • + + + + + + - + +
    文件名大小修改时间执行操作
    +
    +
    + + +
    + + +
    + + + +
    +
    + + +
    +
    +
    + + + + +

    编辑文件:

    +

    最后更新日期:

    +
    +
    +
    + + + +
    +
    + + -
    -

    自定义目录文件上传

    -
    -
    - - - -
    -
    - '; - foreach ($customFiles as $file) { - echo '
  • '; - echo '' . htmlspecialchars($file) . ''; - echo ' (大小: ' . formatSize(filesize($customDir . $file)) . ')'; - echo '
  • '; - } - echo ''; - } else { - echo ''; - } - } - ?> - - -

    编辑文件:

    -

    最后更新日期:

    -
    -
    - - - -
    - -
    -

    订阅管理

    +

    订阅管理

    - 1. 注意: 通用模板(tuanbe.yaml)最多支持7个订阅链接,请勿更改默认名称。 + 1. 注意: 通用模板(mihomo.yaml)最多支持7个订阅链接,请勿更改默认名称。 + +

    @@ -884,28 +842,80 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { - +

    -
    +

    Base64 节点信息转换

    -
    - - - +
    +
    +
    -

    节点转换工具

    -
    - - -
    + +
    +

    节点转换工具

    +
    +
    + +
    + +
    +
    + + + + + + + + + diff --git a/luci-app-nekoclash/htdocs/nekoclash/upload_sb.php b/luci-app-nekoclash/htdocs/nekoclash/upload_sb.php index 95148d7fd..89ce3f251 100644 --- a/luci-app-nekoclash/htdocs/nekoclash/upload_sb.php +++ b/luci-app-nekoclash/htdocs/nekoclash/upload_sb.php @@ -267,6 +267,8 @@ if (isset($_POST['update_index'])) { Sing-box文件管理器 + +