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

patch #210

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

patch #210

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1529,18 +1529,18 @@ enum ieee80211_state {
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#else
extern __inline int is_multicast_mac_addr(const u8 *addr)
static __inline int is_multicast_mac_addr(const u8 *addr)
{
return (addr[0] != 0xff) && (0x01 & addr[0]);
}

extern __inline int is_broadcast_mac_addr(const u8 *addr)
static __inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
}

extern __inline int is_zero_mac_addr(const u8 *addr)
static __inline int is_zero_mac_addr(const u8 *addr)
{
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
Expand Down
20 changes: 17 additions & 3 deletions os_dep/linux/ioctl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,12 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8
if (ret != _SUCCESS)
goto exit;

cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2)
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
#else
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
#endif


#else
int freq = rtw_ch2freq(ch);
Expand Down Expand Up @@ -4929,7 +4934,12 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
return ret;
}

static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)

#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2)
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
#else
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
#endif
{
_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);

Expand Down Expand Up @@ -9679,7 +9689,11 @@ 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 (wdev->current_bss) {
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2)
if (wdev->current_bss) {
#else
if (wdev->connected) {
#endif
RTW_INFO(FUNC_ADPT_FMT" clear current_bss by cfg80211_disconnected\n", FUNC_ADPT_ARG(adapter));
rtw_cfg80211_indicate_disconnect(adapter, 0, 1);
}
Expand Down