Compare commits

...

4 Commits

Author SHA1 Message Date
Sebastien Caps 4812d03f07
Merge 6115e6f342 into 4f645eec17 2024-03-26 22:48:45 +03:00
Christian Bremvåg 4f645eec17
Merge pull request #1147 from heitbaum/patch-2
Update Makefile to error on incompatible-pointer-types
2024-03-23 08:33:00 +01:00
Rudi Heitbaum 123e373f88
Update Makefile to error on incompatible-pointer-types 2024-03-16 10:33:16 +11:00
Sebastien Caps 6115e6f342
Added fix/support for RHEL9 2023-12-05 09:06:43 +01:00
5 changed files with 37 additions and 34 deletions

View File

@ -11,7 +11,7 @@ EXTRA_CFLAGS += -Wno-missing-declarations
EXTRA_CFLAGS += -Wno-missing-prototypes
#EXTRA_CFLAGS += -Wno-error=cast-function-type
#EXTRA_CFLAGS += -Wno-parentheses-equality
EXTRA_CFLAGS += -Wno-error=incompatible-pointer-types
#EXTRA_CFLAGS += -Wno-error=incompatible-pointer-types
EXTRA_CFLAGS += -Wno-stringop-overread
#EXTRA_CFLAGS += -Wno-pointer-bool-conversion
EXTRA_CFLAGS += -Wno-unknown-pragmas

View File

@ -460,7 +460,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
if (started) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false);
@ -476,7 +476,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
goto exit;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
@ -1155,10 +1155,13 @@ check_bss:
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0)
#else
roam_info.channel = notify_channel;
roam_info.bssid = cur_network->network.MacAddress;
#endif
#endif
roam_info.req_ie = pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2;
roam_info.req_ie_len = pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2;
roam_info.resp_ie = pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6;
@ -1738,7 +1741,7 @@ exit:
}
static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
, int link_id
#endif
, u8 key_index
@ -1885,7 +1888,7 @@ addkey_end:
}
static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
, int link_id
#endif
, u8 keyid
@ -2053,7 +2056,7 @@ exit:
}
static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
int link_id,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
@ -2077,7 +2080,7 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
struct net_device *ndev,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
int link_id,
#endif
u8 key_index
@ -2129,7 +2132,7 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,
struct net_device *ndev,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
int link_id,
#endif
u8 key_index)
@ -5315,10 +5318,10 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
return ret;
}
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2))
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
#else
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
#else
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
#endif
{
_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
@ -6191,7 +6194,7 @@ static int cfg80211_rtw_set_channel(struct wiphy *wiphy
return 0;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, unsigned int link_id, struct cfg80211_chan_def *chandef){
#else
static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_chan_def *chandef){
@ -10484,7 +10487,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
rtw_cfg80211_indicate_scan_done(adapter, _TRUE);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
if (wdev->links[0].client.current_bss) {
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
if (wdev->connected) {

View File

@ -1738,7 +1738,7 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);
#ifdef CONFIG_RTW_NAPI
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0)))
netif_napi_add_weight(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);
#else
netif_napi_add(ndev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT);

View File

@ -213,7 +213,7 @@ const int drv_proc_hdls_num = sizeof(drv_proc_hdls) / sizeof(struct rtw_proc_hdl
static int rtw_drv_proc_open(struct inode *inode, struct file *file)
{
/* struct net_device *dev = proc_get_parent_data(inode); */
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) && (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(9, 0)))
ssize_t index = (ssize_t)PDE_DATA(inode);
#else
ssize_t index = (ssize_t)inode->i_private;
@ -239,10 +239,10 @@ static int rtw_drv_proc_open(struct inode *inode, struct file *file)
static ssize_t rtw_drv_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
size_t index = (ssize_t)file_inode(file)->i_private;
#else
ssize_t index = (ssize_t)file_inode(file)->i_private;
ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
#endif
const struct rtw_proc_hdl *hdl = drv_proc_hdls + index;
ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;
@ -4163,10 +4163,10 @@ const int adapter_proc_hdls_num = sizeof(adapter_proc_hdls) / sizeof(struct rtw_
static int rtw_adapter_proc_open(struct inode *inode, struct file *file)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
ssize_t index = (ssize_t)PDE_DATA(inode);
#else
#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 17, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
ssize_t index = (ssize_t)inode->i_private;
#else
ssize_t index = (ssize_t)PDE_DATA(inode);
#endif
const struct rtw_proc_hdl *hdl = adapter_proc_hdls + index;
void *private = proc_get_parent_data(inode);
@ -4189,10 +4189,10 @@ static int rtw_adapter_proc_open(struct inode *inode, struct file *file)
static ssize_t rtw_adapter_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
#else
#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 17, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
ssize_t index = (ssize_t)file_inode(file)->i_private;
#else
ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
#endif
const struct rtw_proc_hdl *hdl = adapter_proc_hdls + index;
ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;
@ -4358,10 +4358,10 @@ const int odm_proc_hdls_num = sizeof(odm_proc_hdls) / sizeof(struct rtw_proc_hdl
static int rtw_odm_proc_open(struct inode *inode, struct file *file)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
ssize_t index = (ssize_t)PDE_DATA(inode);
#else
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
ssize_t index = (ssize_t)inode->i_private;
#else
ssize_t index = (ssize_t)PDE_DATA(inode);
#endif
const struct rtw_proc_hdl *hdl = odm_proc_hdls + index;
void *private = proc_get_parent_data(inode);
@ -4384,10 +4384,10 @@ static int rtw_odm_proc_open(struct inode *inode, struct file *file)
static ssize_t rtw_odm_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
#else
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
ssize_t index = (ssize_t)file_inode(file)->i_private;
#else
ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
#endif
const struct rtw_proc_hdl *hdl = odm_proc_hdls + index;
ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;

View File

@ -1201,10 +1201,10 @@ inline void kthread_thread_exit(_completion *comp)
#endif
{
#ifdef PLATFORM_LINUX
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
complete_and_exit(comp, 0);
#else
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))
kthread_complete_and_exit(comp, 0);
#else
complete_and_exit(comp, 0);
#endif
#endif