OpenWrt Forum Archive

Topic: Update on Linksys WRT1900AC support

The content of this topic has been archived between 16 Sep 2014 and 7 May 2018. Unfortunately there are posts – most likely complete pages – missing.

gufus wrote:
hno wrote:
nbd wrote:

Quite frankly, this is completely ridiculous. Belkin has already released the source code of this driver in a GPL tarball. Interestingly enough, the driver there has GPL license headers apparently added by Marvell.

Which GPL tarball? And it had full sources without precompiled library?

Marvell 88W8864 Linux Driver/Firmware Source

https://github.com/TheDgtl/mrvl_wlan_v7drv

Regards

I copied the driver portion of this to the package folder in the OpenWRT SDK.

I'm having problems getting creating a OpenWRT kernel package using the code. I'm posting the Makefiles I'm trying to use to compile the code and make the package. Help would be appreciated.

If trying to create an OpenWRT Package for this posted wireless driver code is wrong please advise and I will stop.

Makefile in package/wlan-v7:

#WRT1900AC Wifi Driver test package 

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=wlan-v7
PKG_VERSION:=1.0.0
PKG_RELEASE:=1

include $(INCLUDE_DIR)/package.mk

define KernelPackage/wlan-v7
  SECTION:=kernel
  CATEGORY:=Kernel modules
  SUBMENU:=Proprietary Test Marvell WiFi driver
  TITLE:=Kernel driver for 88W8764 WiFi chipsets
  FILES:=$(PKG_BUILD_DIR)/ap8x.o
  #AUTOLOAD:=$(call AutoLoad,30,wl_glue wl)
endef

define Build/Prepare
    $(call Build/Prepare/Default)
    mkdir -p $(PKG_BUILD_DIR)
    $(CP) ./src/* $(PKG_BUILD_DIR)/
endef

define Build/Configure
    #$(MAKE) -C $(PKG_BUILD_DIR) modules
    $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS)
endef

define KernelPackage/wlan-v7/install
    $(INSTALL_DIR) $(1)/bin
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlan-v7 $(1)/bin/
endef

$(eval $(call KernelPackage,wlan-v7))

Makefile in package/wlan-v7/src:

#WRT1900AC Wifi Driver test package 

APS=8

#Set equal to 1 to build with client code, else 0
BUILD_CLIENT=1

#Cap Tx max rate
BUILD_CAP_MAX_RATE=1

ifeq (1, $(BUILD_CLIENT))
#Set equal to 1 in order compile in WPS client code
BUILD_WPS_CLIENT=1
#Set equal to 1 in order to compile DFS channel support and DFS passive scan for channels 52 to 64 and 100 to 140
BUILD_DFS_PASSIVE_SCAN = 1
#Set equal to 1 to include EWB FEATURE
BUILD_EWB=1
endif

#Set equal to 1 in order compile in multicast proxy code
BUILD_MPRXY=1
#Set equal to 1 to include TSO SUPPORT
#Enable TSO by default for L26; L24 does not support TSO
BUILD_TSO=1
#Set equal to 1 to include Dynamic BA Support
BUILD_DYNAMIC_BA=1
#Set equal to 1 to include WFA 11n TKIP Negative tests
BUILD_WFA_TKIP_NEGATIVE = 1
#set equal to 1 to include rx path interrupt reduction
BUILD_RXPATHOPT=0
#set to 1 to enable tcp ack enhancement
BUILD_TCP_ACK_ENHANCEMENT = 1
#Set equal to 1 to include SC2 Palladium simulation development.
PALLADIUM=0
#Set equal to 1 to include spectrum support.
BUILD_SSU_SUPPORT = 0

ifeq (1, $(PALLADIUM))
BUILD_SC_PALLADIUM=1
endif

#Set equal to 1 to enable packet statistics code.
BUILD_QUEUE_STATS_LATENCY=0
BUILD_QUEUE_STATS_CNT_HIST=1

#Set equal to 1,2, or 3 to enable packet statistics code in compile time.
ifeq (1, $(QUEUE_STATS))
BUILD_QUEUE_STATS_LATENCY=1
endif

ifeq (2, $(QUEUE_STATS))
BUILD_QUEUE_STATS_CNT_HIST=1
endif

ifeq (3, $(QUEUE_STATS))
BUILD_QUEUE_STATS_LATENCY=1
BUILD_QUEUE_STATS_CNT_HIST=1
endif

DRIVER_OBJS    := \
        driver/linux/ap8xLnxDesc.o     \
        driver/linux/ap8xLnxFwdl.o        \
        driver/linux/ap8xLnxFwcmd.o        \
        driver/linux/ap8xLnxIntf.o        \
        driver/linux/ap8xLnxApi.o        \
        driver/linux/ap8xLnxRecv.o        \
        driver/linux/ap8xLnxXmit.o        \
        driver/linux/ap8xLnxStat.o        \
        driver/linux/ap8xLnxWlLog.o    \
        driver/linux/ap8xLnxDump.o

API_OBJS    += \
        core/api/wlFun.o        \
        core/api/wlApi.o

AP_OBJS        += \
        core/dbg/wldebug.o         \
        core/encr/aes_key_wrap.o \
        core/encr/hmac_md5.o \
        core/encr/prfapi.o \
        core/encr/pbkdf2.o \
        core/encr/md5.o \
        core/encr/sha1.o \
        core/encr/tkip.o \
        core/encr/AP/ccmpAP.o \
        core/encr/AP/keyMgmt.o \
        core/encr/AP/tkipAP.o \
        core/wlsys/bcngen.o \
        core/wlsys/hal_mib.o \
        core/wlsys/hal_sys.o \
        core/wlsys/w81init.o \
        core/mgt/mhsm.o \
        core/mgt/List.o \
        core/mgt/timer.o \
        core/mgt/AP/AssocSrvAp.o \
        core/mgt/AP/AuthSrvAp.o \
        core/mgt/AP/idList.o \
        core/mgt/AP/macmgmtap.o \
        core/mgt/AP/macMgmtEvt.o \
        core/mgt/AP/macMgmtMlme.o \
        core/mgt/AP/mlmeApi.o \
        core/mgt/AP/mlmeAuth.o \
        core/mgt/AP/smeMain.o \
        core/mgt/AP/StaDb.o \
        core/mgt/AP/SyncSrvAp.o \
        core/mgt/AP/util.o \
        core/mgt/AP/wlMlmeSrv.o \
        core/mib/mib.o \
        core/mib/wl_mib.o \
        core/os/os_if.o \
        core/qos/qos.o \
        core/qos/qos_back.o \
        core/qos/AP/qos_dlp.o \
        core/qos/AP/qos_scheduler.o \
        core/wlsys/domain.o \
        core/wlsys/packet.o \
        core/wlsys/fragment.o \
        core/wlsys/autochannel.o \
        core/mgt/AP/dfsSM.o \
        core/mgt/AP/dfsEv.o \
        core/wds/wds.o

#ifeq (1, $(BUILD_CLIENT))
    $(AP_OBJS)    += \
        core/mgt/STA/AssocSta_sm.o \
        core/mgt/STA/AssocSta_srv.o \
        core/mgt/STA/AuthSta_sm.o \
        core/mgt/STA/AuthSta_srv.o \
        core/mgt/STA/SyncSta_sm.o \
        core/mgt/STA/SyncSta_srv.o \
        core/mgt/STA/macMgmtEvtSta.o \
        core/mgt/STA/smeStateMgrSta.o \
        core/mgt/STA/mlmeApiSta.o \
        core/mgt/STA/wlvmac.o \
        core/mgt/STA/child_srv.o \
        core/mgt/STA/parent_srv.o \
        core/mgt/STA/wlMlmeSrvSta.o \
        core/wlsys/linkmgt.o \
        core/wlsys/ewb_hash.o \
        core/wlsys/ewb_packet.o \
        core/encr/STA/keyMgmtSta.o
#endif

#obj-$(CONFIG_MARVELL_SOFTAP) += ap8x.o
obj-m += ap8x.o 

#CROSS_COMPILE=$(TARGET_CROSS)
#KDIR:=$(KDIR)
PWD:=$(shell pwd)

#AS        = $(CROSS_COMPILE)as
#LD        = $(CROSS_COMPILE)ld
#CC        = $(CROSS_COMPILE)gcc

#SOC:=$(KDIR)/arch/arm/mach-mv88fxx81

#EXTRA_CFLAGS+= -I${KDIR}
EXTRA_CFLAGS+= -DWL_KERNEL_26
EXTRA_CFLAGS+= -DUSE_TASKLET
#EXTRA_CFLAGS+= -DNAPI
EXTRA_CFLAGS+= -O2 -funroll-loops
EXTRA_CFLAGS+=-I${PWD} -I${PWD} -I${PWD}/driver/linux -I${PWD}/core/api -I${PWD}/core/incl -I${PWD}/core/mgt/STA/incl
#EXTRA_CFLAGS+=-I${SOC} -I${SOC}/Common -I${SOC}/Soc/idma -I${SOC}/Soc/ctrlEnv -I${SOC}/mv88f5181 -I${SOC}/osServices -I${SOC}/osServices/linux/ArchARM
#EXTRA_CFLAGS+=-I${SOC}/Board/boardEnv -I${SOC}/Board/boardEnv/DB_88FXX81 -I${SOC}/Soc/ctrlEnv/MV_88FXX81 -I${SOC}/osServices/linux

ifeq (BE,$(ENDIAN))
EXTRA_CFLAGS+=-DMV_CPU_BE
else
EXTRA_CFLAGS+=-DMV_CPU_LE
endif

EXTRA_CFLAGS+=-DMV_LINUX -DMV_ARM
EXTRA_CFLAGS+= -DUDP_API -DAP_MAC_LINUX \
        -DIEEE80211H -DWPA -DAP_WPA2 -DQOS_FEATURE -DSTA_INFO_DB \
        -DBT_COEXISTENCE -DAVOID_MIS_ACC -DQOS_WSM_FEATURE
EXTRA_CFLAGS+= -DEXPORT_SYMTAB
EXTRA_CFLAGS+= -DRELEASE_11N
EXTRA_CFLAGS+= -DAGG_QUE -DAP8X_STATISTICS
EXTRA_CFLAGS+= -DENABLE_WLSNDEVT
EXTRA_CFLAGS+= -DAP8X_DUMP -DAUTOCHANNEL -DENABLE_WLSYSLOG -DUAPSD_SUPPORT
EXTRA_CFLAGS+= -DAMPDU_SUPPORT 
EXTRA_CFLAGS+= -DMRV_8021X 
EXTRA_CFLAGS+= -DINTEROP -DAMSDU_BYTE_REORDER -DIEEE_HTIE
EXTRA_CFLAGS+= -DWDS_FEATURE
EXTRA_CFLAGS+= -DBRS_SUPPORT
EXTRA_CFLAGS+= -DIEEE80211_DH
#EXTRA_CFLAGS+= -DZERO_COPY
EXTRA_CFLAGS+= -DZERO_COPY_RX
EXTRA_CFLAGS+= -DMFG_SUPPORT
EXTRA_CFLAGS+= -DPWRFRAC
EXTRA_CFLAGS+= -DMRVL_WSC
#EXTRA_CFLAGS+= -DMRVL_WAPI
EXTRA_CFLAGS+= -DMRVL_DFS
#EXTRA_CFLAGS+= -DWMON
#EXTRA_CFLAGS+= -DINTOLERANT40
EXTRA_CFLAGS+= -DIEEE80211N_MIMOPSD110
EXTRA_CFLAGS+= -DCOEXIST_20_40_SUPPORT
EXTRA_CFLAGS+= -DGENERIC_GETIE
EXTRA_CFLAGS+= -DWNC_LED_CTRL

ifeq (16, $(APS))
EXTRA_CFLAGS+= -DMCAST_PS_OFFLOAD_SUPPORT
endif

ifeq (1, $(BUILD_RXPATHOPT))
EXTRA_CFLAGS+= -DRXPATHOPT
endif

EXTRA_CFLAGS+= -DMRVL_WPS2
EXTRA_CFLAGS+= -DEXPLICIT_BF

ifeq (1,$(BUILD_TCP_ACK_ENHANCEMENT))
EXTRA_CFLAGS += -DTCP_ACK_ENHANCEMENT
endif

ifeq (1, $(BUILD_EWB))
EXTRA_CFLAGS+= -DEWB
endif

ifeq (1, $(BUILD_TSO))
EXTRA_CFLAGS+= -DWLAN_INCLUDE_TSO
endif

EXTRA_CFLAGS+= -DMBSS -DCOMMON_PHYDSSS -DMIMO_PS_HT -DNPROTECTION

ifeq (1, $(BUILD_CLIENT))
EXTRA_CFLAGS+= -DCLIENT_SUPPORT -DWPA_STA -DWPA2 -DRSN_RESOLVE -DAMPDU_SUPPORT_TX_CLIENT
endif

EXTRA_CFLAGS+= -DSOC_W8764 -DSOC_W8864

ifeq (1, $(WLDBG))
EXTRA_CFLAGS+= -DWL_DEBUG
endif

ifeq (1, $(NOFWDL))
EXTRA_CFLAGS+= -DNO_FW_DOWNLOAD
endif

ifeq (1, $(MFGFW))
EXTRA_CFLAGS+= -DDEFAULT_MFG_MODE
endif

ifneq (1, $(WLMEM))
EXTRA_CFLAGS+= -DWLMEM_DISABLED
endif

ifeq (1, $(BUILD_MPRXY))
EXTRA_CFLAGS+= -DMPRXY -DMPRXY_SNOOP -DMPRXY_IGMP_QUERY
endif

ifeq (1, $(BULID_CLIENT_ONLY))
EXTRA_CFLAGS+= -DCLIENTONLY -DSINGLE_DEV_INTERFACE
endif

ifeq (, $(APS))
EXTRA_CFLAGS+= -DNUMOFAPS=1
else
EXTRA_CFLAGS+= -DNUMOFAPS=$(APS)
endif

ifeq (1, $(V4FW))
EXTRA_CFLAGS+= -DAMPDU_SUPPORT_SBA
EXTRA_CFLAGS+= -DV4FW
endif

ifeq (1, $(BUILD_WPS_CLIENT))
EXTRA_CFLAGS+= -DMRVL_WPS_CLIENT
endif

ifeq (1, $(BUILD_DFS_PASSIVE_SCAN))
EXTRA_CFLAGS+= -DDFS_PASSIVE_SCAN -DDFS_CHNL_SUPPORT -DFCC_15E_INTERIM_PLAN
endif

EXTRA_CFLAGS+= -DBA_WATCHDOG
EXTRA_CFLAGS+= -DV6FW -DATTN_RSSI -DAMPDU_SUPPORT_SBA

ifeq (1, $(BUILD_DYNAMIC_BA))
EXTRA_CFLAGS+= -DDYNAMIC_BA_SUPPORT
endif

EXTRA_CFLAGS+= -DAMSDUOVERAMPDU

ifeq (1, $(BUILD_WFA_TKIP_NEGATIVE))
EXTRA_CFLAGS+= -DWFA_TKIP_NEGATIVE
endif

ifeq (1, $(BUILD_SC_PALLADIUM))
EXTRA_CFLAGS+= -DSC_PALLADIUM
endif

ifeq (1, $(BUILD_SSU_SUPPORT))
EXTRA_CFLAGS+= -DSSU_SUPPORT
endif

ifeq (1, $(BUILD_QUEUE_STATS_LATENCY))
EXTRA_CFLAGS+= -DQUEUE_STATS_LATENCY -DQUEUE_STATS
endif

ifeq (1, $(BUILD_QUEUE_STATS_CNT_HIST))
EXTRA_CFLAGS+= -DQUEUE_STATS_CNT_HIST
endif

ifeq (0, $(BUILD_QUEUE_STATS_LATENCY))
EXTRA_CFLAGS+= -DQUEUE_STATS
endif

ifeq (1, $(BUILD_CAP_MAX_RATE))
EXTRA_CFLAGS+= -DCAP_MAX_RATE
endif

#all:
    #@echo $(if $(findstring MRVL_WPS2,$(EXTRA_CFLAGS)),MRVL_WPS2 defined,Info: MRVL_WPS2 not defined)
    #$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

#clean:
#    rm -f *.o *.a *.s *.ko *.ko.cmd *.o.cmd *.mod.* .ap8x.* $(ap8x-objs)
#    find . -name .*.o.cmd -exec rm -f {} \;

(Last edited by Chadster766 on 24 Aug 2014, 04:42)

The people that are offered a refund : Have you purchased the router directly from Belkin ?

I would love to get a refund for this thing too , however i did purchase it from a retailer several months ago .

Advertising the product as running openwrt is the same as advertising a product as running OSX. If you pay a premium to buy a product that is advertised to run a particular software... it should run it.

Linksys failing to follow through on their promise was grounds for a return. The manager on duty at Best Buy accepted the return.

Looks like thieving the palladium driver wasn't such a bad idea after all... Now I'm just curious if it actually works on production hardware and whether you can disable regulatory rules on that thing and force running in high amplitude gain wide band mode (even if that's illegal). That would be so awesome.

dfarning wrote:

Advertising the product as running openwrt is the same as advertising a product as running OSX. If you pay a premium to buy a product that is advertised to run a particular software... it should run it.

Linksys failing to follow through on their promise was grounds for a return. The manager on duty at Best Buy accepted the return.

Ok, it's time for me to try and return this WRT1900AC, but I bought it from a private individual so it looks like I'm stuck with a very expensive nonOpenWRT doorstop. Has anyone determined if Belkin will give a refund to smucks like me who believed the marketing hype and bought from a private individual? I've tried calling WRT1900AC Support: (877) 318-7026 and Customer Support  (800) 546-5797 only to be told that all circuits are busy and to call back before being hung up on. Can anyone offer me a smidgen of hope that I can get a refund for this thing?  I'm sorry if this is OT, but I couldn't find a thread related to refunds.

Ephraim Gadsby Jr. wrote:

Can anyone offer me a smidgen of hope that I can get a refund for this thing?

Get it from the manufacturer, claim the seller has gone out of business or get the invoice from the "private individual". Not working as advertised in the state manufactured (say, because they used a part that fits but is lacking), is a manufacturing defect they have to cover by repairing the device or refunding you.

I have opened a new topic so we dont have to pollute this thread with refund questions .

You can find the new thread which is only about getting a refund here :
https://forum.openwrt.org/viewtopic.php … 88#p243588 .

(Last edited by CrimInalA on 12 Aug 2014, 08:10)

dorian wrote:

Looks like thieving the palladium driver wasn't such a bad idea after all... Now I'm just curious if it actually works on production hardware and whether you can disable regulatory rules on that thing and force running in high amplitude gain wide band mode (even if that's illegal). That would be so awesome.

If you are talking about the Marvell wireless driver; AFAIK nothing has been stolen. Otherwise I wouldn't attempt to compile it.

Really these drivers are built using other Open Source modules and should fall under GPL transparency compliance. Not that I know much about GPL protocol.

GPL only requires public release of code changes to GPL code, code created for the purpose of interfacing with GPL code based binaries does not need to be released, unless compiled into the same binary. It goes without saying that not all modified GPL code fits the offending project's quality standards or code style guidelines.
Palladium is a diagnostic chip and circuit design toolkit from Cadence: http://www.cadence.com/products/sd/pall … fault.aspx
From what I can gather from the code, this is a diagnostic driver. Though it is likely an actual open source driver could be built with its code as a reference, I don't think using it as is for production use would be a good idea.
As far as the code being stolen goes, if you obtained it from a public source, it's fair game for you to have it. Legal issues are for the thief to deal with. I wasn't actually serious about that, though.

(Last edited by dorian on 12 Aug 2014, 17:34)

dorian wrote:

GPL only requires public release of code changes to GPL code, code created for the purpose of interfacing with GPL code based binaries does not need to be released, unless compiled into the same binary. It goes without saying that not all modified GPL code fits the offending project's quality standards or code style guidelines.
Palladium is a diagnostic chip and circuit design toolkit from Cadence: http://www.cadence.com/products/sd/pall … fault.aspx
From what I can gather from the code, this is a diagnostic driver. Though it is likely an actual open source driver could be built with its code as a reference, I don't think using it as is for production use would be a good idea.
As far as the code being stolen goes, if you obtained it from a public source, it's fair game for you to have it. Legal issues are for the thief to deal with. I wasn't actually serious about that, though.

Thanks for the GPL summary and clarification of publicly available code smile

This Cadence stuff in new to me. Are you saying the posted source of Marvell wireless driver can't and shouldn't be compile for OpenWRT use?

(Last edited by Chadster766 on 12 Aug 2014, 22:03)

No, it will probably compile and minimal modification would make it work, but it doesn't look like a production driver to me, though it could be that it is. Wi-Fi drivers are full of bugs far and wide and there's no compelling reason for the manufacturer to clean up the code most of the time, if it sort of works and is good enough to use. You don't even want to know about cellphone radio devices, they're even worse...

dorian wrote:

No, it will probably compile and minimal modification would make it work, but it doesn't look like a production driver to me, though it could be that it is. Wi-Fi drivers are full of bugs far and wide and there's no compelling reason for the manufacturer to clean up the code most of the time, if it sort of works and is good enough to use. You don't even want to know about cellphone radio devices, they're even worse...

Thanks big_smile

Just to make sure after reading "official" linksys statement by escalation manager:

We won't get any usable openwrt for this router, right?!

I am running this;
https://github.com/wrt1900ac/opensource … er-Breaker

which is openwrt.....

seems to work ok for me. I just downloaded the openwrt-mvebu-mamba-jffs2-128k.img file and through the default firmware interface uploaded it.

router rebooted and i was in. (new ip though of 192.168.200.1)

Boris2 wrote:
geoffa wrote:

I am running this;
https://github.com/wrt1900ac/opensource … er-Breaker

which is openwrt.....

seems to work ok for me.

Yeah but that's a mutant which is old, not FOSS, and has no packages repository.


I understand that its not F/OSS and i can see how not having a repo could be bad for people that want to run other stuff, but can you expand as to what you mean by mutant?

TheTrooper wrote:

WOULD LOVE TO SEE IT!

TheTrooper, read pages 23+, you will be disappointed.

I'm running the latest firmware and the Linksys keeps loosing settings after reboot. That's a real showstopper cause it takes 20+ minutes to reconfigure/restore backup. And I had it reboot by itself today sad

So what I wanna know is whether openwrt runs or will run with either a closed or open source driver. Cause if openwrt is a no go for the coming 3 months or so I'll demand a refund. It's just bizar that the wrt1900ac is basically the most expensive 1900ac router on the market, but for some reason they manage to f it up at Linksys. I'm absolutely not amused.

SaberOne… the OpenWRT people here are giving up on the WRT1900AC and returning them for refunds. Draw your own conclusion wink

Saber,

I'm running a AA version on my router and it is plenty stable. I tried flashing BB on it and it was definitely not stable. I would try the AA version.

AAv1 works good

(Last edited by gufus on 16 Aug 2014, 03:17)

Are there screenshots of AA or video of it.

Back here after an absence of a few weeks, and just trying to catch up on the latest again.

Am I right in thinking that still nothing has changed and that the driver from Belkin really STILL has not been released?

If you want to do this on your own. The driver can be retrieved from:

Marvell 88W8864 Linux Driver/Firmware Source

https://github.com/TheDgtl/mrvl_wlan_v7drv

You will need to copy the directories "driver" and "core" into a new OpenWRT directory "package/network/wlan-v7/src"

Create this Makefile in "package/network/wlan-v7':

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=wlan-v7
PKG_VERSION:=1.0.0
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(if $(PKG_BRANCH),$(PKG_BRANCH),wlan-v7-trunk)-$(PKG_VERSION)

include $(INCLUDE_DIR)/package.mk

WLAN_V7_FILES:=$(PKG_BUILD_DIR)/ap8x.ko
WLAN_V7_AUTOLOAD:=ap8x


define KernelPackage/wlan-v7
  SUBMENU:=Wireless Drivers
  TITLE:=Test driver for 88W8764 WiFi chipsets
  FILES:=$(WLAN_V7_FILES)
  AUTOLOAD:=$(call AutoLoad,30,WLAN_V7_AUTOLOAD)
endef

define KernelPackage/wlan-v7/description
 This package contains a test driver for Marvell 802.11a/b/g chipsets.
endef

#************************
APS=8

#Set equal to 1 to build with client code, else 0
BUILD_CLIENT=1

#Cap Tx max rate
BUILD_CAP_MAX_RATE=1

ifeq (1, $(BUILD_CLIENT))
#Set equal to 1 in order compile in WPS client code
BUILD_WPS_CLIENT=1
#Set equal to 1 in order to compile DFS channel support and DFS passive scan for channels 52 to 64 and 100 to 140
BUILD_DFS_PASSIVE_SCAN = 1
#Set equal to 1 to include EWB FEATURE
BUILD_EWB=1
endif

#Set equal to 1 in order compile in multicast proxy code
BUILD_MPRXY=1
#Set equal to 1 to include TSO SUPPORT
#Enable TSO by default for L26; L24 does not support TSO
BUILD_TSO=1
#Set equal to 1 to include Dynamic BA Support
BUILD_DYNAMIC_BA=1
#Set equal to 1 to include WFA 11n TKIP Negative tests
BUILD_WFA_TKIP_NEGATIVE = 1
#set equal to 1 to include rx path interrupt reduction
BUILD_RXPATHOPT=0
#set to 1 to enable tcp ack enhancement
BUILD_TCP_ACK_ENHANCEMENT = 1
#Set equal to 1 to include SC2 Palladium simulation development.
PALLADIUM=0
#Set equal to 1 to include spectrum support.
BUILD_SSU_SUPPORT = 0

ifeq (1, $(PALLADIUM))
BUILD_SC_PALLADIUM=1
endif

#Set equal to 1 to enable packet statistics code.P-OBJS)
BUILD_QUEUE_STATS_LATENCY=0
BUILD_QUEUE_STATS_CNT_HIST=1

#Set equal to 1,2, or 3 to enable packet statistics code in compile time.
ifeq (1, $(QUEUE_STATS))
BUILD_QUEUE_STATS_LATENCY=1
endif

ifeq (2, $(QUEUE_STATS))
BUILD_QUEUE_STATS_CNT_HIST=1
endif

ifeq (3, $(QUEUE_STATS))
BUILD_QUEUE_STATS_LATENCY=1
BUILD_QUEUE_STATS_CNT_HIST=1
endif

EXTRA_CFLAGS+= -I${LINUX_DIR}
EXTRA_CFLAGS+= -DWL_KERNEL_26
EXTRA_CFLAGS+= -DUSE_TASKLET
EXTRA_CFLAGS+= -O2 -funroll-loops
EXTRA_CFLAGS+=-I${PKG_BUILD_DIR} -I${PKG_BUILD_DIR} -I${PKG_BUILD_DIR}/driver/linux -I${PKG_BUILD_DIR}/core/api -I${PKG_BUILD_DIR}/core/incl -I${PKG_BUILD_DIR}/core/mgt/STA/incl

ifeq (BE,$(ENDIAN))
EXTRA_CFLAGS+=-DMV_CPU_BE
else
EXTRA_CFLAGS+=-DMV_CPU_LE
endif

EXTRA_CFLAGS+=-DMV_LINUX -DMV_ARM
EXTRA_CFLAGS+= -DUDP_API -DAP_MAC_LINUX \
                -DIEEE80211H -DWPA -DAP_WPA2 -DQOS_FEATURE -DSTA_INFO_DB \
                                -DBT_COEXISTENCE -DAVOID_MIS_ACC -DQOS_WSM_FEATURE
EXTRA_CFLAGS+= -DEXPORT_SYMTAB
EXTRA_CFLAGS+= -DRELEASE_11N
EXTRA_CFLAGS+= -DAGG_QUE -DAP8X_STATISTICS
EXTRA_CFLAGS+= -DENABLE_WLSNDEVT
EXTRA_CFLAGS+= -DAP8X_DUMP -DAUTOCHANNEL -DENABLE_WLSYSLOG -DUAPSD_SUPPORT
EXTRA_CFLAGS+= -DAMPDU_SUPPORT
EXTRA_CFLAGS+= -DMRV_8021X
EXTRA_CFLAGS+= -DINTEROP -DAMSDU_BYTE_REORDER -DIEEE_HTIE
EXTRA_CFLAGS+= -DWDS_FEATURE
EXTRA_CFLAGS+= -DBRS_SUPPORT
EXTRA_CFLAGS+= -DIEEE80211_DH
EXTRA_CFLAGS+= -DZERO_COPY_RX
EXTRA_CFLAGS+= -DMFG_SUPPORT
EXTRA_CFLAGS+= -DPWRFRAC
EXTRA_CFLAGS+= -DMRVL_WSC
EXTRA_CFLAGS+= -DMRVL_DFS
EXTRA_CFLAGS+= -DIEEE80211N_MIMOPSD110
EXTRA_CFLAGS+= -DCOEXIST_20_40_SUPPORT
EXTRA_CFLAGS+= -DGENERIC_GETIE
EXTRA_CFLAGS+= -DWNC_LED_CTRL

ifeq (16, $(APS))
EXTRA_CFLAGS+= -DMCAST_PS_OFFLOAD_SUPPORT
endif

ifeq (16, $(APS))
EXTRA_CFLAGS+= -DMCAST_PS_OFFLOAD_SUPPORT
endif

ifeq (1, $(BUILD_RXPATHOPT))
EXTRA_CFLAGS+= -DRXPATHOPT
endif

EXTRA_CFLAGS+= -DMRVL_WPS2
EXTRA_CFLAGS+= -DEXPLICIT_BF

ifeq (1,$(BUILD_TCP_ACK_ENHANCEMENT))
EXTRA_CFLAGS += -DTCP_ACK_ENHANCEMENT
endif

ifeq (1, $(BUILD_EWB))
EXTRA_CFLAGS+= -DEWB
endif

ifeq (1, $(BUILD_TSO))
EXTRA_CFLAGS+= -DWLAN_INCLUDE_TSO
endif

EXTRA_CFLAGS+= -DMBSS -DCOMMON_PHYDSSS -DMIMO_PS_HT -DNPROTECTION

ifeq (1, $(BUILD_CLIENT))
EXTRA_CFLAGS+= -DCLIENT_SUPPORT -DWPA_STA -DWPA2 -DRSN_RESOLVE -DAMPDU_SUPPORT_TX_CLIENT
endif

EXTRA_CFLAGS+= -DSOC_W8764 -DSOC_W8864

ifeq (1, $(WLDBG))
EXTRA_CFLAGS+= -DWL_DEBUG
endif

ifeq (1, $(NOFWDL))
EXTRA_CFLAGS+= -DNO_FW_DOWNLOAD
endif

ifeq (1, $(MFGFW))
EXTRA_CFLAGS+= -DDEFAULT_MFG_MODE
endif

ifneq (1, $(WLMEM))
EXTRA_CFLAGS+= -DWLMEM_DISABLED
endif

ifeq (1, $(BUILD_MPRXY))
EXTRA_CFLAGS+= -DMPRXY -DMPRXY_SNOOP -DMPRXY_IGMP_QUERY
endif

ifeq (1, $(BULID_CLIENT_ONLY))
EXTRA_CFLAGS+= -DCLIENTONLY -DSINGLE_DEV_INTERFACE
endif

ifeq (, $(APS))
EXTRA_CFLAGS+= -DNUMOFAPS=1
else
EXTRA_CFLAGS+= -DNUMOFAPS=$(APS)
endif

ifeq (1, $(V4FW))
EXTRA_CFLAGS+= -DAMPDU_SUPPORT_SBA
EXTRA_CFLAGS+= -DV4FW
endif

ifeq (1, $(BUILD_WPS_CLIENT))
EXTRA_CFLAGS+= -DMRVL_WPS_CLIENT
endif

ifeq (1, $(BUILD_DFS_PASSIVE_SCAN))
EXTRA_CFLAGS+= -DDFS_PASSIVE_SCAN -DDFS_CHNL_SUPPORT -DFCC_15E_INTERIM_PLAN
endif

EXTRA_CFLAGS+= -DBA_WATCHDOG
EXTRA_CFLAGS+= -DV6FW -DATTN_RSSI -DAMPDU_SUPPORT_SBA

ifeq (1, $(BUILD_DYNAMIC_BA))
EXTRA_CFLAGS+= -DDYNAMIC_BA_SUPPORT
endif

EXTRA_CFLAGS+= -DAMSDUOVERAMPDU

ifeq (1, $(BUILD_WFA_TKIP_NEGATIVE))
EXTRA_CFLAGS+= -DWFA_TKIP_NEGATIVE
endif

ifeq (1, $(BUILD_SC_PALLADIUM))
EXTRA_CFLAGS+= -DSC_PALLADIUM
endif

ifeq (1, $(BUILD_SSU_SUPPORT))
EXTRA_CFLAGS+= -DSSU_SUPPORT
endif

ifeq (1, $(BUILD_QUEUE_STATS_LATENCY))
EXTRA_CFLAGS+= -DQUEUE_STATS_LATENCY -DQUEUE_STATS
endif

ifeq (1, $(BUILD_QUEUE_STATS_CNT_HIST))
EXTRA_CFLAGS+= -DQUEUE_STATS_CNT_HIST
endif

ifeq (0, $(BUILD_QUEUE_STATS_LATENCY))
EXTRA_CFLAGS+= -DQUEUE_STATS
endif

ifeq (1, $(BUILD_CAP_MAX_RATE))
EXTRA_CFLAGS+= -DCAP_MAX_RATE
endif
#************************

MAKE_ARGS:= \
        ARCH="$(LINUX_KARCH)" \
        CROSS_COMPILE="$(TARGET_CROSS)" \
        TOOLPREFIX="$(KERNEL_CROSS)" \
        TOOLPATH="$(KERNEL_CROSS)" \
        KERNELPATH="$(LINUX_DIR)" \
        KDIR="$(LINUX_DIR)" \
        SUBDIRS="$(PKG_BUILD_DIR)" \
        EXTRA_CFLAGS="$(EXTRA_CFLAGS)"

define Build/Prepare
        mkdir -p $(PKG_BUILD_DIR)
        $(CP) ./src/* $(PKG_BUILD_DIR)/
endef

define Build/Compile
        $(MAKE) -C "$(LINUX_DIR)" $(MAKE_ARGS) modules
endef

define KernelPackage/wlan-v7/install
        $(INSTALL_DIR) $(1)/usr/bin
endef

$(eval $(call KernelPackage,wlan-v7))

Create this Makefile in "package/network/wlan-v7/src":

#WRT1900AC Wifi Driver test package

DRIVER-OBJS = ap8x-objs
API-OBJS = ap8x-objs
AP-OBJS = ap8x-objs

$(DRIVER-OBJS)  := \
                driver/linux/ap8xLnxDesc.o      \
                driver/linux/ap8xLnxFwdl.o              \
                driver/linux/ap8xLnxFwcmd.o             \
                driver/linux/ap8xLnxIntf.o              \
                driver/linux/ap8xLnxApi.o               \
                driver/linux/ap8xLnxRecv.o              \
                driver/linux/ap8xLnxXmit.o              \
                driver/linux/ap8xLnxStat.o              \
                driver/linux/ap8xLnxWlLog.o     \
                driver/linux/ap8xLnxDump.o

$(API-OBJS)     += \
                core/api/wlFun.o                \
                core/api/wlApi.o

$(AP-OBJS)      += \
                core/dbg/wldebug.o              \
                core/encr/aes_key_wrap.o \
                core/encr/hmac_md5.o \
                core/encr/prfapi.o \
                core/encr/pbkdf2.o \
                core/encr/md5.o \
                core/encr/sha1.o \
                core/encr/tkip.o \
                core/encr/AP/ccmpAP.o \
                core/encr/AP/keyMgmt.o \
                core/encr/AP/tkipAP.o \
                core/wlsys/bcngen.o \
                core/wlsys/hal_mib.o \
                core/wlsys/hal_sys.o \
                core/wlsys/w81init.o \
                core/mgt/mhsm.o \
                core/mgt/List.o \
                core/mgt/timer.o \
                core/mgt/AP/AssocSrvAp.o \
                core/mgt/AP/AuthSrvAp.o \
                core/mgt/AP/idList.o \
                core/mgt/AP/macmgmtap.o \
                core/mgt/AP/macMgmtEvt.o \
                core/mgt/AP/macMgmtMlme.o \
                core/mgt/AP/mlmeApi.o \
                core/mgt/AP/mlmeAuth.o \
                core/mgt/AP/smeMain.o \
                core/mgt/AP/StaDb.o \
                core/mgt/AP/SyncSrvAp.o \
                core/mgt/AP/util.o \
                core/mgt/AP/wlMlmeSrv.o \
                core/mib/mib.o \
                core/mib/wl_mib.o \
                core/os/os_if.o \
                core/qos/qos.o \
                core/qos/qos_back.o \
                core/qos/AP/qos_dlp.o \
                core/qos/AP/qos_scheduler.o \
                core/wlsys/domain.o \
                core/wlsys/packet.o \
                core/wlsys/fragment.o \
                core/wlsys/autochannel.o \
                core/mgt/AP/dfsSM.o \
                core/mgt/AP/dfsEv.o \
                core/wds/wds.o

ifeq (1, $(BUILD_CLIENT))
$(AP-OBJS)      += \
                core/mgt/STA/AssocSta_sm.o \
                core/mgt/STA/AssocSta_srv.o \
                core/mgt/STA/AuthSta_sm.o \
                core/mgt/STA/AuthSta_srv.o \
                core/mgt/STA/SyncSta_sm.o \
                core/mgt/STA/SyncSta_srv.o \
                core/mgt/STA/macMgmtEvtSta.o \
                core/mgt/STA/smeStateMgrSta.o \
                core/mgt/STA/mlmeApiSta.o \
                core/mgt/STA/wlvmac.o \
                core/mgt/STA/child_srv.o \
                core/mgt/STA/parent_srv.o \
                core/mgt/STA/wlMlmeSrvSta.o \
                core/wlsys/linkmgt.o \
                core/wlsys/ewb_hash.o \
                core/wlsys/ewb_packet.o \
                core/encr/STA/keyMgmtSta.o
endif

obj-m += ap8x.o

clean:
        rm -f *.o *.a *.s *.ko *.ko.cmd *.o.cmd *.mod.* .ap8x.* $(ap8x-objs)
        find . -name .*.o.cmd -exec rm -f {} \;

After that you will have to choose to build this kernel driver in OpenWRT menuconfig

Sorry, posts 676 to 675 are missing from our archive.