Skip to content

Commit

Permalink
Added kernel v5.4 support + better handling of fallthroughs
Browse files Browse the repository at this point in the history
  • Loading branch information
kimocoder committed Jan 24, 2020
1 parent 31127ce commit d2415df
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 18 deletions.
15 changes: 0 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS) -fno-pie
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
#EXTRA_CFLAGS += -Wno-cast-function-type
EXTRA_CFLAGS += -Wno-date-time
#EXTRA_CFLAGS += -Wno-misleading-indentation
#EXTRA_CFLAGS += -Wno-uninitialized
# Relax some warnings from '-Wextra' so we won't get flooded with warnings
#EXTRA_CFLAGS += -Wno-sign-compare
#EXTRA_CFLAGS += -Wno-missing-field-initializers
#EXTRA_CFLAGS += -Wno-type-limits
EXTRA_CFLAGS += -Wno-implicit-fallthrough
EXTRA_CFLAGS += -Wno-maybe-uninitialized

GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc )
ifeq ($(GCC_VER_49),1)
Expand Down
6 changes: 5 additions & 1 deletion core/rtw_mlme_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,11 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame)
ptable->func = &OnAuth;
else
ptable->func = &OnAuthClient;
/* pass through */
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
__attribute__ ((fallthrough));
#else
__attribute__ ((__fallthrough__));
#endif
case WIFI_ASSOCREQ:
case WIFI_REASSOCREQ:
_mgt_dispatcher(padapter, ptable, precv_frame);
Expand Down
2 changes: 1 addition & 1 deletion dkms.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE_NAME="realtek-rtl8188eus"
PACKAGE_VERSION="5.3.9~20200112"
PACKAGE_VERSION="5.3.9~20200124"
CLEAN="'make' clean"
BUILT_MODULE_NAME[0]=8188eu
PROCS_NUM=`nproc`
Expand Down
2 changes: 1 addition & 1 deletion hal/hal_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ s32 c2h_handler(_adapter *adapter, u8 id, u8 seq, u8 plen, u8 *payload)
#endif
case C2H_EXTEND:
sub_id = payload[0];
/* no handle, goto default */
__attribute__ ((__fallthrough__));

default:
if (phydm_c2H_content_parsing(adapter_to_phydm(adapter), id, plen, payload) != TRUE)
Expand Down
2 changes: 2 additions & 0 deletions os_dep/linux/ioctl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2367,6 +2367,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
case NL80211_IFTYPE_P2P_CLIENT:
is_p2p = _TRUE;
#endif
__attribute__ ((__fallthrough__));
case NL80211_IFTYPE_STATION:
networkType = Ndis802_11Infrastructure;

Expand All @@ -2391,6 +2392,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
case NL80211_IFTYPE_P2P_GO:
is_p2p = _TRUE;
#endif
__attribute__ ((__fallthrough__));
case NL80211_IFTYPE_AP:
networkType = Ndis802_11APMode;

Expand Down

0 comments on commit d2415df

Please sign in to comment.