wwan: qmi_wwan_q: Bump version to 1.2.9

Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
Sean Khan 2025-06-02 23:37:14 -04:00
parent 02482401c2
commit 3f25226876

View File

@ -93,7 +93,7 @@ extern struct rmnet_nss_cb *rmnet_nss_callbacks __rcu __read_mostly;
* These devices may alternatively/additionally be configured using AT * These devices may alternatively/additionally be configured using AT
* commands on a serial interface * commands on a serial interface
*/ */
#define VERSION_NUMBER "V1.2.6" #define VERSION_NUMBER "V1.2.9"
#define QUECTEL_WWAN_VERSION "Quectel_Linux&Android_QMI_WWAN_Driver_"VERSION_NUMBER #define QUECTEL_WWAN_VERSION "Quectel_Linux&Android_QMI_WWAN_Driver_"VERSION_NUMBER
static const char driver_name[] = "qmi_wwan_q"; static const char driver_name[] = "qmi_wwan_q";
@ -406,7 +406,7 @@ static void bridge_mode_rx_fixup(sQmiWwanQmap *pQmapDev, struct net_device *net,
uint bridge_mode = 0; uint bridge_mode = 0;
unsigned char *bridge_mac; unsigned char *bridge_mac;
if (pQmapDev->qmap_mode > 1 || pQmapDev->use_rmnet_usb == 1) { if (pQmapDev->qmap_mode > 1 || ((pQmapDev->use_rmnet_usb == 1) && !one_card_mode)) {
struct qmap_priv *priv = netdev_priv(net); struct qmap_priv *priv = netdev_priv(net);
bridge_mode = priv->bridge_mode; bridge_mode = priv->bridge_mode;
bridge_mac = priv->bridge_mac; bridge_mac = priv->bridge_mac;
@ -806,6 +806,19 @@ static void rmnet_vnd_update_tx_stats(struct net_device *net,
#endif #endif
} }
#if (LINUX_VERSION_CODE > KERNEL_VERSION(6,5,0))
static inline unsigned int u64_stats_fetch_begin_irq(const struct u64_stats_sync *syncp)
{
return u64_stats_fetch_begin(syncp);
}
static inline bool u64_stats_fetch_retry_irq(const struct u64_stats_sync *syncp,
unsigned int start)
{
return u64_stats_fetch_retry(syncp, start);
}
#endif
#if defined(MHI_NETDEV_STATUS64) #if defined(MHI_NETDEV_STATUS64)
static struct rtnl_link_stats64 *_rmnet_vnd_get_stats64(struct net_device *net, struct rtnl_link_stats64 *stats) static struct rtnl_link_stats64 *_rmnet_vnd_get_stats64(struct net_device *net, struct rtnl_link_stats64 *stats)
{ {
@ -854,7 +867,7 @@ static struct rtnl_link_stats64 *_rmnet_vnd_get_stats64(struct net_device *net,
tx_bytes = stats64->tx_bytes; tx_bytes = stats64->tx_bytes;
} while (u64_stats_fetch_retry_irq(&stats64->syncp, start)); } while (u64_stats_fetch_retry_irq(&stats64->syncp, start));
stats->rx_packets += u64_stats_read(&rx_packets); stats->rx_packets += u64_stats_read(&rx_packets);
stats->rx_bytes += u64_stats_read(&rx_bytes); stats->rx_bytes += u64_stats_read(&rx_bytes);
stats->tx_packets += u64_stats_read(&tx_packets); stats->tx_packets += u64_stats_read(&tx_packets);
stats->tx_bytes += u64_stats_read(&tx_bytes); stats->tx_bytes += u64_stats_read(&tx_bytes);
@ -1793,7 +1806,7 @@ static void qmap_packet_decode(sQmiWwanQmap *pQmapDev,
} }
} }
#endif #endif
protocol = htons(ETH_P_IP); protocol = htons(ETH_P_IP);
break; break;
case 0x60: case 0x60:
#ifdef CONFIG_QCA_NSS_PACKET_FILTER #ifdef CONFIG_QCA_NSS_PACKET_FILTER
@ -1999,8 +2012,14 @@ static void ql_net_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *i
{ {
/* Inherit standard device info */ /* Inherit standard device info */
usbnet_get_drvinfo(net, info); usbnet_get_drvinfo(net, info);
/* strlcpy() is deprecated in kernel 6.8.0+, using strscpy instead */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6,8,0))
strlcpy(info->driver, driver_name, sizeof(info->driver)); strlcpy(info->driver, driver_name, sizeof(info->driver));
strlcpy(info->version, VERSION_NUMBER, sizeof(info->version)); strlcpy(info->version, VERSION_NUMBER, sizeof(info->version));
#else
strscpy(info->driver, driver_name, sizeof(info->driver));
strscpy(info->version, VERSION_NUMBER, sizeof(info->version));
#endif
} }
static struct ethtool_ops ql_net_ethtool_ops; static struct ethtool_ops ql_net_ethtool_ops;
@ -2065,7 +2084,7 @@ static int qmi_wwan_register_subdriver(struct usbnet *dev)
atomic_set(&info->pmcount, 0); atomic_set(&info->pmcount, 0);
/* register subdriver */ /* register subdriver */
#if (LINUX_VERSION_CODE > KERNEL_VERSION( 5,12,0 )) //cac6fb015f719104e60b1c68c15ca5b734f57b9c #if (LINUX_VERSION_CODE >= KERNEL_VERSION( 5,14,0 )) //cac6fb015f719104e60b1c68c15ca5b734f57b9c
subdriver = usb_cdc_wdm_register(info->control, &dev->status->desc, subdriver = usb_cdc_wdm_register(info->control, &dev->status->desc,
4096, WWAN_PORT_QMI, &qmi_wwan_cdc_wdm_manage_power); 4096, WWAN_PORT_QMI, &qmi_wwan_cdc_wdm_manage_power);
#else #else
@ -2194,7 +2213,7 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
int qmap_size = (dev->driver_info->data)&0xFF; int qmap_size = (dev->driver_info->data)&0xFF;
int idProduct = le16_to_cpu(dev->udev->descriptor.idProduct); int idProduct = le16_to_cpu(dev->udev->descriptor.idProduct);
int lte_a = (idProduct == 0x0306 || idProduct == 0x030B || idProduct == 0x0512 || idProduct == 0x0620 || int lte_a = (idProduct == 0x0306 || idProduct == 0x030B || idProduct == 0x0512 || idProduct == 0x0620 ||
idProduct == 0x0800 || idProduct == 0x0801 || idProduct == 0x0122); idProduct == 0x0800 || idProduct == 0x0801 || idProduct == 0x0122 || idProduct == 0x0316);
if (qmap_size > 4096 || dev->udev->speed >= USB_SPEED_SUPER) { //if meet this requirements, must be LTE-A or 5G if (qmap_size > 4096 || dev->udev->speed >= USB_SPEED_SUPER) { //if meet this requirements, must be LTE-A or 5G
lte_a = 1; lte_a = 1;
@ -2226,7 +2245,9 @@ static int qmi_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
pQmapDev->rmnet_info.size = sizeof(RMNET_INFO); pQmapDev->rmnet_info.size = sizeof(RMNET_INFO);
pQmapDev->rmnet_info.rx_urb_size = pQmapDev->qmap_size; pQmapDev->rmnet_info.rx_urb_size = pQmapDev->qmap_size;
pQmapDev->rmnet_info.ep_type = 2; //DATA_EP_TYPE_HSUSB pQmapDev->rmnet_info.ep_type = 2; //DATA_EP_TYPE_HSUSB
pQmapDev->rmnet_info.iface_id = 4; pQmapDev->rmnet_info.iface_id = 4;//Interface ID
if(idProduct == 0x0316)
pQmapDev->rmnet_info.iface_id = 3;// SDX35 Interface ID
pQmapDev->rmnet_info.qmap_mode = pQmapDev->qmap_mode; pQmapDev->rmnet_info.qmap_mode = pQmapDev->qmap_mode;
pQmapDev->rmnet_info.qmap_version = pQmapDev->qmap_version; pQmapDev->rmnet_info.qmap_version = pQmapDev->qmap_version;
pQmapDev->rmnet_info.dl_minimum_padding = 0; pQmapDev->rmnet_info.dl_minimum_padding = 0;