mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2025-01-24 10:15:18 +00:00
Uploading new v5.3.4
This commit is contained in:
parent
2d4a79c1b8
commit
d2932f7a54
339
LICENSE
Normal file
339
LICENSE
Normal file
@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
67
Makefile
67
Makefile
@ -1,8 +1,8 @@
|
||||
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
|
||||
EXTRA_CFLAGS += -O1
|
||||
#EXTRA_CFLAGS += -O3
|
||||
#EXTRA_CFLAGS += -Wall
|
||||
#EXTRA_CFLAGS += -Wextra
|
||||
EXTRA_CFLAGS += -Wall
|
||||
EXTRA_CFLAGS += -Wextra
|
||||
#EXTRA_CFLAGS += -Werror
|
||||
#EXTRA_CFLAGS += -pedantic
|
||||
#EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
|
||||
@ -13,11 +13,17 @@ 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-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
|
||||
|
||||
GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc )
|
||||
ifeq ($(GCC_VER_49),1)
|
||||
EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
|
||||
EXTRA_CFLAGS += -Wno-date-time -Wno-error=date-time # Fix compile error && warning on gcc 4.9 and later
|
||||
endif
|
||||
|
||||
EXTRA_CFLAGS += -I$(src)/include
|
||||
@ -29,11 +35,11 @@ CONFIG_AUTOCFG_CP = n
|
||||
########################## WIFI IC ############################
|
||||
CONFIG_MULTIDRV = n
|
||||
CONFIG_RTL8188E = n
|
||||
CONFIG_RTL8812A = n
|
||||
CONFIG_RTL8812A = y
|
||||
CONFIG_RTL8821A = y
|
||||
CONFIG_RTL8192E = n
|
||||
CONFIG_RTL8723B = n
|
||||
CONFIG_RTL8814A = n
|
||||
CONFIG_RTL8814A = y
|
||||
CONFIG_RTL8723C = n
|
||||
CONFIG_RTL8188F = n
|
||||
CONFIG_RTL8822B = n
|
||||
@ -46,11 +52,11 @@ CONFIG_SDIO_HCI = n
|
||||
CONFIG_GSPI_HCI = n
|
||||
########################## Features ###########################
|
||||
CONFIG_MP_INCLUDED = y
|
||||
CONFIG_POWER_SAVING = y
|
||||
CONFIG_POWER_SAVING = n
|
||||
CONFIG_USB_AUTOSUSPEND = n
|
||||
CONFIG_HW_PWRP_DETECTION = n
|
||||
CONFIG_WIFI_TEST = n
|
||||
CONFIG_BT_COEXIST = y
|
||||
CONFIG_BT_COEXIST = n
|
||||
CONFIG_INTEL_WIDI = n
|
||||
CONFIG_WAPI_SUPPORT = n
|
||||
CONFIG_EFUSE_CONFIG_FILE = y
|
||||
@ -67,7 +73,12 @@ CONFIG_80211W = n
|
||||
CONFIG_REDUCE_TX_CPU_LOADING = n
|
||||
CONFIG_BR_EXT = y
|
||||
CONFIG_TDLS = n
|
||||
CONFIG_WIFI_MONITOR = n
|
||||
CONFIG_WIFI_MONITOR = y
|
||||
# If you are setting up AP (e.g. by hostapd) in 802.11ac mode, you may have to choose 'y' below.
|
||||
# Otherwise some channels may be flagged 'NO-IR' (i.e. Passive scanning) by the driver.
|
||||
# Please check your country's regulatory domain first,
|
||||
# to see whether active scanning is permitted by law/regulations on the desired channels.
|
||||
CONFIG_DISABLE_REGD_C=y
|
||||
CONFIG_MCC_MODE = n
|
||||
CONFIG_APPEND_VENDOR_IE_ENABLE = n
|
||||
CONFIG_RTW_NAPI = y
|
||||
@ -77,7 +88,7 @@ CONFIG_RTW_IPCAM_APPLICATION = n
|
||||
CONFIG_RTW_REPEATER_SON = n
|
||||
CONFIG_RTW_WIFI_HAL = y
|
||||
########################## Debug ###########################
|
||||
CONFIG_RTW_DEBUG = y
|
||||
CONFIG_RTW_DEBUG = n
|
||||
# default log level is _DRV_INFO_ = 4,
|
||||
# please refer to "How_to_set_driver_debug_log_level.doc" to set the available level.
|
||||
CONFIG_RTW_LOG_LEVEL = 4
|
||||
@ -93,7 +104,7 @@ CONFIG_AP_WOWLAN = n
|
||||
######### Notify SDIO Host Keep Power During Syspend ##########
|
||||
CONFIG_RTW_SDIO_PM_KEEP_POWER = y
|
||||
###################### MP HW TX MODE FOR VHT #######################
|
||||
CONFIG_MP_VHT_HW_TX_MODE = n
|
||||
CONFIG_MP_VHT_HW_TX_MODE = y
|
||||
###################### Platform Related #######################
|
||||
CONFIG_PLATFORM_I386_PC = y
|
||||
CONFIG_PLATFORM_ANDROID_X86 = n
|
||||
@ -177,6 +188,38 @@ ifeq ($(CONFIG_PCI_HCI), y)
|
||||
HCI_NAME = pci
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
EXTRA_CFLAGS += -DDBG=1 -DCONFIG_RTW_DEBUG -DCONFIG_DBG_COUNTER -DRTW_LOG_LEVEL=5
|
||||
EXTRA_CFLAGS += -DCONFIG_RADIOTAP_WITH_RXDESC
|
||||
else ifeq ($(DEBUG), 2)
|
||||
EXTRA_CFLAGS += -DDBG=1 -DCONFIG_RTW_DEBUG -DCONFIG_DBG_COUNTER -DRTW_LOG_LEVEL=5
|
||||
EXTRA_CFLAGS += -DCONFIG_DEBUG_RTL871X
|
||||
EXTRA_CFLAGS += -DCONFIG_RADIOTAP_WITH_RXDESC
|
||||
else
|
||||
EXTRA_CFLAGS += -DDBG=0
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTL8812A)_$(CONFIG_RTL8821A)_$(CONFIG_RTL8814A), y_y_y)
|
||||
|
||||
EXTRA_CFLAGS += -DDRV_NAME=\"rtl88xxau\"
|
||||
ifeq ($(CONFIG_USB_HCI), y)
|
||||
USER_MODULE_NAME = 88XXau
|
||||
endif
|
||||
ifeq ($(CONFIG_PCI_HCI), y)
|
||||
USER_MODULE_NAME = 88XXae
|
||||
endif
|
||||
ifeq ($(CONFIG_SDIO_HCI), y)
|
||||
USER_MODULE_NAME = 88XXas
|
||||
endif
|
||||
|
||||
else
|
||||
EXTRA_CFLAGS += -DDRV_NAME=\"rtl8812au\"
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(CONFIG_USB2_EXTERNAL_POWER), y)
|
||||
EXTRA_CFLAGS += -DCONFIG_USE_EXTERNAL_POWER
|
||||
endif
|
||||
|
||||
_OS_INTFS_FILES := os_dep/osdep_service.o \
|
||||
os_dep/linux/os_intfs.o \
|
||||
@ -228,6 +271,7 @@ _PLATFORM_FILES := platform/platform_ops.o
|
||||
|
||||
EXTRA_CFLAGS += -I$(src)/hal/btc
|
||||
|
||||
include $(TopDIR)/hal/phydm/phydm.mk
|
||||
########### HAL_RTL8188E #################################
|
||||
ifeq ($(CONFIG_RTL8188E), y)
|
||||
|
||||
@ -2068,5 +2112,6 @@ clean:
|
||||
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
|
||||
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
|
||||
rm -fr .tmp_versions
|
||||
rm -fr .cache.mk
|
||||
endif
|
||||
|
||||
|
113
README.md
Normal file
113
README.md
Normal file
@ -0,0 +1,113 @@
|
||||
## RTL8812AU/21AU and RTL8814AU drivers
|
||||
## with monitor mode and frame injection
|
||||
|
||||
###
|
||||
newest driver 5.4.3 from realtek + patches to add 8814 support
|
||||
|
||||
### DKMS
|
||||
This driver can be installed using [DKMS]. This is a system which will automatically recompile and install a kernel module when a new kernel gets installed or updated. To make use of DKMS, install the `dkms` package, which on Debian (based) systems is done like this:
|
||||
```
|
||||
sudo apt-get install dkms
|
||||
```
|
||||
|
||||
### Installation of Driver
|
||||
In order to install the driver open a terminal in the directory with the source code and execute the following command:
|
||||
```
|
||||
sudo ./dkms-install.sh
|
||||
```
|
||||
|
||||
### Removal of Driver
|
||||
In order to remove the driver from your system open a terminal in the directory with the source code and execute the following command:
|
||||
```
|
||||
sudo ./dkms-remove.sh
|
||||
```
|
||||
|
||||
### Make
|
||||
For building & installing the driver with 'make' use
|
||||
```
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
### Notes
|
||||
Download
|
||||
```
|
||||
git clone -b v5.3.4 https://github.com/aircrack-ng/rtl8812au.git
|
||||
cd rtl*
|
||||
```
|
||||
Package / Build dependencies (Kali)
|
||||
```
|
||||
sudo apt-get install build-essential
|
||||
sudo apt-get install bc
|
||||
sudo apt-get install libelf-dev
|
||||
sudo apt-get install linux-headers-`uname -r`
|
||||
```
|
||||
For Raspberry (RPI)
|
||||
```
|
||||
sudo apt-get install raspberrypi-kernel-headers
|
||||
```
|
||||
For setting monitor mode
|
||||
1. Fix problematic interference in monitor mode.
|
||||
```
|
||||
airmon-ng check kill
|
||||
```
|
||||
You may also uncheck the box "Automatically connect to this network when it is avaiable" in nm-connection-editor. This only works if you have a saved wifi connection.
|
||||
|
||||
2. Set interface down
|
||||
```
|
||||
sudo ip link set wlan0 down
|
||||
```
|
||||
3. Set monitor mode
|
||||
```
|
||||
sudo iw dev wlan0 set type monitor
|
||||
```
|
||||
4. Set interface up
|
||||
```
|
||||
sudo ip link set wlan0 up
|
||||
```
|
||||
For setting TX power
|
||||
```
|
||||
sudo iw wlan0 set txpower fixed 3000
|
||||
```
|
||||
|
||||
### LED control
|
||||
|
||||
#### You can now control LED behaviour statically by Makefile, for example:
|
||||
|
||||
```sh
|
||||
CONFIG_LED_ENABLE = n
|
||||
```
|
||||
value can be y or n
|
||||
|
||||
#### statically by module parameter in /etc/modprobe.d/8812au.conf or wherever, for example:
|
||||
|
||||
```sh
|
||||
options 88XXau rtw_led_enable=0
|
||||
```
|
||||
value can be 0 or 1
|
||||
|
||||
#### or dynamically by writing to /proc/net/rtl8812au/$(your interface name)/led_enable, for example:
|
||||
|
||||
```sh
|
||||
$ echo "0" > /proc/net/rtl8812au/$(your interface name)/led_enable
|
||||
```
|
||||
value can be 0 or 1
|
||||
|
||||
#### check current value:
|
||||
|
||||
```sh
|
||||
$ cat /proc/net/rtl8812au/$(your interface name)/led_enable
|
||||
```
|
||||
|
||||
### NetworkManager
|
||||
|
||||
Newer versions of NetworkManager switches to random MAC address. Some users would prefer to use a fixed address.
|
||||
Simply add these lines below
|
||||
```
|
||||
[device]
|
||||
wifi.scan-rand-mac-address=no
|
||||
```
|
||||
at the end of file /etc/NetworkManager/NetworkManager.conf and restart NetworkManager with the command:
|
||||
```
|
||||
sudo service NetworkManager restart
|
||||
```
|
123
Realtek_Changelog.txt
Normal file
123
Realtek_Changelog.txt
Normal file
@ -0,0 +1,123 @@
|
||||
Product: RTL8812A USB Software Package - Linux Driver
|
||||
Version: v5.2.20.2_28373.20180619
|
||||
|
||||
Release History:
|
||||
|
||||
v5.2.20.2_28373.20180619
|
||||
|
||||
Update phydm to improve TP stability
|
||||
|
||||
v5.2.20.1_27761.20180508
|
||||
|
||||
Support WiFi-HAL for Android 8
|
||||
|
||||
v5.2.20_25672.20171213
|
||||
|
||||
Update PHYDM setting
|
||||
Update FW to v52.10
|
||||
Correct DFS master function
|
||||
Fixed WPA2 vulnerability - key reinstallation attacks(KRACKs)(update)
|
||||
|
||||
v5.2.9.3_24903.20171101
|
||||
|
||||
Fixed WPA2 vulnerability - key reinstallation attacks(KRACKs)
|
||||
|
||||
v5.2.9.2_24491.20171027
|
||||
|
||||
Remove test code
|
||||
Fix crash for BF function
|
||||
Fix wrong memory accesse
|
||||
Fix encrypt broadcast packet fail
|
||||
Fix crash for TDLS
|
||||
|
||||
v5.2.9.1_24461.20171018
|
||||
|
||||
(Do not use)
|
||||
|
||||
v5.2.9_22809.20170621
|
||||
|
||||
Update FW to v52.2
|
||||
Update PHYDM setting
|
||||
Support PNO
|
||||
Fix WOW issue
|
||||
Fix efuse issue
|
||||
Sync channel plan document
|
||||
Fix DFS issue
|
||||
Support NAPI & GRO
|
||||
Enable Power by rate
|
||||
Fix MP power tracking issue
|
||||
Fix potential memory out of range
|
||||
Support CE-RED. 2G: ETSI v2.1.1 / 5G: ETSI v2.1.0
|
||||
|
||||
v5.1.5_19247.20160830
|
||||
|
||||
Update FW to v49
|
||||
Update PHY parameters v57
|
||||
Support TDLS
|
||||
Enable GTK offload under WOW
|
||||
Fix no scan results after resume
|
||||
Fix NDPA issue under scan
|
||||
Fix dynamic watchdog don't work
|
||||
|
||||
v4.3.20_16317.20160108
|
||||
|
||||
Disable CONFIG_WIFI_TEST & CONFIG_WOWLAN in Makefile default
|
||||
|
||||
v4.3.20_16317.20151231
|
||||
|
||||
Fix STBC issue
|
||||
Fix NDPA sounding issue
|
||||
Fix r/w rf register racing issue
|
||||
Fix kernel panic for BT & timer
|
||||
Fix memory leak for cmd thread
|
||||
Fix ADDBA flow
|
||||
Support Power limit
|
||||
Support USB mode switch
|
||||
Support Linux Kernel 4.2
|
||||
Update FW to v41
|
||||
Update PHY parameters to v55
|
||||
|
||||
v4.3.13_14061.20150505
|
||||
|
||||
Update FW
|
||||
Update Phy parameters
|
||||
Support WOWLAN GTK offload
|
||||
Support Adaptivity
|
||||
Support 1T2R
|
||||
Support 8812AU-VN
|
||||
Fix scan timeout issue
|
||||
Fix RFE type error
|
||||
Fix Spur Calibration flow
|
||||
Fix some 802.11 logo issue
|
||||
Fix some crash issues
|
||||
|
||||
v4.3.8_12175.20140912
|
||||
|
||||
Update PHY parameters to improve throughput
|
||||
Update FW
|
||||
Support PMF
|
||||
Support WoWLAN
|
||||
Modify channel plan
|
||||
Fix MP issue
|
||||
|
||||
v4.3.2_11100.20140411
|
||||
|
||||
Fix p2p issues
|
||||
Improve throughput
|
||||
Update FW
|
||||
|
||||
v4.2.3_8123.20130705
|
||||
|
||||
Update PHY parameters to improve throughput
|
||||
|
||||
v4.2.2_7502.20130517
|
||||
|
||||
Support 11AC for STA
|
||||
|
||||
v4.2.0_7054.20130328
|
||||
|
||||
Fix LED behavior
|
||||
|
||||
v4.2.0_6952.20130315
|
||||
|
||||
First release
|
@ -904,8 +904,10 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, struct sitesurvey_parm *pparm)
|
||||
u32 scan_timeout_ms;
|
||||
|
||||
pmlmepriv->scan_start_time = rtw_get_current_time();
|
||||
#if 0 /*fariouche: looking at other wlan drivers, they do not handle timeout. It is conflicting with long scans */
|
||||
scan_timeout_ms = rtw_scan_timeout_decision(padapter);
|
||||
mlme_set_scan_to_timer(pmlmepriv,scan_timeout_ms);
|
||||
#endif
|
||||
|
||||
rtw_led_control(padapter, LED_CTL_SITE_SURVEY);
|
||||
} else
|
||||
|
@ -6071,6 +6071,9 @@ ssize_t proc_set_lck(struct file *file, const char __user *buffer, size_t count,
|
||||
#endif /* CONFIG_DBG_RF_CAL */
|
||||
|
||||
#endif /* CONFIG_PROC_DEBUG */
|
||||
|
||||
#ifdef CONFIG_RTW_DEBUG
|
||||
|
||||
#define RTW_BUFDUMP_BSIZE 16
|
||||
#if 1
|
||||
inline void RTW_BUF_DUMP_SEL(uint _loglevel, void *sel, u8 *_titlestring,
|
||||
@ -6188,3 +6191,10 @@ inline void RTW_BUF_DUMP_SEL(uint _loglevel, void *sel, u8 *_titlestring,
|
||||
}
|
||||
|
||||
#endif
|
||||
#else
|
||||
inline void RTW_BUF_DUMP_SEL(uint _loglevel, void *sel, u8 *_titlestring,
|
||||
bool _idx_show, const u8 *_hexdata, int _hexdatalen)
|
||||
{
|
||||
}
|
||||
#endif //#ifdef CONFIG_RTW_DEBUG
|
||||
|
||||
|
6190
core/rtw_debug.c~
6190
core/rtw_debug.c~
File diff suppressed because it is too large
Load Diff
23
dkms-install.sh
Executable file
23
dkms-install.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "You must run this with superuser priviliges. Try \"sudo ./dkms-install.sh\"" 2>&1
|
||||
exit 1
|
||||
else
|
||||
echo "About to run dkms install steps..."
|
||||
fi
|
||||
|
||||
DRV_DIR=rtl8812au
|
||||
DRV_NAME=rtl8812au
|
||||
DRV_VERSION=5.2.20.2
|
||||
|
||||
cp -r ../${DRV_DIR} /usr/src/${DRV_NAME}-${DRV_VERSION}
|
||||
|
||||
dkms add -m ${DRV_NAME} -v ${DRV_VERSION}
|
||||
dkms build -m ${DRV_NAME} -v ${DRV_VERSION}
|
||||
dkms install -m ${DRV_NAME} -v ${DRV_VERSION}
|
||||
RESULT=$?
|
||||
|
||||
echo "Finished running dkms install steps."
|
||||
|
||||
exit $RESULT
|
24
dkms-remove.sh
Executable file
24
dkms-remove.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "You must run this with superuser priviliges. Try \"sudo ./dkms-remove.sh\"" 2>&1
|
||||
exit 1
|
||||
else
|
||||
echo "About to run dkms removal steps..."
|
||||
fi
|
||||
|
||||
DRV_DIR=rtl8812au
|
||||
DRV_NAME=rtl8812au
|
||||
DRV_VERSION=5.2.20.2
|
||||
|
||||
dkms remove ${DRV_NAME}/${DRV_VERSION} --all
|
||||
rm -rf /usr/src/${DRV_NAME}-${DRV_VERSION}
|
||||
|
||||
RESULT=$?
|
||||
if [[ "$RESULT" != "0" ]]; then
|
||||
echo "Error occurred while running dkms remove." 2>&1
|
||||
else
|
||||
echo "Finished running dkms removal steps."
|
||||
fi
|
||||
|
||||
exit $RESULT
|
10
dkms.conf
Normal file
10
dkms.conf
Normal file
@ -0,0 +1,10 @@
|
||||
PACKAGE_NAME="realtek-rtl88xxau"
|
||||
PACKAGE_VERSION="5.2.20.2~20180812"
|
||||
CLEAN="'make' clean"
|
||||
BUILT_MODULE_NAME[0]=88XXau
|
||||
PROCS_NUM=`nproc`
|
||||
[ $PROCS_NUM -gt 16 ] && PROCS_NUM=16
|
||||
DEST_MODULE_LOCATION[0]="/updates"
|
||||
MAKE="'make' -j$PROCS_NUM KVER=${kernelver} KSRC=/lib/modules/${kernelver}/build"
|
||||
AUTOINSTALL="yes"
|
||||
REMAKE_INITRD=no
|
3431
hal/btc/halbtc8192e1ant.c
Normal file
3431
hal/btc/halbtc8192e1ant.c
Normal file
File diff suppressed because it is too large
Load Diff
240
hal/btc/halbtc8192e1ant.h
Normal file
240
hal/btc/halbtc8192e1ant.h
Normal file
@ -0,0 +1,240 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2016 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
|
||||
|
||||
#if (RTL8192E_SUPPORT == 1)
|
||||
|
||||
/* *******************************************
|
||||
* The following is for 8192E 1ANT BT Co-exist definition
|
||||
* ******************************************* */
|
||||
#define BT_AUTO_REPORT_ONLY_8192E_1ANT 1
|
||||
|
||||
#define BT_INFO_8192E_1ANT_B_FTP BIT(7)
|
||||
#define BT_INFO_8192E_1ANT_B_A2DP BIT(6)
|
||||
#define BT_INFO_8192E_1ANT_B_HID BIT(5)
|
||||
#define BT_INFO_8192E_1ANT_B_SCO_BUSY BIT(4)
|
||||
#define BT_INFO_8192E_1ANT_B_ACL_BUSY BIT(3)
|
||||
#define BT_INFO_8192E_1ANT_B_INQ_PAGE BIT(2)
|
||||
#define BT_INFO_8192E_1ANT_B_SCO_ESCO BIT(1)
|
||||
#define BT_INFO_8192E_1ANT_B_CONNECTION BIT(0)
|
||||
|
||||
#define BT_INFO_8192E_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||
(((_BT_INFO_EXT_&BIT(0))) ? true : false)
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8192E_1ANT 2
|
||||
|
||||
#define BT_8192E_1ANT_WIFI_NOISY_THRESH 30 /* max: 255 */
|
||||
|
||||
enum bt_info_src_8192e_1ant {
|
||||
BT_INFO_SRC_8192E_1ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8192E_1ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8192E_1ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8192E_1ANT_MAX
|
||||
};
|
||||
|
||||
enum bt_8192e_1ant_bt_status {
|
||||
BT_8192E_1ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8192E_1ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8192E_1ANT_BT_STATUS_INQ_PAGE = 0x2,
|
||||
BT_8192E_1ANT_BT_STATUS_ACL_BUSY = 0x3,
|
||||
BT_8192E_1ANT_BT_STATUS_SCO_BUSY = 0x4,
|
||||
BT_8192E_1ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
|
||||
BT_8192E_1ANT_BT_STATUS_MAX
|
||||
};
|
||||
|
||||
enum bt_8192e_1ant_wifi_status {
|
||||
BT_8192E_1ANT_WIFI_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8192E_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN = 0x1,
|
||||
BT_8192E_1ANT_WIFI_STATUS_CONNECTED_SCAN = 0x2,
|
||||
BT_8192E_1ANT_WIFI_STATUS_CONNECTED_SPECIFIC_PKT = 0x3,
|
||||
BT_8192E_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4,
|
||||
BT_8192E_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5,
|
||||
BT_8192E_1ANT_WIFI_STATUS_MAX
|
||||
};
|
||||
|
||||
enum bt_8192e_1ant_coex_algo {
|
||||
BT_8192E_1ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8192E_1ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8192E_1ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8192E_1ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8192E_1ANT_COEX_ALGO_A2DP_PANHS = 0x4,
|
||||
BT_8192E_1ANT_COEX_ALGO_PANEDR = 0x5,
|
||||
BT_8192E_1ANT_COEX_ALGO_PANHS = 0x6,
|
||||
BT_8192E_1ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
|
||||
BT_8192E_1ANT_COEX_ALGO_PANEDR_HID = 0x8,
|
||||
BT_8192E_1ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
|
||||
BT_8192E_1ANT_COEX_ALGO_HID_A2DP = 0xa,
|
||||
BT_8192E_1ANT_COEX_ALGO_MAX = 0xb,
|
||||
};
|
||||
|
||||
struct coex_dm_8192e_1ant {
|
||||
/* fw mechanism */
|
||||
boolean cur_ignore_wlan_act;
|
||||
boolean pre_ignore_wlan_act;
|
||||
u8 pre_ps_tdma;
|
||||
u8 cur_ps_tdma;
|
||||
u8 ps_tdma_para[5];
|
||||
u8 ps_tdma_du_adj_type;
|
||||
boolean auto_tdma_adjust;
|
||||
boolean pre_ps_tdma_on;
|
||||
boolean cur_ps_tdma_on;
|
||||
boolean pre_bt_auto_report;
|
||||
boolean cur_bt_auto_report;
|
||||
u8 pre_lps;
|
||||
u8 cur_lps;
|
||||
u8 pre_rpwm;
|
||||
u8 cur_rpwm;
|
||||
|
||||
/* sw mechanism */
|
||||
boolean pre_low_penalty_ra;
|
||||
boolean cur_low_penalty_ra;
|
||||
u32 pre_val0x6c0;
|
||||
u32 cur_val0x6c0;
|
||||
u32 pre_val0x6c4;
|
||||
u32 cur_val0x6c4;
|
||||
u32 pre_val0x6c8;
|
||||
u32 cur_val0x6c8;
|
||||
u8 pre_val0x6cc;
|
||||
u8 cur_val0x6cc;
|
||||
boolean limited_dig;
|
||||
|
||||
u32 backup_arfr_cnt1; /* Auto Rate Fallback Retry cnt */
|
||||
u32 backup_arfr_cnt2; /* Auto Rate Fallback Retry cnt */
|
||||
u16 backup_retry_limit;
|
||||
u8 backup_ampdu_max_time;
|
||||
|
||||
/* algorithm related */
|
||||
u8 pre_algorithm;
|
||||
u8 cur_algorithm;
|
||||
u8 bt_status;
|
||||
u8 wifi_chnl_info[3];
|
||||
|
||||
u32 pre_ra_mask;
|
||||
u32 cur_ra_mask;
|
||||
u8 pre_arfr_type;
|
||||
u8 cur_arfr_type;
|
||||
u8 pre_retry_limit_type;
|
||||
u8 cur_retry_limit_type;
|
||||
u8 pre_ampdu_time_type;
|
||||
u8 cur_ampdu_time_type;
|
||||
u32 arp_cnt;
|
||||
|
||||
u8 error_condition;
|
||||
};
|
||||
|
||||
struct coex_sta_8192e_1ant {
|
||||
boolean bt_disabled;
|
||||
boolean bt_link_exist;
|
||||
boolean sco_exist;
|
||||
boolean a2dp_exist;
|
||||
boolean hid_exist;
|
||||
boolean pan_exist;
|
||||
|
||||
boolean under_lps;
|
||||
boolean under_ips;
|
||||
u32 specific_pkt_period_cnt;
|
||||
u32 high_priority_tx;
|
||||
u32 high_priority_rx;
|
||||
u32 low_priority_tx;
|
||||
u32 low_priority_rx;
|
||||
s8 bt_rssi;
|
||||
boolean bt_tx_rx_mask;
|
||||
u8 pre_bt_rssi_state;
|
||||
u8 pre_wifi_rssi_state[4];
|
||||
boolean c2h_bt_info_req_sent;
|
||||
u8 bt_info_c2h[BT_INFO_SRC_8192E_1ANT_MAX][10];
|
||||
u32 bt_info_c2h_cnt[BT_INFO_SRC_8192E_1ANT_MAX];
|
||||
boolean c2h_bt_inquiry_page;
|
||||
boolean c2h_bt_page; /* Add for win8.1 page out issue */
|
||||
boolean wifi_is_high_pri_task; /* Add for win8.1 page out issue */
|
||||
u8 bt_retry_cnt;
|
||||
u8 bt_info_ext;
|
||||
u32 pop_event_cnt;
|
||||
u8 scan_ap_num;
|
||||
|
||||
u32 crc_ok_cck;
|
||||
u32 crc_ok_11g;
|
||||
u32 crc_ok_11n;
|
||||
u32 crc_ok_11n_agg;
|
||||
|
||||
u32 crc_err_cck;
|
||||
u32 crc_err_11g;
|
||||
u32 crc_err_11n;
|
||||
u32 crc_err_11n_agg;
|
||||
|
||||
boolean cck_lock;
|
||||
boolean pre_ccklock;
|
||||
u8 coex_table_type;
|
||||
|
||||
boolean force_lps_on;
|
||||
};
|
||||
|
||||
/* *******************************************
|
||||
* The following is interface which will notify coex module.
|
||||
* ******************************************* */
|
||||
void ex_halbtc8192e1ant_power_on_setting(IN struct btc_coexist *btcoexist);
|
||||
void ex_halbtc8192e1ant_pre_load_firmware(IN struct btc_coexist *btcoexist);
|
||||
void ex_halbtc8192e1ant_init_hw_config(IN struct btc_coexist *btcoexist,
|
||||
IN boolean wifi_only);
|
||||
void ex_halbtc8192e1ant_init_coex_dm(IN struct btc_coexist *btcoexist);
|
||||
void ex_halbtc8192e1ant_ips_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8192e1ant_lps_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8192e1ant_scan_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8192e1ant_connect_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8192e1ant_media_status_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8192e1ant_specific_packet_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8192e1ant_bt_info_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 *tmp_buf, IN u8 length);
|
||||
void ex_halbtc8192e1ant_rf_status_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8192e1ant_halt_notify(IN struct btc_coexist *btcoexist);
|
||||
void ex_halbtc8192e1ant_pnp_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 pnp_state);
|
||||
void ex_halbtc8192e1ant_coex_dm_reset(IN struct btc_coexist *btcoexist);
|
||||
void ex_halbtc8192e1ant_periodical(IN struct btc_coexist *btcoexist);
|
||||
void ex_halbtc8192e1ant_display_coex_info(IN struct btc_coexist *btcoexist);
|
||||
void ex_halbtc8192e1ant_dbg_control(IN struct btc_coexist *btcoexist,
|
||||
IN u8 op_code, IN u8 op_len, IN u8 *pdata);
|
||||
|
||||
#else /* #if (RTL8192E_SUPPORT == 1) */
|
||||
#define ex_halbtc8192e1ant_power_on_setting(btcoexist)
|
||||
#define ex_halbtc8192e1ant_pre_load_firmware(btcoexist)
|
||||
#define ex_halbtc8192e1ant_init_hw_config(btcoexist, wifi_only)
|
||||
#define ex_halbtc8192e1ant_init_coex_dm(btcoexist)
|
||||
#define ex_halbtc8192e1ant_ips_notify(btcoexist, type)
|
||||
#define ex_halbtc8192e1ant_lps_notify(btcoexist, type)
|
||||
#define ex_halbtc8192e1ant_scan_notify(btcoexist, type)
|
||||
#define ex_halbtc8192e1ant_connect_notify(btcoexist, type)
|
||||
#define ex_halbtc8192e1ant_media_status_notify(btcoexist, type)
|
||||
#define ex_halbtc8192e1ant_specific_packet_notify(btcoexist, type)
|
||||
#define ex_halbtc8192e1ant_bt_info_notify(btcoexist, tmp_buf, length)
|
||||
#define ex_halbtc8192e1ant_rf_status_notify(btcoexist, type)
|
||||
#define ex_halbtc8192e1ant_halt_notify(btcoexist)
|
||||
#define ex_halbtc8192e1ant_pnp_notify(btcoexist, pnp_state)
|
||||
#define ex_halbtc8192e1ant_coex_dm_reset(btcoexist)
|
||||
#define ex_halbtc8192e1ant_periodical(btcoexist)
|
||||
#define ex_halbtc8192e1ant_display_coex_info(btcoexist)
|
||||
#define ex_halbtc8192e1ant_dbg_control(btcoexist, op_code, op_len, pdata)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
4273
hal/btc/halbtc8192e2ant.c
Normal file
4273
hal/btc/halbtc8192e2ant.c
Normal file
File diff suppressed because it is too large
Load Diff
230
hal/btc/halbtc8192e2ant.h
Normal file
230
hal/btc/halbtc8192e2ant.h
Normal file
@ -0,0 +1,230 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2016 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
|
||||
|
||||
#if (RTL8192E_SUPPORT == 1)
|
||||
/* *******************************************
|
||||
* The following is for 8192E 2Ant BT Co-exist definition
|
||||
* ******************************************* */
|
||||
#define BT_AUTO_REPORT_ONLY_8192E_2ANT 0
|
||||
|
||||
#define BT_INFO_8192E_2ANT_B_FTP BIT(7)
|
||||
#define BT_INFO_8192E_2ANT_B_A2DP BIT(6)
|
||||
#define BT_INFO_8192E_2ANT_B_HID BIT(5)
|
||||
#define BT_INFO_8192E_2ANT_B_SCO_BUSY BIT(4)
|
||||
#define BT_INFO_8192E_2ANT_B_ACL_BUSY BIT(3)
|
||||
#define BT_INFO_8192E_2ANT_B_INQ_PAGE BIT(2)
|
||||
#define BT_INFO_8192E_2ANT_B_SCO_ESCO BIT(1)
|
||||
#define BT_INFO_8192E_2ANT_B_CONNECTION BIT(0)
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8192E_2ANT 2
|
||||
#define NOISY_AP_NUM_THRESH_8192E 10
|
||||
|
||||
enum bt_info_src_8192e_2ant {
|
||||
BT_INFO_SRC_8192E_2ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8192E_2ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8192E_2ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8192E_2ANT_MAX
|
||||
};
|
||||
|
||||
enum bt_8192e_2ant_bt_status {
|
||||
BT_8192E_2ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8192E_2ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8192E_2ANT_BT_STATUS_INQ_PAGE = 0x2,
|
||||
BT_8192E_2ANT_BT_STATUS_ACL_BUSY = 0x3,
|
||||
BT_8192E_2ANT_BT_STATUS_SCO_BUSY = 0x4,
|
||||
BT_8192E_2ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
|
||||
BT_8192E_2ANT_BT_STATUS_MAX
|
||||
};
|
||||
|
||||
enum bt_8192e_2ant_coex_algo {
|
||||
BT_8192E_2ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8192E_2ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8192E_2ANT_COEX_ALGO_SCO_PAN = 0x2,
|
||||
BT_8192E_2ANT_COEX_ALGO_HID = 0x3,
|
||||
BT_8192E_2ANT_COEX_ALGO_A2DP = 0x4,
|
||||
BT_8192E_2ANT_COEX_ALGO_A2DP_PANHS = 0x5,
|
||||
BT_8192E_2ANT_COEX_ALGO_PANEDR = 0x6,
|
||||
BT_8192E_2ANT_COEX_ALGO_PANHS = 0x7,
|
||||
BT_8192E_2ANT_COEX_ALGO_PANEDR_A2DP = 0x8,
|
||||
BT_8192E_2ANT_COEX_ALGO_PANEDR_HID = 0x9,
|
||||
BT_8192E_2ANT_COEX_ALGO_HID_A2DP_PANEDR = 0xa,
|
||||
BT_8192E_2ANT_COEX_ALGO_HID_A2DP = 0xb,
|
||||
BT_8192E_2ANT_COEX_ALGO_MAX = 0xc
|
||||
};
|
||||
|
||||
struct coex_dm_8192e_2ant {
|
||||
/* fw mechanism */
|
||||
u8 pre_bt_dec_pwr_lvl;
|
||||
u8 cur_bt_dec_pwr_lvl;
|
||||
u8 pre_fw_dac_swing_lvl;
|
||||
u8 cur_fw_dac_swing_lvl;
|
||||
boolean cur_ignore_wlan_act;
|
||||
boolean pre_ignore_wlan_act;
|
||||
u8 pre_ps_tdma;
|
||||
u8 cur_ps_tdma;
|
||||
u8 ps_tdma_para[5];
|
||||
u8 ps_tdma_du_adj_type;
|
||||
boolean reset_tdma_adjust;
|
||||
boolean auto_tdma_adjust;
|
||||
boolean auto_tdma_adjust_low_rssi;
|
||||
boolean pre_ps_tdma_on;
|
||||
boolean cur_ps_tdma_on;
|
||||
boolean pre_bt_auto_report;
|
||||
boolean cur_bt_auto_report;
|
||||
|
||||
/* sw mechanism */
|
||||
boolean pre_rf_rx_lpf_shrink;
|
||||
boolean cur_rf_rx_lpf_shrink;
|
||||
u32 bt_rf_0x1e_backup;
|
||||
boolean pre_low_penalty_ra;
|
||||
boolean cur_low_penalty_ra;
|
||||
boolean pre_dac_swing_on;
|
||||
u32 pre_dac_swing_lvl;
|
||||
boolean cur_dac_swing_on;
|
||||
u32 cur_dac_swing_lvl;
|
||||
boolean pre_adc_back_off;
|
||||
boolean cur_adc_back_off;
|
||||
boolean pre_agc_table_en;
|
||||
boolean cur_agc_table_en;
|
||||
u32 pre_val0x6c0;
|
||||
u32 cur_val0x6c0;
|
||||
u32 pre_val0x6c4;
|
||||
u32 cur_val0x6c4;
|
||||
u32 pre_val0x6c8;
|
||||
u32 cur_val0x6c8;
|
||||
u8 pre_val0x6cc;
|
||||
u8 cur_val0x6cc;
|
||||
boolean limited_dig;
|
||||
|
||||
u32 backup_arfr_cnt1; /* Auto Rate Fallback Retry cnt */
|
||||
u32 backup_arfr_cnt2; /* Auto Rate Fallback Retry cnt */
|
||||
u16 backup_retry_limit;
|
||||
u8 backup_ampdu_max_time;
|
||||
|
||||
/* algorithm related */
|
||||
u8 pre_algorithm;
|
||||
u8 cur_algorithm;
|
||||
u8 bt_status;
|
||||
u8 wifi_chnl_info[3];
|
||||
|
||||
u8 pre_ss_type;
|
||||
u8 cur_ss_type;
|
||||
|
||||
u8 pre_lps;
|
||||
u8 cur_lps;
|
||||
u8 pre_rpwm;
|
||||
u8 cur_rpwm;
|
||||
|
||||
|
||||
u32 pre_ra_mask;
|
||||
u32 cur_ra_mask;
|
||||
u8 cur_ra_mask_type;
|
||||
u8 pre_arfr_type;
|
||||
u8 cur_arfr_type;
|
||||
u8 pre_retry_limit_type;
|
||||
u8 cur_retry_limit_type;
|
||||
u8 pre_ampdu_time_type;
|
||||
u8 cur_ampdu_time_type;
|
||||
};
|
||||
|
||||
struct coex_sta_8192e_2ant {
|
||||
boolean bt_disabled;
|
||||
boolean bt_link_exist;
|
||||
boolean sco_exist;
|
||||
boolean a2dp_exist;
|
||||
boolean hid_exist;
|
||||
boolean pan_exist;
|
||||
boolean force_lps_on;
|
||||
|
||||
boolean under_lps;
|
||||
boolean under_ips;
|
||||
u32 high_priority_tx;
|
||||
u32 high_priority_rx;
|
||||
u32 low_priority_tx;
|
||||
u32 low_priority_rx;
|
||||
u8 bt_rssi;
|
||||
u8 pre_bt_rssi_state;
|
||||
u8 pre_wifi_rssi_state[4];
|
||||
boolean c2h_bt_info_req_sent;
|
||||
u8 bt_info_c2h[BT_INFO_SRC_8192E_2ANT_MAX][10];
|
||||
u32 bt_info_c2h_cnt[BT_INFO_SRC_8192E_2ANT_MAX];
|
||||
boolean c2h_bt_inquiry_page;
|
||||
u8 bt_retry_cnt;
|
||||
u8 bt_info_ext;
|
||||
u8 scan_ap_num;
|
||||
u32 bt_coex_supported_version;
|
||||
u32 cnt_setup_link;
|
||||
u32 cnt_wifi_high_pri;
|
||||
boolean is_setup_link;
|
||||
boolean wifi_is_high_pri_task;
|
||||
|
||||
u32 crc_ok_cck;
|
||||
u32 crc_ok_11g;
|
||||
u32 crc_ok_11n;
|
||||
u32 crc_ok_11n_vht;
|
||||
|
||||
u32 crc_err_cck;
|
||||
u32 crc_err_11g;
|
||||
u32 crc_err_11n;
|
||||
u32 crc_err_11n_vht;
|
||||
};
|
||||
|
||||
/* *******************************************
|
||||
* The following is interface which will notify coex module.
|
||||
* ******************************************* */
|
||||
void ex_halbtc8192e2ant_power_on_setting(IN struct btc_coexist *btcoexist);
|
||||
void ex_halbtc8192e2ant_init_hw_config(IN struct btc_coexist *btcoexist,
|
||||
IN boolean wifi_only);
|
||||
void ex_halbtc8192e2ant_init_coex_dm(IN struct btc_coexist *btcoexist);
|
||||
void ex_halbtc8192e2ant_ips_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8192e2ant_lps_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8192e2ant_scan_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8192e2ant_connect_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8192e2ant_media_status_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8192e2ant_specific_packet_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 type);
|
||||
void ex_halbtc8192e2ant_bt_info_notify(IN struct btc_coexist *btcoexist,
|
||||
IN u8 *tmp_buf, IN u8 length);
|
||||
void ex_halbtc8192e2ant_halt_notify(IN struct btc_coexist *btcoexist);
|
||||
void ex_halbtc8192e2ant_periodical(IN struct btc_coexist *btcoexist);
|
||||
void ex_halbtc8192e2ant_display_coex_info(IN struct btc_coexist *btcoexist);
|
||||
|
||||
#else /* #if (RTL8192E_SUPPORT == 1) */
|
||||
#define ex_halbtc8192e2ant_power_on_setting(btcoexist)
|
||||
#define ex_halbtc8192e2ant_init_hw_config(btcoexist, wifi_only)
|
||||
#define ex_halbtc8192e2ant_init_coex_dm(btcoexist)
|
||||
#define ex_halbtc8192e2ant_ips_notify(btcoexist, type)
|
||||
#define ex_halbtc8192e2ant_lps_notify(btcoexist, type)
|
||||
#define ex_halbtc8192e2ant_scan_notify(btcoexist, type)
|
||||
#define ex_halbtc8192e2ant_connect_notify(btcoexist, type)
|
||||
#define ex_halbtc8192e2ant_media_status_notify(btcoexist, type)
|
||||
#define ex_halbtc8192e2ant_specific_packet_notify(btcoexist, type)
|
||||
#define ex_halbtc8192e2ant_bt_info_notify(btcoexist, tmp_buf, length)
|
||||
#define ex_halbtc8192e2ant_halt_notify(btcoexist)
|
||||
#define ex_halbtc8192e2ant_periodical(btcoexist)
|
||||
#define ex_halbtc8192e2ant_display_coex_info(btcoexist)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
4621
hal/btc/halbtc8703b1ant.c
Normal file
4621
hal/btc/halbtc8703b1ant.c
Normal file
File diff suppressed because it is too large
Load Diff
445
hal/btc/halbtc8703b1ant.h
Normal file
445
hal/btc/halbtc8703b1ant.h
Normal file
@ -0,0 +1,445 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2016 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#if (BT_SUPPORT == 1 && COEX_SUPPORT == 1)
|
||||
|
||||
#if (RTL8703B_SUPPORT == 1)
|
||||
/* *******************************************
|
||||
* The following is for 8703B 1ANT BT Co-exist definition
|
||||
* ******************************************* */
|
||||
#define BT_AUTO_REPORT_ONLY_8703B_1ANT 1
|
||||
#define BT_8703B_1ANT_ENABLE_GNTBT_TO_GPIO14 0
|
||||
|
||||
#define BT_INFO_8703B_1ANT_B_FTP BIT(7)
|
||||
#define BT_INFO_8703B_1ANT_B_A2DP BIT(6)
|
||||
#define BT_INFO_8703B_1ANT_B_HID BIT(5)
|
||||
#define BT_INFO_8703B_1ANT_B_SCO_BUSY BIT(4)
|
||||
#define BT_INFO_8703B_1ANT_B_ACL_BUSY BIT(3)
|
||||
#define BT_INFO_8703B_1ANT_B_INQ_PAGE BIT(2)
|
||||
#define BT_INFO_8703B_1ANT_B_SCO_ESCO BIT(1)
|
||||
#define BT_INFO_8703B_1ANT_B_CONNECTION BIT(0)
|
||||
|
||||
#define BT_INFO_8703B_1ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_) \
|
||||
(((_BT_INFO_EXT_&BIT(0))) ? TRUE : FALSE)
|
||||
|
||||
#define BTC_RSSI_COEX_THRESH_TOL_8703B_1ANT 2
|
||||
|
||||
#define BT_8703B_1ANT_WIFI_NOISY_THRESH 50 /* max: 255 */
|
||||
|
||||
/* for Antenna detection */
|
||||
#define BT_8703B_1ANT_ANTDET_PSDTHRES_BACKGROUND 50
|
||||
#define BT_8703B_1ANT_ANTDET_PSDTHRES_2ANT_BADISOLATION 70
|
||||
#define BT_8703B_1ANT_ANTDET_PSDTHRES_2ANT_GOODISOLATION 55
|
||||
#define BT_8703B_1ANT_ANTDET_PSDTHRES_1ANT 35
|
||||
#define BT_8703B_1ANT_ANTDET_RETRY_INTERVAL 10 /* retry timer if ant det is fail, unit: second */
|
||||
#define BT_8703B_1ANT_ANTDET_SWEEPPOINT_DELAY 40000
|
||||
#define BT_8703B_1ANT_ANTDET_ENABLE 0
|
||||
#define BT_8703B_1ANT_ANTDET_COEXMECHANISMSWITCH_ENABLE 0
|
||||
|
||||
#define BT_8703B_1ANT_LTECOEX_INDIRECTREG_ACCESS_TIMEOUT 30000
|
||||
|
||||
enum bt_8703b_1ant_signal_state {
|
||||
BT_8703B_1ANT_SIG_STA_SET_TO_LOW = 0x0,
|
||||
BT_8703B_1ANT_SIG_STA_SET_BY_HW = 0x0,
|
||||
BT_8703B_1ANT_SIG_STA_SET_TO_HIGH = 0x1,
|
||||
BT_8703B_1ANT_SIG_STA_MAX
|
||||
};
|
||||
|
||||
enum bt_8703b_1ant_path_ctrl_owner {
|
||||
BT_8703B_1ANT_PCO_BTSIDE = 0x0,
|
||||
BT_8703B_1ANT_PCO_WLSIDE = 0x1,
|
||||
BT_8703B_1ANT_PCO_MAX
|
||||
};
|
||||
|
||||
enum bt_8703b_1ant_gnt_ctrl_type {
|
||||
BT_8703B_1ANT_GNT_TYPE_CTRL_BY_PTA = 0x0,
|
||||
BT_8703B_1ANT_GNT_TYPE_CTRL_BY_SW = 0x1,
|
||||
BT_8703B_1ANT_GNT_TYPE_MAX
|
||||
};
|
||||
|
||||
enum bt_8703b_1ant_gnt_ctrl_block {
|
||||
BT_8703B_1ANT_GNT_BLOCK_RFC_BB = 0x0,
|
||||
BT_8703B_1ANT_GNT_BLOCK_RFC = 0x1,
|
||||
BT_8703B_1ANT_GNT_BLOCK_BB = 0x2,
|
||||
BT_8703B_1ANT_GNT_BLOCK_MAX
|
||||
};
|
||||
|
||||
enum bt_8703b_1ant_lte_coex_table_type {
|
||||
BT_8703B_1ANT_CTT_WL_VS_LTE = 0x0,
|
||||
BT_8703B_1ANT_CTT_BT_VS_LTE = 0x1,
|
||||
BT_8703B_1ANT_CTT_MAX
|
||||
};
|
||||
|
||||
enum bt_8703b_1ant_lte_break_table_type {
|
||||
BT_8703B_1ANT_LBTT_WL_BREAK_LTE = 0x0,
|
||||
BT_8703B_1ANT_LBTT_BT_BREAK_LTE = 0x1,
|
||||
BT_8703B_1ANT_LBTT_LTE_BREAK_WL = 0x2,
|
||||
BT_8703B_1ANT_LBTT_LTE_BREAK_BT = 0x3,
|
||||
BT_8703B_1ANT_LBTT_MAX
|
||||
};
|
||||
|
||||
enum bt_info_src_8703b_1ant {
|
||||
BT_INFO_SRC_8703B_1ANT_WIFI_FW = 0x0,
|
||||
BT_INFO_SRC_8703B_1ANT_BT_RSP = 0x1,
|
||||
BT_INFO_SRC_8703B_1ANT_BT_ACTIVE_SEND = 0x2,
|
||||
BT_INFO_SRC_8703B_1ANT_MAX
|
||||
};
|
||||
|
||||
enum bt_8703b_1ant_bt_status {
|
||||
BT_8703B_1ANT_BT_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8703B_1ANT_BT_STATUS_CONNECTED_IDLE = 0x1,
|
||||
BT_8703B_1ANT_BT_STATUS_INQ_PAGE = 0x2,
|
||||
BT_8703B_1ANT_BT_STATUS_ACL_BUSY = 0x3,
|
||||
BT_8703B_1ANT_BT_STATUS_SCO_BUSY = 0x4,
|
||||
BT_8703B_1ANT_BT_STATUS_ACL_SCO_BUSY = 0x5,
|
||||
BT_8703B_1ANT_BT_STATUS_MAX
|
||||
};
|
||||
|
||||
enum bt_8703b_1ant_wifi_status {
|
||||
BT_8703B_1ANT_WIFI_STATUS_NON_CONNECTED_IDLE = 0x0,
|
||||
BT_8703B_1ANT_WIFI_STATUS_NON_CONNECTED_ASSO_AUTH_SCAN = 0x1,
|
||||
BT_8703B_1ANT_WIFI_STATUS_CONNECTED_SCAN = 0x2,
|
||||
BT_8703B_1ANT_WIFI_STATUS_CONNECTED_SPECIFIC_PKT = 0x3,
|
||||
BT_8703B_1ANT_WIFI_STATUS_CONNECTED_IDLE = 0x4,
|
||||
BT_8703B_1ANT_WIFI_STATUS_CONNECTED_BUSY = 0x5,
|
||||
BT_8703B_1ANT_WIFI_STATUS_MAX
|
||||
};
|
||||
|
||||
enum bt_8703b_1ant_coex_algo {
|
||||
BT_8703B_1ANT_COEX_ALGO_UNDEFINED = 0x0,
|
||||
BT_8703B_1ANT_COEX_ALGO_SCO = 0x1,
|
||||
BT_8703B_1ANT_COEX_ALGO_HID = 0x2,
|
||||
BT_8703B_1ANT_COEX_ALGO_A2DP = 0x3,
|
||||
BT_8703B_1ANT_COEX_ALGO_A2DP_PANHS = 0x4,
|
||||
BT_8703B_1ANT_COEX_ALGO_PANEDR = 0x5,
|
||||
BT_8703B_1ANT_COEX_ALGO_PANHS = 0x6,
|
||||
BT_8703B_1ANT_COEX_ALGO_PANEDR_A2DP = 0x7,
|
||||
BT_8703B_1ANT_COEX_ALGO_PANEDR_HID = 0x8,
|
||||
BT_8703B_1ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,
|
||||
BT_8703B_1ANT_COEX_ALGO_HID_A2DP = 0xa,
|
||||
BT_8703B_1ANT_COEX_ALGO_MAX = 0xb,
|
||||
};
|
||||
|
||||
enum bt_8703b_1ant_phase {
|
||||
BT_8703B_1ANT_PHASE_COEX_INIT = 0x0,
|
||||
BT_8703B_1ANT_PHASE_WLANONLY_INIT = 0x1,
|
||||
BT_8703B_1ANT_PHASE_WLAN_OFF = 0x2,
|
||||
BT_8703B_1ANT_PHASE_2G_RUNTIME = 0x3,
|
||||
BT_8703B_1ANT_PHASE_5G_RUNTIME = 0x4,
|
||||
BT_8703B_1ANT_PHASE_BTMPMODE = 0x5,
|
||||
BT_8703B_1ANT_PHASE_ANTENNA_DET = 0x6,
|
||||
BT_8703B_1ANT_PHASE_MAX
|
||||
};
|
||||
|
||||
enum bt_8703b_1ant_Scoreboard {
|
||||
BT_8703B_1ANT_SCOREBOARD_ACTIVE = BIT(0),
|
||||
BT_8703B_1ANT_SCOREBOARD_ONOFF = BIT(1),
|
||||
BT_8703B_1ANT_SCOREBOARD_SCAN = BIT(2),
|
||||
BT_8703B_1ANT_SCOREBOARD_UNDERTEST = BIT(3),
|
||||
BT_8703B_1ANT_SCOREBOARD_WLBUSY = BIT(6)
|
||||
};
|
||||
|
||||
|
||||
struct coex_dm_8703b_1ant {
|
||||
/* hw setting */
|
||||
u8 pre_ant_pos_type;
|
||||
u8 cur_ant_pos_type;
|
||||
/* fw mechanism */
|
||||
boolean cur_ignore_wlan_act;
|
||||
boolean pre_ignore_wlan_act;
|
||||
u8 pre_ps_tdma;
|
||||
u8 cur_ps_tdma;
|
||||
u8 ps_tdma_para[5];
|
||||
u8 ps_tdma_du_adj_type;
|
||||
boolean auto_tdma_adjust;
|
||||
boolean pre_ps_tdma_on;
|
||||
boolean cur_ps_tdma_on;
|
||||
boolean pre_bt_auto_report;
|
||||
boolean cur_bt_auto_report;
|
||||
u8 pre_lps;
|
||||
u8 cur_lps;
|
||||
u8 pre_rpwm;
|
||||
u8 cur_rpwm;
|
||||
|
||||
/* sw mechanism */
|
||||
boolean pre_low_penalty_ra;
|
||||
boolean cur_low_penalty_ra;
|
||||
u32 pre_val0x6c0;
|
||||
u32 cur_val0x6c0;
|
||||
u32 pre_val0x6c4;
|
||||
u32 cur_val0x6c4;
|
||||
u32 pre_val0x6c8;
|
||||
u32 cur_val0x6c8;
|
||||
u8 pre_val0x6cc;
|
||||
u8 cur_val0x6cc;
|
||||
boolean limited_dig;
|
||||
|
||||
u32 backup_arfr_cnt1; /* Auto Rate Fallback Retry cnt */
|
||||
u32 backup_arfr_cnt2; /* Auto Rate Fallback Retry cnt */
|
||||
u16 backup_retry_limit;
|
||||
u8 backup_ampdu_max_time;
|
||||
|
||||
/* algorithm related */
|
||||
u8 pre_algorithm;
|
||||
u8 cur_algorithm;
|
||||
u8 bt_status;
|
||||
u8 wifi_chnl_info[3];
|
||||
|
||||
u32 pre_ra_mask;
|
||||
u32 cur_ra_mask;
|
||||
u8 pre_arfr_type;
|
||||
u8 cur_arfr_type;
|
||||
u8 pre_retry_limit_type;
|
||||
u8 cur_retry_limit_type;
|
||||
u8 pre_ampdu_time_type;
|
||||
u8 cur_ampdu_time_type;
|
||||
u32 arp_cnt;
|
||||
|
||||
u8 error_condition;
|
||||
};
|
||||
|
||||
struct coex_sta_8703b_1ant {
|
||||
boolean bt_disabled;
|
||||
boolean bt_link_exist;
|
||||
boolean sco_exist;
|
||||
boolean a2dp_exist;
|
||||
boolean hid_exist;
|
||||
boolean pan_exist;
|
||||
boolean bt_hi_pri_link_exist;
|
||||
u8 num_of_profile;
|
||||
|
||||
boolean under_lps;
|
||||
boolean under_ips;
|
||||
u32 specific_pkt_period_cnt;
|
||||
u32 high_priority_tx;
|
||||
u32 high_priority_rx;
|
||||
u32 low_priority_tx;
|
||||
u32 low_priority_rx;
|
||||
boolean is_hiPri_rx_overhead;
|
||||
s8 bt_rssi;
|
||||
boolean bt_tx_rx_mask;
|
||||
u8 pre_bt_rssi_state;
|
||||
u8 pre_wifi_rssi_state[4];
|
||||
u8 bt_info_c2h[BT_INFO_SRC_8703B_1ANT_MAX][10];
|
||||
u32 bt_info_c2h_cnt[BT_INFO_SRC_8703B_1ANT_MAX];
|
||||
boolean bt_whck_test;
|
||||
boolean c2h_bt_inquiry_page;
|
||||
boolean c2h_bt_remote_name_req;
|
||||
boolean c2h_bt_page; /* Add for win8.1 page out issue */
|
||||
boolean wifi_is_high_pri_task; /* Add for win8.1 page out issue */
|
||||
u8 bt_retry_cnt;
|
||||
u8 bt_info_ext;
|
||||
u8 bt_info_ext2;
|
||||
u32 pop_event_cnt;
|
||||
u8 scan_ap_num;
|
||||
|
||||
u32 crc_ok_cck;
|
||||
u32 crc_ok_11g;
|
||||
u32 crc_ok_11n;
|
||||
u32 crc_ok_11n_vht;
|
||||
|
||||
u32 crc_err_cck;
|
||||
u32 crc_err_11g;
|
||||
u32 crc_err_11n;
|
||||
u32 crc_err_11n_vht;
|
||||
|
||||
boolean cck_lock;
|
||||
boolean cck_lock_ever;
|
||||
boolean cck_lock_warn;
|
||||
|
||||
u8 coex_table_type;
|
||||
boolean force_lps_ctrl;
|
||||
|
||||
boolean concurrent_rx_mode_on;
|
||||
|
||||
u16 score_board;
|
||||
u8 isolation_btween_wb; /* 0~ 50 */
|
||||
|
||||
u8 a2dp_bit_pool;
|
||||
u8 cut_version;
|
||||
boolean acl_busy;
|
||||
boolean bt_create_connection;
|
||||