Compare commits

..

No commits in common. "6e9319c3f442f2ec54d903c3f833ae2600ceb9fc" and "7924117c2a3b87e8c657fcbe7cceb4abe220418b" have entirely different histories.

2 changed files with 4 additions and 21 deletions

View File

@ -1,7 +1,3 @@
v2.1.1
Fix support for kernels <5.12
Tested on 5.4.0
v2.1.0 v2.1.0
Implement proper functionality for echoing transmits Implement proper functionality for echoing transmits
Transmit errors are now reported properly Transmit errors are now reported properly

View File

@ -57,7 +57,7 @@
#define KO_DESC "Netdevice driver for Intrepid CAN/Ethernet devices" #define KO_DESC "Netdevice driver for Intrepid CAN/Ethernet devices"
#define KO_MAJOR 2 #define KO_MAJOR 2
#define KO_MINOR 1 #define KO_MINOR 1
#define KO_PATCH 1 #define KO_PATCH 0
#define KO_VERSION str(KO_MAJOR) "." str(KO_MINOR) "." str(KO_PATCH) #define KO_VERSION str(KO_MAJOR) "." str(KO_MINOR) "." str(KO_PATCH)
#define KO_VERSION_INT (KO_MAJOR << 16) | (KO_MINOR << 8) | KO_PATCH #define KO_VERSION_INT (KO_MAJOR << 16) | (KO_MINOR << 8) | KO_PATCH
@ -93,7 +93,6 @@ MODULE_VERSION(KO_VERSION);
#define KERNEL_FAULT_TAKES_VMA (LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)) #define KERNEL_FAULT_TAKES_VMA (LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0))
#define KERNEL_SUPPORTS_ALIASES (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)) #define KERNEL_SUPPORTS_ALIASES (LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0))
#define KERNEL_DEFINES_VM_FAULT_T (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)) #define KERNEL_DEFINES_VM_FAULT_T (LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0))
#define KERNEL_CAN_ECHO_TRACKS_LEN (LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0))
#if KERNEL_DEFINES_VM_FAULT_T == 0 #if KERNEL_DEFINES_VM_FAULT_T == 0
typedef int vm_fault_t; typedef int vm_fault_t;
@ -270,11 +269,7 @@ static netdev_tx_t intrepid_netdevice_xmit(struct sk_buff *skb, struct net_devic
} }
msg.description = intrepid_next_tx_description(ics, &tx_idx); msg.description = intrepid_next_tx_description(ics, &tx_idx);
can_put_echo_skb(skb, dev, tx_idx can_put_echo_skb(skb, dev, tx_idx, msg.length);
#if KERNEL_CAN_ECHO_TRACKS_LEN
, msg.length
#endif
);
consumed = true; consumed = true;
/* Copy the message into the usermode box */ /* Copy the message into the usermode box */
@ -542,19 +537,11 @@ static bool handle_transmit_receipt(
/* unsuccessful transmits */ /* unsuccessful transmits */
/* stats are handled in intrepid_fill_canerr_frame_from_neomessage */ /* stats are handled in intrepid_fill_canerr_frame_from_neomessage */
if (msg->status.globalError) { if (msg->status.globalError) {
can_free_echo_skb(device, tx_idx can_free_echo_skb(device, tx_idx, NULL);
#if KERNEL_CAN_ECHO_TRACKS_LEN
, NULL
#endif
);
return false; return false;
} }
length = can_get_echo_skb(device, tx_idx length = can_get_echo_skb(device, tx_idx, NULL);
#if KERNEL_CAN_ECHO_TRACKS_LEN
, NULL
#endif
);
stats->tx_packets++; stats->tx_packets++;
stats->tx_bytes += length; stats->tx_bytes += length;
return true; return true;