Skip to content

Commit

Permalink
Merge pull request #69 from moontide/fix-builds-on-kernel-6.7
Browse files Browse the repository at this point in the history
rtl8852au: Fix builds on kernel 6.7
  • Loading branch information
lwfinger authored Nov 24, 2023
2 parents c50294a + 01d3021 commit 70bdde2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions os_dep/linux/ioctl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -5252,7 +5252,11 @@ static int cfg80211_rtw_add_beacon(struct wiphy *wiphy, struct net_device *ndev,
}
rtw_mi_scan_abort(adapter, _TRUE);
rtw_mi_buddy_set_scan_deny(adapter, 300);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)
ret = rtw_add_beacon(adapter, info->beacon.head, info->beacon.head_len, info->beacon.tail, info->beacon.tail_len);
#else
ret = rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len);
#endif

exit:
return ret;
Expand Down Expand Up @@ -5386,7 +5390,11 @@ static int rtw_cfg80211_set_assocresp_ies(struct net_device *net, const u8 *buf,
}

static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)
struct cfg80211_ap_update *info)
#else
struct cfg80211_beacon_data *info)
#endif
{
int ret = 0;
_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
Expand All @@ -5399,14 +5407,28 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
* frames or %NULL
* @proberesp_ies_len: length of proberesp_ies in octets
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)
if (info->beacon.proberesp_ies_len > 0)
rtw_cfg80211_set_proberesp_ies(ndev, info->beacon.proberesp_ies, info->beacon.proberesp_ies_len);
#else
if (info->proberesp_ies_len > 0)
rtw_cfg80211_set_proberesp_ies(ndev, info->proberesp_ies, info->proberesp_ies_len);
#endif
#endif /* not_yet */

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)
if (info->beacon.assocresp_ies_len > 0)
rtw_cfg80211_set_assocresp_ies(ndev, info->beacon.assocresp_ies, info->beacon.assocresp_ies_len);
#else
if (info->assocresp_ies_len > 0)
rtw_cfg80211_set_assocresp_ies(ndev, info->assocresp_ies, info->assocresp_ies_len);
#endif

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0)
ret = rtw_add_beacon(adapter, info->beacon.head, info->beacon.head_len, info->beacon.tail, info->beacon.tail_len);
#else
ret = rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len);
#endif

return ret;
}
Expand Down

0 comments on commit 70bdde2

Please sign in to comment.