diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index bf2f5a5..3e08863 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -5394,8 +5394,15 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev, } 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 *ap_upd) +#else struct cfg80211_beacon_data *info) +#endif { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 7, 0) + struct cfg80211_beacon_data *const info = &ap_upd->beacon; +#endif int ret = 0; _adapter *adapter = (_adapter *)rtw_netdev_priv(ndev); diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index ab147a4..6166ac5 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -2047,13 +2047,13 @@ static void rtw_ethtool_get_drvinfo(struct net_device *dev, struct ethtool_drvin wdev = dev->ieee80211_ptr; if (wdev) { - strlcpy(info->driver, wiphy_dev(wdev->wiphy)->driver->name, + strscpy(info->driver, wiphy_dev(wdev->wiphy)->driver->name, sizeof(info->driver)); } else { - strlcpy(info->driver, "N/A", sizeof(info->driver)); + strscpy(info->driver, "N/A", sizeof(info->driver)); } - strlcpy(info->version, DRIVERVERSION, sizeof(info->version)); + strscpy(info->version, DRIVERVERSION, sizeof(info->version)); padapter = (_adapter *)rtw_netdev_priv(dev); if (padapter) { @@ -2064,10 +2064,10 @@ static void rtw_ethtool_get_drvinfo(struct net_device *dev, struct ethtool_drvin scnprintf(info->fw_version, sizeof(info->fw_version), "%d.%d", hal_data->firmware_version, hal_data->firmware_sub_version); } else { - strlcpy(info->fw_version, "N/A", sizeof(info->fw_version)); + strscpy(info->fw_version, "N/A", sizeof(info->fw_version)); } - strlcpy(info->bus_info, dev_name(wiphy_dev(wdev->wiphy)), + strscpy(info->bus_info, dev_name(wiphy_dev(wdev->wiphy)), sizeof(info->bus_info)); } diff --git a/os_dep/linux/usb_intf.c b/os_dep/linux/usb_intf.c index 572b8ff..675f243 100644 --- a/os_dep/linux/usb_intf.c +++ b/os_dep/linux/usb_intf.c @@ -347,7 +347,7 @@ struct rtw_usb_drv usb_drv = { .usbdrv.reset_resume = rtw_resume, #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) && LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)) .usbdrv.drvwrap.driver.shutdown = rtw_dev_shutdown, #else .usbdrv.driver.shutdown = rtw_dev_shutdown, diff --git a/os_dep/linux/wifi_regd.c b/os_dep/linux/wifi_regd.c index 81e1dc7..db8846c 100644 --- a/os_dep/linux/wifi_regd.c +++ b/os_dep/linux/wifi_regd.c @@ -405,7 +405,7 @@ int rtw_regd_init(struct wiphy *wiphy) wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS; #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0)) wiphy->regulatory_flags |= REGULATORY_IGNORE_STALE_KICKOFF; #endif