Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make DAHDI build against Kernel 5.15 #8

Closed
wants to merge 6 commits into from

Commits on Sep 11, 2020

  1. Fix build on kernels >= 5.4.0 (linux/pci-aspm.h is gone)

    Since kernel commit 7ce2e76a0420801fb4b53b9e6850940e6b326433, ASPM
    definitions have moved from linux/pci-aspm.h to linux/pci.h
    laf0rge committed Sep 11, 2020
    Configuration menu
    Copy the full SHA
    a07cd95 View commit details
    Browse the repository at this point in the history
  2. Fix build on kernels >= 5.6.0 (struct proc_ops)

    In kernel commit d56c0d45f0e27f814e87a1676b6bdccccbc252e9, procfs
    switched from 'struct file_operations' to 'struct proc_ops'; we need
    to change DAHDI to build with those more recent kernels.
    laf0rge committed Sep 11, 2020
    Configuration menu
    Copy the full SHA
    6c6d85e View commit details
    Browse the repository at this point in the history
  3. dahdi-base.c: remove netdev->trans_start (kerne >= 4.7)

    In linux kernel commit 4d659fcb20d3d3302b429c889a73a92ff2804b9a
    in May 2016, netdev->trans_start was removed and write accesses
    are replaced with this helper: netif_trans_update(dev)
    
    This makes dahdi-base.c compile against kernels >= 4.7
    when CONFIG_DAHDI_NET is enabled.
    
    Signed-off-by: Harald Welte <laforge@osmocom.org>
    laf0rge committed Sep 11, 2020
    Configuration menu
    Copy the full SHA
    fb04119 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2021

  1. remove old ioctl code

    With 5.9 the macros HAVE_UNLOCKED_IOCTL and HAVE_COMPAT_IOCTL are gone.
    I didn't figured out when they were added because it predates git (2.6.12).
    
    I don't know if there are any user or if the current dahdi driver even builds with such an old
    linux kernel version.
    lynxis authored and laf0rge committed Nov 29, 2021
    Configuration menu
    Copy the full SHA
    97d6b0f View commit details
    Browse the repository at this point in the history
  2. dahdi-base, netdev: send frame via protocol handlers, fix HDLC encaps…

    …ulation
    
    The HDLC encapsulation module can add its own headers and trailers to
    the packet. For correct operation in this case, it is necessary to send
    a packet from DAHDI to the appropriate HDLC handler. The HDLC handler,
    in turn, should call the device driver procedure to transfer the packet.
    
    Thus, for correct processing of outgoing packets, we should use function
    hdlc_start_xmit from Linux HDLC stack as a ndo_start_xmit procedure.
    
    (Note that if the protocol handler does not provide a xmit procedure,
    then function hdlc_start_xmit will call the hardware driver directly.)
    
    In the case of DAHDI, the packet transfer procedure (device driver xmit
    procedure) is set in function dahdi_ioctl_chanconfig to dahdi_xmit:
    
        dev_to_hdlc(chan->hdlcnetdev->netdev)->xmit = dahdi_xmit;
    
    Asterisk-Issue: DAHLIN-381
    ikle authored and laf0rge committed Nov 29, 2021
    Configuration menu
    Copy the full SHA
    9c152d2 View commit details
    Browse the repository at this point in the history
  3. Fix build with DAHDI_NET on kernel >= 5.15

    Ever since commit ad7eab2ab014748b062507b7ac69f8e856057717
    "net: split out ndo_siowandev ioctl" has been merged in 5.15-rc1,
    DAHDI failed to compile with DAHDI_NET enabled due to slight differences
    in handling the HDLC/WAN device related ioctl.
    
    Signed-off-by: Harald Welte <laforge@gnumonks.org>
    laf0rge committed Nov 29, 2021
    Configuration menu
    Copy the full SHA
    b237182 View commit details
    Browse the repository at this point in the history