更新
This commit is contained in:
parent
24e893a8c9
commit
b56accee06
@ -11,15 +11,16 @@ define Package/fibocom-dial
|
|||||||
TITLE:=Fibocom Dial
|
TITLE:=Fibocom Dial
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/fibocom-dial/description
|
define Build/Prepare
|
||||||
Fibocom Dial (Prints a snarky message)
|
mkdir -p $(PKG_BUILD_DIR)
|
||||||
|
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/fibocom-dial/install
|
define Package/fibocom-dial/install
|
||||||
$(INSTALL_DIR) $(1)/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fibocom-dial $(1)/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fibocom-dial $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fibo_qmimsg_server $(1)/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fibo_qmimsg_server $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/multi-pdn-manager $(1)/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/multi-pdn-manager $(1)/usr/bin
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,fibocom-dial))
|
$(eval $(call BuildPackage,fibocom-dial))
|
||||||
|
@ -281,8 +281,11 @@ static int bridge_arp_reply(struct net_device *net, struct sk_buff *skb, uint br
|
|||||||
__skb_pull(reply, skb_network_offset(reply));
|
__skb_pull(reply, skb_network_offset(reply));
|
||||||
reply->ip_summed = CHECKSUM_UNNECESSARY;
|
reply->ip_summed = CHECKSUM_UNNECESSARY;
|
||||||
reply->pkt_type = PACKET_HOST;
|
reply->pkt_type = PACKET_HOST;
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
|
||||||
netif_rx_ni(reply);
|
netif_rx_ni(reply);
|
||||||
|
#else
|
||||||
|
netif_rx(reply);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -650,8 +653,13 @@ static void rmnet_vnd_update_rx_stats(struct net_device *net,
|
|||||||
struct pcpu_sw_netstats *stats64 = this_cpu_ptr(dev->stats64);
|
struct pcpu_sw_netstats *stats64 = this_cpu_ptr(dev->stats64);
|
||||||
|
|
||||||
u64_stats_update_begin(&stats64->syncp);
|
u64_stats_update_begin(&stats64->syncp);
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
|
||||||
stats64->rx_packets += rx_packets;
|
stats64->rx_packets += rx_packets;
|
||||||
stats64->rx_bytes += rx_bytes;
|
stats64->rx_bytes += rx_bytes;
|
||||||
|
#else
|
||||||
|
u64_stats_add(&stats64->rx_packets, rx_packets);
|
||||||
|
u64_stats_add(&stats64->rx_bytes, rx_bytes);
|
||||||
|
#endif
|
||||||
u64_stats_update_end(&stats64->syncp);
|
u64_stats_update_end(&stats64->syncp);
|
||||||
#else
|
#else
|
||||||
net->stats.rx_packets += rx_packets;
|
net->stats.rx_packets += rx_packets;
|
||||||
@ -666,8 +674,13 @@ static void rmnet_vnd_update_tx_stats(struct net_device *net,
|
|||||||
struct pcpu_sw_netstats *stats64 = this_cpu_ptr(dev->stats64);
|
struct pcpu_sw_netstats *stats64 = this_cpu_ptr(dev->stats64);
|
||||||
|
|
||||||
u64_stats_update_begin(&stats64->syncp);
|
u64_stats_update_begin(&stats64->syncp);
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
|
||||||
stats64->tx_packets += tx_packets;
|
stats64->tx_packets += tx_packets;
|
||||||
stats64->tx_bytes += tx_bytes;
|
stats64->tx_bytes += tx_bytes;
|
||||||
|
#else
|
||||||
|
u64_stats_add(&stats64->tx_packets, tx_packets);
|
||||||
|
u64_stats_add(&stats64->tx_bytes, tx_bytes);
|
||||||
|
#endif
|
||||||
u64_stats_update_end(&stats64->syncp);
|
u64_stats_update_end(&stats64->syncp);
|
||||||
#else
|
#else
|
||||||
net->stats.tx_packets += tx_packets;
|
net->stats.tx_packets += tx_packets;
|
||||||
@ -700,10 +713,17 @@ static struct rtnl_link_stats64 *_rmnet_vnd_get_stats64(struct net_device *net,
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
start = u64_stats_fetch_begin_irq(&stats64->syncp);
|
start = u64_stats_fetch_begin_irq(&stats64->syncp);
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
|
||||||
rx_packets = stats64->rx_packets;
|
rx_packets = stats64->rx_packets;
|
||||||
rx_bytes = stats64->rx_bytes;
|
rx_bytes = stats64->rx_bytes;
|
||||||
tx_packets = stats64->tx_packets;
|
tx_packets = stats64->tx_packets;
|
||||||
tx_bytes = stats64->tx_bytes;
|
tx_bytes = stats64->tx_bytes;
|
||||||
|
#else
|
||||||
|
rx_packets = u64_stats_read(&stats64->rx_packets);
|
||||||
|
rx_bytes = u64_stats_read(&stats64->rx_bytes);
|
||||||
|
tx_packets = u64_stats_read(&stats64->tx_packets);
|
||||||
|
tx_bytes = u64_stats_read(&stats64->tx_bytes);
|
||||||
|
#endif
|
||||||
} while (u64_stats_fetch_retry_irq(&stats64->syncp, start));
|
} while (u64_stats_fetch_retry_irq(&stats64->syncp, start));
|
||||||
|
|
||||||
stats->rx_packets += rx_packets;
|
stats->rx_packets += rx_packets;
|
||||||
@ -1857,8 +1877,16 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
|
|||||||
|
|
||||||
/* make MAC addr easily distinguishable from an IP header */
|
/* make MAC addr easily distinguishable from an IP header */
|
||||||
if (possibly_iphdr(dev->net->dev_addr)) {
|
if (possibly_iphdr(dev->net->dev_addr)) {
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
|
||||||
dev->net->dev_addr[0] |= 0x02; /* set local assignment bit */
|
dev->net->dev_addr[0] |= 0x02; /* set local assignment bit */
|
||||||
dev->net->dev_addr[0] &= 0xbf; /* clear "IP" bit */
|
dev->net->dev_addr[0] &= 0xbf; /* clear "IP" bit */
|
||||||
|
#else
|
||||||
|
u8 addr = dev->net->dev_addr[0];
|
||||||
|
|
||||||
|
addr |= 0x02; /* set local assignment bit */
|
||||||
|
addr &= 0xbf; /* clear "IP" bit */
|
||||||
|
dev_addr_mod(dev->net, 0, &addr, 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (!_usbnet_get_stats64)
|
if (!_usbnet_get_stats64)
|
||||||
_usbnet_get_stats64 = dev->net->netdev_ops->ndo_get_stats64;
|
_usbnet_get_stats64 = dev->net->netdev_ops->ndo_get_stats64;
|
||||||
|
@ -8,12 +8,9 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
LUCI_TITLE:=Modem Server
|
LUCI_TITLE:=Modem Server
|
||||||
LUCI_DEPENDS:=+luci-compat +kmod-usb-net +kmod-usb-net-cdc-ether +kmod-usb-acm \
|
LUCI_DEPENDS:=+luci-compat +quectel-CM-5G +kmod-gobinet \
|
||||||
+kmod-usb-net-qmi-wwan +kmod-usb-net-rndis +kmod-usb-serial-qualcomm \
|
+kmod-usb-net-cdc-ether +kmod-usb-net-qmi-wwan \
|
||||||
+kmod-usb-net-sierrawireless +kmod-usb-ohci +kmod-usb-serial \
|
+kmod-usb-net-rndis +kmod-usb-serial-option
|
||||||
+kmod-usb-serial-option \
|
|
||||||
+kmod-usb2 +kmod-usb3 \
|
|
||||||
+quectel-CM-5G +kmod-gobinet
|
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
|
@ -8,12 +8,11 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
LUCI_TITLE:=Modem Server
|
LUCI_TITLE:=Modem Server
|
||||||
LUCI_DEPENDS:=+luci-compat +kmod-usb-net +kmod-usb-net-cdc-ether +kmod-usb-acm \
|
LUCI_DEPENDS:=+luci-compat +quectel-CM-5G +kmod-usb-acm \
|
||||||
+kmod-usb-net-qmi-wwan +kmod-usb-net-rndis +kmod-usb-serial-qualcomm \
|
+kmod-usb-net-cdc-ether +kmod-usb-net-cdc-mbim \
|
||||||
+kmod-usb-net-sierrawireless +kmod-usb-ohci +kmod-usb-serial \
|
+kmod-usb-net-qmi-wwan +kmod-usb-net-rndis \
|
||||||
+kmod-usb-serial-option +kmod-usb-wdm \
|
+kmod-usb-serial-option +kmod-usb-wdm \
|
||||||
+kmod-usb2 +kmod-usb3 \
|
+kmod-qmi_wwan_f +kmod-qmi_wwan_q
|
||||||
+quectel-CM-5G +kmod-qmi_wwan_q +kmod-usb-net-cdc-mbim
|
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
|
@ -1,39 +1,39 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:= quectel-CM-5G
|
PKG_NAME:= quectel-CM-5G
|
||||||
PKG_RELEASE:=2
|
PKG_VERSION:=1.6.4
|
||||||
PKG_VERSION:=1.0
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/quectel-CM-5G
|
define Package/quectel-CM-5G
|
||||||
SECTION:=utils
|
SECTION:=utils
|
||||||
CATEGORY:=Utilities
|
CATEGORY:=Utilities
|
||||||
TITLE:=quectel-CM-5G app building test
|
TITLE:=quectel-CM-5G app
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/quectel-CM-5G/description
|
define Build/Prepare
|
||||||
quectel-CM-5G app building test
|
mkdir -p $(PKG_BUILD_DIR)
|
||||||
|
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
||||||
|
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
||||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||||
ARCH="$(LINUX_KARCH)" \
|
ARCH="$(LINUX_KARCH)" \
|
||||||
SUBDIRS="$(PKG_BUILD_DIR)" \
|
M="$(PKG_BUILD_DIR)" \
|
||||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
|
||||||
CC="$(TARGET_CC)"
|
CC="$(TARGET_CC)"
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/quectel-CM-5G/install
|
define Package/quectel-CM-5G/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin $(1)/lib/netifd/proto $(1)/lib/netifd
|
$(INSTALL_DIR) $(1)/usr/bin $(1)/lib/netifd/proto
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/quectel-CM $(1)/usr/bin/quectel-CM
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/quectel-CM $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) ./files/rmnet_init.sh $(1)/lib/netifd
|
||||||
|
$(INSTALL_BIN) ./files/rmnet.script $(1)/lib/netifd
|
||||||
$(INSTALL_BIN) ./files/rmnet.sh $(1)/lib/netifd/proto
|
$(INSTALL_BIN) ./files/rmnet.sh $(1)/lib/netifd/proto
|
||||||
$(INSTALL_BIN) ./files/rmnet6.sh $(1)/lib/netifd/proto
|
$(INSTALL_BIN) ./files/rmnet6.sh $(1)/lib/netifd/proto
|
||||||
$(INSTALL_BIN) ./files/rmnet6.script $(1)/lib/netifd
|
$(INSTALL_BIN) ./files/rmnet6.script $(1)/lib/netifd
|
||||||
$(INSTALL_BIN) ./files/rmnet.script $(1)/lib/netifd
|
|
||||||
$(INSTALL_BIN) ./files/rmnet_init.sh $(1)/usr/bin
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,quectel-CM-5G))
|
$(eval $(call BuildPackage,quectel-CM-5G))
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/network.sh
|
. /lib/functions/network.sh
|
||||||
. /lib/netifd/netifd-proto.sh
|
. /lib/netifd/netifd-proto.sh
|
||||||
|
|
||||||
setup_interface() {
|
setup_interface() {
|
||||||
INTERFACE=$1
|
INTERFACE=$1
|
||||||
CONFIG=/tmp/rmnet_$2_ipv4config
|
CONFIG=/tmp/rmnet_$2_ipv4config
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/network.sh
|
. /lib/functions/network.sh
|
||||||
. ../netifd-proto.sh
|
. ../netifd-proto.sh
|
||||||
|
|
||||||
init_proto "$@"
|
init_proto "$@"
|
||||||
|
|
||||||
proto_rmnet_setup() {
|
proto_rmnet_setup() {
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/network.sh
|
. /lib/functions/network.sh
|
||||||
. /lib/netifd/netifd-proto.sh
|
. /lib/netifd/netifd-proto.sh
|
||||||
|
|
||||||
setup_interface() {
|
setup_interface() {
|
||||||
INTERFACE=$1
|
INTERFACE=$1
|
||||||
CONFIG=/tmp/rmnet_$2_ipv6config
|
CONFIG=/tmp/rmnet_$2_ipv6config
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
. /lib/functions.sh
|
. /lib/functions.sh
|
||||||
. /lib/functions/network.sh
|
. /lib/functions/network.sh
|
||||||
. ../netifd-proto.sh
|
. ../netifd-proto.sh
|
||||||
|
|
||||||
init_proto "$@"
|
init_proto "$@"
|
||||||
|
|
||||||
proto_rmnet6_setup() {
|
proto_rmnet6_setup() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user