Skip to content

Commit

Permalink
fix: adapt to old kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
Jun-Amane committed Nov 16, 2022
1 parent dab6e02 commit 0294b69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion os_dep/linux/ioctl_cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ void rtw_cfg80211_deinit_rfkill(struct wiphy *wiphy);
#define rtw_cfg80211_connect_result(wdev, bssid, req_ie, req_ie_len, resp_ie, resp_ie_len, status, gfp) cfg80211_connect_result(wdev_to_ndev(wdev), bssid, req_ie, req_ie_len, resp_ie, resp_ie_len, status, gfp)

#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) && !defined(RHEL79))
#define rtw_cfg80211_disconnected(wdev, reason, ie, ie_len, locally_generated, gfp) cfg80211_disconnected(wdev_to_ndev(wdev), reason, ie, ie_len, gfp)
#define rtw_cfg80211_disconnected(wdev, reason, ie, ie_len, locally_generated, gfp) cfg80211_disconnected(wdev_to_ndev(wdev), reason, ie, ie_len, ie_len, gfp)
#else
#define rtw_cfg80211_disconnected(wdev, reason, ie, ie_len, locally_generated, gfp) cfg80211_disconnected(wdev_to_ndev(wdev), reason, ie, ie_len, locally_generated, gfp)
#endif
Expand Down
2 changes: 1 addition & 1 deletion os_dep/linux/rtw_cfgvendor.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ struct sk_buff *rtw_cfg80211_vendor_event_alloc(
struct sk_buff *skb;

#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0))
skb = cfg80211_vendor_event_alloc(wiphy, len, event_id, gfp);
skb = cfg80211_vendor_event_alloc(wiphy, NULL, len, event_id, gfp);
#else
skb = cfg80211_vendor_event_alloc(wiphy, wdev, len, event_id, gfp);
#endif
Expand Down

1 comment on commit 0294b69

@dimerr
Copy link

@dimerr dimerr commented on 0294b69 Mar 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, that must be a typo ? There are no extra arguments to cfg80211_disconnected function
in older kernels: https://elixir.bootlin.com/linux/v4.1/source/include/net/cfg80211.h#L4583

Please sign in to comment.