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

Makefile updated to support Raspberry Pi computers #13

Open
wants to merge 3 commits into
base: main
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS) -fno-pie
EXTRA_CFLAGS += -O1
#EXTRA_CFLAGS += -O3
#EXTRA_CFLAGS += -Wall
Expand All @@ -24,7 +24,7 @@ ifeq ($(GCC_VER_49),1)
EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
endif

EXTRA_CFLAGS += -I$(src)/include
EXTRA_CFLAGS += -I$(src)/include -I$(srctree)/$(src)/include

EXTRA_LDFLAGS += --strip-debug

Expand Down Expand Up @@ -143,8 +143,8 @@ CONFIG_LAYER2_ROAMING = y
CONFIG_ROAMING_FLAG = 0x3
###################### Platform Related #######################
CONFIG_PLATFORM_I386_PC = y
CONFIG_PLATFORM_RPI_ARM = n
CONFIG_PLATFORM_RPI_ARM64 = n
CONFIG_PLATFORM_ARM_RPI = n
CONFIG_PLATFORM_ARM64_RPI = n
CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
CONFIG_PLATFORM_JB_X86 = n
Expand Down Expand Up @@ -277,10 +277,11 @@ _HAL_INTFS_FILES := hal/hal_intf.o \
hal/led/hal_$(HCI_NAME)_led.o


EXTRA_CFLAGS += -I$(src)/platform
EXTRA_CFLAGS += -I$(src)/platform -I$(srctree)/$(src)/platform
_PLATFORM_FILES := platform/platform_ops.o

EXTRA_CFLAGS += -I$(src)/hal/btc
EXTRA_CFLAGS += -I$(src)/hal/btc -I$(srctree)/$(src)/hal/btc
EXTRA_CFLAGS += -I$(src)/hal/phydm -I$(srctree)/$(src)/hal/phydm

########### HAL_RTL8188E #################################
ifeq ($(CONFIG_RTL8188E), y)
Expand Down Expand Up @@ -1350,7 +1351,7 @@ ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT

SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
SUBARCH := $(shell uname -m | sed -e "s/i.86/i386/; s/ppc64le/powerpc/; s/ppc/powerpc/; s/armv.l/arm/; s/aarch64/arm64/;")
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
KVER := $(shell uname -r)
Expand All @@ -1360,7 +1361,7 @@ INSTALL_PREFIX :=
STAGINGMODDIR := /lib/modules/$(KVER)/kernel/drivers/staging
endif

ifeq ($(CONFIG_PLATFORM_RPI_ARM), y)
ifeq ($(CONFIG_PLATFORM_ARM_RPI), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT

Expand All @@ -1372,7 +1373,7 @@ MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
endif

ifeq ($(CONFIG_PLATFORM_RPI_ARM64), y)
ifeq ($(CONFIG_PLATFORM_ARM64_RPI), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT

Expand Down Expand Up @@ -2557,4 +2558,3 @@ clean:
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
endif

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Based on EDIMAX EW-7811Un V2 Linux Driver (Version : 1.0.1.3) 2021-10-01
- Support Kernel: 3.8 - 5.4 (Realtek)
- Support up to Kernel 6.2
- Support for RaspiOS added by [@d3vilh](https://github.com/d3vilh)

## Specification

Expand Down
2 changes: 2 additions & 0 deletions os_dep/linux/ioctl_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -10519,10 +10519,12 @@ static int rtw_priv_get(struct net_device *dev,
return -ENETDOWN;
}

/* patch for "rtw_sctx_wait timeout: dump_mgntframe_and_wait" https://lkml.org/lkml/2022/11/6/275
if (RTW_CANNOT_RUN(padapter)) {
RTW_INFO("%s fail =>(padapter->bSurpriseRemoved == _TRUE) || ( padapter->bDriverStopped == _TRUE)\n", __func__);
return -ENETDOWN;
}
*/

if (extra == NULL) {
wrqu->length = 0;
Expand Down