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

Fix cfg80211 Function Argument Errors and Include Missing Header Files for 5.15.x Linux Kernel Compatibility #1160

Open
wants to merge 2 commits into
base: v5.6.4.2
Choose a base branch
from

Conversation

IamCOD3X
Copy link

@IamCOD3X IamCOD3X commented Jun 7, 2024

Summary

This pull request addresses several compatibility issues and ensures smooth operation with the 5.15.x Linux kernel. The changes include:

  1. Fixing the "too few arguments to function cfg80211_ch_switch_started_notify" error by adjusting the number of arguments passed based on the kernel version.
  2. Adding necessary flags to resolve errors related to missing header files, such as "drv_types.h not found".
  3. Incorporating conditionals to support the 5.15.x kernel series specifically.

Changes

  1. Function Argument Fixes:

    • Updated the calls to cfg80211_ch_switch_started_notify:
      • For kernel versions 6.3.0 to less than 6.9.0: Five arguments.
      • For kernel versions 6.1.0 to less than 6.3.0, and 5.15.0 to less than 6.9.0: Four arguments.
      • For kernel versions 5.15.78 and above: Four arguments.
      • For kernel versions 5.11.0 to less than 5.15.0, or RHEL version 8.0 or higher: Three arguments.
      • For versions lower than 5.11.0: Two arguments.
    • Updated the calls to cfg80211_ch_switch_notify:
      • For kernel versions 6.3.0 to less than 6.9.0: Four arguments.
      • For kernel versions 5.19.2 and above: Three arguments.
      • For kernel versions 5.15.0 to less than 6.9.0, and 5.15.78 and above: Three arguments.
      • For versions lower than 5.15.0: Two arguments.
  2. Header File Fixes:

    • Added flags to include paths for header files to fix errors like "drv_types.h not found".
  3. Other Compatibility Fixes:

    • Ensured correct handling of key management functions with added link_id parameter for kernel versions 5.15.78 and above.
    • Adjusted cfg80211_rtw_stop_ap and cfg80211_rtw_get_channel functions to accommodate additional parameters in 5.15.78 and above.
    • Updated rtw_cfg80211_indicate_connect and other related functions for proper field assignments in kernel 5.15.78 and above.

Motivation

These changes ensure compatibility with the 5.15.x Linux kernel, preventing build errors related to function argument mismatches and header file issues. This is crucial for maintaining stability and functionality across different kernel versions.

Testing

  • Verified the build process and functionality on the 5.15.x kernel series to ensure that the correct number of arguments are passed and that no header file issues persist.

Additional Notes

  • This PR addresses specific compatibility and build issues with the 5.15.x kernel series. Further testing on different kernel versions and environments is recommended to ensure comprehensive coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant