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

5.19.0-0.deb11.2-amd64ereor #191

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
EXTRA_CFLAGS += -O1
#EXTRA_CFLAGS += -O3
#EXTRA_CFLAGS += -Wall
#EXTRA_CFLAGS += -Wextra
#EXTRA_CFLAGS += -Werror
#EXTRA_CFLAGS += -pedantic
#EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes

EXTRA_CFLAGS += -Wno-unused-variable
EXTRA_CFLAGS += -Wno-unused-value
EXTRA_CFLAGS += -Wno-unused-label
EXTRA_CFLAGS += -Wno-unused-parameter
EXTRA_CFLAGS += -Wno-unused-function
EXTRA_CFLAGS += -Wno-unused
#EXTRA_CFLAGS += -Wno-uninitialized
EXTRA_CFLAGS += -Wno-vla -g
EXTRA_CFLAGS += -Wno-implicit-fallthrough

GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc )
Expand Down
3 changes: 2 additions & 1 deletion core/efuse/rtw_efuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,13 +778,14 @@ void rtw_efuse_analyze(PADAPTER padapter, u8 Type, u8 Fake)
j = 0;

for (i = 0; i < mapLen; i++) {
if (i % 16 == 0)
if (i % 16 == 0) {
RTW_PRINT_SEL(RTW_DBGDUMP, "0x%03x: ", i);
_RTW_PRINT_SEL(RTW_DBGDUMP, "%02X%s"
, pEfuseHal->fakeEfuseInitMap[i]
, ((i + 1) % 16 == 0) ? "\n" : (((i + 1) % 8 == 0) ? " " : " ")
);
}
}
_RTW_PRINT_SEL(RTW_DBGDUMP, "\n");
if (eFuseWord)
rtw_mfree((u8 *)eFuseWord, EFUSE_MAX_SECTION_NUM * (EFUSE_MAX_WORD_UNIT * 2));
Expand Down
3 changes: 2 additions & 1 deletion core/rtw_mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -3119,10 +3119,11 @@ void rtw_drv_scan_by_self(_adapter *padapter, u8 reason)
#ifdef CONFIG_LAYER2_ROAMING
if (rtw_chk_roam_flags(padapter, RTW_ROAM_ACTIVE) && pmlmepriv->need_to_roam == _TRUE)
RTW_INFO(FUNC_ADPT_FMT" need to roam, don't care BusyTraffic\n", FUNC_ADPT_ARG(padapter));
else
else {
#endif
RTW_INFO(FUNC_ADPT_FMT" exit BusyTraffic\n", FUNC_ADPT_ARG(padapter));
goto exit;
}
}
else if (ssc_chk != SS_ALLOW)
goto exit;
Expand Down
3 changes: 2 additions & 1 deletion core/rtw_rf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1288,9 +1288,10 @@ void dump_txpwr_lmt(void *sel, _adapter *adapter)

RTW_PRINT_SEL(sel, "txpwr_lmt_2g_cck_ofdm_state:0x%02x\n", rfctl->txpwr_lmt_2g_cck_ofdm_state);
#ifdef CONFIG_IEEE80211_BAND_5GHZ
if (IS_HARDWARE_TYPE_JAGUAR_AND_JAGUAR2(adapter))
if (IS_HARDWARE_TYPE_JAGUAR_AND_JAGUAR2(adapter)) {
RTW_PRINT_SEL(sel, "txpwr_lmt_5g_cck_ofdm_state:0x%02x\n", rfctl->txpwr_lmt_5g_cck_ofdm_state);
RTW_PRINT_SEL(sel, "txpwr_lmt_5g_20_40_ref:0x%02x\n", rfctl->txpwr_lmt_5g_20_40_ref);
}
#endif
RTW_PRINT_SEL(sel, "\n");

Expand Down
12 changes: 12 additions & 0 deletions include/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1529,18 +1529,30 @@ enum ieee80211_state {
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#else
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0))
static inline int is_multicast_mac_addr(const u8 *addr)
#else
extern __inline int is_multicast_mac_addr(const u8 *addr)
#endif
{
return (addr[0] != 0xff) && (0x01 & addr[0]);
}

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0))
static inline int is_broadcast_mac_addr(const u8 *addr)
#else
extern __inline int is_broadcast_mac_addr(const u8 *addr)
#endif
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
}

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

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

#else
int freq = rtw_ch2freq(ch);
Expand All @@ -429,8 +433,12 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8
}

ctype = rtw_chbw_to_nl80211_channel_type(ch, bw, offset, ht);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
cfg80211_ch_switch_notify(adapter->pnetdev, freq, ctype, 0);
#else
cfg80211_ch_switch_notify(adapter->pnetdev, freq, ctype);
#endif
#endif

exit:
return ret;
Expand Down Expand Up @@ -1085,7 +1093,11 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
#endif

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
roam_info.links[0].bssid = cur_network->network.MacAddress;
#else
roam_info.bssid = cur_network->network.MacAddress;
#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;
Expand Down Expand Up @@ -4929,7 +4941,12 @@ 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,
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);

Expand Down Expand Up @@ -9679,7 +9696,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 (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
if (wdev->links[0].client.current_bss) {
#else
if (wdev->current_bss) {
#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
4 changes: 4 additions & 0 deletions os_dep/linux/ioctl_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -9778,7 +9778,11 @@ static int rtw_mp_efuse_set(struct net_device *dev,
rtw_hal_read_chip_info(padapter);
/* set mac addr*/
rtw_macaddr_cfg(adapter_mac_addr(padapter), get_hal_mac_addr(padapter));
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
_rtw_memcpy(padapter->pnetdev->dev_addr, get_hal_mac_addr(padapter), ETH_ALEN); /* set mac addr to net_device */
#else
dev_addr_set(padapter->pnetdev, get_hal_mac_addr(padapter)); /* set mac addr to net_device */
#endif

#ifdef CONFIG_P2P
rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter));
Expand Down
4 changes: 4 additions & 0 deletions os_dep/osdep_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -2491,7 +2491,11 @@ int rtw_change_ifname(_adapter *padapter, const char *ifname)

rtw_init_netdev_name(pnetdev, ifname);

#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
_rtw_memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
#else
dev_addr_set(pnetdev, adapter_mac_addr(padapter));
#endif

if (rtnl_lock_needed)
ret = register_netdev(pnetdev);
Expand Down